Preserve JATS tables and refresh legacy XML caches - #83
Conversation
|
Claude finished @cmungall's task in 4m 32s —— View job Review: Preserve JATS tables and refresh legacy XML caches
Overall this is a well-shaped change. The decisions I most agree with: annotating spans on their source cell rather than propagating values (a reconstructed grid would manufacture patient values that aren't in the paper — exactly the failure mode a supporting-text validator must not have), checking A few things I'd want addressed, the first one especially. Note on verification: I could not execute 1. Table footnotes are now dropped entirely (net text loss vs.
|
|
Claude finished @cmungall's task in 3m 45s —— View job Review: Preserve JATS tables and refresh legacy XML caches
Solid piece of work overall. The version stamping is scoped exactly right — only fresh source/provider acquisitions certify, metadata-only round trips preserve missing/old/future stamps, and PDF/HTML entries are untouched. Output is deterministic, escaping is ordered correctly ( Findings below, most significant first. 1.
|
|
Claude finished @cmungall's task in 4m 23s —— View job Review: Preserve JATS tables and refresh legacy XML caches
The three commits have moved this a long way. Things I checked and think are now right:
Remaining findings, most significant first. 1. A
|
4d02f36 to
0be8fb2
Compare
|
Claude finished @cmungall's task in 4m 14s —— View job Review: Preserve JATS tables and refresh legacy XML caches
Reviewing the branch as it stands after the latest push. Most of what the two earlier passes raised is now resolved in the code rather than only in prose: Three things I'd still look at, plus nits. Verification note: 1. A
|
|
Claude finished @cmungall's task in 5m 25s —— View job Review: Preserve JATS tables and refresh legacy XML caches
Reviewing the branch as pushed (2 commits). The two blocking items from the earlier passes are now closed in code, not prose, and I checked each:
Verification note: there is no Remaining findings, most significant first. None are blocking in my view. 1. The stub gate now sees less text, so a short article with a big table can be discarded whole
2. Table discovery still spans
|
Change
JATS tables were missing from cached full text, preventing validation of findings stated only in a table. Append deterministic pipe-delimited rows with labels/captions and footnotes from the whole main article, including floats-only articles. Preserve body prose and source-managed abstracts; prevent duplicated captions/cells and exclude reviewer/reply tables in sub-article/response elements.
Keep the first 200 source rows per table (headers included), with an explicit truncation notice. Annotate spans on their source cells rather than propagate values; these are source rows, not reconstructed grids. Nested tables own their rows and get a generic heading when they have no separate wrapper.
Add
xml_extraction_version: 1for targeted legacy XML refresh, preserving current PDF/HTML and #80 HTML semantics. Only fresh source/provider acquisitions certify XML; metadata rewrites preserve missing, old, and future stamps. Offline legacy XML remains stale with the existing warning.Validation
just test: 963 passed, mypy/ruff passed before final review fixes.just doctest(202 passed) pass. Final commit314bc44f308a115dd3f9825e6c27d73b047c44e4passes Python 3.10–3.13 CI and the automatic review check; the final review confirms prior blocking findings are fixed.Review disposition and limits
Fixed footnote loss, image/empty-table caption loss, hidden comment/PI text, reviewer-response body/table attribution, nested heading reuse, docstring/version guidance, and reduced the fixture to a relevant excerpt. Existing attribution/alternative body paragraphs survive unless already emitted by the table renderer. Strict XML integer stamps deliberately exclude YAML booleans; adjacent HTML semantics remain unchanged.
Bare tables without JATS wrappers, image tables, and alternate table encodings remain outside scope. The cap is per table, not per document. Provider retry/downgrade redesign and shared version-helper refactoring are deferred: existing successful abstract-only refresh can replace older full text, now documented. Spanned cells require consulting the original table to interpret column relationships. Existing superscript/subscript flattening remains documented and tested; numeric exponent interpretation is not redesigned.
Final non-blocking review disposition
Keep the requested prose-only stub check: counting appended table text could hide a restricted placeholder. A short legitimate body containing a stub phrase can still be rejected; changing that heuristic requires a separate fidelity decision. Keep document-wide main-article table discovery (including front/back) as requested, rather than narrowing it to body/floats.
Retain physical table blocks and notes in source order, without inferred associations for sibling tables or nested notes. An over-cap table with empty initial rows can yield only a truncation notice. Additional boolean-stamp tests, document-level limits, helper refactors and minor test/docstring cleanup are deferred hardening; none were identified as blocking in the final review. Existing HTML stamp semantics and provider downgrade behavior remain outside this issue.
Closes #68