Skip to content

fix(desktop): validate team names and instructions like agents - #5969

Open
wolfyy970 wants to merge 3 commits into
block:mainfrom
wolfyy970:fix/team-instruction-text-validation
Open

fix(desktop): validate team names and instructions like agents#5969
wolfyy970 wants to merge 3 commits into
block:mainfrom
wolfyy970:fix/team-instruction-text-validation

Conversation

@wolfyy970

@wolfyy970 wolfyy970 commented Aug 15, 2026

Copy link
Copy Markdown

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.

@wolfyy970
wolfyy970 requested a review from a team as a code owner August 15, 2026 16:31
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@themiguelamador themiguelamador left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found and fixed two missing outbound enforcement points:

  • build_team_event did not apply the new reviewable-text contract. A pre-existing or directly loaded unsafe teams.json record 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.

@wolfyy970
wolfyy970 force-pushed the fix/team-instruction-text-validation branch from e8a6d89 to eaa9037 Compare August 16, 2026 20:18
@wolfyy970

Copy link
Copy Markdown
Author

You're right. Publish and export were still open. Complear/buzz 404'd from here so I put the fail-closed checks on build_team_event and the export builder.

Fixed in eaa9037.

wolfyy970 and others added 3 commits August 18, 2026 09:05
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>
@wolfyy970
wolfyy970 force-pushed the fix/team-instruction-text-validation branch from eaa9037 to 56e725a Compare August 18, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared team instructions bypass executable text validation

2 participants