Skip to content

feat(a2): prove blocking warden enforcement via wrapToolCall (LIA-395)#1032

Open
sliamh11 wants to merge 1 commit into
mainfrom
a2-warden-veto-walking-skeleton
Open

feat(a2): prove blocking warden enforcement via wrapToolCall (LIA-395)#1032
sliamh11 wants to merge 1 commit into
mainfrom
a2-warden-veto-walking-skeleton

Conversation

@sliamh11

Copy link
Copy Markdown
Owner

Summary

  • A2 of the MA kill-switch spike (LIA-394..400): proves LangChain JS's real createMiddleware({wrapToolCall}) contract can enforce the unmodified codex_warden_hooks.py run plan-review-gate script — blocking, allow-once, and model-visible-feedback semantics.
  • All three proven deterministically via FakeToolCallingModel against the real, unmodified gate script (13/13 tests) — no live model credential required, unlike A1's split.
  • Verdict: PASS (framework-mechanism) — full scope and limitations in scripts/spikes/lia395_warden_veto_walking_skeleton.md.
  • Forks fresh off origin/main per the established per-slice convention (A1/PR spike(a1): LangChain createAgent walking skeleton reusing tool-broker.ts (LIA-394) #1031 is still open, so its langchain/@langchain/core/@langchain/anthropic devDeps are re-added here independently — trivial to reconcile on rebase if A1 lands first).

Test plan

  • npx vitest run scripts/spikes/lia395_warden_veto_walking_skeleton.test.ts — 13/13 passing
  • Native code-reviewer: SHIP
  • GPT backend code-reviewer co-gate: SHIP
  • Fresh verification-gate: SHIP (independently re-ran tests, confirmed worktree isolation, confirmed lockfile sync)
  • Human review

🤖 Generated with Claude Code

Proves LangChain's real `createMiddleware({wrapToolCall})` contract can
enforce the unmodified `codex_warden_hooks.py run plan-review-gate` script:
a denied tool call never reaches its handler, an allowed call reaches it
exactly once, and the model sees the gate's actual deny text as a
ToolMessage on its next turn.

All three proven deterministically via FakeToolCallingModel against the
real gate script (13/13 tests) -- no live model credential required,
unlike A1's split. Verdict: PASS (framework-mechanism); see
scripts/spikes/lia395_warden_veto_walking_skeleton.md for full scope.

Forks fresh off origin/main per the established per-slice convention (A1/PR
#1031 is still open, so its langchain devDeps are re-added here
independently -- trivial to reconcile on rebase if A1 lands first).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant