Skip to content

test(agents): fix unauthorized workflow mention fixture - #2457

Closed
kalvinnchau wants to merge 1 commit into
mainfrom
fix/main-js-ci
Closed

kalvinnchau wants to merge 1 commit into
mainfrom
fix/main-js-ci

Conversation

@kalvinnchau

Copy link
Copy Markdown
Contributor

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:

bin/pnpm exec vitest run src/features/agent-harness/kit.test.ts -t "refuses a mention from anyone else, and triggers that are not its"

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

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>
@kalvinnchau
kalvinnchau marked this pull request as ready for review November 4, 2026 18:16
@kalvinnchau
kalvinnchau requested a review from a team as a code owner November 4, 2026 18:16

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 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.

@kalvinnchau kalvinnchau closed this Nov 4, 2026
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.

2 participants