feat(a2): prove blocking warden enforcement via wrapToolCall (LIA-395)#1032
Open
sliamh11 wants to merge 1 commit into
Open
feat(a2): prove blocking warden enforcement via wrapToolCall (LIA-395)#1032sliamh11 wants to merge 1 commit into
sliamh11 wants to merge 1 commit into
Conversation
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>
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
createMiddleware({wrapToolCall})contract can enforce the unmodifiedcodex_warden_hooks.py run plan-review-gatescript — blocking, allow-once, and model-visible-feedback semantics.FakeToolCallingModelagainst the real, unmodified gate script (13/13 tests) — no live model credential required, unlike A1's split.scripts/spikes/lia395_warden_veto_walking_skeleton.md.origin/mainper the established per-slice convention (A1/PR spike(a1): LangChain createAgent walking skeleton reusing tool-broker.ts (LIA-394) #1031 is still open, so itslangchain/@langchain/core/@langchain/anthropicdevDeps 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🤖 Generated with Claude Code