Fix worker status schema inconsistency between --name and --team modes - #1101
Fix worker status schema inconsistency between --name and --team modes#1101RerankerGuo wants to merge 2 commits into
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
8fac0b6 to
a36e1fd
Compare
shiyiyue1102
left a comment
There was a problem hiding this comment.
Thanks for working on this. The current head (a36e1fdb) does not compile: GetWorkerRuntimeStatus calls h.findTeamMember and h.applyTeamMember, but those methods exist only on ResourceHandler, and the added tests use the removed WorkerMemberRef and map-shaped TeamStatus.Members. Please rebase on the current main, implement or reuse team enrichment for LifecycleHandler with the current TeamWorkerRef / []TeamMemberStatus types, and drop the unrelated go.mod change unless it is separately justified.
The regression test should compare both the --name and --team response paths with non-empty personal roomID and TeamRoomID, and verify the intended v1.2 contract: a member’s roomID is the personal communication room, while the shared room is Team.Status.TeamRoomID. Please also cover the remaining schema difference around message, since --team -o json currently returns the list response without runtime-status aggregation.
感谢修复这个问题。当前 HEAD(a36e1fdb)无法编译:GetWorkerRuntimeStatus 调用了 h.findTeamMember 和 h.applyTeamMember,但这些方法只存在于 ResourceHandler;新增测试还使用了已删除的 WorkerMemberRef 和 map 结构的 TeamStatus.Members。请先基于当前 main rebase,使用当前的 TeamWorkerRef / []TeamMemberStatus 为 LifecycleHandler 正确实现或复用 Team 信息补全逻辑;无关的 go.mod 修改如无独立理由也请移除。
回归测试应使用非空的个人 roomID 和 TeamRoomID,直接比较 --name 与 --team 两条响应路径,并锁定 v1.2 的语义:成员 roomID 是个人通信房间,共享房间是 Team.Status.TeamRoomID。另外也请覆盖剩余的 message 字段差异,因为当前 --team -o json 直接返回列表响应,没有聚合 runtime status。
The GetWorkerRuntimeStatus handler was missing team/member enrichment that GetWorker and ListWorkers already provided via applyTeamMember. This caused agt worker status --name X and agt worker status --team Y to return schema-inconsistent JSON for the same worker (missing team, role, roomID, and matrixUserID fields). Fix: apply findTeamMember + applyTeamMember in GetWorkerRuntimeStatus to populate team member context consistently across all worker status endpoints. Closes agentscope-ai#1098
|
Addressed the review feedback and force-pushed a clean rebase onto current Changes:
Verification:
|
a36e1fd to
ad46cd8
Compare
Summary
agt worker status --name Xandagt worker status --team Yreturned schema-inconsistent JSON for the same workerGetWorkerRuntimeStatuswas missing team/member enrichment (team, role, roomID, matrixUserID fields) thatGetWorkerandListWorkersalready providedfindTeamMember+applyTeamMemberinGetWorkerRuntimeStatusto populate team member context consistentlyChanges
agentteams-controller/internal/server/lifecycle_handler.go: Added team member lookup inGetWorkerRuntimeStatusagentteams-controller/internal/server/lifecycle_handler_test.go: Added 2 unit tests (team member info + standalone worker)agentteams-controller/go.mod: Fixed go version format (1.25.0 -> 1.25)changelog/current.md: Added changelog entryTest plan
TestLifecycleWorkerStatusIncludesTeamMemberInfoandTestLifecycleWorkerStatusStandaloneNoTeamInfoCloses #1098