fix(desktop): validate team names and instructions like agents - #5969
fix(desktop): validate team names and instructions like agents#5969wolfyy970 wants to merge 3 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
themiguelamador
left a comment
There was a problem hiding this comment.
Found and fixed two missing outbound enforcement points:
build_team_eventdid not apply the new reviewable-text contract. A pre-existing or directly loaded unsafeteams.jsonrecord could therefore still be signed and queued during startup migration, unlike the existing managed-agent publication path.- Team snapshot export also serialized legacy unsafe team names/instructions without validation; only preview/import rejected them afterward. The export builder now fails closed before assembling member snapshots.
Both fixes validate at their shared builders and include regression coverage for invisible/bidirectional text.
Fix: https://github.com/Complear/buzz/commit/c1e3dc54a
Branch: Complear:review/pr-5969-fix
Verification: canonical just desktop-tauri-test (2,449 passed, 15 ignored, plus all auxiliary workspace tests), just desktop-tauri-clippy, Tauri formatting check, and git diff --check.
e8a6d89 to
eaa9037
Compare
|
You're right. Publish and export were still open. Complear/buzz 404'd from here so I put the fail-closed checks on Fixed in eaa9037. |
Team instructions run at launch but skipped the reviewable-text contract that agent definitions already use, so hidden characters could land through create, update, relay sync, or snapshot import. Fixes block#5734 Signed-off-by: KC <79471844+wolfyy970@users.noreply.github.com>
Create, update, inbound, and import already used the reviewable-text contract. A dirty teams.json could still be signed at startup and written into a snapshot. Fail closed at those two builders. Co-authored-by: Miguel Amador <2944764+themiguelamador@users.noreply.github.com> Signed-off-by: KC <79471844+wolfyy970@users.noreply.github.com>
block#5904 added membership propagation on team create/update/inbound. The rebase onto that must keep those agent-store imports next to the reviewable-text check. Signed-off-by: KC <79471844+wolfyy970@users.noreply.github.com>
eaa9037 to
56e725a
Compare
Summary
Agents already refuse hidden characters in names and instructions. Teams didn't, even though team instructions run at launch.
I put the same check on team create/update, inbound 30176 (before we keep the event), and snapshot preview/confirm. A failed update doesn't write the store.
Related issue
Fixes #5734. Same contract as #4220.
Testing
Unit tests on the validator, the inbound path, and snapshot import. Desktop Tauri suite runs in CI.