Packet S6b: Gate B PASS — Docling lab benchmark run, decision record, and harness fixes - #2154
Conversation
… Docling lab dispatch (packet S6b) Zero-pp non-inferiority margins for parse success and numeric exactness; table-heavy improvement target 0 pp by explicit owner decision (v1 corpus ceiling caveat recorded, fixtures.v2 follow-up to be queued). All five gates pending_owner_run until the owner-approved docling-lab.yml dispatch completes. Validated: docling-lab: Gate B record valid (final mode). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
…-up (packet S6b) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
…ntime requirement is pinned The first docling-lab.yml dispatch (run 32164356999) failed in the docker build stage: the lock generator omitted setuptools from the hashed lock, and torch 2.13.0+cpu declares setuptools>=77.0.3 at runtime. The generator now passes the pip-tools flag that pins such packages into the lock. Only lock change: setuptools==84.0.0 with hashes (via torch); extractor pins unchanged (docling 2.120.2, pymupdf 1.28.0, torch 2.13.0+cpu). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
…ndbox image Retry run 32165911181 got past the hashed install (setuptools fix confirmed) and failed the docling model prefetch: rapidocr imports cv2, and the slim Debian base ships neither libGL.so.1 nor glib. Add libgl1 + libglib2.0-0 to the apt layer; the same import runs again at benchmark time, so this also protects the run phase. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
…er failed document Run 32166445937 completed with all 46 docling documents uniformly 'error' (~37s each, full pipeline durations) while the same runner, models, corpus, tesseract, read-only HOME/models/cwd, and no-network conditions all succeed locally — the cause is locked inside the never-uploaded raw output. The per-doc progress line now appends the runner's recorded exception name and message for non-completed documents, whitespace-collapsed, truncated to 200 chars, with every registered canary token redacted; stream tails and extracted text are never printed. Verified locally: a hostile doc prints '[ConversionError: ...]', clean docs print unchanged lines. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
Run 32171549648's error surface named the real failure: docling's models call torch.compile, whose Inductor backend requires a C++ compiler at runtime (InvalidCxxCompiler), and the sandbox image deliberately ships no toolchain. Every clean conversion failed on it; the hostile contained failures were genuine. Eager mode needs no compiler, is deterministic, and avoids per-process compile overhead. Verified locally: a table_heavy fixture converts under TORCHDYNAMO_DISABLE=1 (2 tables, 84 cells). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
…s markdown export Run 32174653778 was the first valid docling pass (parse 36/36, table F1 parity, hostile clean) but scored numeric exactness -25 to -62.5pp: docling's export_to_markdown HTML-escapes angle brackets, so comparator assertions like '>= 1.4 mmol/L' surface as '>= 1.4 mmol/L' — value intact, encoding different. normalise() now applies html.unescape alongside the existing escaped-pipe handling; exactness compares values, not escaping. Verified locally: numeric-dense-velmarone recovers 8/8 assertions (was 3/8); docling-lab contract tests 20/20. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
…14 (packet S6b) All five gates pass at the pre-agreed 0 pp margins: parse 36/36 both engines, numeric exactness 162/162 both, table F1 parity at ceiling (owner-agreed 0 pp table-heavy target; fixtures.v2 hardness follow-up queued), hostile 10/10 contained with 0 crash artifacts and 0 canary echoes, resources max 12.6 s P95 / 1.40 GiB against 120 s / 6 GiB caps. Record validated: docling-lab: Gate B record valid (final mode). HANDOVER: S6b row added; S7+ B4 cell set to unblocked (design-only). Inbox: B4 build-packet request queued. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:33 minutes Limit details: You’ve used the included review currently available. Your 101 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
Comment |
Uh oh!
There was an error while loading. Please reload this page.
Summary
docs/rag-improvement/gate-b-decision-record-2026-08-18.{md,json}from evidence run 32176604314 (artifactdocling-lab-report-32176604314, commit8a92378). All five gates pass at the owner's pre-agreed 0 pp margins, committed before any dispatch (6d05c07): parse success 36/36 both engines, numeric/unit/comparator exactness 162/162 both engines, table cell F1 parity on both table strata (table-heavy improvement leg met at the owner-agreed 0 pp parity-at-ceiling target), hostile containment 10/10 both engines with 0 crash artifacts and 0 canary echoes, and resources far inside every ceiling (docling max wall P95 12,558 ms vs the 120 s cap; max peak RSS ~1.40 GiB vs the 6 GiB cap).779af80— regenerateeval/docling/requirements.txtwith pip-tools'--allow-unsafeso torch'ssetuptools>=77.0.3runtime requirement is pinned into the hashed lock (run 1 failed the--require-hashesinstall).958a70d— addlibgl1+libglib2.0-0to the sandbox image; docling's rapidocr stage imports cv2 during model prefetch (run 2 failed onlibGL.so.1).c66faf8— per-document progress lines now append a bounded, canary-redacted exception name/message for non-completed documents (run 3 produced a uniform all-error docling pass with the cause locked inside never-uploaded raw output; stream tails and extracted text are still never printed).6c6e80e— run the docling phase withTORCHDYNAMO_DISABLE=1: docling's models calltorch.compile, whose Inductor backend needs a C++ compiler the sandbox image deliberately lacks (run 4's diagnostic namedInvalidCxxCompileron every clean document).8a92378— make assertion scoring escape-neutral (html.unescapeinscore.pynormalise, alongside the existing\|handling): docling's markdown export HTML-escapes comparators (>= 1.4 mmol/Las>= 1.4 mmol/L), which run 5 scored as −25 to −62.5 pp despite the values being intact (verified locally: 8/8 assertions recover on the comparator-richest fixture).docs/rag-improvement/HANDOVER.md: S6b status row added; S7+ row's B4 cell set to unblocked — Gate B PASS (design-only authorisation, caveats carried in the decision record).docling-lab-fixtures.v2table-hardness corpus (P3 — the v1 tables sit at legacy F1 1.0, so the improvement leg had no headroom), and the B4 shadow-mode build packet (P2 — authorised by this pass, with the parity-at-ceiling and eager-mode-latency caveats attached).397f40d.RAG impact: no retrieval behaviour change — benchmark evidence and decision record only
Verification
npm run verify:pr-local— selected plan completed:check:runtime,check:installed-lock-parity,format:changed,sitemap:check,docs:check-index/inventory/scripts/links,check:branch-review-ledger,check:outstanding-issues,check:ledger-write-discipline,lint,typecheckall green. The wrapper'steststep raced this session's own concurrent commit/push (the push guard runs Prettier in a temp worktree); a clean dedicated rerun on the identical tree is green:Test Files 673 passed (673),Tests 7281 passed | 4 skipped (7285), exit 0. The three wrapper steps behind it were then run directly:check:rag:fixtures— "Offline RAG fixture and manifest validation passed (36 golden cases, 26 suites)";check:medication-interactions— index up to date (525 rows);check:medication-lexicon-report— up to date (37 catalogue terms).npm run check:docling-lab— "docling-lab contract passed (36 fixtures, 10 hostile, 6 canaries; Gate B template valid)."node eval/docling/report/build-report.mjs --validate-record docs/rag-improvement/gate-b-decision-record-2026-08-18.json --final— "docling-lab: Gate B record valid (final mode)."verify:releasenot run: not a release/handoff-confidence claim, and it is provider-backed.eval:retrieval:quality/eval:rag/eval:qualitynot run: no retrieval, ranking, selection, chunking, generation, or answer-contract code changed; provider-backed and not authorised for this packet.check:production-readinessnot run: no clinical workflow, privacy, environment, Supabase, source-governance, or deployment behaviour changed — the diff is confined to the isolatedeval/docling/lab and documentation records.Risk and rollout
eval/docling/(dispatch-only lab, never part ofpr-required) anddocs/. The worker, extractors,Dockerfile.worker,worker/python/requirements*, and the database are untouched, per the HANDOVER S6 hard boundary. The scoring change (html.unescape) alters only how the lab compares assertion strings; the leak posture is unchanged (the new log line prints exception name/message only, canary-redacted and truncated — never stream tails or extracted text).git revertany individual commit; each harness fix and the decision-record commit are independent. Reverting the record commits simply withdraws the Gate B verdict; the lab remains isolated by construction.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
WORKER_DOCUMENT_EXTRACTOR_MODE=legacy|shadow) only; theingestion-worker-reviewersubagent reviews that future PR. Two caveats travel with the pass: the table-heavy leg was satisfied at parity-on-ceiling (not a demonstrated gain), and docling ran eager at ~9–19 s/document on 2 CPUs versus legacy's ~1 s.🤖 Generated with Claude Code
https://claude.ai/code/session_01GwXsbJpfsPmUp719Mco2Rq
Generated by Claude Code