From 169e61f7753a645c7fbc8eb77039227fa6bf3990 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sun, 17 May 2026 03:10:02 +0900 Subject: [PATCH] test(audit): allowlist build-team-idle-wake-hint-client.ts in prompt route audit Red: a43215f24 introduced plugin/build-team-idle-wake-hint-client.ts which accesses session.promptAsync for method binding. The audit test flagged it as a raw prompt route offender, breaking CI on dev. Green: Add the narrow client facade to RAW_PROMPT_ALLOWLIST with the same justification pattern used for event.ts and recover-unavailable-tool.ts. The facade binds SDK methods back to the Session instance and performs no direct dispatch itself; all downstream calls flow through the shared prompt-async gate. Verification: bun test src/shared/prompt-async-route-audit.test.ts passes (6 pass, 0 fail, offenders list empty). --- src/shared/prompt-async-route-audit.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/prompt-async-route-audit.test.ts b/src/shared/prompt-async-route-audit.test.ts index 21e7b8d98..19649efe6 100644 --- a/src/shared/prompt-async-route-audit.test.ts +++ b/src/shared/prompt-async-route-audit.test.ts @@ -10,6 +10,10 @@ const RAW_PROMPT_ALLOWLIST = new Map([ path.join(SOURCE_ROOT, "plugin", "event.ts"), "team idle wake hint wires a client facade for downstream gate-routed dispatch", ], + [ + path.join(SOURCE_ROOT, "plugin", "build-team-idle-wake-hint-client.ts"), + "binds SDK Session.promptAsync/.status into a narrow facade consumed only by gate-routed team-idle-wake-hint dispatch; performs no direct dispatch itself", + ], [ path.join(SOURCE_ROOT, "hooks", "session-recovery", "recover-unavailable-tool.ts"), "runtime type guard checks promptAsync presence before gate-routed promptAsyncAfterSessionIdle",