From c82bc104addfda3386a5c05253deddd33854fbdd Mon Sep 17 00:00:00 2001 From: Kalvin Chau Date: Wed, 4 Nov 2026 09:04:35 -0800 Subject: [PATCH] test(agents): align harness fixture with owner authorization use a non-owner signer for rejected workflow-marked input and assert that markers do not revoke direct owner authority. remove the stale blanket-rejection comment. Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz> Signed-off-by: Kalvin Chau --- src/features/agent-harness/kit.test.ts | 8 ++++++++ src/features/agent-harness/kit.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/features/agent-harness/kit.test.ts b/src/features/agent-harness/kit.test.ts index 1b0da28f0c..336dc483bc 100644 --- a/src/features/agent-harness/kit.test.ts +++ b/src/features/agent-harness/kit.test.ts @@ -176,6 +176,7 @@ describe("harnessKit.conversation", () => { await kit.conversation(delivery({ type: "mention", event }), "thread"), ).toBeUndefined(); const workflow = message("3", "@Ampy go", { + pubkey: mallory, tags: [ ["h", channel], ["buzz:workflow", "w"], @@ -187,6 +188,13 @@ describe("harnessKit.conversation", () => { "thread", ), ).toBeUndefined(); + // A marker alone neither grants authority nor revokes the owner's own. + expect( + await kit.conversation( + delivery({ type: "mention", event: { ...workflow, pubkey: alice } }), + "thread", + ), + ).toBeDefined(); expect( await kit.conversation( delivery({ diff --git a/src/features/agent-harness/kit.ts b/src/features/agent-harness/kit.ts index dac6a8b483..9a0dc1db57 100644 --- a/src/features/agent-harness/kit.ts +++ b/src/features/agent-harness/kit.ts @@ -66,7 +66,7 @@ export type HarnessPrompt = Readonly<{ export type HarnessKit = Readonly<{ /** The conversation a mention or a wake goes to. Undefined when the * harness must not act on it: another trigger, a mention that is not the - * owner's own or attested by them (a workflow's never is), no channel, or a + * owner's own or attested by them, no channel, or a * wake with no conversation to go to. */ conversation( delivery: Delivery,