Repository navigation
Merged
Conversation
This was referenced Nov 6, 2026
… corpus of Loom's document shapes Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ations, invented tables and failed parses Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…atches probes on whole words Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… parses out of time and memory, and checks its container mount Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…and can rerun after a refusal Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… of their own that CI tests A missing PEP page, a directory that is no corpus and a container that cannot see it are refused first; a stopped build's directory can be built again, its scratch emptied with the rest. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…nd leaves a refused directory as found Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…nd says why a render failed; its preflight tests are one case each Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…an, from text or bytes, and refuses an --out that is a file Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… read one way Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… its source is tested through it Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…sts model what docker() raises and returns Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…a failure with no stderr ends without a colon Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… its file's error Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…tderr only when there is some Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ed before it is cut Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…o caller sets Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… manual states the reading-order unit Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…wn number Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…like Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…he stream holds it Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…he one way Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…e is its own test Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…line reads as one on its own lines Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ock case Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
9 tasks done
This was referenced Nov 6, 2026
Merged
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
A document-parsing bench (
python -m bench.docparse) scores the reference extractor on a labelled corpus of design docs, specs, runbooks and decks as PDF, DOCX and PPTX: text, reading order, headings, tables, page locators and silent loss.Why
The reference extractor's PDF reader takes the text layer only, and nothing measured what that costs on the documents Loom ingests. A parser change needs a fixed corpus with gold labels and a scorer before it is built, so that a gain is measured and a regression is caught, on a held-out split it was not tuned on.
Scope and risk
Bench code, a committed corpus and docs; no server or extractor change.
bench/docparse/corpus/: 54 files withgold.jsonl, split dev and held-out within each category: browser-printed design docs, office-suite PDF exports, typeset PDFs with no outline, two-column pages, rotated pages, borderless tables, tables over several pages with a repeated header, slide decks and their PDF exports, scanned pages and a whiteboard photo, DOCX and PPTX. Six are public-domain PEPs printed from their HTML; the rest are synthetic. Gold labels are the document specs the files were rendered from (specs.py); each gold item's pages come from the rendered file through poppler, a parser the bench does not score, found in the document's order through one stream of its words (the synthetic text repeats its phrases). An office or deck export and a scan take their source's split, so no held-out text is tuned on.corpus.pyrebuilds the corpus in a tools container (Dockerfile.tools: Chromium, LibreOffice, poppler);run.pyparses each file with the extractor in a child process of its own and writes normalized parses;score.pyscores any parse of that shape, so another parser is compared by writing it.bench.bootstrap.paired_bootstrap).Compatibility, rollout and rollback
Tests
pytest bench/test_docparse.py: every gold file is in the corpus and every category in both splits, and an export or a scan is in its source's; every gold page span is ordered and every PDF and PPTX item has its page; a block cited over every page scores near 0 and invented tables score 0; a failed parse scores 0 and counts as an error in the report; a timed-out parse, a child that dies leaving undecodable bytes, and one whose last line is no JSON object are each that file's error and the run goes on; a container call returns its output, and a failed one names its program, its input file and the end of its stderr (no colon when there is none); a heading is cited whether the parse keeps its number or not; the corpus build refuses a missing PEP page, a directory that is no corpus and a missing parent before making or removing anything, leaves a directory as found when the tools container cannot see it (or there is no docker program), and once it can, empties the directory with what marks it a corpus removed last; a perfect parse scores full marks on every file; a dropped block in a complete parse is a silent loss and is not one when the parse says it is incomplete; a block whose lines are reordered is not lost; a heading matches without its number and levels compare by rank; a table split over pages with its header repeated scores whole and one with its columns swapped scores 0; reading order follows a repeated text to its next occurrence.The current extractor on the whole corpus (
python -m bench.docparse run --out main.jsonl, thenscore main=main.jsonl):A PDF's tables and, without an outline, its headings are not read; scanned pages fail as needing OCR, so they are not silent; a picture on a slide that holds text is lost while the file reads complete. About 0.06 s and 36 MB a file.
AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. I checked the gold labels against rendered pages, the scorer against hand-built parses, and the scorer's fairness on another parser's output (a parser that drops section numbers or reorders a code block's lines is not charged a lost block).
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code