fix(lab): body-plane read semantics for the SECT-INDEX arm

↗ view on GitHub · Eli Ziff · 2026-08-05 · 360836ae

Audit fix wave A2, four defects from the triple audit:

- head/tail sliced the SERVED plane (index included), so the SECT-INDEX ate
  the head budget - a head:120 fetch once returned 10,723 index chars and 0
  body chars. head/tail now slice the body below the index.
- New index=true scoped mode on read_document/fetch_documents returns exactly
  the SECT-INDEX block (orientation-only, no body evidence); the prompt and
  refusal strings now direct orientation there instead of head:200-400.
- Scoped-only enforcement is now address-aware (indexIsAddressable: >=5
  anchored entries AND >=25% anchored), replacing bodyOffset>0 which forced
  scoped reads on documents with 0-7% usable anchors (4 of 5 HSR docs, the
  EMP redline). fetch_documents gates per document instead of refusing the
  whole batch. Probe on 4 real corpora: memos/playbooks/low-anchor redlines
  read free, well-anchored agreements (77-100%) gate.
- already_read refusal is interval-coverage-based (union over the body span),
  replacing the char-count sum that refused a read while a real 1,000-char
  hole stayed unread (EMP doc-2 [38000,39000)).

MARKDOWN_E2E_INDEX_DELTA bumped to derived-section-index-orient-first-v2.
New bodyPlaneReads.test.ts; 50 tests green across the three suites.

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 28741fa6
Stats 4 files changed , +339 , -66
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-360836ae.md from inside the repo you want the change in.

⬇ Download capture-commit-360836ae.md