fix(lab): wire index-arm system prompt at runtime + prompt-sha conformance gate

↗ view on GitHub · Eli Ziff · 2026-08-05 · 28741fa6

The SECT-INDEX arm's entire first wave served the plain upstream prompt:
MARKDOWN_E2E_INDEX_LAB_SYSTEM_PROMPT was only referenced from the
--preflight-only branch, and chat.ts had no STRUCTURE_INDEX_ENABLED prompt
branch (receipt system_prompt_sha256 byte-identical across index/e2e/control
on every task). Wire the prompt into the chat.ts LAB prompt selection, factor
armExpectedSurface()/inventoryPromptFor() out of the preflight, and make the
markdown-arm conformance block assert the receipt's system_prompt_sha256
against sha256(expected prompt + inventory) - a hard throw on any future
prompt miswiring. Sha reproduction verified byte-for-byte against two real
run receipts (EMP control 4d8c68ce, HSR index 2d6b4973 - the latter equal to
the upstream sha, re-confirming the defect).

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 f1150a9d
Stats 2 files changed , +94 , -56
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-28741fa6.md from inside the repo you want the change in.

⬇ Download capture-commit-28741fa6.md