Repository navigation
test(agents): fix unauthorized workflow mention fixture - #2457
kalvinnchau wants to merge 1 commit into
Conversation
use a non-owner signer with workflow attribution claims to exercise rejection under the restored owner authorization policy. Co-authored-by: OpenAI Codex <noreply@openai.com> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.
Verdict: no blockers. Test-only, one fixture, zero production lines.
The diagnosis holds: #2364's fixture was written against #2360's rule that any buzz:workflow tag poisons fromOwner. #2399 removed that rule, so an owner-signed event now passes event.pubkey === owner before tags are considered, and the old assertion became wrong rather than flaky. The replacement (non-owner signer carrying canonical buzz:workflow / -owner / -mention claims) checks the property that still matters: workflow claims from an arbitrary signer grant nothing. It would stay meaningful if the kit later passes a WorkflowCheck, since the signer is not the authority and the event has no proof.
Merge criteria: the pending JavaScript shards go green on b614fe0.
Out of scope, not blocking: kit.ts:224 still calls fromOwner without a WorkflowCheck, so plugin-harness agents ignore delegated workflow mentions that the bundled Claude/Codex/Pi/Goose runtimes accept after #2399. Whether that divergence is intended is a product call, not something for this PR.
Fixes the failing JavaScript shard on main:
harnessKit.conversation > refuses a mention from anyone else, and triggers that are not its.The fixture inherited the agent owner's signer while expecting workflow-tagged messages to be rejected. After #2399 restored workflow authorization, direct owner messages are accepted regardless of those tags. Use an unauthorized signer with canonical workflow ownership/target claims so the test checks that those claims alone do not authorize a mention. Production behavior is unchanged.
Validation: reproduced the exact CI assertion locally before the change; the same targeted test passes afterward (1 passed, 17 skipped). Command:
Self-review found no blockers. No tests added or removed; production diff is zero lines. Pre-commit checks passed. Per the request to run only the failing test locally, the pre-push types/related-test lane is omitted; broad validation is deferred to hosted CI. No browser changes. Human confirmation and independent review remain pending; keep this PR in draft.
Failing main run: https://github.com/block/buzz-app/actions/runs/41881171705