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).
This commit is contained in:
@@ -10,6 +10,10 @@ const RAW_PROMPT_ALLOWLIST = new Map<string, string>([
|
||||
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",
|
||||
|
||||
Reference in New Issue
Block a user