Remove the closed PDF backend study - #783
Merged
Merged
Conversation
verify_parity.py and parity_pyodide.mjs are the one live part of the staffer-delivery study: #751 (lazy pypdfium2 import) names them as its gate, and the in-browser channel is still open in #112. Relocate them as scripts/pyodide_parity.{py,mjs} so they outlive the study directory. - ROOT now resolves from scripts/. - No default node_modules beside the script: it is not gitignored, so --node-dir or DT_PYODIDE_DIR is required and must sit outside the checkout. - The docstring said --mutate exits 1; it exits 0 when the corruption is detected and 1 when it is not. Corrected to match the code. Verified on develop d3935ee with pyodide 314.0.7 / node 22: 3 fixtures x 2 artifacts IDENTICAL, exit 0; --mutate reports MISMATCH on every HTML row, exit 0; no node dir, exit 2. Hashes match the pre-move run. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The PDF backend study is being removed from the tree. Its conclusions that still constrain current decisions move to the records that own them, stated as present-state facts: - ADR 0002: PDFium is the engine for anchoring and chrome handling, not a measured accuracy lead; no backend dominates, and no design for a second-backend seam was selected. - ADR 0003: the Python engine runs under Pyodide with byte-identical XML output (scripts/pyodide_parity.py); the module-scope pypdfium2 import is the one obstacle (#751); PDFium-WASM exposes the per-glyph data the extractor needs. The PDF path has not run end to end in a browser. - ADR 0011: CSP alone cannot give a browser channel zero egress; window.open and WebRTC are outside it, and Speculation Rules needs script-src without 'unsafe-inline'. Each cites CLOSEOUT.md at the #740 merge commit as evidence. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
make_scan_fixture.py lives in the PDF bake-off's probes, which are being removed, but it is the only executable reproduction of #550 (two different scanned PDFs compare as "no changes"). #550 is open and no test owns it, so under the research-retention rule it survives the study. The issue's own comment names it as the reproduction. - REPO resolves from scripts/; the sys.path insert of src/ is dropped, since the engine is installed (ADR 0017). - pypdf came from the probes' own requirements.txt, not the project. Run with `uv run --with pypdf` rather than adding a dependency. Verified on develop d3935ee: both 20-page scans extract 20 lines, guard_declines=False, compare_pdfs -> changes=0, "DEFECT REPRODUCED". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The PDF study closed in #740 as inconclusive, with no architecture recommendation. Under the research-retention rule its materials no longer answer a live question, so they leave the tree: - docs/research/pdf-backend-bakeoff/ (including CLOSEOUT.md, whose conclusions now live in ADRs 0002, 0003 and 0011) - docs/research/staffer-delivery/ - tests/data/p3/, read only by bake-off probes - the bake-off's .gitignore block - the pyproject comment clause about a frozen preservation manifest, which existed only in the bake-off. The extend-exclude itself stays for the remaining studies' probes and write-ups. The two probes still answering open questions moved to scripts/ in the preceding commits. Git history keeps everything; CLOSEOUT.md at 4171e32 is the citable record. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
willhea
added a commit
that referenced
this pull request
Oct 5, 2026
Resolve the .gitignore conflict with #783: each side removed its own study's ignore block, so neither survives. With the PDF bake-off and staffer-delivery Python gone, the bills_corpus comment drops "for research sweeps" and the fixture-layout exemption names the financial-semantics stress tests as what still reads the download tree. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the closed PDF backend study from the tree, under the research-retention rule (AGENTS.md, "Research artifacts are working material"). #740 closed it as inconclusive, with no architecture recommendation. Git history keeps everything;
CLOSEOUT.mdat4171e32dis the citable record.docs/research/pdf-backend-bakeoff/docs/research/staffer-delivery/tests/data/p3/(3 PDFs)confirm_safe_failure.py,x01_contamination.py).gitignorebake-off block328 tracked files deleted.
CLOSEOUT.mdgoes too: once its conclusions have homes, it is a closure document whose only job is recording what was deleted.What survives, and why
Two probes still answer live questions, so they move to
scripts/instead of being deleted:developd3935ee1scripts/pyodide_parity.py+.mjs(wasstaffer-delivery/probes/verify_parity.py,parity_pyodide.mjs)pypdfium2import; in-browser delivery is still open in #112--mutate: every HTML row MISMATCH, exit 0. No node dir: exit 2. Hashes identical before and after the movescripts/make_scan_fixture.py(waspdf-backend-bakeoff/probes/make_scan_fixture.py)DEFECT REPRODUCED: both 20-page scans extract 20 lines,guard_declines=False,changes=0Both are cataloged in
scripts/README.md.make_scan_fixture.pyneedspypdf, which only the probes' ownrequirements.txtprovided. It runs withuv run --with pypdfrather than adding a project dependency, and its catalog row says to delete it once a test owns #550.Fixed in passing:
verify_parity.py's docstring said--mutateexits 1; the code exits 0 when the corruption is detected and 1 when it is not. The harness no longer defaults tonode_modulesbeside itself, since that would land untracked inscripts/.Where the conclusions went
Written as present-state facts into the ADRs that own them (ADRs here are living records), each with one evidence link to
CLOSEOUT.mdat4171e32d:pypdfium2import is its one obstacle (The XML comparison cannot load in a browser because it imports a PDF library it never uses #751); PDFium-WASM exposes the per-glyph data the extractor uses. The PDF path has not run end to end in a browser.window.openand WebRTC are outside CSP; Speculation Rules is closed only whenscript-srcdrops'unsafe-inline'. Closing the rest needs a browser- or device-level control.pyproject.toml'sextend-excludestays, sinceprovision-matching/andpdf-matching-convergence/still have probes and other studies have write-ups. Its comment loses the clause about a frozen preservation manifest, which existed only in the bake-off.Consumer trace
git grepfor both directory names,data/p3, the fixture names, and the probe and module names: only.gitignoreoutside the study, plus the new evidence permalinks.testpaths = ["tests"]),tests/test_research_probes.py(coversprovision-matchingonly), Dependabot config: no references. Thepipbumps topdf-backend-bakeoff/probes(build(deps): bump pypdf from 6.16.1 to 6.19.0 in /docs/research/pdf-backend-bakeoff/probes #745, build(deps): bump pypdf from 6.15.0 to 6.16.1 in /docs/research/pdf-backend-bakeoff/probes #717, build(deps): bump pypdf from 6.14.2 to 6.15.0 in /docs/research/pdf-backend-bakeoff/probes #566) came from the probes'requirements.txt, which this removes.tests/data/recursively;sweep_bill_dirscovers the corpus trees only.Issue text updated for the new paths
Applied with the maintainer's approval, in place (all three are the maintainer's own text):
scripts/pyodide_parity.py --node-dir <dir>; the study README link is a permalink at4171e32d.uv run --with pypdf python scripts/make_scan_fixture.py --out /tmp/scans.RESULTS.mdlink is a permalink at4171e32d.The new
scripts/paths resolve once this merges.Verification
ruff check .andruff format --check .: clean.-m "not slow and not browser", as CI runs it): 2130 passed, 4 skipped, 15 xfailed.tests/test_adr_index.pyandtests/test_docs_consistency.pypass with the ADR edits.🤖 Generated with Claude Code