feat(eval): isolated Docling lab benchmark harness + Gate B decision-record template (packet S6 / B3) - #2057
Conversation
… / B3) Everything lives under eval/docling/ per docs/rag-improvement/README.md §B3: a fully hashed Python 3.11 lockfile (CPU-only torch), a Docker sandbox (egress-blocked --network=none run, non-root, cgroup CPU/memory/pids limits, per-document wall clocks with wait4 peak-RSS measurement, fail-closed output caps), 36 manifest-driven synthetic fixtures across 6 difficulty strata plus a 10-file hostile corpus, and a read-only comparison against the legacy extractor on parse success, resource bounds, table cell precision/recall, exact number/unit/comparator checks, and hostile containment. Reports are aggregate-only by construction: measurements pass through a numeric allowlist, are stamped with the shared six-field report key imported from scripts/rag-adversarial-contract.mjs, and are scanned for canary/real-source leaks before emit (counts printed, never tokens). Ships the Gate B decision-record template (human markdown + machine JSON twin, all gates pending_owner_run, thresholds owner-agreed before any run) — the benchmark verdict itself is a separate owner-reviewed dispatch of the workflow_dispatch-only .github/workflows/docling-lab.yml, never part of pr-required. Hard boundaries respected: worker/**, Dockerfile.worker, src/lib/extractors/document.ts and the database are untouched; the worker's production lock is consumed read-only in the sandbox image. Offline CI coverage: tests/docling-lab-contract.test.ts (20 tests) and npm run check:docling-lab pin the manifest contract, report-key order, aggregate-only allowlist, gate-status discipline and lockfile cross-checks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XX3AXYHiGXiFfL2VGFiEMn
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. |
… record (PR #2057) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XX3AXYHiGXiFfL2VGFiEMn
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:39 minutes Limit details: You’ve used all 1 included review currently available under your plan. You completed 95 included PR reviews in the past 7 days; at that activity level, included reviews refill 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 for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling 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 (26)
Comment |
…5/S6 status-table and scripts-index conflicts) Both sides kept: main's S5 row (PR #2056, corrected to merged 093f934 per the table's update rule) and this branch's S6 row (PR #2057); scripts-index counts regenerated from the merged package.json (246 files / 251 scripts). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XX3AXYHiGXiFfL2VGFiEMn
BigSimmo
commented
Aug 17, 2026
Unit coverage failure on
So the CI failure looks environmental, not a defect in this diff. The most plausible cause is the coverage job's Also worth noting: the earlier Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Implements packet S6 from
docs/rag-improvement/HANDOVER.md: the isolated Docling lab benchmark undereval/docling/perdocs/rag-improvement/README.md§B3. The deliverable is the harness plus a Gate B decision-record template — no benchmark verdict is recorded; that is a separate owner-reviewed dispatch run.eval/docling/with its own fully hashed Python 3.11 lockfile (pip-compile --generate-hashes, 1,720 sha256 hashes, CPU-only torch via the pytorch CPU index) and its own venvs. Nothing underworker/**,Dockerfile.worker,src/lib/extractors/document.ts, or the database is modified — the legacy extractor and the worker's production lock are consumed strictly read-only as the comparator.node:24-bookworm-slimbase; benchmark runs with--network=none(egress block), non-rootlabuser,--cap-drop=ALL, read-only rootfs and repo mount, 2 CPUs / 6 GB memory / 256 pids / 1 GB tmpfs; per-document wall clocks (120 s, hostile 60 s) enforced by process-group SIGKILL with peak RSS measured viaos.wait4; whole-run 3600 s cap; output caps (64 MB per-doc, 512 MB raw, 1 MB report) enforced fail-closed. Docling layout/TableFormer models are prefetched at image build because the run has no network.CANARY-*leak detectors, real-source denylist enforced by validation.harness/score.pywith definitions documented next to the arithmetic.report/build-report.mjsrebuilds measurements through a numeric allowlist, stamps the six-field S4 report key imported fromscripts/rag-adversarial-contract.mjs(never re-declared), scans the serialised report for canary/real-source leaks and fails closed printing counts, never tokens. Extractor identities travel outside the key like S4'spromptVersion.docs/rag-improvement/gate-b-decision-record.md+ machine twineval/docling/report/gate-b-decision-record.template.json(all gatespending_owner_run), mirroringbaseline-record.md's recorded-vs-pending provenance discipline, with pre-agreed thresholds that must be completed before a run is dispatched. Validated by the same module (--validate-record, template and final modes)..github/workflows/docling-lab.ymlisworkflow_dispatchonly,permissions: contents: read,ubuntu-24.04, allowlisted pinned action SHAs, uploads only the aggregate report artifact on success. It is not referenced bypr-requiredor any automatic trigger.tests/docling-lab-contract.test.ts(20 tests, no docling install needed) pins the manifest contract, imported report-key order, the aggregate-only allowlist (a canary planted in polluted measurements must not survive into the report), gate-status discipline, template validity, and lockfile/env cross-checks.npm run check:docling-labis the matching CLI gate.eval/added todocs/codebase-index.md, scripts-index inventory regenerated (+2 npm scripts:generate:docling-lab-lock,check:docling-lab),.gitignoreentry foreval/docling/out/, HANDOVER §2 S6 status row updated in this PR.RAG impact: no retrieval behaviour change — isolated dispatch-only eval lab under
eval/docling/; no runtime, worker, extractor, ranking, or retrieval code is touched, and the benchmark never runs in PR CI.Verification
npm run verify:pr-local— heavy fail-closed plan (unknowneval/**scope + workflow file):completed: check:runtime, check:installed-lock-parity, format:changed, check:npm-ci-dry-run, sitemap:check, docs:check-index, docs:check-inventory, docs:check-scripts, docs:check-links, check:branch-review-ledger, check:outstanding-issues, check:ledger-write-discipline, check:github-actions, check:ci-scope, check:gitleaks-pinned, check:ci-triage, check:pr-policy, check:gate-manifest, check:skills, check:pr-mergeability, check:verification-plan, lint, typecheck, test, build, check:rag:fixtures, check:medication-interactions, check:medication-lexicon-report·failed: (none)·not reached: (none)npm run check:docling-lab—docling-lab contract passed (36 fixtures, 10 hostile, 6 canaries; Gate B template valid).node scripts/run-vitest.mjs run tests/docling-lab-contract.test.ts—Tests 20 passed (20)npm run check:github-actions—GitHub Actions pin check passed.docs link check passed: 1832 repo path references resolve.·docs script-ref check passed: 494 npm-run reference(s) resolve to real scripts.·docs/codebase-index.md coverage OK·Docs inventory current: 245 script files, 250 npm scripts.scanned_ocr0/6 locally only because the smoke venv has no tesseract (the lab image installs it). The report chain (score.py→build-report.mjs) produced a canary-clean aggregate report from that run.UI verification not run: no UI, routing, styling, or browser behaviour is touched — the diff is an isolated eval lab, docs, and a dispatch-only workflow.
Risk and rollout
eval/docling/,tests/, docs, and oneworkflow_dispatch-only workflow; no production, worker, extractor, or retrieval path changes. The workflow cannot fire automatically and uploads only an aggregate, canary-scanned report. The two npm scripts are additive.eval/docling/out/is gitignored run output.Clinical Governance Preflight
Completed because this PR adds evaluation infrastructure adjacent to clinical extraction (it changes no clinical behaviour):
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
.github/workflows/docling-lab.yml; results land as adocling-lab-report-<run id>artifact.docling-lab-fixtures.v2with unruled/merged-cell/rotated-header tables before treating the table-heavy delta as decisive. Details ineval/docling/README.md.no_new_id, pinned dates, fixed seed).🤖 Generated with Claude Code
https://claude.ai/code/session_01XX3AXYHiGXiFfL2VGFiEMn
Generated by Claude Code