fix(lab): native arm audit fixes - edit plane, ask_inputs, gates

↗ view on GitHub · Eli Ziff · 2026-08-05 · b2986cb1

Audit blocker (docs/upstream-native-arm-audit-2026-08-05.md): edit
anchors ran on Beaver's un-coerced parse while reads served the pinned
coerced plane, so a find string copied verbatim from served text failed
(applied=0) wherever upstream succeeds. Fix vendors the pin's own
tracked-edit chain (generator-sliced from git show 2266446b, 31
declarations byte-identical under normalization) into
upstreamNativeDocxRenderer.ts sharing the pinned parser; Beaver's
applyTrackedEdits is untouched for the other arms.

ask_inputs_terminated is now reachable: four blocking throws (two
beyond the audit's list - the askPause guard and the content_reset
isolation term) are exempted for a real native termination, which lands
typed metrics instead of crashing the runner.

Gate hardening: single nativeMaxIterations binding witnessed by both
the receipt and the provider call site; tool_result_max_chars and five
more measured env-derived fields asserted in the isolation predicate.

E1: the three dispatcher-level edit_document validations emit the pin's
bare {error} envelope (no ok key), decided from metadata with the docx
test before the byte load, matching pin order; runEditDocument-stage
failures keep {ok:false,error}. Probe-verified against the pin's own
serialized expressions.

tsc 0 errors; 14-arm preflight identical to pre-build baselines.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011pfUVhNFTRvhYGXBwoKNj6
Repository eliziff/Beaver
Author Eli Ziff <eliasziff@gmail.com>
Authored
Parents 679b14f2
Stats 4 files changed , +990 , -15
Part of Evaluation harness: Beaver-CAN and LegalBench-RAG adapters

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-b2986cb1.md from inside the repo you want the change in.

⬇ Download capture-commit-b2986cb1.md