Three fully-formed "post the AI answer to the platform" helpers exist and none of them is reachable:
apps/github-app/src/lib/github-poster.ts:36 — postAiResponse → postIssueComment / postDiscussionComment, real Octokit calls
apps/slack-bot/src/lib/slack-poster.ts:16 — postAiResponse → client.chat.postMessage
apps/teams-bot/src/lib/teams-poster.ts:26 — postAiResponse → context.sendActivity (the file documents its own unreachability at lines 23-24)
Nothing imports any of them except github-poster.test.ts, so there's no live leak. The real path is the worker's PlatformAdapter, which is gated on shadow mode in packages/outpost/queue/src/handlers/ai-response.ts.
The problem is what happens next time someone needs a direct post. Each of these is one import away from being wired up, and none consults shadow mode, so the caller would silently bypass the gate — and docs/deployment.md:212 currently asks the author to remember by hand. That's the same shape as the bug #233 is fixing: enforcement by convention rather than by the predicate.
Two ways to go, and I lean toward the first:
- Delete them. The
PlatformAdapter path in the worker is the real one, and dead code that looks live is worse than no code.
- Guard them, so a future caller inherits the check:
export async function postAiResponse(target: PostTarget, options: PostResponseOptions): Promise<void> {
if (isShadowMode()) {
console.log(`[GitHub App] Shadow mode — response for ${owner}/${repo} withheld`);
return;
}
...
}
Worth confirming nobody has a branch in flight that intends to use them before deleting. Depends on #233 if we take option 2.
Three fully-formed "post the AI answer to the platform" helpers exist and none of them is reachable:
apps/github-app/src/lib/github-poster.ts:36—postAiResponse→postIssueComment/postDiscussionComment, real Octokit callsapps/slack-bot/src/lib/slack-poster.ts:16—postAiResponse→client.chat.postMessageapps/teams-bot/src/lib/teams-poster.ts:26—postAiResponse→context.sendActivity(the file documents its own unreachability at lines 23-24)Nothing imports any of them except
github-poster.test.ts, so there's no live leak. The real path is the worker'sPlatformAdapter, which is gated on shadow mode inpackages/outpost/queue/src/handlers/ai-response.ts.The problem is what happens next time someone needs a direct post. Each of these is one import away from being wired up, and none consults shadow mode, so the caller would silently bypass the gate — and
docs/deployment.md:212currently asks the author to remember by hand. That's the same shape as the bug #233 is fixing: enforcement by convention rather than by the predicate.Two ways to go, and I lean toward the first:
PlatformAdapterpath in the worker is the real one, and dead code that looks live is worse than no code.Worth confirming nobody has a branch in flight that intends to use them before deleting. Depends on #233 if we take option 2.