Skip to content

Commit 5beafbd

Browse files
committed
test(permissions): assert explicit worker grant ask binding
1 parent 5513d73 commit 5beafbd

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/permission/worker-grant-flow.test.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ describe("worker grant-request flow: deny → parent replay grant → one retry"
186186
expect(store.peek(requestId)?.status).toBe("pending");
187187
});
188188

189-
test("send_input text answers the ask but grants nothing", () => {
189+
test("send_input text answers an unbound ask but grants nothing", () => {
190190
const sessions = createSubAgentSessionStore();
191191
const session = sessions.start({
192192
id: "fleet-1",
@@ -221,9 +221,8 @@ describe("worker grant-request flow: deny → parent replay grant → one retry"
221221
},
222222
}),
223223
).toBe(true);
224-
expect(sessions.peekAsk(session.id)?.deniedCall?.requestId).toBe(
225-
envelope.requestId,
226-
);
224+
// A request ID quoted in prose is not an authority-bearing binding.
225+
expect(sessions.peekAsk(session.id)?.deniedCall).toBeUndefined();
227226

228227
const echo = JSON.stringify({
229228
requestId: envelope.requestId,

0 commit comments

Comments
 (0)