docpluck 2.4.161__tar.gz → 2.4.162__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. {docpluck-2.4.161 → docpluck-2.4.162}/.gitignore +5 -0
  2. {docpluck-2.4.161 → docpluck-2.4.162}/PKG-INFO +3 -3
  3. {docpluck-2.4.161 → docpluck-2.4.162}/README.md +2 -2
  4. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/__init__.py +1 -1
  5. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/extract_structured.py +1 -1
  6. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/normalize.py +21 -3
  7. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/flatten.py +359 -69
  8. {docpluck-2.4.161 → docpluck-2.4.162}/pyproject.toml +1 -1
  9. {docpluck-2.4.161 → docpluck-2.4.162}/LICENSE +0 -0
  10. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/__main__.py +0 -0
  11. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/batch.py +0 -0
  12. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/body.py +0 -0
  13. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/cli.py +0 -0
  14. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/extract.py +0 -0
  15. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/extract_columns.py +0 -0
  16. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/extract_docx.py +0 -0
  17. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/extract_docx_structured.py +0 -0
  18. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/extract_html.py +0 -0
  19. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/extract_layout.py +0 -0
  20. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/figures/__init__.py +0 -0
  21. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/glyph_evidence.py +0 -0
  22. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/glyph_names.py +0 -0
  23. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/quality.py +0 -0
  24. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/references/__init__.py +0 -0
  25. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/references/link.py +0 -0
  26. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/references/parse.py +0 -0
  27. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/references/split.py +0 -0
  28. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/references/types.py +0 -0
  29. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/render.py +0 -0
  30. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/resources.py +0 -0
  31. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/__init__.py +0 -0
  32. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/_offsets.py +0 -0
  33. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/_reference_entries.py +0 -0
  34. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/annotators/__init__.py +0 -0
  35. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/annotators/docx.py +0 -0
  36. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/annotators/html.py +0 -0
  37. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/annotators/pdf.py +0 -0
  38. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/annotators/text.py +0 -0
  39. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/blocks.py +0 -0
  40. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/boundaries.py +0 -0
  41. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/core.py +0 -0
  42. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/taxonomy.py +0 -0
  43. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/sections/types.py +0 -0
  44. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/symbols.py +0 -0
  45. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/__init__.py +0 -0
  46. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/arm_spans.py +0 -0
  47. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/bbox_utils.py +0 -0
  48. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/bottom_extend.py +0 -0
  49. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/camelot_cell_join.py +0 -0
  50. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/camelot_extract.py +0 -0
  51. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/camelot_row_ties.py +0 -0
  52. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/caption_rows.py +0 -0
  53. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/captions.py +0 -0
  54. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/cell_cleaning.py +0 -0
  55. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/cell_geometry.py +0 -0
  56. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/cluster.py +0 -0
  57. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/column_split.py +0 -0
  58. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/detect.py +0 -0
  59. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/docx_tables.py +0 -0
  60. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/dropped_glyphs.py +0 -0
  61. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/notes.py +0 -0
  62. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/render.py +0 -0
  63. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/rotated.py +0 -0
  64. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tables/whitespace.py +0 -0
  65. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/telemetry.py +0 -0
  66. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/tempfiles.py +0 -0
  67. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/testing/__init__.py +0 -0
  68. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/testing/_root.py +0 -0
  69. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/testing/corpus.py +0 -0
  70. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/testing/corpus_manifest.py +0 -0
  71. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/testing/regenerate.py +0 -0
  72. {docpluck-2.4.161 → docpluck-2.4.162}/docpluck/version.py +0 -0
@@ -163,3 +163,8 @@ tests/corpora.local.json
163
163
  # disk, where the project skills read them; they are no longer published.
164
164
  /CLAUDE.md
165
165
  /LESSONS.md
166
+
167
+ # Local secrets (the PyPI upload token for scripts/publish_pypi.py). Never committed.
168
+ .env
169
+ .env.local
170
+ .env.*.local
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: docpluck
3
- Version: 2.4.161
3
+ Version: 2.4.162
4
4
  Summary: PDF, DOCX, and HTML text extraction and normalization for academic papers
5
5
  Project-URL: Homepage, https://docpluck.app
6
6
  Project-URL: Documentation, https://docpluck.app/api-docs
@@ -126,7 +126,7 @@ Requires Python 3.10 or newer.
126
126
  pip install "docpluck[all] @ git+https://github.com/giladfeldman/docpluck.git"
127
127
  ```
128
128
 
129
- To pin a release, append its tag: `...docpluck.git@v2.4.161`. The package is also on PyPI
129
+ To pin a release, append its tag: `...docpluck.git@v2.4.162`. The package is also on PyPI
130
130
  (`pip install docpluck`); the GitHub tags are the release of record and PyPI can trail them,
131
131
  so check `pip index versions docpluck` if you need a specific version from PyPI.
132
132
 
@@ -431,7 +431,7 @@ default to off except `DOCPLUCK_COLUMN_CORRECT_GENERAL`, which is on unless set
431
431
  If you use docpluck in research, cite the version you used (from `get_version_info()`):
432
432
 
433
433
  > Feldman, G. (2026). *docpluck: Text and statistic extraction from academic papers*
434
- > (Version 2.4.161) [Computer software]. https://github.com/giladfeldman/docpluck
434
+ > (Version 2.4.162) [Computer software]. https://github.com/giladfeldman/docpluck
435
435
 
436
436
  Machine-readable metadata is in [CITATION.cff](CITATION.cff); GitHub's "Cite this repository"
437
437
  button reads it.
@@ -75,7 +75,7 @@ Requires Python 3.10 or newer.
75
75
  pip install "docpluck[all] @ git+https://github.com/giladfeldman/docpluck.git"
76
76
  ```
77
77
 
78
- To pin a release, append its tag: `...docpluck.git@v2.4.161`. The package is also on PyPI
78
+ To pin a release, append its tag: `...docpluck.git@v2.4.162`. The package is also on PyPI
79
79
  (`pip install docpluck`); the GitHub tags are the release of record and PyPI can trail them,
80
80
  so check `pip index versions docpluck` if you need a specific version from PyPI.
81
81
 
@@ -380,7 +380,7 @@ default to off except `DOCPLUCK_COLUMN_CORRECT_GENERAL`, which is on unless set
380
380
  If you use docpluck in research, cite the version you used (from `get_version_info()`):
381
381
 
382
382
  > Feldman, G. (2026). *docpluck: Text and statistic extraction from academic papers*
383
- > (Version 2.4.161) [Computer software]. https://github.com/giladfeldman/docpluck
383
+ > (Version 2.4.162) [Computer software]. https://github.com/giladfeldman/docpluck
384
384
 
385
385
  Machine-readable metadata is in [CITATION.cff](CITATION.cff); GitHub's "Cite this repository"
386
386
  button reads it.
@@ -115,7 +115,7 @@ from .references import (
115
115
  parse_references,
116
116
  )
117
117
 
118
- __version__ = "2.4.161"
118
+ __version__ = "2.4.162"
119
119
  __author__ = "Gilad Feldman"
120
120
  __license__ = "MIT"
121
121
 
@@ -74,7 +74,7 @@ from .telemetry import fallback_scope, record_fallback
74
74
  # `_pick_better_table`, shipped. Both of those defects are OPEN, pinned by the xfail in
75
75
  # tests/test_r1_whitespace_cells_wiring_real_pdf.py. The claim below read as current for 16
76
76
  # days and a mandatory gate was built on it, so it is corrected here and kept there.
77
- TABLE_EXTRACTION_VERSION = "2.4.32" # v2.4.32 (2026-11-16, v2.4.161): a later column binding the same field wins whole (unparsed reason field_bound_by_later_column); a cell printing two stacked results is not bound; a grid copied from a neighbouring table is removed and the table keeps its own text; a repeated sign row is dropped; bracket intervals are read inside their wrapper; Cohen's h/w/f/kappa, Hedges, r-squared, generalized eta and log OR are not typed as d; typed_without_header; ASCII minus in every table field; captions printed under tables. Previous: v2.4.31 (2026-11-13, v2.4.160): copy-protected PDFs with an empty user password reach Camelot decrypted; the running-text check folds ligatures (NFKC) on both channels; new keys unmapped_glyph_fonts (result), unparsed and fields["est_kind"] (flattened rows); a caption no longer types a column from a capital D or the word "or". Previous: v2.4.30 (2026-11-11, v2.4.159): tied captions pair by position (nearest caption above the grid); a grid holding under 25% of its printed table (under its caption) is set aside for the full text; a side-by-side column body stops at the table note or a numbered section heading; a minus sign printed on the line above a value joins it; raised footnote letters in cells become ^a; a page printing "Table N (continued)" labels its topmost grid; a descending printed CI passes through with fields["CI_order"]="descending". Previous: v2.4.29 (2026-11-01, v2.4.158): a page-furniture rule must also recur on a caption-free page (a table series keeps its own closing rule). Previous: v2.4.28 (2026-10-31, v2.4.157): caption-only regions take their rule extent; side-by-side lines in one cell keep page order; overflowing row labels return to the stub; stacked header labels fold; word-table wraps join on cell evidence. Previous: v2.4.27 (2026-10-29, v2.4.156): fields_raw on every record; typed descriptive cells (M (SD), b (SE), n (%), est [CI]) with fields["group"]; M=/SD= rows and x-led label wraps are data; caption lines leave the grid; recurring section lines and label-only rows over data stay body rows; nested spanning headers are not arm groups; uncaptioned continuation pages are linked. Previous: v2.4.26 (2026-10-24, v2.4.155): a grid opening with a printed "TABLE N (Continued)" is labelled Table N (matched, new optional key continuation_of); a grid whose first row is its bare "Table N" label is paired with Table N's caption; a lone-minus row joins its number, never the SE below it; a stacked data row is no longer a header row; flatten skips the grid's own label/caption rows, types U and z, parses values carrying footnote/significance marks, carries a printed inequality as <key>_op, keeps a statistic column under no group header out of every arm, treats a label repeated over each column of its span as one arm, and flattens a grouping that binds no statistic as one record per row; also camelot stream keeps the textline it dropped on an exact row-boundary tie (a recovered header line or row label) and joins the rows the tie split; two values Camelot appends into one cell keep a space between them; side-by-side tables reach their ruled bottom instead of stopping at the first blank gap; the upright whitespace grid splits words the page spaces without space glyphs; a heading under a column-header row stays its own row; a merged data row is no longer taken for a header row; flatten reads a df column's "2, 40" pair, packed arms with alphanumeric labels ("1A"), and refuses an estimate from a worded interval cell. Previous: v2.4.25 (2026-10-23, v2.4.154): an uncaptioned candidate that copies its page text is no longer kept because of a page number or a decreasing evenly spaced axis column. Previous: v2.4.24 (2026-10-14, v2.4.154): a Camelot grid reaches the end of its printed table (rows below an indented sub-block or label-only row are appended with the grid's own columns); a minus sign Camelot's text layer dropped (TeX/MathTime symbol fonts) is put back from the page; side-by-side captions are found when the PDF draws its spaces as glyphs; a super-header row keeps its labels when only its stub cell is leaked caption prose; flatten binds columns to the group header that spans them (wrapped headers are not groups), carries fields.p_text and fields.CI_kind; a four-line caption region stops at its header lines. Previous: v2.4.23 (2026-10-13, v2.4.153): a flattened sentence states the interval level the table prints (header, super-header, caption, note) instead of always "95% CI"; no level or two levels -> bare "CI"; new field fields.CI_level only when stated (69 of 10,713 manifest rows in 6 papers change: 59 to "CI", 10 to "90% CI"). Previous: v2.4.22 (2026-10-06, v2.4.151): a caption in one column of a two-column page no longer runs its box into the other column's prose; the box stops at the neighbouring column's first glyph (12 firings over 101 manifest papers, 2 tables changed, both improved, 0 regressed); a cell-less table closed by its own note reads its body up to the note instead of stopping at 1500 chars or the first sentence-shaped line, and only ever adds to the old body (95 of 595 table captions over 125 manifest papers, 0 shortened); in a numeric table a wrapped lowercase label or text line joins its row, a CI printed under its coefficient joins it, and a row with its own values is no longer glued to the row above; flatten keeps a label printed right of the stub (82 of 1,041 grids changed, 0 statistic values lost, 0 cell words lost). Previous: v2.4.21 (2026-10-05, v2.4.150): table cells read through the Linotype Pi glyph-name repair (docpluck/glyph_names.py), so `=` `<` `-` in an affected font's cells are no longer `!` `'` `&`. Previous: v2.4.20 (2026-10-01, v2.4.149): a table pass that failed is named in `method` as a `+<stage>_failed` piece (0 of 125 healthy manifest papers), the lattice raster always comes from pdfium and a failed render is retried, and flatten types "<effect> and CI" columns and reads an en dash in sign position as a minus (59 rows in 16 of 1,114 manifest tables, each checked on the page). # v2.4.19 (2026-10-01, v2.4.148): stored table output changes in four ways -- a caption stops at its own header row (16 of 1,114 manifest tables), header_rows is the <thead> row count of the table's own html (250 tables), new field header_text_below_caption keeps the statistic labels the caption no longer swallows, and flatten no longer labels 10.1037/pspp0000586 Table 9 means as r. # v2.4.18 (2026-09-28, v2.4.147): stored table output changes in eight ways -- PDF tables carry their printed note in `footnote` (and note rows leave the grid only when verbatim there); a table printed sideways is read in its own frame (`cell_geometry="whitespace_rotated"`) or ships its own lines, and every table carries `content_status`; a caption label alone on its line no longer empties its table; a right-column caption box starts at the caption; a super-header's span is read from the page into `colspan`; a Camelot column fused under a super-header is re-split; above 40 pages lattice reads only caption pages (`lattice_scope:` in `method`); memory exhaustion is retried and, if it still degrades output, named as `incomplete:resource_exhausted` in `method`. Previous: v2.4.17 (2026-09-25, v2.4.145): a ruled table no longer absorbs the next table's caption and rows (the 2c8b0dd regression, incl. a fabricated F row); region/caption/note guards narrowed; Nature `N |` captions read; uncaptioned Camelot grids KEPT with caption_status="uncaptioned_candidate" instead of dropped; every Table carries caption_status; method never carries +pdfplumber_recovery/+pdfplumber_word_patch. Previous: v2.4.16 (A BROKEN CAMELOT IS NOW NAMED IN `method`, NOT SILENT, 2026-09-22): `extract_tables_camelot` caught its own ImportError and both per-flavor exceptions and returned `[]` normally, so `camelot_failed:` never reached the method string -- a document that got zero tables because Camelot could not run was BYTE-IDENTICAL in `method` to a document that has none. Measured on apa/chan_feldman_2025_cogemo.pdf: before, both flavors raising gave `method=pdftotext_default`; after, `...+camelot_failed:camelot_all_flavors_failed`. The table COUNT was 9 in every arm (the whitespace/isolated fallback backfills one table per caption), so neither the count nor the method string was ever a signal. THIS VERSION IS BUMPED BECAUSE THE STORED VALUE CHANGED: a consumer keying archived `method` strings on `table_extraction_version` could not otherwise tell a pre-fix record from a post-fix one, which is the exact failure an unbumped pipeline version has already caused in this project once. On a healthy machine nothing changes at all. # v2.4.15 (THE REGION MUST COVER THE TABLE, NOT THE CAPTION, 2026-09-12): four defects in table-region detection, each of which DELETED published columns or rows with no error and no log line. (a) `detect._horizontal_rules_in` required a ruled line to be entirely CONTAINED in the search band, and the band is built at the CAPTION's x-range -- so it was blind to exactly the rules that establish a grid. On 10.1001/jamanetworkopen.2023.39337 p9 the caption spans 141pt while Table 3's twenty rules each span 515pt: all twenty were rejected and ten 10pt-wide row decorations were kept, which still cleared LATTICE_MIN_HORIZONTAL_RULES, so the lattice branch fired on furniture and produced a caption-width region. Camelot, handed a 141pt strip, correctly reported 2 columns; the printed table has 7. FIVE OF SIX DATA COLUMNS, and the Sodium and Physical-activity values of the surviving one, appeared ZERO times in the 59 KB render -- not mis-parsed, absent. Now keyed on x-OVERLAP, which is the safe widening test for a ruled line specifically because a rule does not cross a page column gutter. (b) Rules drawn CELL BY CELL arrive as one segment per column, and a segmented rule only overlaps the band where the caption happens to sit: on ieee_access_2 p55 the three header segments run 77.5->123.1, 123.1->200.5, 200.5->286.4 with the caption at 280.4->319.6, so overlap alone reached one segment of a three-column grid. `_coalesced_horizontal_rules` merges collinear end-to-end segments first; a single-span rule is returned unchanged. (c) `_longest_aligned_run` compared only column START edges, so a run severed wherever a right-aligned cell changed WIDTH. On 10.1371/journal.pmed.1004323 p10 Table 3 the last two rows print bare counts (`0`, `3`) where the rows above print `3/5 (60.0%)`: their cells begin ~29pt further right -- past _COLUMN_EDGE_TOL_PT -- while ENDING on exactly the same edge, so the run stopped early and `fenylefrine 0 3` / `ephedrine 0 2` were cut off. `_edges_align` now accepts a column aligned on its START **or** its END edge, which is what a table actually is: left-aligned labels beside right-aligned numbers. Widening the tolerance instead would approach the inter-column gutter and merge real columns. (d) A located region is now widened to the full width of the rows it ALREADY contains that begin at its left edge (`_widen_to_left_aligned_rows`), because the run locks onto the MODAL body shape and a column populated only in the header and one summary row is narrower than the table. Same paper: `Rel. risk (95% CI) 1.19 (0.33-4.31)` and `P value 1.00` sat outside the box Camelot was given. Gated OFF for the `caption_only` fallback, where no grid was located and widening is the documented cog_emo Table 8/9 regression. MEASURED, deterministically and two-sided: over 40 PDFs sampled random.Random(20260912) from a 10,049-PDF repository, 25 carrying >=1 table caption and 62 captioned regions, column-clipped regions fell 43 -> 34 with 7 papers improved and 0 worsened ((a)+(b) only; the clip detector shares (d)'s left-edge criterion so it cannot judge (d) and was not used to). On the 6-paper canary set 2 renders changed and 3 were BYTE-IDENTICAL, and a token census over both changed renders shows nothing lost: pavlou +163 token instances with 0 tokens reduced, plos_med +687 chars with 0 tokens vanished. plos_med Table 4 also stops being a copy of Table 3 -- its caption sat above the anesthetic-complications grid, so every surgical-reintervention row reached no structured table at all. Ground truth for all four is the rasterized page (pdftoppm -r 130/150), never another extractor. Pinned by tests/test_lattice_region_not_clipped_to_caption_width_real_pdf.py and tests/test_region_covers_sparse_columns_real_pdf.py, all watched RED first. THIS VERSION MUST BUMP: consumers read `table_extraction_version` as the identity of the pipeline that produced a table, and table content changed. # v2.4.14 (THE DECLARED HEADER COUNT IS A CEILING, 2026-09-08): `_clean_grid` re-derived the header-row count from cell length and numeric ratio even when the source document had STATED it. Word records repeating header rows in `w:trPr/w:tblHeader` and mammoth turns exactly that into `<th>`, so on a markup DOCX table the count is a fact the file declares, not an inference. Measured over the 19 DOCX in custody: 122 tables, 57 declaring a count, 21 where the guess exceeded the declaration -- 42 rows of PUBLISHED STATISTICS deleted from `flattened_rows` (10.5281/zenodo.21911212 Table 10 shipped 23 of 26 rows, dropping two full results rows with CIs and p-values). The ceiling reaches the `html` channel too (`cells_to_html`), so html-vs-flatten header divergence went 21/122 -> 0/122; one input can never give two answers. PDF blast radius measured at ZERO -- every PDF call site calls `cells_to_html(cells)` bare and passes no declaration. THIS VERSION MUST BUMP even though PDF output is byte-identical: consumers read `table_extraction_version` as the identity of the pipeline that produced a table, and DOCX table content changed. Also in this stratum: `extract_docx_structured` ships DOCX tables to consumers for the first time (engine chosen by measurement over 16 DOCX / 5,091 cells; python-docx disqualified for silently returning 0 tables inside `w:sdt` content controls). # v2.4.13 (W0r, THE UNMAPPED-GLYPH MINUS, 2026-09-02): the `<td>` channel destroyed minus signs on published statistics, because the repair was keyed on the literal `(cid:0)` pdfminer.six emits and Camelot 2.0.0 does not use pdfminer.six - `camelot/utils.py` imports LAParams/LTChar from `playa.miner`, whose `Font.decode` falls back to an identity map, so the same unmappable code 0 arrives as a raw NUL. The repair became a green-shaped no-op the day the table backend changed and nothing failed. Measured on one file: Camelot page 4 stream = 21 cells with NUL / 0 with "(cid:0)"; pdfplumber = 0 / 31; pdftotext decodes all 31 correctly as U+2212, so the page is intact and only this channel loses them. HARM: 10.1016/j.joep.2020.102350 p2 prints `Cramer's V = 0.067 [-0.108, 0.218]`, an interval SPANNING zero, and we shipped a cell every consumer reads as EXCLUDING zero; p4 prints `199 -1 -31 -30 213 14 31 17` and we shipped the three signed values unsigned beside three intact unsigned ones. Both rasterized and read. `cell_cleaning.recover_unmapped_glyph_minus` recovers BOTH spellings - a rule keyed on one library's spelling of "I could not decode this" is one dependency bump from silence - and lives in `clean_cell_text`, so flatten, cells[].text, raw_text and the rendered <table> agree. GATED, and the prevalence sweep is why: the code-0 slot is not a minus everywhere, it is whatever that font left unmapped. 10.1017/s1930297500007956 uses it for an EXTENSIBLE OPENING PAREN with code 1 as its closing partner (rasterized p17: `y_i ~ Gaussian((mu1, mu2), [...]^-1)`), where the ungated rule fires 25 times and fabricates a minus each time. Two typographic discriminators separate the classes across every affected paper: a code-1 partner in the text, and whether the marker shares a line with its digits. U+FFFD is deliberately NOT covered - it lands in the OPERATOR slot, and on one rasterized page the same codepoint is both <= and >=. MEASURED: source prevalence 3/200 sampled papers (1.5%), 86 sites; shipped output over the 26-paper render baseline under a two-arm guard diff, 2 papers, 86 destroyed sites -> 0, 74 lines changing exactly as the rule predicts and 17 adjudicated as a fold-to-split that loses nothing. THOSE TWO 86s ARE DIFFERENT MEASUREMENTS OVER DISJOINT PAPER SETS and must not be quoted as one figure. Tools: tools/diag/unmapped_glyph_prevalence_scan.py, tools/diag/unmapped_minus_guard_diff.py. KNOWN AND NOT FIXED HERE: `whitespace._UNMAPPED_GLYPH_RE` matches only `(cid:N)`/U+FFFD while camelot_extract.py:715 runs that gate on Camelot cells, so it cannot see the new spelling of the marker its own docstring promises to condemn; widening it changes which grids are ACCEPTED, whose failure mode is text loss, so it gets its own measurement first (tools/diag/unmapped_marker_gate_census.py). # v2.4.12 (REAL PER-CELL GEOMETRY, 2026-08-19): every Camelot cell shipped `(0.0, 0.0, 0.0, 0.0)` while Camelot itself held real coordinates for each one - register A1/G6a, open across two releases and the single item blocking three known defects. Reading `ct.cells[r][c]` is one line; it took two releases because EVERY way of getting it wrong produces WRONG coordinates rather than empty ones, and a wrong bbox is worse than none - it answers, plausibly, and the answer is off by a page. G4 named four traps (bottom-up vs top-down; 1- vs 0-indexed pages; cells emitted AFTER docpluck trims rows; the whitespace path's zero table bbox) and deferred the work until the guard could be built first. Building the guard found TWO MORE, both live on real papers. T5: Camelot silently ROTATES a page whose text is sideways and reports coordinates in that rotated frame - 10.1001/jamanetworkopen.2023.39337 p8 reports rotation=anticlockwise, pdf_size=(792,612) and a table bbox reaching x=730.7, off-page in pdfplumber's 612-wide frame, while pdfplumber reports rotation=0; also 10.1017/s0007123424000024 p6 (clockwise), whose converted boxes come out with a NEGATIVE top. 2 of 8 papers probed. T6: `_augment_lattice_with_stream_rows` pd.concat's stream rows onto `ct.df` and never touches `ct.cells`, so 10.1038/s41598-023-50423-7 ships df=61x4 against cells=20x4 - zipping by index would give 41 rows of published data another row's rectangle. THE GUARD: each rectangle is converted to pdfplumber space, `chars_in_bbox` is asked what stands there, and the result scored by character-multiset CONTAINMENT - exact equality is the wrong predicate and the probe said so before the code was written, because Camelot assigns a whole text object to ONE grid cell even when its glyphs spill past that cell's column edges. Measured: per cell 86.3% score >=0.95 under the correct transform against 2.1%/1.5%/1.5% under T1/T2/T3; per TABLE the median correct score is 0.98 while ALL 200 tables fall below 0.30 under every trap. Gate 0.60, in a real gap - on the shipped corpus the lowest ACCEPTED table scores 0.70 and the two rejected score 0.55 and 0.53. All-or-nothing per table: a half-verified grid carries real boxes on some cells and zeros on others with nothing to tell them apart. Verification is SAMPLED (40 cells, fixed stride - never random), the geometry is not: `chars_in_bbox` is O(chars-on-page), so full verification costs 78.9 ms/table and grows with the grid, on the service's per-request path; the cap makes it 40.0 ms/table independent of size and changed NO verdict across 200 tables. The three row-trims each gained an index-returning `_keep_after_*` sibling and became one-liners over it - one implementation, two views, so the raw-row mapping cannot drift from the trim; behaviour verified identical to the originals over 6,002 generated matrices. Table gains `cell_geometry`, on EVERY table from EVERY path: "verified:<fraction>" or the named refusal (camelot_rotated_page, grid_shape_mismatch, roundtrip_failed, no_layout, whitespace_native, no_cells). An earlier draft left it unset on the non-Camelot paths and the census showed 11.6% of tables reporting nothing - which both hid the state and UNDERSTATED what we ship, since the whitespace path's boxes are built from pdfplumber words and are real by construction. Census on the shipped path (python tools/diag/cell_geometry_census.py, 12 papers, 69 tables): 81.2% verified, 10.1% no_cells, 2.9% roundtrip_failed, 2.9% grid_shape_mismatch, 1.4% camelot_rotated_page, 1.4% whitespace_native - and 5,206 of 5,686 cells (91.6%) now carry a real bbox where every one was (0,0,0,0). THIS IS THE FOUNDATION, NOT THE FIX: register J's two open text-loss defects and the FUSED-GRID class (G6h) are unblocked, not closed. # v2.4.11 (three TEXT-LOSS defects closed, 2026-08-19): the three gold-verified defects that had been sitting behind xfail(strict) because a fix for each was attempted and REVERTED. (a) detect._bbox_of_caption_line grouped a page's chars by round(top) ACROSS THE WHOLE PAGE and returned min(x0)/max(x1), so on a two-column page the caption's y-row also held the neighbouring column's body line - chan_feldman_2025_cogemo p8 gave a 441.8pt caption bbox for a table occupying 214pt, the region swallowed that column's prose, and every grid guard then rejected the table "on its own merits". Five sessions read this as a guard-tuning problem; it is horizontal, not vertical. Clipped to the caption's COLUMN RUN (detect._column_runs), keyed on the page's own gutter: the caption's inter-word gaps top out at 3.1pt against a 10.5pt gutter - TYPOGRAPHIC evidence, a band the renderer emitted. Region words 266->107. (b) whitespace._cluster_into_rows measured the y-gap to the PREVIOUS WORD; words are sorted by (top, x0) so the running previous-top creeps in sub-threshold steps and an arbitrarily tall band collapses into one row. Measured over the 26-paper baseline with tools/diag/row_cluster_census.py: 30 of 60 caption-anchored regions smeared across 8 papers. THE 2026-08-04 REVERT'S COUNTER-EXAMPLE WAS ITSELF THE DEFECT - xiao Table 4's "94.4pt legitimately tall row" is the entire table body (stacked header, 5 product rows, 5 CI continuation lines, 75 words) and that table emitted cells=0; it is now 7 rows / 35 cells. Four geometric discriminators had been designed and rejected around a constraint that did not exist. (c) _pick_better_table arbitrated on SHAPE alone, so a Discussion paragraph Camelot structured as a 4x2 grid outranked and replaced maier Table 7's gold-exact 3x5 descriptives; candidates are now tested for prose dominance (whitespace.grid_is_body_prose) BEFORE arbitration. THE FIRST REMEDY RE-CREATED THE DEFECT: a continuation re-merge folded an indented single-baseline line back into the row above, passed 31 green tests, and the corpus guard-diff said 21 tables lost cells (-867) and 12 lost raw_text - each fold EXTENDED the row so the contiguity test could never fail (10.1111/jomf.13036 Table 6: rows labelled 1/2/3/4+ are indented past their group label, so all five folded into one 75pt row). Deleted, not tuned. Same guard-diff also caught grid_is_body_prose condemning a REAL 33x4 qualitative table (10.5465/amc.2022.0006 T4, 70 cells / 2,008 chars - closed with a header-row veto reusing cell_cleaning._is_header_like_row) and, worse, that guard DELETING rather than substituting when the fallback was empty; the rejection is now PROVISIONAL (the candidate is stashed and restored, recording table_prose_rejection_reverted_no_replacement). Gate: tools/diag/table_capture_guard_diff.py, --isolate <change> for attribution. See docs/OVERHAUL_REGISTER.md section J and LESSONS L-046/L-047. # v2.4.10 (whitespace grid-guard accuracy, 2026-08-04): TWO false-negative classes in the guard that decides whether a whitespace/char grid is a real DATA table. (a) _CAPTION_LABEL_RE was UNANCHORED, so a mid-sentence CROSS-REFERENCE in a footnote/prose cell ("…al. (2007) in Table 8.", "…in Figure 2. We summarized…") read as an absorbed caption and condemned the whole grid; anchored to ^\s* to match the discipline camelot_extract._CAPTION_ROW_PATTERN already documents (its comment notes anchoring is why an inline "see Table 2" does not match). (b) the clean-data-cell test matched a SINGLE numeric token, so every multi-token APA COMPOSITE was scored as non-data — `2.84 [1.89]` (mean [SD]), `3.47 [1.23] (170)` (mean [SD] (n)), `2.84 ± 1.89`, `0.42***` — and a descriptives table built from them scored clean_data_rows=0 and was discarded as prose. Replaced the shape regex with a NUMERIC-DOMINANCE test (_cell_is_clean_data: digit-bearing AND free of substantive words), which generalises to composites not yet seen instead of chasing each with another alternation; the prose side is unmoved, so absorbed body text is still rejected. 101-PDF guard-diff: 24 tables recover (up from 20 at v2.4.120), 0 regressed, 0 foreign-caption acceptances. # v2.4.9 (RC-T cycle 4 own-caption exemption, 2026-08-04): _whitespace_grid_is_clean rejected ANY grid containing a "Table N."/"Figure N." caption cell — the signature of a region that absorbed a NEIGHBOURING table's caption. But detect._region_for_caption builds every region as _union(caption_bbox, geom_bbox), so a caption-anchored region ALWAYS contains its OWN caption by construction (the region-driven Camelot pass needs it for pairing). The guard therefore condemned EVERY region grid: whitespace_cells returned 0 cells corpus-wide (19/19 chan_feldman+maier regions) and each table fell to the raw_text fallback, which truncates rows. The exemption is IDENTITY-based, not position-based: the anchoring caption's number is threaded from the region spec (extract_structured) / region.caption_match (whitespace) into the guard, and a caption cell is exempt ONLY when it names THAT exact number, sits within _OWN_CAPTION_MAX_ROW, and is the first such match — per-CELL, and opt-in (own_caption_number=None keeps the strict legacy behaviour for the auto-detect path). A position-only draft was written and REJECTED in cross-model review (codex, 2026-08-04); all three of its holes reproduced locally — a NEIGHBOUR's caption in a leading row blessed as own (publishing another table's data), (r,c) sort order picking the leftmost caption on side-by-side pages, and a whole-ROW exemption letting a second Table/Figure caption ride along. Guard-diff over the APA corpus: 13 tables recover (ip_feldman T1, jdm_.2023.15 T2/T3, korbmacher T7/9/10/12/14, maier T3/8/9/10/11 — 812 cells), 0 regressed, 0 foreign-caption acceptances. chan_feldman is NOT fixed here: its regions genuinely absorb 2-column body prose and fail the prose/clean-data guards on their own merits (the separate region prose-trim cycle); its xfail(strict) stays armed with the corrected diagnosis. # v2.4.8 (RC-T caption-tail walk, 2026-08-04 — the gated RC-T cycle, user-approved): _extract_table_body_text's body_start walk stepped break-to-break (preferring ) and inspected only a 40-char window, so a WRAPPED caption whose table body serializes column-by-column (no early blank line) overshot the caption's own terminator and SILENTLY DROPPED leading rows (chan_feldman T3 lost its first four rows: Sample size / Geographic origin / Gender / Ethnic group; chan T1 lost hypothesis row 1). Replaced by _caption_tail_body_start: a per-LINE walk with three structural rules — (1) WHOLE-line terminator test measured from the true line start, so a self-terminated caption ("Table 6. Study 2 descriptive statistics.") breaks immediately (the xiao_2021 T6 truncation the run-3 prototype regressed on); (2) a blank line ends an unterminated caption; (3) a real caption wraps at most _CAPTION_TAIL_MAX_LINES physical lines — beyond that the "tail" is table CONTENT, so body_start returns to just after the caption line (the amc_1 T3 bibliography-table truncation). Plus _skip_leading_nontable_junk (drops a leading figure caption or wrapped body-prose paragraph from a recovered head; bounded + terminated-only so a genuine table's first rows are never eaten) and _raw_text_is_page_furniture_only (suppresses a fallback that is ONLY a next-page running header + page marker — jama_open_1 T2 rendered nothing but a journal banner, article title, date and "8/13"). _line_is_body_prose gains a bibliography-row exemption (author-initials opener + year) so a collection table's reference rows are not read as prose. 101-PDF guard-diff: 333 captions recover leading rows, 0 truncations (the run-3 prototype had 2). # v2.4.7 (concurrent-session reconciliation, 2026-07-02 — AI-gold-verified): landed six in-flight table fixes onto the v2.4.6 greedy+rescue base (the global-assignment pairing refactor was REJECTED — it regressed chan_feldman T6 + reshuffled ~24 papers, the same net-harmful class as prior global attempts). (1) chandrashekar side-by-side de-interleave: a page with ≥2 captions straddling a whitespace gutter drives each caption's region to its OWN column (_detect_column_gutters/_assign_caption_columns/_label_x_midpoint/_column_table_bottom + isolated Camelot calls), rebuilding caption+body from that column — Table 4 17×2-merge → clean 9×2, both captions gold-exact. (2) efendic T1 categorical + T2 detect: unified detect.py aligned-row-run (contiguous column-aligned run, prose-robust) + widen-aware geometry (_detect_geometry_widen_aware picks the more-columnar of narrow/widened band) + contiguous-footnote-gap + whitespace _is_categorical_grid acceptance — T1 3×2→5×3, T2 0×0-stub→11×5. (3) efendic T3 running-header strip (_RUNNING_HEADER_PATTERNS gains 'Author et al. <page>') + T2-5 leading caption-tail-PROSE strip (context-guarded: only above a genuine multi-cell header) — grids start at the real header. (4) collabra_77859 T2↔T3: bare integers excluded from the caption-overlap tokenizer (_CAPTION_TOKEN_RE → [a-z]{3,}|\d+\.\d+) so a stray 'Table 2' digit stops manufacturing false overlap; region-driven capture then pins pairing deterministically (a reading-order tie-break was tried + REJECTED — it perturbed greedy visit order and regressed chan_feldman T6). (5) cog_emo T8 caption-marker hint: an absorbed 'Table N.' first row (_leading_table_caption_number) authoritatively pins a grid to caption N, beating degenerate token-overlap ties — T8 recovers its 17×6 intercorrelation matrix, T9 its 12×8. Full 101-PDF structured diff vs v2.4.6 (Camelot verified DETERMINISTIC on this host: two identical-code runs byte-identical), AI-gold-verified on the changed papers. # v2.4.6 (duplicate-starvation rescue, 2026-07-01 — AI-gold-verified, PAIRING change): _rescue_duplicate_starved_captions repairs the greedy mis-pairing where, on a page with ≥2 captions, Camelot emits a near-identical DUPLICATE fragment of one table and the greedy first-come loop hands that duplicate to a SECOND caption — starving (dropping) that caption's own real table. When ≥2 captions were assigned identical-raw_text tables, the best-overlap caption keeps it and each other caption is reassigned to the best UNASSIGNED same-page table that fits it at least as well as the duplicate. Fires ONLY on that signature — a whole-corpus dup_rescue-firing scan confirms it activates on bmc_med_3 alone; every other page keeps its greedy assignment byte-identical (so the corpus-wide token-overlap fixes verified in prior cycles are untouched). bmc_med_3 Table 3 recovers its real 11×6 "Comparisons of SCE" grid (AI-gold-verified vs the source page; was a second copy of Table 2's 29×5). A full order-independent GLOBAL matching also fixed it but reshuffled ~24 papers + regressed chan_feldman T6 (prose fragment promoted to a caption) — rejected; see LEARNINGS / memory project_docpluck_region_driven_camelot. Camelot run-to-run non-determinism (feedback_camelot_flake_cumulative_load) defeats naive before/after fingerprint diffing, so surgicality is proven at the CODE-PATH level (no dup_rescue → identical HEAD path), not by comparing flaky shapes. # v2.4.5 (region-driven capture, 2026-06-29 — AI-gold-verified, CAPTURE-PATH change): each table caption now drives Camelot stream with its OWN caption-anchored region as table_areas (extract_tables_camelot_by_region + _region_driven_capture), so a caption gets exactly its table by construction — recovers stacked / side-by-side multi-table-per-page cases blind pages="all" + token-overlap pairing could not separate (efendic Table 4+5 split, 12 papers' 0×0 stubs → real). Region tables are CANDIDATES: _pick_better_table keeps the structurally-richer of {region, auto-detect} per caption (region too-narrow bbox can't collapse a wide table; jama_open_1 stays 43×7). Content-plausibility guards on the region path (_cell_is_prose dominance + _CAPTION_LABEL_RE absorption) reject prose-as-grid / caption-absorbed fragments → honest 0×0 stubs (cog_emo Table 3/9). Caption page-fix (char_start past leading \n\n/\f) is the foundation. Full 101-PDF structured diff (27 changed/0 err) + 6-paper AI-gold canary (all FIX/PASS/NET-BETTER, no new regressions). Known documented hard cases (not regressions vs prior): cog_emo T8 Camelot under-segmentation, chandrashekar 2-col caption interleave, efendic T2 Camelot-invisible, bmc_med_3 duplicate-fragment pairing (FIXED in v2.4.6 by _rescue_duplicate_starved_captions; the dedupe + bbox-proximity + global-matching approaches were net-harmful and rejected — see LEARNINGS). # v2.4.4 (ESCIcheck consumer request 2026-06-25 — flatten-only, AI-gold-verified): (DP-3) flatten._infer_anova_eta2_hint types a font-dropped η²p effect column by STRUCTURE — an unlabeled estimate column in an F-test/ANOVA results table (F + BF01/CI, no competing d/r/OR) is keyed `eta2`, range-guarded to [0,1]; the η²p glyph itself is unrecoverable (NotoSerif uni:no, OCR-tier). (DP-5b) flatten._inline_stat_field types a self-labeled cell (`r = .67`, `d = 0.32`) by its token even under a generic "Effect size" header. (DP-5a) cell_cleaning._is_fragment_cell recognizes a bracketed-CI close tail (`0.73]`) so a CI split across rows rejoins (`[0.59, 0.73]`) and the junk fragment row is dropped (cog_emo T8 14→10 rows). These three are flatten/cell-cleaning ONLY — no capture-path change, so caption→table pairing is byte-identical to v2.4.3. (DP-1/DP-2 capture recovery — the caption page-attribution fix — was prototyped but REVERTED: AI-gold canary verify showed it mis-pairs same-page-caption tables (efendic T4/T5, cog_emo T8/T9) and only half-fixes plos_med; it is queued as its own gated cycle with same-page disambiguation + region-quality gating. See an internal triage doc (2026-06-25).) # v2.4.3 (RC-T foundation): tables.whitespace gains a CHAR-LEVEL column-detection fallback (char_whitespace_cells) — when pdfplumber's word grouper glues a tight-kerned numeric row into one token so the word-gap detector finds < 2 columns, recover the grid from char x-gaps, voting on column-START edges (right-aligned data columns are left-edge-stable even when the label column is variable-width) and reinserting intra-cell word spacing from geometry. Fires ONLY as a fallback when the word path returns < 2 columns, so currently-correct tables are byte-unchanged (word path restored verbatim). Recovers ip_feldman Table 10's 7 regression rows in isolation. NOT yet wired to replace a degenerate MATCHED Camelot table (that extract_structured change + region prose-trim is the next gated cycle — see LEARNINGS 2026-06-25). # v2.4.2 (RC-T Layer-2): _extract_table_body_text now (a) Note-anchor — a table's "Note:" footnote is its last element, so trim body prose bled past it (chan_feldman T1/T3, efendic_2022 T5); and (b) degenerate-prose guard — suppress a raw_text fallback that STARTS mid-sentence with a lowercase multi-letter word AND is majority sentence-shaped prose, so render emits a clean caption-only table instead of an unstructured-table dump duplicating Results/Discussion prose (chan_feldman T9 was a verbatim ## Discussion duplicate). FP-safe (real cells start with header/label/number/single-letter marker, never a wrapped continuation); full-corpus 101-PDF guard-diff only trims+suppresses (grew=0 changed=0). # v2.4.1 (DP-2/DP-5): (DP-2) blank-header role recovery now types the unlabeled p-value (a bare `.XXX` after the test stat, no comparison op) and df (a bare integer/Welch-decimal between the stat and the d[CI] column) columns it previously skipped — collabra.77859 T3 fields gain p+df (tables.flatten._recover_blank_roles Pass 4.5). (DP-5) parallel-arm tables with a TWO-ROW header no longer drop their first data row, and a CENTERED super-header is aligned to its arm block instead of its visual-center column: (a) cell_cleaning._is_header_like_row counts APA value shapes (leading-dot decimal, bracketed CI, operator-prefixed p, N/A) as data via _DATA_VALUE_CELL_RE so a real first data row isn't read as a 3rd header row (collabra.90203 T10 recovered the Identifiable/Explicit-learning correlation); (b) tables.flatten._detect_column_groups re-derives arm boundaries from equal-width blocks of the data region (each must hold one super-label) so a centered super-label folded mid-span no longer swaps arm values (xiao_2021 T4 Original/Replication F) or pushes a stat column into the label region; (c) tables.flatten._classify_column reads a folded super-header cell's role from its sub-part (collabra.90203 T10 CI). Full-corpus cached-table flatten diff: no clean-table regression. # v2.4.0 (REQUEST_11): flatten now populates fields for NON-clinical result tables — (a) blank-header column-role recovery (tables.flatten._recover_blank_roles): assign a stat role to a header-stripped column from its data-token SHAPE (CI brackets, df1/df2 pair, estimate-adjacent-CI, p-with-operator) AND caption/footnote/all-header-rows vocabulary, never bare position; recovers collabra.77859 T5 (t/df/d/CI) + collabra.90203 T8/T9 (F/df/p/BF01/eta²p-as-est/CI). (b) packed parallel-arm split (tables.flatten._detect_packed_arms/_flatten_packed_arms): tables packing k≥2 arms into single cells ("Separate Joint" + space-joined values) emit one typed record per arm (group=arm) — collabra.77859 T3 Separate/Joint, xiao_2021 T7 Regret/Justifiability. (c) new BF01 role; validity guards drop r∉[-1,1] / non-monotone CI / non-int n / p∉[0,1]. (d) GENERAL L-004 fixes: _parse_number + _parse_ci_cell fold U+2212 MINUS (negative t/d/CI bounds in Camelot cells were dropped/sign-lost); _VALUE_GROUP_RE handles bracket-led CI groups. Default render + PROSECCO output byte-identical. # v2.3.0 (Tier-2, REQUEST_10): cross-flavor lattice-augmentation — recover data rows a lattice extraction vertically TRUNCATED by appending the rows a same-page, same-column-count stream table captured below the lattice bbox (camelot_extract._augment_lattice_with_stream_rows), gated on equal-col-count + bbox overlap + extends-below; PLUS numeric/parenthetical continuation merge (cell_cleaning._merge_continuation_rows) rejoining stream's stacked value/parenthetical cells. Fixes PROSECCO Table 2 R2-R6. v2.2.0: EC-T1 docpluck.tables.flatten — per-row FlattenedRow records (sentence + structured fields) for downstream stat-verification consumers (effectcheck/escimate/scimeto) + opt-in inline "rendered as text" block below each <table> via render_pdf_to_markdown(flatten_tables_inline=True). v2.1.5: cell-cleaning recovers CMEX10 extensible-bracket PUA glyphs (U+F8EE-F8FB). v2.1.4: cell-cleaning recovers Adobe-Symbol-font PUA glyphs (beta/chi/bullet as U+F0xx). v2.1.3: cell-cleaning recovers '<'-as-backslash glyph corruption. v2.1.2: cell-cleaning recovers descending-CI '2'-for-minus corruption. v2.1.1: cell-cleaning recovers (cid:0) corrupted minus signs + strips math-alphanumeric styling. v2.1.0: cell-cleaning pipeline ported from splice spike (multi-row header detection, continuation merging, leader-dot strip, mash-split, group separators, sig-marker attach)
77
+ TABLE_EXTRACTION_VERSION = "2.4.33" # v2.4.33 (2026-11-19, v2.4.162): one number reader for every cell shape (US-grouped numbers typed, a detached sign refused); header df bound to its own column, t(df)/chi2(df) headers; a repeated statistic displaces the earlier block whole; domain table (value_out_of_domain); half-read combined cells listed (estimate_not_parsed, interval_not_parsed); a cell without an interval under an estimate-and-interval header is not an estimate (cell_shape_not_estimate_interval). Previous: v2.4.32 (2026-11-16, v2.4.161): a later column binding the same field wins whole (unparsed reason field_bound_by_later_column); a cell printing two stacked results is not bound; a grid copied from a neighbouring table is removed and the table keeps its own text; a repeated sign row is dropped; bracket intervals are read inside their wrapper; Cohen's h/w/f/kappa, Hedges, r-squared, generalized eta and log OR are not typed as d; typed_without_header; ASCII minus in every table field; captions printed under tables. Previous: v2.4.31 (2026-11-13, v2.4.160): copy-protected PDFs with an empty user password reach Camelot decrypted; the running-text check folds ligatures (NFKC) on both channels; new keys unmapped_glyph_fonts (result), unparsed and fields["est_kind"] (flattened rows); a caption no longer types a column from a capital D or the word "or". Previous: v2.4.30 (2026-11-11, v2.4.159): tied captions pair by position (nearest caption above the grid); a grid holding under 25% of its printed table (under its caption) is set aside for the full text; a side-by-side column body stops at the table note or a numbered section heading; a minus sign printed on the line above a value joins it; raised footnote letters in cells become ^a; a page printing "Table N (continued)" labels its topmost grid; a descending printed CI passes through with fields["CI_order"]="descending". Previous: v2.4.29 (2026-11-01, v2.4.158): a page-furniture rule must also recur on a caption-free page (a table series keeps its own closing rule). Previous: v2.4.28 (2026-10-31, v2.4.157): caption-only regions take their rule extent; side-by-side lines in one cell keep page order; overflowing row labels return to the stub; stacked header labels fold; word-table wraps join on cell evidence. Previous: v2.4.27 (2026-10-29, v2.4.156): fields_raw on every record; typed descriptive cells (M (SD), b (SE), n (%), est [CI]) with fields["group"]; M=/SD= rows and x-led label wraps are data; caption lines leave the grid; recurring section lines and label-only rows over data stay body rows; nested spanning headers are not arm groups; uncaptioned continuation pages are linked. Previous: v2.4.26 (2026-10-24, v2.4.155): a grid opening with a printed "TABLE N (Continued)" is labelled Table N (matched, new optional key continuation_of); a grid whose first row is its bare "Table N" label is paired with Table N's caption; a lone-minus row joins its number, never the SE below it; a stacked data row is no longer a header row; flatten skips the grid's own label/caption rows, types U and z, parses values carrying footnote/significance marks, carries a printed inequality as <key>_op, keeps a statistic column under no group header out of every arm, treats a label repeated over each column of its span as one arm, and flattens a grouping that binds no statistic as one record per row; also camelot stream keeps the textline it dropped on an exact row-boundary tie (a recovered header line or row label) and joins the rows the tie split; two values Camelot appends into one cell keep a space between them; side-by-side tables reach their ruled bottom instead of stopping at the first blank gap; the upright whitespace grid splits words the page spaces without space glyphs; a heading under a column-header row stays its own row; a merged data row is no longer taken for a header row; flatten reads a df column's "2, 40" pair, packed arms with alphanumeric labels ("1A"), and refuses an estimate from a worded interval cell. Previous: v2.4.25 (2026-10-23, v2.4.154): an uncaptioned candidate that copies its page text is no longer kept because of a page number or a decreasing evenly spaced axis column. Previous: v2.4.24 (2026-10-14, v2.4.154): a Camelot grid reaches the end of its printed table (rows below an indented sub-block or label-only row are appended with the grid's own columns); a minus sign Camelot's text layer dropped (TeX/MathTime symbol fonts) is put back from the page; side-by-side captions are found when the PDF draws its spaces as glyphs; a super-header row keeps its labels when only its stub cell is leaked caption prose; flatten binds columns to the group header that spans them (wrapped headers are not groups), carries fields.p_text and fields.CI_kind; a four-line caption region stops at its header lines. Previous: v2.4.23 (2026-10-13, v2.4.153): a flattened sentence states the interval level the table prints (header, super-header, caption, note) instead of always "95% CI"; no level or two levels -> bare "CI"; new field fields.CI_level only when stated (69 of 10,713 manifest rows in 6 papers change: 59 to "CI", 10 to "90% CI"). Previous: v2.4.22 (2026-10-06, v2.4.151): a caption in one column of a two-column page no longer runs its box into the other column's prose; the box stops at the neighbouring column's first glyph (12 firings over 101 manifest papers, 2 tables changed, both improved, 0 regressed); a cell-less table closed by its own note reads its body up to the note instead of stopping at 1500 chars or the first sentence-shaped line, and only ever adds to the old body (95 of 595 table captions over 125 manifest papers, 0 shortened); in a numeric table a wrapped lowercase label or text line joins its row, a CI printed under its coefficient joins it, and a row with its own values is no longer glued to the row above; flatten keeps a label printed right of the stub (82 of 1,041 grids changed, 0 statistic values lost, 0 cell words lost). Previous: v2.4.21 (2026-10-05, v2.4.150): table cells read through the Linotype Pi glyph-name repair (docpluck/glyph_names.py), so `=` `<` `-` in an affected font's cells are no longer `!` `'` `&`. Previous: v2.4.20 (2026-10-01, v2.4.149): a table pass that failed is named in `method` as a `+<stage>_failed` piece (0 of 125 healthy manifest papers), the lattice raster always comes from pdfium and a failed render is retried, and flatten types "<effect> and CI" columns and reads an en dash in sign position as a minus (59 rows in 16 of 1,114 manifest tables, each checked on the page). # v2.4.19 (2026-10-01, v2.4.148): stored table output changes in four ways -- a caption stops at its own header row (16 of 1,114 manifest tables), header_rows is the <thead> row count of the table's own html (250 tables), new field header_text_below_caption keeps the statistic labels the caption no longer swallows, and flatten no longer labels 10.1037/pspp0000586 Table 9 means as r. # v2.4.18 (2026-09-28, v2.4.147): stored table output changes in eight ways -- PDF tables carry their printed note in `footnote` (and note rows leave the grid only when verbatim there); a table printed sideways is read in its own frame (`cell_geometry="whitespace_rotated"`) or ships its own lines, and every table carries `content_status`; a caption label alone on its line no longer empties its table; a right-column caption box starts at the caption; a super-header's span is read from the page into `colspan`; a Camelot column fused under a super-header is re-split; above 40 pages lattice reads only caption pages (`lattice_scope:` in `method`); memory exhaustion is retried and, if it still degrades output, named as `incomplete:resource_exhausted` in `method`. Previous: v2.4.17 (2026-09-25, v2.4.145): a ruled table no longer absorbs the next table's caption and rows (the 2c8b0dd regression, incl. a fabricated F row); region/caption/note guards narrowed; Nature `N |` captions read; uncaptioned Camelot grids KEPT with caption_status="uncaptioned_candidate" instead of dropped; every Table carries caption_status; method never carries +pdfplumber_recovery/+pdfplumber_word_patch. Previous: v2.4.16 (A BROKEN CAMELOT IS NOW NAMED IN `method`, NOT SILENT, 2026-09-22): `extract_tables_camelot` caught its own ImportError and both per-flavor exceptions and returned `[]` normally, so `camelot_failed:` never reached the method string -- a document that got zero tables because Camelot could not run was BYTE-IDENTICAL in `method` to a document that has none. Measured on apa/chan_feldman_2025_cogemo.pdf: before, both flavors raising gave `method=pdftotext_default`; after, `...+camelot_failed:camelot_all_flavors_failed`. The table COUNT was 9 in every arm (the whitespace/isolated fallback backfills one table per caption), so neither the count nor the method string was ever a signal. THIS VERSION IS BUMPED BECAUSE THE STORED VALUE CHANGED: a consumer keying archived `method` strings on `table_extraction_version` could not otherwise tell a pre-fix record from a post-fix one, which is the exact failure an unbumped pipeline version has already caused in this project once. On a healthy machine nothing changes at all. # v2.4.15 (THE REGION MUST COVER THE TABLE, NOT THE CAPTION, 2026-09-12): four defects in table-region detection, each of which DELETED published columns or rows with no error and no log line. (a) `detect._horizontal_rules_in` required a ruled line to be entirely CONTAINED in the search band, and the band is built at the CAPTION's x-range -- so it was blind to exactly the rules that establish a grid. On 10.1001/jamanetworkopen.2023.39337 p9 the caption spans 141pt while Table 3's twenty rules each span 515pt: all twenty were rejected and ten 10pt-wide row decorations were kept, which still cleared LATTICE_MIN_HORIZONTAL_RULES, so the lattice branch fired on furniture and produced a caption-width region. Camelot, handed a 141pt strip, correctly reported 2 columns; the printed table has 7. FIVE OF SIX DATA COLUMNS, and the Sodium and Physical-activity values of the surviving one, appeared ZERO times in the 59 KB render -- not mis-parsed, absent. Now keyed on x-OVERLAP, which is the safe widening test for a ruled line specifically because a rule does not cross a page column gutter. (b) Rules drawn CELL BY CELL arrive as one segment per column, and a segmented rule only overlaps the band where the caption happens to sit: on ieee_access_2 p55 the three header segments run 77.5->123.1, 123.1->200.5, 200.5->286.4 with the caption at 280.4->319.6, so overlap alone reached one segment of a three-column grid. `_coalesced_horizontal_rules` merges collinear end-to-end segments first; a single-span rule is returned unchanged. (c) `_longest_aligned_run` compared only column START edges, so a run severed wherever a right-aligned cell changed WIDTH. On 10.1371/journal.pmed.1004323 p10 Table 3 the last two rows print bare counts (`0`, `3`) where the rows above print `3/5 (60.0%)`: their cells begin ~29pt further right -- past _COLUMN_EDGE_TOL_PT -- while ENDING on exactly the same edge, so the run stopped early and `fenylefrine 0 3` / `ephedrine 0 2` were cut off. `_edges_align` now accepts a column aligned on its START **or** its END edge, which is what a table actually is: left-aligned labels beside right-aligned numbers. Widening the tolerance instead would approach the inter-column gutter and merge real columns. (d) A located region is now widened to the full width of the rows it ALREADY contains that begin at its left edge (`_widen_to_left_aligned_rows`), because the run locks onto the MODAL body shape and a column populated only in the header and one summary row is narrower than the table. Same paper: `Rel. risk (95% CI) 1.19 (0.33-4.31)` and `P value 1.00` sat outside the box Camelot was given. Gated OFF for the `caption_only` fallback, where no grid was located and widening is the documented cog_emo Table 8/9 regression. MEASURED, deterministically and two-sided: over 40 PDFs sampled random.Random(20260912) from a 10,049-PDF repository, 25 carrying >=1 table caption and 62 captioned regions, column-clipped regions fell 43 -> 34 with 7 papers improved and 0 worsened ((a)+(b) only; the clip detector shares (d)'s left-edge criterion so it cannot judge (d) and was not used to). On the 6-paper canary set 2 renders changed and 3 were BYTE-IDENTICAL, and a token census over both changed renders shows nothing lost: pavlou +163 token instances with 0 tokens reduced, plos_med +687 chars with 0 tokens vanished. plos_med Table 4 also stops being a copy of Table 3 -- its caption sat above the anesthetic-complications grid, so every surgical-reintervention row reached no structured table at all. Ground truth for all four is the rasterized page (pdftoppm -r 130/150), never another extractor. Pinned by tests/test_lattice_region_not_clipped_to_caption_width_real_pdf.py and tests/test_region_covers_sparse_columns_real_pdf.py, all watched RED first. THIS VERSION MUST BUMP: consumers read `table_extraction_version` as the identity of the pipeline that produced a table, and table content changed. # v2.4.14 (THE DECLARED HEADER COUNT IS A CEILING, 2026-09-08): `_clean_grid` re-derived the header-row count from cell length and numeric ratio even when the source document had STATED it. Word records repeating header rows in `w:trPr/w:tblHeader` and mammoth turns exactly that into `<th>`, so on a markup DOCX table the count is a fact the file declares, not an inference. Measured over the 19 DOCX in custody: 122 tables, 57 declaring a count, 21 where the guess exceeded the declaration -- 42 rows of PUBLISHED STATISTICS deleted from `flattened_rows` (10.5281/zenodo.21911212 Table 10 shipped 23 of 26 rows, dropping two full results rows with CIs and p-values). The ceiling reaches the `html` channel too (`cells_to_html`), so html-vs-flatten header divergence went 21/122 -> 0/122; one input can never give two answers. PDF blast radius measured at ZERO -- every PDF call site calls `cells_to_html(cells)` bare and passes no declaration. THIS VERSION MUST BUMP even though PDF output is byte-identical: consumers read `table_extraction_version` as the identity of the pipeline that produced a table, and DOCX table content changed. Also in this stratum: `extract_docx_structured` ships DOCX tables to consumers for the first time (engine chosen by measurement over 16 DOCX / 5,091 cells; python-docx disqualified for silently returning 0 tables inside `w:sdt` content controls). # v2.4.13 (W0r, THE UNMAPPED-GLYPH MINUS, 2026-09-02): the `<td>` channel destroyed minus signs on published statistics, because the repair was keyed on the literal `(cid:0)` pdfminer.six emits and Camelot 2.0.0 does not use pdfminer.six - `camelot/utils.py` imports LAParams/LTChar from `playa.miner`, whose `Font.decode` falls back to an identity map, so the same unmappable code 0 arrives as a raw NUL. The repair became a green-shaped no-op the day the table backend changed and nothing failed. Measured on one file: Camelot page 4 stream = 21 cells with NUL / 0 with "(cid:0)"; pdfplumber = 0 / 31; pdftotext decodes all 31 correctly as U+2212, so the page is intact and only this channel loses them. HARM: 10.1016/j.joep.2020.102350 p2 prints `Cramer's V = 0.067 [-0.108, 0.218]`, an interval SPANNING zero, and we shipped a cell every consumer reads as EXCLUDING zero; p4 prints `199 -1 -31 -30 213 14 31 17` and we shipped the three signed values unsigned beside three intact unsigned ones. Both rasterized and read. `cell_cleaning.recover_unmapped_glyph_minus` recovers BOTH spellings - a rule keyed on one library's spelling of "I could not decode this" is one dependency bump from silence - and lives in `clean_cell_text`, so flatten, cells[].text, raw_text and the rendered <table> agree. GATED, and the prevalence sweep is why: the code-0 slot is not a minus everywhere, it is whatever that font left unmapped. 10.1017/s1930297500007956 uses it for an EXTENSIBLE OPENING PAREN with code 1 as its closing partner (rasterized p17: `y_i ~ Gaussian((mu1, mu2), [...]^-1)`), where the ungated rule fires 25 times and fabricates a minus each time. Two typographic discriminators separate the classes across every affected paper: a code-1 partner in the text, and whether the marker shares a line with its digits. U+FFFD is deliberately NOT covered - it lands in the OPERATOR slot, and on one rasterized page the same codepoint is both <= and >=. MEASURED: source prevalence 3/200 sampled papers (1.5%), 86 sites; shipped output over the 26-paper render baseline under a two-arm guard diff, 2 papers, 86 destroyed sites -> 0, 74 lines changing exactly as the rule predicts and 17 adjudicated as a fold-to-split that loses nothing. THOSE TWO 86s ARE DIFFERENT MEASUREMENTS OVER DISJOINT PAPER SETS and must not be quoted as one figure. Tools: tools/diag/unmapped_glyph_prevalence_scan.py, tools/diag/unmapped_minus_guard_diff.py. KNOWN AND NOT FIXED HERE: `whitespace._UNMAPPED_GLYPH_RE` matches only `(cid:N)`/U+FFFD while camelot_extract.py:715 runs that gate on Camelot cells, so it cannot see the new spelling of the marker its own docstring promises to condemn; widening it changes which grids are ACCEPTED, whose failure mode is text loss, so it gets its own measurement first (tools/diag/unmapped_marker_gate_census.py). # v2.4.12 (REAL PER-CELL GEOMETRY, 2026-08-19): every Camelot cell shipped `(0.0, 0.0, 0.0, 0.0)` while Camelot itself held real coordinates for each one - register A1/G6a, open across two releases and the single item blocking three known defects. Reading `ct.cells[r][c]` is one line; it took two releases because EVERY way of getting it wrong produces WRONG coordinates rather than empty ones, and a wrong bbox is worse than none - it answers, plausibly, and the answer is off by a page. G4 named four traps (bottom-up vs top-down; 1- vs 0-indexed pages; cells emitted AFTER docpluck trims rows; the whitespace path's zero table bbox) and deferred the work until the guard could be built first. Building the guard found TWO MORE, both live on real papers. T5: Camelot silently ROTATES a page whose text is sideways and reports coordinates in that rotated frame - 10.1001/jamanetworkopen.2023.39337 p8 reports rotation=anticlockwise, pdf_size=(792,612) and a table bbox reaching x=730.7, off-page in pdfplumber's 612-wide frame, while pdfplumber reports rotation=0; also 10.1017/s0007123424000024 p6 (clockwise), whose converted boxes come out with a NEGATIVE top. 2 of 8 papers probed. T6: `_augment_lattice_with_stream_rows` pd.concat's stream rows onto `ct.df` and never touches `ct.cells`, so 10.1038/s41598-023-50423-7 ships df=61x4 against cells=20x4 - zipping by index would give 41 rows of published data another row's rectangle. THE GUARD: each rectangle is converted to pdfplumber space, `chars_in_bbox` is asked what stands there, and the result scored by character-multiset CONTAINMENT - exact equality is the wrong predicate and the probe said so before the code was written, because Camelot assigns a whole text object to ONE grid cell even when its glyphs spill past that cell's column edges. Measured: per cell 86.3% score >=0.95 under the correct transform against 2.1%/1.5%/1.5% under T1/T2/T3; per TABLE the median correct score is 0.98 while ALL 200 tables fall below 0.30 under every trap. Gate 0.60, in a real gap - on the shipped corpus the lowest ACCEPTED table scores 0.70 and the two rejected score 0.55 and 0.53. All-or-nothing per table: a half-verified grid carries real boxes on some cells and zeros on others with nothing to tell them apart. Verification is SAMPLED (40 cells, fixed stride - never random), the geometry is not: `chars_in_bbox` is O(chars-on-page), so full verification costs 78.9 ms/table and grows with the grid, on the service's per-request path; the cap makes it 40.0 ms/table independent of size and changed NO verdict across 200 tables. The three row-trims each gained an index-returning `_keep_after_*` sibling and became one-liners over it - one implementation, two views, so the raw-row mapping cannot drift from the trim; behaviour verified identical to the originals over 6,002 generated matrices. Table gains `cell_geometry`, on EVERY table from EVERY path: "verified:<fraction>" or the named refusal (camelot_rotated_page, grid_shape_mismatch, roundtrip_failed, no_layout, whitespace_native, no_cells). An earlier draft left it unset on the non-Camelot paths and the census showed 11.6% of tables reporting nothing - which both hid the state and UNDERSTATED what we ship, since the whitespace path's boxes are built from pdfplumber words and are real by construction. Census on the shipped path (python tools/diag/cell_geometry_census.py, 12 papers, 69 tables): 81.2% verified, 10.1% no_cells, 2.9% roundtrip_failed, 2.9% grid_shape_mismatch, 1.4% camelot_rotated_page, 1.4% whitespace_native - and 5,206 of 5,686 cells (91.6%) now carry a real bbox where every one was (0,0,0,0). THIS IS THE FOUNDATION, NOT THE FIX: register J's two open text-loss defects and the FUSED-GRID class (G6h) are unblocked, not closed. # v2.4.11 (three TEXT-LOSS defects closed, 2026-08-19): the three gold-verified defects that had been sitting behind xfail(strict) because a fix for each was attempted and REVERTED. (a) detect._bbox_of_caption_line grouped a page's chars by round(top) ACROSS THE WHOLE PAGE and returned min(x0)/max(x1), so on a two-column page the caption's y-row also held the neighbouring column's body line - chan_feldman_2025_cogemo p8 gave a 441.8pt caption bbox for a table occupying 214pt, the region swallowed that column's prose, and every grid guard then rejected the table "on its own merits". Five sessions read this as a guard-tuning problem; it is horizontal, not vertical. Clipped to the caption's COLUMN RUN (detect._column_runs), keyed on the page's own gutter: the caption's inter-word gaps top out at 3.1pt against a 10.5pt gutter - TYPOGRAPHIC evidence, a band the renderer emitted. Region words 266->107. (b) whitespace._cluster_into_rows measured the y-gap to the PREVIOUS WORD; words are sorted by (top, x0) so the running previous-top creeps in sub-threshold steps and an arbitrarily tall band collapses into one row. Measured over the 26-paper baseline with tools/diag/row_cluster_census.py: 30 of 60 caption-anchored regions smeared across 8 papers. THE 2026-08-04 REVERT'S COUNTER-EXAMPLE WAS ITSELF THE DEFECT - xiao Table 4's "94.4pt legitimately tall row" is the entire table body (stacked header, 5 product rows, 5 CI continuation lines, 75 words) and that table emitted cells=0; it is now 7 rows / 35 cells. Four geometric discriminators had been designed and rejected around a constraint that did not exist. (c) _pick_better_table arbitrated on SHAPE alone, so a Discussion paragraph Camelot structured as a 4x2 grid outranked and replaced maier Table 7's gold-exact 3x5 descriptives; candidates are now tested for prose dominance (whitespace.grid_is_body_prose) BEFORE arbitration. THE FIRST REMEDY RE-CREATED THE DEFECT: a continuation re-merge folded an indented single-baseline line back into the row above, passed 31 green tests, and the corpus guard-diff said 21 tables lost cells (-867) and 12 lost raw_text - each fold EXTENDED the row so the contiguity test could never fail (10.1111/jomf.13036 Table 6: rows labelled 1/2/3/4+ are indented past their group label, so all five folded into one 75pt row). Deleted, not tuned. Same guard-diff also caught grid_is_body_prose condemning a REAL 33x4 qualitative table (10.5465/amc.2022.0006 T4, 70 cells / 2,008 chars - closed with a header-row veto reusing cell_cleaning._is_header_like_row) and, worse, that guard DELETING rather than substituting when the fallback was empty; the rejection is now PROVISIONAL (the candidate is stashed and restored, recording table_prose_rejection_reverted_no_replacement). Gate: tools/diag/table_capture_guard_diff.py, --isolate <change> for attribution. See docs/OVERHAUL_REGISTER.md section J and LESSONS L-046/L-047. # v2.4.10 (whitespace grid-guard accuracy, 2026-08-04): TWO false-negative classes in the guard that decides whether a whitespace/char grid is a real DATA table. (a) _CAPTION_LABEL_RE was UNANCHORED, so a mid-sentence CROSS-REFERENCE in a footnote/prose cell ("…al. (2007) in Table 8.", "…in Figure 2. We summarized…") read as an absorbed caption and condemned the whole grid; anchored to ^\s* to match the discipline camelot_extract._CAPTION_ROW_PATTERN already documents (its comment notes anchoring is why an inline "see Table 2" does not match). (b) the clean-data-cell test matched a SINGLE numeric token, so every multi-token APA COMPOSITE was scored as non-data — `2.84 [1.89]` (mean [SD]), `3.47 [1.23] (170)` (mean [SD] (n)), `2.84 ± 1.89`, `0.42***` — and a descriptives table built from them scored clean_data_rows=0 and was discarded as prose. Replaced the shape regex with a NUMERIC-DOMINANCE test (_cell_is_clean_data: digit-bearing AND free of substantive words), which generalises to composites not yet seen instead of chasing each with another alternation; the prose side is unmoved, so absorbed body text is still rejected. 101-PDF guard-diff: 24 tables recover (up from 20 at v2.4.120), 0 regressed, 0 foreign-caption acceptances. # v2.4.9 (RC-T cycle 4 own-caption exemption, 2026-08-04): _whitespace_grid_is_clean rejected ANY grid containing a "Table N."/"Figure N." caption cell — the signature of a region that absorbed a NEIGHBOURING table's caption. But detect._region_for_caption builds every region as _union(caption_bbox, geom_bbox), so a caption-anchored region ALWAYS contains its OWN caption by construction (the region-driven Camelot pass needs it for pairing). The guard therefore condemned EVERY region grid: whitespace_cells returned 0 cells corpus-wide (19/19 chan_feldman+maier regions) and each table fell to the raw_text fallback, which truncates rows. The exemption is IDENTITY-based, not position-based: the anchoring caption's number is threaded from the region spec (extract_structured) / region.caption_match (whitespace) into the guard, and a caption cell is exempt ONLY when it names THAT exact number, sits within _OWN_CAPTION_MAX_ROW, and is the first such match — per-CELL, and opt-in (own_caption_number=None keeps the strict legacy behaviour for the auto-detect path). A position-only draft was written and REJECTED in cross-model review (codex, 2026-08-04); all three of its holes reproduced locally — a NEIGHBOUR's caption in a leading row blessed as own (publishing another table's data), (r,c) sort order picking the leftmost caption on side-by-side pages, and a whole-ROW exemption letting a second Table/Figure caption ride along. Guard-diff over the APA corpus: 13 tables recover (ip_feldman T1, jdm_.2023.15 T2/T3, korbmacher T7/9/10/12/14, maier T3/8/9/10/11 — 812 cells), 0 regressed, 0 foreign-caption acceptances. chan_feldman is NOT fixed here: its regions genuinely absorb 2-column body prose and fail the prose/clean-data guards on their own merits (the separate region prose-trim cycle); its xfail(strict) stays armed with the corrected diagnosis. # v2.4.8 (RC-T caption-tail walk, 2026-08-04 — the gated RC-T cycle, user-approved): _extract_table_body_text's body_start walk stepped break-to-break (preferring ) and inspected only a 40-char window, so a WRAPPED caption whose table body serializes column-by-column (no early blank line) overshot the caption's own terminator and SILENTLY DROPPED leading rows (chan_feldman T3 lost its first four rows: Sample size / Geographic origin / Gender / Ethnic group; chan T1 lost hypothesis row 1). Replaced by _caption_tail_body_start: a per-LINE walk with three structural rules — (1) WHOLE-line terminator test measured from the true line start, so a self-terminated caption ("Table 6. Study 2 descriptive statistics.") breaks immediately (the xiao_2021 T6 truncation the run-3 prototype regressed on); (2) a blank line ends an unterminated caption; (3) a real caption wraps at most _CAPTION_TAIL_MAX_LINES physical lines — beyond that the "tail" is table CONTENT, so body_start returns to just after the caption line (the amc_1 T3 bibliography-table truncation). Plus _skip_leading_nontable_junk (drops a leading figure caption or wrapped body-prose paragraph from a recovered head; bounded + terminated-only so a genuine table's first rows are never eaten) and _raw_text_is_page_furniture_only (suppresses a fallback that is ONLY a next-page running header + page marker — jama_open_1 T2 rendered nothing but a journal banner, article title, date and "8/13"). _line_is_body_prose gains a bibliography-row exemption (author-initials opener + year) so a collection table's reference rows are not read as prose. 101-PDF guard-diff: 333 captions recover leading rows, 0 truncations (the run-3 prototype had 2). # v2.4.7 (concurrent-session reconciliation, 2026-07-02 — AI-gold-verified): landed six in-flight table fixes onto the v2.4.6 greedy+rescue base (the global-assignment pairing refactor was REJECTED — it regressed chan_feldman T6 + reshuffled ~24 papers, the same net-harmful class as prior global attempts). (1) chandrashekar side-by-side de-interleave: a page with ≥2 captions straddling a whitespace gutter drives each caption's region to its OWN column (_detect_column_gutters/_assign_caption_columns/_label_x_midpoint/_column_table_bottom + isolated Camelot calls), rebuilding caption+body from that column — Table 4 17×2-merge → clean 9×2, both captions gold-exact. (2) efendic T1 categorical + T2 detect: unified detect.py aligned-row-run (contiguous column-aligned run, prose-robust) + widen-aware geometry (_detect_geometry_widen_aware picks the more-columnar of narrow/widened band) + contiguous-footnote-gap + whitespace _is_categorical_grid acceptance — T1 3×2→5×3, T2 0×0-stub→11×5. (3) efendic T3 running-header strip (_RUNNING_HEADER_PATTERNS gains 'Author et al. <page>') + T2-5 leading caption-tail-PROSE strip (context-guarded: only above a genuine multi-cell header) — grids start at the real header. (4) collabra_77859 T2↔T3: bare integers excluded from the caption-overlap tokenizer (_CAPTION_TOKEN_RE → [a-z]{3,}|\d+\.\d+) so a stray 'Table 2' digit stops manufacturing false overlap; region-driven capture then pins pairing deterministically (a reading-order tie-break was tried + REJECTED — it perturbed greedy visit order and regressed chan_feldman T6). (5) cog_emo T8 caption-marker hint: an absorbed 'Table N.' first row (_leading_table_caption_number) authoritatively pins a grid to caption N, beating degenerate token-overlap ties — T8 recovers its 17×6 intercorrelation matrix, T9 its 12×8. Full 101-PDF structured diff vs v2.4.6 (Camelot verified DETERMINISTIC on this host: two identical-code runs byte-identical), AI-gold-verified on the changed papers. # v2.4.6 (duplicate-starvation rescue, 2026-07-01 — AI-gold-verified, PAIRING change): _rescue_duplicate_starved_captions repairs the greedy mis-pairing where, on a page with ≥2 captions, Camelot emits a near-identical DUPLICATE fragment of one table and the greedy first-come loop hands that duplicate to a SECOND caption — starving (dropping) that caption's own real table. When ≥2 captions were assigned identical-raw_text tables, the best-overlap caption keeps it and each other caption is reassigned to the best UNASSIGNED same-page table that fits it at least as well as the duplicate. Fires ONLY on that signature — a whole-corpus dup_rescue-firing scan confirms it activates on bmc_med_3 alone; every other page keeps its greedy assignment byte-identical (so the corpus-wide token-overlap fixes verified in prior cycles are untouched). bmc_med_3 Table 3 recovers its real 11×6 "Comparisons of SCE" grid (AI-gold-verified vs the source page; was a second copy of Table 2's 29×5). A full order-independent GLOBAL matching also fixed it but reshuffled ~24 papers + regressed chan_feldman T6 (prose fragment promoted to a caption) — rejected; see LEARNINGS / memory project_docpluck_region_driven_camelot. Camelot run-to-run non-determinism (feedback_camelot_flake_cumulative_load) defeats naive before/after fingerprint diffing, so surgicality is proven at the CODE-PATH level (no dup_rescue → identical HEAD path), not by comparing flaky shapes. # v2.4.5 (region-driven capture, 2026-06-29 — AI-gold-verified, CAPTURE-PATH change): each table caption now drives Camelot stream with its OWN caption-anchored region as table_areas (extract_tables_camelot_by_region + _region_driven_capture), so a caption gets exactly its table by construction — recovers stacked / side-by-side multi-table-per-page cases blind pages="all" + token-overlap pairing could not separate (efendic Table 4+5 split, 12 papers' 0×0 stubs → real). Region tables are CANDIDATES: _pick_better_table keeps the structurally-richer of {region, auto-detect} per caption (region too-narrow bbox can't collapse a wide table; jama_open_1 stays 43×7). Content-plausibility guards on the region path (_cell_is_prose dominance + _CAPTION_LABEL_RE absorption) reject prose-as-grid / caption-absorbed fragments → honest 0×0 stubs (cog_emo Table 3/9). Caption page-fix (char_start past leading \n\n/\f) is the foundation. Full 101-PDF structured diff (27 changed/0 err) + 6-paper AI-gold canary (all FIX/PASS/NET-BETTER, no new regressions). Known documented hard cases (not regressions vs prior): cog_emo T8 Camelot under-segmentation, chandrashekar 2-col caption interleave, efendic T2 Camelot-invisible, bmc_med_3 duplicate-fragment pairing (FIXED in v2.4.6 by _rescue_duplicate_starved_captions; the dedupe + bbox-proximity + global-matching approaches were net-harmful and rejected — see LEARNINGS). # v2.4.4 (ESCIcheck consumer request 2026-06-25 — flatten-only, AI-gold-verified): (DP-3) flatten._infer_anova_eta2_hint types a font-dropped η²p effect column by STRUCTURE — an unlabeled estimate column in an F-test/ANOVA results table (F + BF01/CI, no competing d/r/OR) is keyed `eta2`, range-guarded to [0,1]; the η²p glyph itself is unrecoverable (NotoSerif uni:no, OCR-tier). (DP-5b) flatten._inline_stat_field types a self-labeled cell (`r = .67`, `d = 0.32`) by its token even under a generic "Effect size" header. (DP-5a) cell_cleaning._is_fragment_cell recognizes a bracketed-CI close tail (`0.73]`) so a CI split across rows rejoins (`[0.59, 0.73]`) and the junk fragment row is dropped (cog_emo T8 14→10 rows). These three are flatten/cell-cleaning ONLY — no capture-path change, so caption→table pairing is byte-identical to v2.4.3. (DP-1/DP-2 capture recovery — the caption page-attribution fix — was prototyped but REVERTED: AI-gold canary verify showed it mis-pairs same-page-caption tables (efendic T4/T5, cog_emo T8/T9) and only half-fixes plos_med; it is queued as its own gated cycle with same-page disambiguation + region-quality gating. See an internal triage doc (2026-06-25).) # v2.4.3 (RC-T foundation): tables.whitespace gains a CHAR-LEVEL column-detection fallback (char_whitespace_cells) — when pdfplumber's word grouper glues a tight-kerned numeric row into one token so the word-gap detector finds < 2 columns, recover the grid from char x-gaps, voting on column-START edges (right-aligned data columns are left-edge-stable even when the label column is variable-width) and reinserting intra-cell word spacing from geometry. Fires ONLY as a fallback when the word path returns < 2 columns, so currently-correct tables are byte-unchanged (word path restored verbatim). Recovers ip_feldman Table 10's 7 regression rows in isolation. NOT yet wired to replace a degenerate MATCHED Camelot table (that extract_structured change + region prose-trim is the next gated cycle — see LEARNINGS 2026-06-25). # v2.4.2 (RC-T Layer-2): _extract_table_body_text now (a) Note-anchor — a table's "Note:" footnote is its last element, so trim body prose bled past it (chan_feldman T1/T3, efendic_2022 T5); and (b) degenerate-prose guard — suppress a raw_text fallback that STARTS mid-sentence with a lowercase multi-letter word AND is majority sentence-shaped prose, so render emits a clean caption-only table instead of an unstructured-table dump duplicating Results/Discussion prose (chan_feldman T9 was a verbatim ## Discussion duplicate). FP-safe (real cells start with header/label/number/single-letter marker, never a wrapped continuation); full-corpus 101-PDF guard-diff only trims+suppresses (grew=0 changed=0). # v2.4.1 (DP-2/DP-5): (DP-2) blank-header role recovery now types the unlabeled p-value (a bare `.XXX` after the test stat, no comparison op) and df (a bare integer/Welch-decimal between the stat and the d[CI] column) columns it previously skipped — collabra.77859 T3 fields gain p+df (tables.flatten._recover_blank_roles Pass 4.5). (DP-5) parallel-arm tables with a TWO-ROW header no longer drop their first data row, and a CENTERED super-header is aligned to its arm block instead of its visual-center column: (a) cell_cleaning._is_header_like_row counts APA value shapes (leading-dot decimal, bracketed CI, operator-prefixed p, N/A) as data via _DATA_VALUE_CELL_RE so a real first data row isn't read as a 3rd header row (collabra.90203 T10 recovered the Identifiable/Explicit-learning correlation); (b) tables.flatten._detect_column_groups re-derives arm boundaries from equal-width blocks of the data region (each must hold one super-label) so a centered super-label folded mid-span no longer swaps arm values (xiao_2021 T4 Original/Replication F) or pushes a stat column into the label region; (c) tables.flatten._classify_column reads a folded super-header cell's role from its sub-part (collabra.90203 T10 CI). Full-corpus cached-table flatten diff: no clean-table regression. # v2.4.0 (REQUEST_11): flatten now populates fields for NON-clinical result tables — (a) blank-header column-role recovery (tables.flatten._recover_blank_roles): assign a stat role to a header-stripped column from its data-token SHAPE (CI brackets, df1/df2 pair, estimate-adjacent-CI, p-with-operator) AND caption/footnote/all-header-rows vocabulary, never bare position; recovers collabra.77859 T5 (t/df/d/CI) + collabra.90203 T8/T9 (F/df/p/BF01/eta²p-as-est/CI). (b) packed parallel-arm split (tables.flatten._detect_packed_arms/_flatten_packed_arms): tables packing k≥2 arms into single cells ("Separate Joint" + space-joined values) emit one typed record per arm (group=arm) — collabra.77859 T3 Separate/Joint, xiao_2021 T7 Regret/Justifiability. (c) new BF01 role; validity guards drop r∉[-1,1] / non-monotone CI / non-int n / p∉[0,1]. (d) GENERAL L-004 fixes: _parse_number + _parse_ci_cell fold U+2212 MINUS (negative t/d/CI bounds in Camelot cells were dropped/sign-lost); _VALUE_GROUP_RE handles bracket-led CI groups. Default render + PROSECCO output byte-identical. # v2.3.0 (Tier-2, REQUEST_10): cross-flavor lattice-augmentation — recover data rows a lattice extraction vertically TRUNCATED by appending the rows a same-page, same-column-count stream table captured below the lattice bbox (camelot_extract._augment_lattice_with_stream_rows), gated on equal-col-count + bbox overlap + extends-below; PLUS numeric/parenthetical continuation merge (cell_cleaning._merge_continuation_rows) rejoining stream's stacked value/parenthetical cells. Fixes PROSECCO Table 2 R2-R6. v2.2.0: EC-T1 docpluck.tables.flatten — per-row FlattenedRow records (sentence + structured fields) for downstream stat-verification consumers (effectcheck/escimate/scimeto) + opt-in inline "rendered as text" block below each <table> via render_pdf_to_markdown(flatten_tables_inline=True). v2.1.5: cell-cleaning recovers CMEX10 extensible-bracket PUA glyphs (U+F8EE-F8FB). v2.1.4: cell-cleaning recovers Adobe-Symbol-font PUA glyphs (beta/chi/bullet as U+F0xx). v2.1.3: cell-cleaning recovers '<'-as-backslash glyph corruption. v2.1.2: cell-cleaning recovers descending-CI '2'-for-minus corruption. v2.1.1: cell-cleaning recovers (cid:0) corrupted minus signs + strips math-alphanumeric styling. v2.1.0: cell-cleaning pipeline ported from splice spike (multi-row header detection, continuation merging, leader-dot strip, mash-split, group separators, sig-marker attach)
78
78
 
79
79
  TableTextMode = Literal["raw", "placeholder"]
80
80
 
@@ -25,7 +25,7 @@ class NormalizationLevel(str, Enum):
25
25
  academic = "academic"
26
26
 
27
27
 
28
- NORMALIZATION_VERSION = "1.9.82" # v1.9.82 (2026-11-16, v2.4.161): T0 strips a paragraph as a table of contents only when most of its lines are contents lines (a Word file joined by single line breaks with one form blank "_______" was deleted whole; a form field with no page number is not a contents line); any step that leaves under half of a text of 1,000+ characters records normalization_step_removed_most_text, and a non-blank text left blank records normalized_text_empty; P0q on text without page breaks keeps a repeated line that a value follows (repeated_line_kept_value_followed); S6u never joins a line that is only a bare DOI to a number line under it (any case, any opener); the letter-marker scan cache is stored on the frozen layout. Previous: v1.9.81 (2026-11-13, v2.4.160): A1 statistic joins cross one line break only (a blank line is never crossed; a statistic left split by one is counted as a1_stat_split_by_blank_line_left), p/OR/CI/RR need a word boundary; a leading-dot value counts as a value-only line, looked up to 4 lines ahead; F0 counts each furniture line it deletes (f0_furniture_line_removed). Previous: v1.9.80 (2026-10-31, v2.4.157): W0p page- and token-bound, raised-sign exponents, word-attached footnote marks, ambiguous same-page copies left unmarked; S8m significance-mark rejoin; R2 keeps an inline digit between words. Previous: v1.9.79 (2026-10-29, v2.4.156): line-end hyphens restored in extract_pdf (one pdftotext -bbox pass); new steps W0u (digit-range hyphen), W0v (DOI hyphen), S6u (URL/DOI rejoined across a line), S0h (U+00AD that is the printed hyphen), P0t (running title on pages 2+); three-part compounds; reference numbers no longer glued to a DOI; more watermark patterns; ORCID URLs kept. Previous: v1.9.78 (2026-10-25, v2.4.155): the two-column reorder of interleaved pages (DOCPLUCK_COLUMN_CORRECT_GENERAL) is ON by default, behind a region plan: a page that is a table across the gutter, or two two-column blocks stacked apart or in different type, keeps pdftotext's order; a full-width table above or below the columns is read in place. The column crops also leave a rotated margin watermark to its own crop when a figure in the body carries a rotated axis title. Extracted text changes on reordered pages only (same words, new order). Previous: v1.9.77 (2026-10-24, v2.4.155): P0y drops a bare year that opens at least 3 pages and a quarter of them (the AOM verso running head "2020 Kim and Kim 585" left its year behind on 13-14 pages); the form feed stays, year cells inside tables are untouched. F0 also finds page footnotes set only slightly smaller than the body (9 pt under 10 pt), which the 1 pt body band had counted as body: the zone is a marker-led block of small print set apart by a gap below the lowest body-size line, in the lower half of the page, with no caption or table note in it (manifest: 3 Elsevier first-page note blocks move, nothing else). Previous: v1.9.76 (2026-10-24, v2.4.155): P1 RETAINS an acknowledgment / previous-version note it finds in the front zone (it deleted the note's first line and stranded the rest mid-Introduction) and sets it off as its own paragraph; the render labels it as a blockquote. P0 also drops the wrapped second line of the AOM copyright footer. Previous: v1.9.75 (2026-10-23, v2.4.154): F0 also strips running heads whose page number is fused into the line, and alternating (recto/verso) heads, but only within the first or last three lines of a page; the exact-repeat rule is unchanged. Previous: v1.9.74 (2026-10-14, v2.4.154): A4 turns braces into brackets only after CI wording (`d ∈ {1, 2}` is a set: 2 corpus sites restored, 10.1038/s41562-026-02417-4 and ieee-access-7); H0b joins a letter-spaced label pdftotext split in two when the layout prints it on one baseline (`article info`, 3 JESP papers); W0t gives a line-end fragment the text still prints hyphenated no licence (0 of 306 manifest firings change). Previous: v1.9.73 (2026-10-13, v2.4.153): W0t restores a compound hyphen pdftotext dehyphenated away (`selfreported` -> `self-reported`) only when the paper prints `A-B` inline, no layout word holds `AB` in a hyphen-free stretch, and the `A-` line ends cover every site of every compound starting `A`; 313 restorations over 101 manifest PDFs, 16 of them checked on the page (0 wrong). Previous: v1.9.72 (2026-10-09, v2.4.152): page numbers are decided on the RAW text (_pagination_verdict: own-block bare integer = page index + an offset shared by >=3 near-consecutive pages) and the late strip blanks only those lines -- table integers and raw data that chained like pages are no longer deleted (122 PDFs: 44 papers over their page count -> 0); the repeated-line once_per_page arm keeps a line followed by its value (table row labels); a page break rejoined across a split statistic lands before the statistic, never inside it; H0 keeps a banner-shaped line carrying a labelled statistic. Previous: v1.9.71 (2026-10-05, v2.4.150): no normalize rule changed; the TEXT it receives from extract_pdf did -- Linotype Pi fonts with no ToUnicode map (/H11005 ...) now decode as the font declares them (= < > + minus x alpha eta rho chi) instead of `!` `'` `&`. Previous:v1.9.70 (2026-09-28, v2.4.147): three changes to normalized text. (1) W0s: operator glyphs a publisher font labels as digits (`5` for `=`, `2` for minus) are corrected ONLY where the declared font is an operator-only repertoire AND every rasterized sample of that glyph is a bar shape -- two physical origins; otherwise passed through and counted. (2) The inferential CI-upper minus flip is retired at all four sites: a printed `[-0.52, 0.33]` is no longer turned into `[-0.52, -0.33]` (census: 4 firings, 0 correct). (3) S5a and S5b RETIRED -- U+FFFD is no longer rewritten to `eta` / `>=` / `<=` from the surrounding text, in normalize_text or in the render pass. Measured over all 9,988 repository PDFs: S5a 0 firings; S5b 20 firings in 6 papers, 15 correct (one paper) and 5 wrong (HAL cover pages, a blank DOI bracket became `<=`/`>=`). Previous: v1.9.69 (2026-09-25, v2.4.145): no normalize rule changed; the TEXT it receives from extract_pdf did — reference-list continuation pages are re-read left column then right, a column reorder is refused unless every non-space character survives (the released corrector duplicated digits), and the U+FFFD recovery is retired (an undecodable glyph now arrives as U+FFFD). Previous: v1.9.68 (2026-09-16, docpluck-review): _DOI_IDENTIFIER_IN_LINE and _BARE_DOI_IDENTIFIER_LINE (both new in v1.9.67) each restated the DOI grammar independently -- the very drift the comment on the first one warned against -- and disagreed on a doi:-prefixed short-form DOI ('doi:10/gt3vmw'): matched by _BARE_DOI_IDENTIFIER_LINE, missed by _DOI_IDENTIFIER_IN_LINE, which only recognised the short form after a doi.org URL prefix. Verified by printing both regexes' output on the same input, not inferred from reading. Both now derive from one shared _DOI_FULL_FORM / _DOI_SHORT_FORM pair. THIS VERSION MUST BUMP even though the change only widens one predicate used by an existing H0 exemption: a doi:-prefixed short-form DOI on a colon-introduced header-zone line now survives where it previously did not, so consumer text keyed on this string changes for that narrow shape. No corpus occurrence of the divergent shape has been found; this closes an unmeasured drift risk rather than a demonstrated corpus defect, and is recorded as such. // v1.9.67 (2026-09-12): a DOI on its OWN CONTINUATION LINE is reference DATA, and three rules were deleting it. P0's two curated DOI-line patterns fired document-wide on the strength of a comment that claimed "in-text DOI mentions ... never appear alone" -- false, because a reference whose DOI wraps is exactly that. Measured over 300 PDFs sampled random.Random(20260912) from a 10,049-PDF article corpus (297 English via tools/diag/_language.py; 1 spanish, 1 portuguese, 1 bilingual excluded and reported): they fired 649 times across 117 of 297 papers (39.4%) on a UNIQUE standalone DOI inside a References span, and 27 times in 2 papers on a genuine per-page journal footer -- 27/676 = 4.0% ACCURACY, the same arithmetic that condemned the EU-numeric rules and W0k. Verified at the primary source: 10.1525/collabra.138502 prints 133 DOIs and the academic render delivered 101, losing all 32 of its standalone-DOI lines (raw line 2217 is the wrapped tail of the entry ending "Sex Roles, 62(7-8), 520-531."). H0 contributed a THIRD route: its header zone is a flat 30-line cap with no content end-condition, so on a short document it reaches the bibliography and banner pattern 0 (generic bare publisher URL) deleted the short-form DOI line of a short QA fixture document on the "doi.org" host -- 6 references in, 5 DOIs out. THE GENUINE FOOTER IS NOT LOST WITH THEM: a journal stamps its own DOI on every page, so it RECURS, and P0r already strips on >= 3 standalone repetitions; _BARE_DOI_IDENTIFIER_LINE adds the shape there and was verified firing on real papers (10.1038/s41467-024-46784-w 19 lines -> 0, 10.24425/mms.2021.137706 7 -> 0), so it is not dead code. The line CONTENT is identical in both cases and can therefore NEVER separate them; recurrence can, and recurrence is what a running footer IS. Two H0 end-conditions added, each measured separately: no line inside a _find_references_spans span is header furniture, and a DOI-identifier line introduced by a colon-terminated lead-in is the object of a sentence (measured both ways over the same 297 papers: 4 of 5 real identifiers recovered, 1 of 120 masthead drops lost). THIS VERSION MUST BUMP even though the change mostly REMOVES rules: consumers store extracted text keyed on this string, so leaving it at 1.9.66 would make pre-fix and post-fix text indistinguishable in their store -- and the pre-fix text is missing published identifiers. WHY IT MATTERED DOWNSTREAM: a downstream citation pipeline feeds this render to its reference parser, so a reference that lost its DOI reached the database with doi: null and fell outside retraction coverage, with nothing erroring and no test going red; its end-to-end DOI-coverage assertion sat at 5 of 6 engineered identifiers and is 6 of 6 against the fixed render. Corpus re-measured after the fix: 649 reference-DOI losses -> 1, the single residual being 10.24072/pci.rr.101017.rev11 (a bioRxiv preprint URL with no colon lead-in), recorded rather than coded because one paper proves a shape exists and says nothing about prevalence. Pinned by tests/test_standalone_doi_line_is_reference_data.py, proved RED by re-inserting the two deleted patterns at runtime. PREVIOUS: # v1.9.66 (2026-09-08): W0g is UNWIRED from both of its text channels -- normalize_text and the render markdown post-process (it was never in the table-cell path; verified by grep, not assumed). It re-signed a bare positive decimal whenever a bracket in the same record "proved" a dropped minus, WITHOUT CHECKING WHICH STATISTIC THE BRACKET BELONGED TO: on korbmacher_2022_kruger the page prints `r(223) = -0.13 (p = .0498, 95% CI [-0.26, -0.0002])` and W0g published `p = -.0498`, a negative probability, plus `p = -.05` from the second occurrence. NOT a re-normalization curiosity -- the render call ran W0g over already-normalized markdown, i.e. a second pass, so render_pdf_to_markdown emitted both fabricated values on the FIRST render and every consumer of the .md received them. THE THREE TIERS directive (CLAUDE.md, 2026-09-06) names CI CONTAINMENT verbatim as forbidden evidence and W0g is CI containment by name; its signature is `text: str`, so it can never consult the rendered page. THIS VERSION MUST BUMP even though the change only REMOVES a rewrite: consumers store extracted text keyed on this string, so leaving it at 1.9.65 would make text produced BEFORE and AFTER the fix indistinguishable in their store. W0b, W0d, W0q, W0h and W0m are DELIBERATELY UNTOUCHED -- a family verdict must be tested per member, and the recorded "W0b/W0d/W0g fire 0 times in 226 papers" is WRONG for W0b and W0d, which recover 62 real minus signs on efendic_2022_affect. The definition is kept and unwired, not deleted. Pinned by tests/test_w0g_must_not_fabricate_a_negative_p_value.py, watched RED first. ALSO IN 1.9.66: G5c2_split_numbered_heading_rejoin is now IDEMPOTENT BY CONSTRUCTION -- it emits `N. <Heading>` and its own output was eligible as its own input, because the stacked-orphan guard only saw a BARE `^N.$` and lookup_canonical_label strips one leading number, so `6. References` still qualified as a target and a stray `3.` above it was glued on, giving `3. 6. References`, which resolves to None and makes the section partitioner lose the heading. That single shape was the ENTIRE remaining content of the corpus idempotency gate (efendic_2022_affect, am_sociol_rev_4, nat_comms_3, bmc_med_4), with digit counts IDENTICAL across all four -- a digit-delta check could never have found it. Pinned by tests/test_g5c2_must_not_stack_two_heading_numbers.py, watched RED first. // v1.9.65 (2026-09-08): W0i, W0k and W0l are UNWIRED from all three default text channels -- normalize_text, the render markdown post-process and the table-cell path. They rewrote a printed digit 3 into a multiplication sign on inferential evidence alone, which the THREE TIERS directive classes as a FILE LIE and forbids correcting silently; measured over 101 PDFs W0k fired on 5 papers and DESTROYED a real published token in 4 of them (HapMap3 -> HapMap *, ASL TO3 -> ASL TO *). THIS VERSION MUST BUMP even though the change only REMOVES rewrites: consumers store extracted text keyed on this string (e.g. `corpus-text__docpluck-norm@1.9.57.txt`), so leaving it at 1.9.64 would make text produced BEFORE and AFTER the fix indistinguishable in a consumer's store -- and a confirmed corrupted store exists (10.1038/s41562-024-02076-3 holds both `HapMap3 SNPs.` and `HapMap *`). The definitions are kept and unwired, not deleted. Pinned by tests/test_w0k_must_not_destroy_real_digits.py, all five watched RED first. // v1.9.64 (2026-09-02): `page_numbers_stripped` is an exact occurrence count and `headers_removed` is retired -- the two keys the 2026-08-22 telemetry blocker (ask 114401Z) was measured on were still CHARACTER DELTAS after the v1.9.63 sign/dash/quote `count=` work: two-digit page numbers reported 2x, three-digit 3x, and `headers_removed` fired on zero-header documents because the S9 `_track` reused the `before` snapshot captured for P0, republishing P0's page-number characters under a second key. P0 now counts the lines its helper blanked (line count preserved by construction; zip(strict=True) makes any future violation loud); the S9 4-digit blanking counts its own blanked lines and reports them under `page_numbers_stripped` -- the kind of thing it actually removes -- so `headers_removed`, which no site writes truthfully, is no longer written at all (absent reads as 0 downstream, which is the true value: this path never removed a header). Text output is byte-identical -- the change is observation only, pinned by tests/test_page_number_telemetry_is_an_exact_count.py, written red first. // v1.9.63 (2026-09-01): THE WATERMARK ARM'S "ACCEPTED RESIDUAL" WAS FOUR RED TESTS, AND THE SIGNAL THAT CLOSES IT IS NOT POSITIONAL. v1.9.62 reinstated the arm on page coverage and DOCUMENTED, in code and in a test named `test_the_residual_is_real_and_is_documented_not_denied`, that a table row label at >=90% page coverage would still be deduplicated -- reasoning that "at that coverage no POSITIONAL signal separates a table label from a watermark". The reasoning was true and beside the point: it only ever looked at position. The cost was not hypothetical -- it left FOUR tests red in `test_page_gate_never_deletes_the_last_copy.py`, the file whose entire purpose is to pin that this gate never deletes data, and the release was reported as verified with them red. They were found by a repository-wide sweep, not by this stream. TWO TYPOGRAPHIC SIGNALS CLOSE IT. (1) NOT FOLLOWED BY ITS OWN VALUE: a table ROW LABEL is followed by the number it labels, so deleting it orphans that number -- the exact harm rule 0g names -- while an overlay is followed by whatever the page held. Measured: `Author Manuscript` is followed by a bare value on 0 of 220 (ieee_access_2), 2 of 92 (ieee_access_alt) and 2 of 112 (10.1525/collabra.19525) occurrences, against 5 of 5 for `Number of trained architectures` and 7 of 9 for `Performance metric` on the REAL ieee_access_5, and 20 of 20 for the adversarial spread-table fixture. Two orders of magnitude apart, so the 0.50 threshold sits in the gap rather than on an edge. Shipped as the named `_value_followed_fraction` so its test pins the SHIPPED rule rather than a retyped pattern. (2) MODAL COPIES PER PAGE >= 2: a watermark repeats WITHIN a page, which is the only reason this arm exists. The adversarial header-above-title prints the string twice on page 1 and ONCE on every page after, so its modal per-page count is 1 and its max_per_page of 2 comes from one page; the real watermarks are modal 4 on 100% of covered pages. A line whose typical page carries one copy is a RUNNING HEADER, and the once_per_page arm correctly declines it. Grok 4.6 (xai) named this shape on 2026-08-28 as a reason to delete the arm and was right that the arm reached it; it no longer does, and nothing is removed at all rather than all-but-one. PER-PAGE UNIFORMITY was measured as a candidate gate and REJECTED, and that finding stands: the synthetic worst case is uniform too (4 copies on 5 of 5 pages), so it separates nothing. AND THE TEST FIXTURE WAS WRONG, which is why nothing caught this sooner: `_paginated_doc` emits `marker / "" / "%0.3f" / ""`, a value directly under every copy -- the TABLE ROW LABEL shape. Two tests used it to assert the arm FIRES, so the file's entire positive direction was pinned on the shape the arm must refuse. It is kept for the negative tests, where "a row label must survive" is exactly what it should model, and a new `_overlay_doc` models a genuine overlay. Real-paper effect unchanged: ieee_access_2 still promotes `## V.: SUPPLEMENTARY INDEX`, still removes 219 of 220 watermark copies, and all 7 real table labels across ieee_access_5/6/10 keep every copy. See tests/test_watermark_arm_is_gated_on_page_coverage.py. # v1.9.62 (2026-08-29): THE WATERMARK ARM IS BACK, GATED ON PAGE COVERAGE RATHER THAN ON A RAW COUNT -- AND A ZERO MEASURED THE INSTRUMENT AGAIN. v1.9.61 deleted the `count >= 20` arm on a reproduced Grok 4.6 (xai) finding that it deduplicated TABLE CONTENT, and set the conditions for reinstating it: "a discriminator that encodes the measured shape (present on essentially every page), not a raw occurrence count -- and gather more than one positive first". Both are met and all three stated reasons for the deletion were RE-TESTED, none surviving. (1) WHAT THE DELETION COST, which is what forced the re-test and was not visible when it was taken: with no arm, ieee_access_2.pdf retains all 220 copies of "Author Manuscript", one of which sits between a paragraph and the heading `V.: SUPPLEMENTARY INDEX`, which is therefore never promoted. That is SECTION STRUCTURE reaching the sectioning consumers -- so the deletion note's asymmetry argument ("furniture that survives is VISIBLE and reversible") did not hold here: the loss was neither, and it was caught by a test, not by a consumer. (2) THE DISCRIMINATOR IS PAGE COVERAGE and the classes separate with no overlap. Measured over the 10 IEEE test PDFs plus 10.1525/collabra.19525: WATERMARKS at ratio 0.96-0.98, each exactly 4 copies on EVERY covered page (ieee_access_2 220x on 55/56; ieee_access_alt 92x on 23/24; collabra.19525 112x on 28/29), against TABLE CONTENT at ratio 0.06-0.22 (`Performance metric` 9x on 4/18; `Feature Categories` 7x on 3/18; 9 more, none above 0.22). (3) THE LABEL THAT CONDEMNED THE ARM IS IN THE SECOND BLOCK. `Number of trained architectures` occurs 5 times on 3 of 18 pages of the real paper -- ratio 0.17. The reproduction that deleted the arm was a SYNTHETIC document built to the reported shape; the shape is reachable and the paper is not an instance of it. Rebuilding it here took two attempts: the first fixture reported UNTOUCHED on all three trees INCLUDING one with the original arm restored, because S8_line_break_joining merged the label into the next line before the strip ran. A probe that does not reach the branch reports a clean run; asserting the arm FIRED is what caught it. (4) DENOMINATOR, measured separately from the shape: over 200 papers strided from the 9,888-PDF repository (198 extracted OK) this gate selects ZERO lines -- and that zero was checked against a KNOWN POSITIVE before being believed, the identical filter firing on 3 of 3 known watermark papers and 0 of the 8 other IEEE papers beside them. (5) THE RESIDUAL IS STATED, NOT ENGINEERED AROUND: a table label repeated several times per page across >=90% of a document would still be deduplicated. Built synthetically it DOES fire; it was not found in any of the 198 real papers. Accepted because at that coverage no POSITIONAL signal distinguishes it from a watermark -- that IS the definition of one -- and because the damage is bounded three ways: rule 0g spares the first copy in document order, `_carries_statistical_content` refuses anything carrying data, and every removal is named per line in `repeated_line_stripped:watermark_every_page`. Per-page UNIFORMITY was measured as an extra gate and REJECTED: the real watermarks are perfectly uniform, but so is the synthetic worst case, so it separates nothing the ratio has not. See tests/test_watermark_arm_is_gated_on_page_coverage.py, whose 14 cases were watched with the arm removed: the 3 real watermarks and both synthetic arm cases go RED while all 7 real table-content cases stay GREEN in both states. # v1.9.61 (2026-08-28): THE PAGE GATE DELETED AN ARTICLE TITLE, AND ITS PAGE MAP WAS WRONG FOR HALF OF ALL BOUNDARIES. v1.9.60 was blocked pre-tag by a three-provider consult (sol/openai, sonnet/anthropic, grok/xai); every finding below was reproduced locally before it was acted on, and one reviewer claim was reproduced and found WIDER than reported while another needed three attempts before the probe reached the branch under test. (1) PAGE ATTRIBUTION. `_page` was incremented AFTER the line was recorded, while pdftotext glues the page separator to the FIRST LINE OF THE NEW PAGE -- so the first line of page N was filed under page N-1, and the first line of a page is exactly where a running header sits. On a 6-page header the map came out [1,1,2,3,4,5], giving max_per_page 2 instead of 1, so the once-per-page arm did NOT fire and all six copies survived: the gate failed at its own purpose while staying live on footers and on table content, the two error directions it exists to separate. Measured over a 70-paper strided sample (tools/diag/form_feed_page_attribution_census.py): of 994 form feeds, 70 (7.0%) sit alone on their line and are HARMLESS -- strip() empties the line so nothing is recorded -- 415 (41.8%) are glued to a line outside the 15-120 candidate band and cost nothing, and 509 (51.2%) are glued to a RECORDED candidate and corrupt the map. An independent 36-paper sample gave 1122/2218 (50.6%). NOT 93% and not 100%: those figures answer "how many are glued" and "how many have nothing before them on their line", and only the 51.2% bounds the fix. (2) RULE 0g, ALL-OR-NOTHING. The strip took EVERY copy of a repeated line. On 10.1001/jamanetworkopen.2023.39337 the title "Effect of Time-Restricted Eating on Weight Loss in Adults With Type 2 Diabetes" occurs 13 times -- twelve running headers and, on page 1, the TITLE BLOCK, which the text layer shows sitting between the article-type banner `Original Investigation | Nutrition, Obesity, and Exercise` and the subtitle `A Randomized Clinical Trial` plus the author list. All thirteen went and the paper shipped with NO TITLE, with nothing in `changes_made` naming it. The FIRST copy in document order now always survives: where a content instance exists it PRECEDES the furniture derived from it, where every copy is furniture the cost is one visible challengeable line, and document order is stable under line removal -- which also makes the step idempotent by construction, since pass 2 sees one occurrence and fails the count>=5 floor. A CLEVERER SURVIVOR RULE WAS BUILT AND REFUTED and is recorded so nobody rebuilds it: "furniture travels with furniture" (score each occurrence by how many neighbours are unique) TIES TWELVE occurrences on the JAMA title and cannot pick it, while on 10.1098/rsos.182237 it separates cleanly and picks a copy sitting in the REFERENCES section. Wrong in both directions at once. (3) FOUR MORE FORM-FEED EATERS, and then three more found by census. v1.9.60 fixed five line-dropping sites; these are SUBSTITUTION and STRIP sites its sweep could not reach. A1 spells every gap with the regex whitespace class, which matches U+000C: ALL SEVEN reachable patterns lose the boundary, not the one the findings doc demonstrated. A1 is now page-scoped BY CONSTRUCTION (split on the form feed, edit within each page, rejoin) rather than by a hand-narrowed class in ten places -- measured cost, 1 of 524 firings (0.2%) straddles a page break, and that one is a `p =` at the foot of one page joining its value at the head of the next, the shape a rejoin is least entitled to assume. The FINAL `out = t.strip()` ate a boundary on 70 of 70 papers, because pdftotext ends every document with one; four papers leave normalization with 2-3 form feeds and two sit at exactly 2, where losing one drops them below the `>= 2` paginated threshold and into the unstable line-index fallback this release exists to retire. T0 (_strip_toc_dot_leader_block) loses it at TWO sites, the dropped-paragraph `continue` and the leading-blank trim, since a form-feed-only paragraph strips to the empty string. P1 (_strip_frontmatter_metadata_leaks) loses it at its drop `continue`. F0's FOOTNOTE branch never called `_drop()` while the header/footer branch four lines above it does -- and a footnote is by definition the LAST content on its page, so the separator it consumed is a boundary more often than not. LateJoin and A4 keep their boundary through a new shared `keep_break_in_rejoin`, which re-emits it BEFORE the rejoined token: these sites CANNOT be page-scoped, because crossing the break is the whole point of them, and emitting the boundary INSIDE the statistic would hand consumers a token no paper printed. Corpus effect over the 70-paper sample: form feeds retained 393/994 (40%) at HEAD -> 829/994 (83%), and papers left at ZERO page boundaries 17 -> 0. The 160 still removed are ONE deliberate, documented site -- R3 collapses the page-break junction inside a bibliography so a reference entry split across a page rejoins -- and are left alone rather than swept in. (4) PER-LINE TELEMETRY. A character delta cannot say WHAT vanished; the title's disappearance was invisible in `changes_made`, and the differential that eventually caught it had to re-run two builds of the library over the same corpus. The strip now records `repeated_line_stripped:<arm>` per removed copy and `repeated_line_last_copy_kept` for the copy spared, both with the line text as the detail -- routed through the existing `record_fallback` channel that `normalize_text` already holds open and `batch.py` already copies onto ExtractionReport, because a NEW report field would need plumbing at every serialization layer and the last three telemetry fixes in this file each stopped one layer short of a consumer. THE `count >= 20` WATERMARK ARM WAS DELETED IN THIS VERSION -- and this sentence previously claimed the opposite ("WHAT DID NOT CHANGE ... nothing here licenses either keeping or removing it"), which was true of an earlier draft and stale by the time the code shipped. CORRECTED 2026-08-29; 1.9.61 was never released, so the record is amended rather than struck. The arm's zero across the 70-paper sample measured the INSTRUMENT: that corpus contains none of the three papers that exercise it. See v1.9.62. NEITHER GATE ANYONE WOULD REACH FOR CAN SEE THE TITLE DEFECT: the deletion is perfectly idempotent -- pass 1 and pass 2 byte-identical with the title absent from both -- and the canary's --quick paper is byte-identical under both versions, with none of its 8 configured papers showing the signature. Both run honestly and are blind. See tests/test_page_gate_never_deletes_the_last_copy.py, whose nine fixes were each reverted in isolation and watched RED. # v1.9.60 (2026-08-25): A REPEATED LINE IS FURNITURE BECAUSE OF WHERE IT SITS ON THE PAGE, NOT HOW FAR APART IT SITS IN THE FILE -- and `changes_made` now publishes a COUNT rather than a character delta. (1) THE REPEATED-LINE STRIP was gated on `min(gaps) >= 20`, the minimum LINE-INDEX distance between occurrences, as a proxy for "once per page". The proxy is not stable under line removal and its own comment predicted the failure ("causing idempotence drift when pass 2 has a shorter input"). MEASURED on ieee_access_5: the table column header `Performance metric` appears 9 times on pass 1 at [521, 545, 582, 651, 682, 972, 978, 1032, 1040] -- two tight pairs at the tail give min_gap 6, so it is KEPT; other steps then delete those four tail occurrences, so pass 2 sees five well-spaced ones, min_gap 22, and DELETES ALL FIVE, losing the label that says what the numbers underneath it are. No threshold fixes this: min-gap over a shrinking occurrence set is not monotone. The gate is now the PAGE DISTRIBUTION -- a line is furniture only if it occurs on >= 5 distinct pages AND either at most once per page (running header/footer) or >= 20 times (a watermark that repeats within each page). A line's page is a property of the document, so deleting other lines cannot move it. Over the 21-paper strided sample the two classes separate with NO OVERLAP: 16 running headers (5-21 pages, 1 per page) and 4 watermarks (on every page) against 13 lines of TABLE CONTENT the old rule was DELETING -- `Number of trained architectures`, the values 100/200/0.18/2/3/4/8, `Total`, `Other`, demography_3's 21 `***` significance markers (19 of them on ONE page, taken by the `count >= 20` path) and maier's 26 `X` marks (ALL on one page). So this was never only an idempotency bug. (2) THAT GATE NEEDED THE PAGE BOUNDARIES BACK, and five steps were destroying them: P0_page_footer_strip (113 form feeds over the sample), P0r_recurring_running_header_strip (74), S9_header_footer_removal (9), H0r and G5c2 (1 each), each dropping a whole line with a bare `continue` and taking the form feed glued to it. This is L-052's class, whose promise had been made three separate times in three LOCAL implementations -- and the sites that had not made it were the ones nobody had looked at. One shared `keep_page_break` / `page_break_residue` now defines it once. Corpus effect: 371 raw form feeds -> 85 (23%) at HEAD -> 290 (78%), and papers left at ZERO page boundaries 11 of 21 -> 0 of 21. (3) DELETE FURNITURE, NEVER DATA (rule 0g) is now actually consulted by the repeated-line strip, which never called `_carries_statistical_content`. It had to be: with the page gate in, `j_health_soc_behav_1`'s figure note `Note: Whiskers indicate 95% confidence intervals. N = 136,739 (women = 68,993, men = 67,746). Data are from the` sits once under each of five figures on five pages and is indistinguishable from a running footer BY POSITION. Its wrapped second line is caught by widening the data-source-caption marker so the year may sit anywhere inside the parenthesis group (`(Release 22, years 2001-2023)`), the same survey-plus-year-range shape that marker was written for. HEAD-vs-fix over the sample: 34 furniture lines newly removed, 10 lines recovered, ZERO lines of data lost, corpus non-idempotency 1 -> 0. (4) `NormalizationReport._track` takes an explicit `count=`, wired at W0g / W0q / W0h -- the three rules whose sum effectcheck publishes as `upstream_sign_rewrites`. NO PUBLISHED VALUE WAS WRONG, and this is stated plainly because the first draft of this entry claimed one was: measured over the 21-paper corpus the family fires on ONE paper reporting signs=6 delta=6, and ZERO papers diverge. What changes is that the agreement was a COINCIDENCE OF WHITESPACE and is now a contract. `changes_made` held `abs(len(before) - len(after))`, which for this family is the whitespace normalisation, and that equals the number of minus signs re-attached only when there is exactly one stray space per bound: `[- 0.58, - 0.18]` gives delta 2 / signs 2, but `[- 0.58 , - 0.18]` gives delta 3 / signs 2 and `[- 0.58, - 0.18]` gives delta 4 / signs 2. Neither divergent shape occurs in the corpus -- they are arithmetic probes, not prevalence claims -- and that is the point, because a latent divergence never announces itself. This is exactly the closure ESCImate's 2026-08-22 notice asked for: "exactness here rests on a property of the RULES, not of the metric". THE UNIT IS MINUS SIGNS ATTACHED TO A NUMERAL, uniform across the three rules, because one W0q firing repairs one bracket and can attach TWO signs -- a per-firing count was drafted first and reports 3 on that paper where the truth is 6, the mirror error. `_track` never INVENTS a count: a call site supplies one or the character delta stands unchanged. `changes_made_by_step` stays a character delta by design. See tests/test_changes_made_is_an_exact_count.py and tests/test_repeated_line_strip_is_page_scoped.py. # v1.9.59 (2026-08-22): A PAGE NUMBER IS IN THE MARGIN; A BARE INTEGER IN THE BODY IS A VALUE. The standalone-page-number strip was one MULTILINE substitution with no page context, so it deleted EVERY line whose whole content was a 1-3 digit integer -- and pdftotext emits a narrow numeric table column as ONE CELL PER LINE. It was silently selective: `-4`, `0.5` and `1000` never matched, `0`, `4` and `999` always did. MEASURED on 10.1136/bmj-2024-080924 (BMJ) supplementary appendix Table S1 p6, row "Number of Advancement Maneuvers (attempt #2)": the paper prints a coefficient of `0` with `(-1.5 to 1.5)` and `p = 0.999`, and we delivered the interval and the p-value WITH NO ESTIMATE -- worse than a wrong number, because an interval attached to nothing cannot even be attributed. This is the real content of ESCImate `2026-08-09/DP-14`, which both sides had diagnosed as a "column-major dump"; the source text layer is row-major and complete, and this rule punched the holes. The gate is TYPOGRAPHIC: a page number is drawn in the margin, so it must be among the first or last 2 non-blank lines of its page. A SECOND gate strips a PAGINATION RUN wherever it sits -- `value - page_index` constant across >=3 distinct pages -- because a two-column PDF puts the number mid-stream in pdftotext reading order (10.1016/j.jesp.2009.12.010 prints `495` between "non-agree-" and "ment and the status quo"); a table column cannot satisfy that, its integers sit on ONE page. Corpus effect over the 26-paper baseline, old rule vs new: 1,228 bare-integer lines RETAINED, 1,104 still stripped, and the LINE COUNT is identical on all 26 papers -- the parity v1.9.57 was measured against. Site census: 345 margin vs 1,987 body-interior sites in 26/26 papers, 239 of them beside an interval or a p-value (tools/diag/page_number_strip_blast_radius.py --baseline). The step had NO count, NO changes_made key and NO log line; it now tracks P0_standalone_page_numbers / page_numbers_stripped. A first draft of the fix recomputed the margin band after each removal, which promoted the next line into it and erased a table column of `1 2 3 4 5` inward -- caught by its own test, not by reading. ALSO: NormalizationReport.changes_made now ACCUMULATES instead of overwriting (three rules write dropped_minus_signs_recovered and three write minus_signs_recovered, so only the last survived; filed by ESCImate 2026-08-21 §4, who had to publish upstream_sign_rewrites as a LOWER BOUND), and the new changes_made_by_step records every changed step INCLUDING length-neutral ones -- a `2`->`-` glyph substitution has a delta of zero, so the rules this metric exists for were the ones most likely to vanish from it. See tests/test_page_number_strip_never_deletes_data.py and tests/test_changes_made_accumulates.py. # v1.9.58 (2026-08-21): A RUNNING HEADER'S DEBRIS MUST NOT VETO THE HEADING AFTER IT. v1.9.57 recorded that ONE stray U+0008 BACKSPACE made a running header unequal to its layout-channel twin and therefore unstrippable, and fixed it -- inside the F0 COMPARISON KEY only (_NONSPACE_CTRL_RE, used solely by _key). The character stayed in the EMITTED text, where an unrelated rule then landed on it: sections/annotators/text.py::_prior_paragraph_is_sentence_terminated walks back over space/tab/newline and requires the character underneath to be in '.!?/'. On 10.3389/fvets.2025.1645266 (PMC13137375) p2 the header arrives as FORMFEED + 'Abuna et al.' + BACKSPACE, so the walk lands on the BACKSPACE, the guard says the prior paragraph is unfinished, and the heading '1 Introduction: the need for regenerative solutions in reproductive medicine' is never emitted. Because partition_into_sections fills each span to the NEXT matched heading, the preceding KEYWORDS span then swallowed 69,849 characters -- the whole article. NEW STEP C0 _strip_furniture_controls, run BEFORE F0 so the comparison key and the output are ONE rule rather than two. THE CLASS IS ONE CHARACTER WIDE, AND MEASURED: over the 30-paper held-out PMC corpus all 33 U+0008 occurrences carry the identical context PERIOD + BS + NEWLINE (trailing furniture) and ZERO carry the overstrike signature (x)BS(x), so no doubled letter can be manufactured -- a reviewer predicted exactly that regression and the corpus refuted it. THE OTHER 16 CONTROL CHARACTERS ARE NOT FURNITURE AND ARE NOT STRIPPED: they are corrupted content glyphs (Schri<02>macher = Schrittmacher; No<04>allsanitat = Notfall...; A<03> -B<03> helices), and deleting them would destroy text. They are COUNTED instead, in the new NormalizationReport.residual_control_chars, because a known limitation written down without a measurement is an unpaid debt rather than a disclosure -- 49 of them live in 16 of the 30 papers. Measured knock-on, pinned by a test: with the BACKSPACE gone, H0's banner strip can finally match the header line it was always meant to catch, so the with-BS and without-BS inputs converge. Arena effect (offline harness, 30 held-out PMC papers): the body-label slice mean rises 0.7681 -> 0.7910 and PMC13137375 alone goes 0.0761 -> 0.7627. See tests/test_furniture_control_chars.py. # # v1.9.57 (2026-08-20): A PAGE NUMBER IS FURNITURE; A PAGE BOUNDARY IS STRUCTURE. The standalone-page-number strip was `^\s*\d{1,3}\s*$` under MULTILINE, and the whitespace class matches THE FORM FEED - so the rule could consume the page break standing beside the number it deleted. Wrong since it was written, held latent by a running footer sitting between the two; anything that stripped that footer took every form feed with it, and with them the `\n\f\f\n` marker separating the footnote appendix, folding it back into the body. TWO BASELINE PAPERS WERE ALREADY IN THAT STATE AT HEAD - 10.1016/j.jesp.2021.104154 and 10.1016/j.joep.2020.102350 report 15 and 18 footnotes through report.footnote_texts while the returned string carries no appendix at all. Measured over the 26-paper baseline against a git worktree of the prior tree, extracted in separate interpreters: 0 lines removed, 0 added; 16 papers gain page breaks (+1..+17); 2 appendices restored (0 -> 1,288 and 0 -> 2,165 bytes); 0 papers worse on any metric. Shipped as the named `_strip_standalone_page_numbers` so its test pins the SHIPPED rule, not a retyped pattern; the form feed is CAPTURED and restored rather than excluded, because a page number is often the first thing on a new page and excluding it stopped those lines matching at all. `_drop()` keeps the same promise inside F0's strip loop. See LESSONS L-052. # v1.9.56 (v2.4.134): THE EVIDENCE EACH REPAIR RESTS ON IS NOW DECLARED, AND ONE RULE STOPPED FABRICATING A SECOND MINUS SIGN. (1) `_ALREADY_SIGNED` is a ONE-CHARACTER lookbehind, so it refused `-0.38` and ACCEPTED `- 0.38`: on a DETACHED sign W0g read a bare-positive estimate, proved it negative from the CI, and emitted `d = - -0.38` - a double-signed effect size no paper printed. The comment above `_SIGNED_DASHES` records that `-2.68 -> --.68` already happened once and that "the fix then covered the one dash form in front of us"; it covered the ATTACHED form. Caught by the idempotency corpus gate, not by reading the rule. (2) W0q: `recover_dropped_minus_ci_upper_in_text` existed ONLY in the table channel, so a CI written in a results SENTENCE never met it - confirmed against the rasterized page of 10.1016/j.jesp.2021.104154 p13, which prints `d = -0.38, 95% CI [-0.58, -0.18]` while pdftotext detaches every minus. 3 brackets in 1 of 26 baseline papers, and the containment arithmetic repaired 0 of them (it had grabbed `S.D = 1.43` as the "estimate"). (3) That rule now splits TYPOGRAPHIC from INFERENTIAL: a DETACHED DASH is a glyph the renderer emitted and the comma proves it is a sign rather than a range separator, so group 5 - captured since the rule was written and never read (register O5) - finally decides. The containment arm is KEPT because chan_feldman_2025_cogemo Table 9 row 2bii has no dash and only the arithmetic recovers its published -0.33, but it is now DECLARED via `ci_upper_minus_inferred_from_containment`. (4) O10: `_recover_estimate_column_via_ci_column` treated any negative bound as proof of the 2-for-minus corruption - including bounds `recover_corrupted_minus_signs` had manufactured one line earlier. It now fires only on a bracket THIS pass actually repaired. (5) O8: W0j signature B is labelled INFERENTIAL in the code and records every firing; W0p records its positional pairing. (6) `NormalizationReport.fallbacks` - every `record_fallback` inside normalization was outside `extract_pdf_structured`'s window and therefore write-only, INCLUDING the ambiguous-pairing refusals added in v2.4.133 to make W0h/W0m observable. # v1.9.55 (v2.4.133): THE LAYOUT-GATED REPAIRS STOP ASSIGNING THEIR EVIDENCE POSITIONALLY. W0h/W0m proved "N glyphs of shape X are corrupt" in pdfplumber's stream and then rewrote the first N matching tokens in pdftotext's stream, document-wide with no page key - so a glyph proven on page 7 licensed flipping a token on page 2. REPRODUCED, not reasoned about: with a decoy `q = .428` prepended to the W0h source paper (ar_apa_j_jesp_2009_12_011), the old code flipped the DECOY and left the genuine coefficient corrupt - one number fabricated, one missed. Each evidence site now carries its own page and its own layout line text, and pairing REFUSES (recording `w0h_ambiguous_pairing_refused`) when the context cannot separate candidates, because pass-through is reversible for the consumer and a rewrite is not. Page-INDEX scoping was measured and rejected: by the time W0h runs the text holds 7 form feeds for a 12-page document, so aligning text page k to layout page k is an off-by-k that produces a confidently WRONG pairing rather than an empty one. W0m was the worse of the two - it counted beta glyphs and flipped the first N `b = <anything>` WITHOUT requiring the coefficient to match, so a beta proven on one page could relabel a genuine unstandardized `b` (a different statistic) elsewhere; the coefficient is now part of the identity. See tests/test_w0h_pairing_is_identity_based.py and docs/OVERHAUL_REGISTER.md G5. # v1.9.54 (v2.4.130): THE SEPARATION OF DUTIES, EXECUTED. Three rules that repaired the PAPER rather than canonicalising NOTATION are DELETED, together with the guard that existed only to serve them. A2 (dropped-decimal repair, `p = 38.` -> `p = .38.`) had NO CITED PAPER anywhere in its code; asked for one, BOTH of its firing sites across 297 English papers turned out to be the paper's own error, rasterized: 10.1177/0146167210380928 p13 prints `B = -0.28, SE = 0.31, p = 38.` and 10.1016/j.jesp.2016.11.001 p7 prints `t(186) = 3.90, p = 001`, each with correctly-dotted numbers on the same line. W0n (`p < 05` -> `p < .05`) is deleted in BOTH channels because its premise is false: the SAME shape has OPPOSITE OWNERS in two real English papers - 10.1016/j.jesp.2009.12.011 p3 PRINTS `p < 05` (the author dropped it; advance 2.00pt vs 3.90pt at a dotted site on the same page, no rect/curve/line in the gap) while 10.1177/0956797613482946 p6 PRINTS `p < .05` and our OCR text layer lost it. A calibrated layout-advance gate (0.51 vs 0.99) was built and REFUTED: Dong p6 is a SCAN whose char boxes come from an OCR engine, so the gate manufactures its own evidence for the exact case it exists to catch. Under irreducible ambiguity the default is PASS-THROUGH, because pass-through is reversible for the consumer and a repair is not. A3a (thousands strip) is deleted because ITS PURPOSE EVAPORATED: its own comment said it strips "so A3 sees the already-clean integer and leaves it alone", and A3 was deleted in v2.4.129. It also produced 1000x errors - 10.1177/0956797620935584 Table S2 p24 prints a Satterthwaite df of `185,178` (fractional by construction, i.e. 185.178) and we delivered `185178`; the collision is STRUCTURAL, since its discriminator is satisfied by construction for any comma-locale number with a 3-digit integer part and 3-decimal precision. It made the library answer one input THREE ways (standard preserved, academic+preserve_math_glyphs counted-but-preserved, academic stripped), and ITS TELEMETRY SAID THE OPPOSITE OF WHAT IT DID: step `A3a_thousands_separator_protect`, metric key `thousands_separators_preserved`, operation `.replace(",", "")` - a false all-clear, which is worse than silence because silence invites a check. ALSO IN THIS RELEASE, the biggest finding of the audit and one that indicts its own framing: THE RENDER CHANNEL DELETES PUBLISHED STATISTICS. The numeric rules were audited exhaustively; the same question was never asked of render.py, which is the channel that reaches the user. Measured on the baseline corpus, 10.1017/s1930297500009189 lost an ENTIRE published-results sentence (two correlations, a Hotelling's t, three p-values, two confidence intervals) to `_suppress_inline_duplicate_table_captions`, and 10.1001/jamanetworkopen.2023.48333 lost a hazard ratio `1.31 (1.20-1.44)` to `_strip_phantom_camelot_tables` - with NO count, NO key in changes_made and NO log line, because render_pdf_to_markdown() chained 54 `md = fn(md)` calls and returned a bare str. Fixed: `_carries_statistical_content` guards every deleting step (delete FURNITURE, never DATA, all-or-nothing per run), and an opt-in `RenderReport` gives the channel telemetry for the first time. See docs/SCOPE.md, LESSONS.md L-032, and tests/test_render_never_deletes_published_statistics.py.
28
+ NORMALIZATION_VERSION = "1.9.83" # v1.9.83 (2026-11-19, v2.4.162): A4 leaves a bracketed US-grouped number whole ("t(1,234.5)" was respaced to "t(1, 234.5)", a df pair it never was). Previous: v1.9.82 (2026-11-16, v2.4.161): T0 strips a paragraph as a table of contents only when most of its lines are contents lines (a Word file joined by single line breaks with one form blank "_______" was deleted whole; a form field with no page number is not a contents line); any step that leaves under half of a text of 1,000+ characters records normalization_step_removed_most_text, and a non-blank text left blank records normalized_text_empty; P0q on text without page breaks keeps a repeated line that a value follows (repeated_line_kept_value_followed); S6u never joins a line that is only a bare DOI to a number line under it (any case, any opener); the letter-marker scan cache is stored on the frozen layout. Previous: v1.9.81 (2026-11-13, v2.4.160): A1 statistic joins cross one line break only (a blank line is never crossed; a statistic left split by one is counted as a1_stat_split_by_blank_line_left), p/OR/CI/RR need a word boundary; a leading-dot value counts as a value-only line, looked up to 4 lines ahead; F0 counts each furniture line it deletes (f0_furniture_line_removed). Previous: v1.9.80 (2026-10-31, v2.4.157): W0p page- and token-bound, raised-sign exponents, word-attached footnote marks, ambiguous same-page copies left unmarked; S8m significance-mark rejoin; R2 keeps an inline digit between words. Previous: v1.9.79 (2026-10-29, v2.4.156): line-end hyphens restored in extract_pdf (one pdftotext -bbox pass); new steps W0u (digit-range hyphen), W0v (DOI hyphen), S6u (URL/DOI rejoined across a line), S0h (U+00AD that is the printed hyphen), P0t (running title on pages 2+); three-part compounds; reference numbers no longer glued to a DOI; more watermark patterns; ORCID URLs kept. Previous: v1.9.78 (2026-10-25, v2.4.155): the two-column reorder of interleaved pages (DOCPLUCK_COLUMN_CORRECT_GENERAL) is ON by default, behind a region plan: a page that is a table across the gutter, or two two-column blocks stacked apart or in different type, keeps pdftotext's order; a full-width table above or below the columns is read in place. The column crops also leave a rotated margin watermark to its own crop when a figure in the body carries a rotated axis title. Extracted text changes on reordered pages only (same words, new order). Previous: v1.9.77 (2026-10-24, v2.4.155): P0y drops a bare year that opens at least 3 pages and a quarter of them (the AOM verso running head "2020 Kim and Kim 585" left its year behind on 13-14 pages); the form feed stays, year cells inside tables are untouched. F0 also finds page footnotes set only slightly smaller than the body (9 pt under 10 pt), which the 1 pt body band had counted as body: the zone is a marker-led block of small print set apart by a gap below the lowest body-size line, in the lower half of the page, with no caption or table note in it (manifest: 3 Elsevier first-page note blocks move, nothing else). Previous: v1.9.76 (2026-10-24, v2.4.155): P1 RETAINS an acknowledgment / previous-version note it finds in the front zone (it deleted the note's first line and stranded the rest mid-Introduction) and sets it off as its own paragraph; the render labels it as a blockquote. P0 also drops the wrapped second line of the AOM copyright footer. Previous: v1.9.75 (2026-10-23, v2.4.154): F0 also strips running heads whose page number is fused into the line, and alternating (recto/verso) heads, but only within the first or last three lines of a page; the exact-repeat rule is unchanged. Previous: v1.9.74 (2026-10-14, v2.4.154): A4 turns braces into brackets only after CI wording (`d ∈ {1, 2}` is a set: 2 corpus sites restored, 10.1038/s41562-026-02417-4 and ieee-access-7); H0b joins a letter-spaced label pdftotext split in two when the layout prints it on one baseline (`article info`, 3 JESP papers); W0t gives a line-end fragment the text still prints hyphenated no licence (0 of 306 manifest firings change). Previous: v1.9.73 (2026-10-13, v2.4.153): W0t restores a compound hyphen pdftotext dehyphenated away (`selfreported` -> `self-reported`) only when the paper prints `A-B` inline, no layout word holds `AB` in a hyphen-free stretch, and the `A-` line ends cover every site of every compound starting `A`; 313 restorations over 101 manifest PDFs, 16 of them checked on the page (0 wrong). Previous: v1.9.72 (2026-10-09, v2.4.152): page numbers are decided on the RAW text (_pagination_verdict: own-block bare integer = page index + an offset shared by >=3 near-consecutive pages) and the late strip blanks only those lines -- table integers and raw data that chained like pages are no longer deleted (122 PDFs: 44 papers over their page count -> 0); the repeated-line once_per_page arm keeps a line followed by its value (table row labels); a page break rejoined across a split statistic lands before the statistic, never inside it; H0 keeps a banner-shaped line carrying a labelled statistic. Previous: v1.9.71 (2026-10-05, v2.4.150): no normalize rule changed; the TEXT it receives from extract_pdf did -- Linotype Pi fonts with no ToUnicode map (/H11005 ...) now decode as the font declares them (= < > + minus x alpha eta rho chi) instead of `!` `'` `&`. Previous:v1.9.70 (2026-09-28, v2.4.147): three changes to normalized text. (1) W0s: operator glyphs a publisher font labels as digits (`5` for `=`, `2` for minus) are corrected ONLY where the declared font is an operator-only repertoire AND every rasterized sample of that glyph is a bar shape -- two physical origins; otherwise passed through and counted. (2) The inferential CI-upper minus flip is retired at all four sites: a printed `[-0.52, 0.33]` is no longer turned into `[-0.52, -0.33]` (census: 4 firings, 0 correct). (3) S5a and S5b RETIRED -- U+FFFD is no longer rewritten to `eta` / `>=` / `<=` from the surrounding text, in normalize_text or in the render pass. Measured over all 9,988 repository PDFs: S5a 0 firings; S5b 20 firings in 6 papers, 15 correct (one paper) and 5 wrong (HAL cover pages, a blank DOI bracket became `<=`/`>=`). Previous: v1.9.69 (2026-09-25, v2.4.145): no normalize rule changed; the TEXT it receives from extract_pdf did — reference-list continuation pages are re-read left column then right, a column reorder is refused unless every non-space character survives (the released corrector duplicated digits), and the U+FFFD recovery is retired (an undecodable glyph now arrives as U+FFFD). Previous: v1.9.68 (2026-09-16, docpluck-review): _DOI_IDENTIFIER_IN_LINE and _BARE_DOI_IDENTIFIER_LINE (both new in v1.9.67) each restated the DOI grammar independently -- the very drift the comment on the first one warned against -- and disagreed on a doi:-prefixed short-form DOI ('doi:10/gt3vmw'): matched by _BARE_DOI_IDENTIFIER_LINE, missed by _DOI_IDENTIFIER_IN_LINE, which only recognised the short form after a doi.org URL prefix. Verified by printing both regexes' output on the same input, not inferred from reading. Both now derive from one shared _DOI_FULL_FORM / _DOI_SHORT_FORM pair. THIS VERSION MUST BUMP even though the change only widens one predicate used by an existing H0 exemption: a doi:-prefixed short-form DOI on a colon-introduced header-zone line now survives where it previously did not, so consumer text keyed on this string changes for that narrow shape. No corpus occurrence of the divergent shape has been found; this closes an unmeasured drift risk rather than a demonstrated corpus defect, and is recorded as such. // v1.9.67 (2026-09-12): a DOI on its OWN CONTINUATION LINE is reference DATA, and three rules were deleting it. P0's two curated DOI-line patterns fired document-wide on the strength of a comment that claimed "in-text DOI mentions ... never appear alone" -- false, because a reference whose DOI wraps is exactly that. Measured over 300 PDFs sampled random.Random(20260912) from a 10,049-PDF article corpus (297 English via tools/diag/_language.py; 1 spanish, 1 portuguese, 1 bilingual excluded and reported): they fired 649 times across 117 of 297 papers (39.4%) on a UNIQUE standalone DOI inside a References span, and 27 times in 2 papers on a genuine per-page journal footer -- 27/676 = 4.0% ACCURACY, the same arithmetic that condemned the EU-numeric rules and W0k. Verified at the primary source: 10.1525/collabra.138502 prints 133 DOIs and the academic render delivered 101, losing all 32 of its standalone-DOI lines (raw line 2217 is the wrapped tail of the entry ending "Sex Roles, 62(7-8), 520-531."). H0 contributed a THIRD route: its header zone is a flat 30-line cap with no content end-condition, so on a short document it reaches the bibliography and banner pattern 0 (generic bare publisher URL) deleted the short-form DOI line of a short QA fixture document on the "doi.org" host -- 6 references in, 5 DOIs out. THE GENUINE FOOTER IS NOT LOST WITH THEM: a journal stamps its own DOI on every page, so it RECURS, and P0r already strips on >= 3 standalone repetitions; _BARE_DOI_IDENTIFIER_LINE adds the shape there and was verified firing on real papers (10.1038/s41467-024-46784-w 19 lines -> 0, 10.24425/mms.2021.137706 7 -> 0), so it is not dead code. The line CONTENT is identical in both cases and can therefore NEVER separate them; recurrence can, and recurrence is what a running footer IS. Two H0 end-conditions added, each measured separately: no line inside a _find_references_spans span is header furniture, and a DOI-identifier line introduced by a colon-terminated lead-in is the object of a sentence (measured both ways over the same 297 papers: 4 of 5 real identifiers recovered, 1 of 120 masthead drops lost). THIS VERSION MUST BUMP even though the change mostly REMOVES rules: consumers store extracted text keyed on this string, so leaving it at 1.9.66 would make pre-fix and post-fix text indistinguishable in their store -- and the pre-fix text is missing published identifiers. WHY IT MATTERED DOWNSTREAM: a downstream citation pipeline feeds this render to its reference parser, so a reference that lost its DOI reached the database with doi: null and fell outside retraction coverage, with nothing erroring and no test going red; its end-to-end DOI-coverage assertion sat at 5 of 6 engineered identifiers and is 6 of 6 against the fixed render. Corpus re-measured after the fix: 649 reference-DOI losses -> 1, the single residual being 10.24072/pci.rr.101017.rev11 (a bioRxiv preprint URL with no colon lead-in), recorded rather than coded because one paper proves a shape exists and says nothing about prevalence. Pinned by tests/test_standalone_doi_line_is_reference_data.py, proved RED by re-inserting the two deleted patterns at runtime. PREVIOUS: # v1.9.66 (2026-09-08): W0g is UNWIRED from both of its text channels -- normalize_text and the render markdown post-process (it was never in the table-cell path; verified by grep, not assumed). It re-signed a bare positive decimal whenever a bracket in the same record "proved" a dropped minus, WITHOUT CHECKING WHICH STATISTIC THE BRACKET BELONGED TO: on korbmacher_2022_kruger the page prints `r(223) = -0.13 (p = .0498, 95% CI [-0.26, -0.0002])` and W0g published `p = -.0498`, a negative probability, plus `p = -.05` from the second occurrence. NOT a re-normalization curiosity -- the render call ran W0g over already-normalized markdown, i.e. a second pass, so render_pdf_to_markdown emitted both fabricated values on the FIRST render and every consumer of the .md received them. THE THREE TIERS directive (CLAUDE.md, 2026-09-06) names CI CONTAINMENT verbatim as forbidden evidence and W0g is CI containment by name; its signature is `text: str`, so it can never consult the rendered page. THIS VERSION MUST BUMP even though the change only REMOVES a rewrite: consumers store extracted text keyed on this string, so leaving it at 1.9.65 would make text produced BEFORE and AFTER the fix indistinguishable in their store. W0b, W0d, W0q, W0h and W0m are DELIBERATELY UNTOUCHED -- a family verdict must be tested per member, and the recorded "W0b/W0d/W0g fire 0 times in 226 papers" is WRONG for W0b and W0d, which recover 62 real minus signs on efendic_2022_affect. The definition is kept and unwired, not deleted. Pinned by tests/test_w0g_must_not_fabricate_a_negative_p_value.py, watched RED first. ALSO IN 1.9.66: G5c2_split_numbered_heading_rejoin is now IDEMPOTENT BY CONSTRUCTION -- it emits `N. <Heading>` and its own output was eligible as its own input, because the stacked-orphan guard only saw a BARE `^N.$` and lookup_canonical_label strips one leading number, so `6. References` still qualified as a target and a stray `3.` above it was glued on, giving `3. 6. References`, which resolves to None and makes the section partitioner lose the heading. That single shape was the ENTIRE remaining content of the corpus idempotency gate (efendic_2022_affect, am_sociol_rev_4, nat_comms_3, bmc_med_4), with digit counts IDENTICAL across all four -- a digit-delta check could never have found it. Pinned by tests/test_g5c2_must_not_stack_two_heading_numbers.py, watched RED first. // v1.9.65 (2026-09-08): W0i, W0k and W0l are UNWIRED from all three default text channels -- normalize_text, the render markdown post-process and the table-cell path. They rewrote a printed digit 3 into a multiplication sign on inferential evidence alone, which the THREE TIERS directive classes as a FILE LIE and forbids correcting silently; measured over 101 PDFs W0k fired on 5 papers and DESTROYED a real published token in 4 of them (HapMap3 -> HapMap *, ASL TO3 -> ASL TO *). THIS VERSION MUST BUMP even though the change only REMOVES rewrites: consumers store extracted text keyed on this string (e.g. `corpus-text__docpluck-norm@1.9.57.txt`), so leaving it at 1.9.64 would make text produced BEFORE and AFTER the fix indistinguishable in a consumer's store -- and a confirmed corrupted store exists (10.1038/s41562-024-02076-3 holds both `HapMap3 SNPs.` and `HapMap *`). The definitions are kept and unwired, not deleted. Pinned by tests/test_w0k_must_not_destroy_real_digits.py, all five watched RED first. // v1.9.64 (2026-09-02): `page_numbers_stripped` is an exact occurrence count and `headers_removed` is retired -- the two keys the 2026-08-22 telemetry blocker (ask 114401Z) was measured on were still CHARACTER DELTAS after the v1.9.63 sign/dash/quote `count=` work: two-digit page numbers reported 2x, three-digit 3x, and `headers_removed` fired on zero-header documents because the S9 `_track` reused the `before` snapshot captured for P0, republishing P0's page-number characters under a second key. P0 now counts the lines its helper blanked (line count preserved by construction; zip(strict=True) makes any future violation loud); the S9 4-digit blanking counts its own blanked lines and reports them under `page_numbers_stripped` -- the kind of thing it actually removes -- so `headers_removed`, which no site writes truthfully, is no longer written at all (absent reads as 0 downstream, which is the true value: this path never removed a header). Text output is byte-identical -- the change is observation only, pinned by tests/test_page_number_telemetry_is_an_exact_count.py, written red first. // v1.9.63 (2026-09-01): THE WATERMARK ARM'S "ACCEPTED RESIDUAL" WAS FOUR RED TESTS, AND THE SIGNAL THAT CLOSES IT IS NOT POSITIONAL. v1.9.62 reinstated the arm on page coverage and DOCUMENTED, in code and in a test named `test_the_residual_is_real_and_is_documented_not_denied`, that a table row label at >=90% page coverage would still be deduplicated -- reasoning that "at that coverage no POSITIONAL signal separates a table label from a watermark". The reasoning was true and beside the point: it only ever looked at position. The cost was not hypothetical -- it left FOUR tests red in `test_page_gate_never_deletes_the_last_copy.py`, the file whose entire purpose is to pin that this gate never deletes data, and the release was reported as verified with them red. They were found by a repository-wide sweep, not by this stream. TWO TYPOGRAPHIC SIGNALS CLOSE IT. (1) NOT FOLLOWED BY ITS OWN VALUE: a table ROW LABEL is followed by the number it labels, so deleting it orphans that number -- the exact harm rule 0g names -- while an overlay is followed by whatever the page held. Measured: `Author Manuscript` is followed by a bare value on 0 of 220 (ieee_access_2), 2 of 92 (ieee_access_alt) and 2 of 112 (10.1525/collabra.19525) occurrences, against 5 of 5 for `Number of trained architectures` and 7 of 9 for `Performance metric` on the REAL ieee_access_5, and 20 of 20 for the adversarial spread-table fixture. Two orders of magnitude apart, so the 0.50 threshold sits in the gap rather than on an edge. Shipped as the named `_value_followed_fraction` so its test pins the SHIPPED rule rather than a retyped pattern. (2) MODAL COPIES PER PAGE >= 2: a watermark repeats WITHIN a page, which is the only reason this arm exists. The adversarial header-above-title prints the string twice on page 1 and ONCE on every page after, so its modal per-page count is 1 and its max_per_page of 2 comes from one page; the real watermarks are modal 4 on 100% of covered pages. A line whose typical page carries one copy is a RUNNING HEADER, and the once_per_page arm correctly declines it. Grok 4.6 (xai) named this shape on 2026-08-28 as a reason to delete the arm and was right that the arm reached it; it no longer does, and nothing is removed at all rather than all-but-one. PER-PAGE UNIFORMITY was measured as a candidate gate and REJECTED, and that finding stands: the synthetic worst case is uniform too (4 copies on 5 of 5 pages), so it separates nothing. AND THE TEST FIXTURE WAS WRONG, which is why nothing caught this sooner: `_paginated_doc` emits `marker / "" / "%0.3f" / ""`, a value directly under every copy -- the TABLE ROW LABEL shape. Two tests used it to assert the arm FIRES, so the file's entire positive direction was pinned on the shape the arm must refuse. It is kept for the negative tests, where "a row label must survive" is exactly what it should model, and a new `_overlay_doc` models a genuine overlay. Real-paper effect unchanged: ieee_access_2 still promotes `## V.: SUPPLEMENTARY INDEX`, still removes 219 of 220 watermark copies, and all 7 real table labels across ieee_access_5/6/10 keep every copy. See tests/test_watermark_arm_is_gated_on_page_coverage.py. # v1.9.62 (2026-08-29): THE WATERMARK ARM IS BACK, GATED ON PAGE COVERAGE RATHER THAN ON A RAW COUNT -- AND A ZERO MEASURED THE INSTRUMENT AGAIN. v1.9.61 deleted the `count >= 20` arm on a reproduced Grok 4.6 (xai) finding that it deduplicated TABLE CONTENT, and set the conditions for reinstating it: "a discriminator that encodes the measured shape (present on essentially every page), not a raw occurrence count -- and gather more than one positive first". Both are met and all three stated reasons for the deletion were RE-TESTED, none surviving. (1) WHAT THE DELETION COST, which is what forced the re-test and was not visible when it was taken: with no arm, ieee_access_2.pdf retains all 220 copies of "Author Manuscript", one of which sits between a paragraph and the heading `V.: SUPPLEMENTARY INDEX`, which is therefore never promoted. That is SECTION STRUCTURE reaching the sectioning consumers -- so the deletion note's asymmetry argument ("furniture that survives is VISIBLE and reversible") did not hold here: the loss was neither, and it was caught by a test, not by a consumer. (2) THE DISCRIMINATOR IS PAGE COVERAGE and the classes separate with no overlap. Measured over the 10 IEEE test PDFs plus 10.1525/collabra.19525: WATERMARKS at ratio 0.96-0.98, each exactly 4 copies on EVERY covered page (ieee_access_2 220x on 55/56; ieee_access_alt 92x on 23/24; collabra.19525 112x on 28/29), against TABLE CONTENT at ratio 0.06-0.22 (`Performance metric` 9x on 4/18; `Feature Categories` 7x on 3/18; 9 more, none above 0.22). (3) THE LABEL THAT CONDEMNED THE ARM IS IN THE SECOND BLOCK. `Number of trained architectures` occurs 5 times on 3 of 18 pages of the real paper -- ratio 0.17. The reproduction that deleted the arm was a SYNTHETIC document built to the reported shape; the shape is reachable and the paper is not an instance of it. Rebuilding it here took two attempts: the first fixture reported UNTOUCHED on all three trees INCLUDING one with the original arm restored, because S8_line_break_joining merged the label into the next line before the strip ran. A probe that does not reach the branch reports a clean run; asserting the arm FIRED is what caught it. (4) DENOMINATOR, measured separately from the shape: over 200 papers strided from the 9,888-PDF repository (198 extracted OK) this gate selects ZERO lines -- and that zero was checked against a KNOWN POSITIVE before being believed, the identical filter firing on 3 of 3 known watermark papers and 0 of the 8 other IEEE papers beside them. (5) THE RESIDUAL IS STATED, NOT ENGINEERED AROUND: a table label repeated several times per page across >=90% of a document would still be deduplicated. Built synthetically it DOES fire; it was not found in any of the 198 real papers. Accepted because at that coverage no POSITIONAL signal distinguishes it from a watermark -- that IS the definition of one -- and because the damage is bounded three ways: rule 0g spares the first copy in document order, `_carries_statistical_content` refuses anything carrying data, and every removal is named per line in `repeated_line_stripped:watermark_every_page`. Per-page UNIFORMITY was measured as an extra gate and REJECTED: the real watermarks are perfectly uniform, but so is the synthetic worst case, so it separates nothing the ratio has not. See tests/test_watermark_arm_is_gated_on_page_coverage.py, whose 14 cases were watched with the arm removed: the 3 real watermarks and both synthetic arm cases go RED while all 7 real table-content cases stay GREEN in both states. # v1.9.61 (2026-08-28): THE PAGE GATE DELETED AN ARTICLE TITLE, AND ITS PAGE MAP WAS WRONG FOR HALF OF ALL BOUNDARIES. v1.9.60 was blocked pre-tag by a three-provider consult (sol/openai, sonnet/anthropic, grok/xai); every finding below was reproduced locally before it was acted on, and one reviewer claim was reproduced and found WIDER than reported while another needed three attempts before the probe reached the branch under test. (1) PAGE ATTRIBUTION. `_page` was incremented AFTER the line was recorded, while pdftotext glues the page separator to the FIRST LINE OF THE NEW PAGE -- so the first line of page N was filed under page N-1, and the first line of a page is exactly where a running header sits. On a 6-page header the map came out [1,1,2,3,4,5], giving max_per_page 2 instead of 1, so the once-per-page arm did NOT fire and all six copies survived: the gate failed at its own purpose while staying live on footers and on table content, the two error directions it exists to separate. Measured over a 70-paper strided sample (tools/diag/form_feed_page_attribution_census.py): of 994 form feeds, 70 (7.0%) sit alone on their line and are HARMLESS -- strip() empties the line so nothing is recorded -- 415 (41.8%) are glued to a line outside the 15-120 candidate band and cost nothing, and 509 (51.2%) are glued to a RECORDED candidate and corrupt the map. An independent 36-paper sample gave 1122/2218 (50.6%). NOT 93% and not 100%: those figures answer "how many are glued" and "how many have nothing before them on their line", and only the 51.2% bounds the fix. (2) RULE 0g, ALL-OR-NOTHING. The strip took EVERY copy of a repeated line. On 10.1001/jamanetworkopen.2023.39337 the title "Effect of Time-Restricted Eating on Weight Loss in Adults With Type 2 Diabetes" occurs 13 times -- twelve running headers and, on page 1, the TITLE BLOCK, which the text layer shows sitting between the article-type banner `Original Investigation | Nutrition, Obesity, and Exercise` and the subtitle `A Randomized Clinical Trial` plus the author list. All thirteen went and the paper shipped with NO TITLE, with nothing in `changes_made` naming it. The FIRST copy in document order now always survives: where a content instance exists it PRECEDES the furniture derived from it, where every copy is furniture the cost is one visible challengeable line, and document order is stable under line removal -- which also makes the step idempotent by construction, since pass 2 sees one occurrence and fails the count>=5 floor. A CLEVERER SURVIVOR RULE WAS BUILT AND REFUTED and is recorded so nobody rebuilds it: "furniture travels with furniture" (score each occurrence by how many neighbours are unique) TIES TWELVE occurrences on the JAMA title and cannot pick it, while on 10.1098/rsos.182237 it separates cleanly and picks a copy sitting in the REFERENCES section. Wrong in both directions at once. (3) FOUR MORE FORM-FEED EATERS, and then three more found by census. v1.9.60 fixed five line-dropping sites; these are SUBSTITUTION and STRIP sites its sweep could not reach. A1 spells every gap with the regex whitespace class, which matches U+000C: ALL SEVEN reachable patterns lose the boundary, not the one the findings doc demonstrated. A1 is now page-scoped BY CONSTRUCTION (split on the form feed, edit within each page, rejoin) rather than by a hand-narrowed class in ten places -- measured cost, 1 of 524 firings (0.2%) straddles a page break, and that one is a `p =` at the foot of one page joining its value at the head of the next, the shape a rejoin is least entitled to assume. The FINAL `out = t.strip()` ate a boundary on 70 of 70 papers, because pdftotext ends every document with one; four papers leave normalization with 2-3 form feeds and two sit at exactly 2, where losing one drops them below the `>= 2` paginated threshold and into the unstable line-index fallback this release exists to retire. T0 (_strip_toc_dot_leader_block) loses it at TWO sites, the dropped-paragraph `continue` and the leading-blank trim, since a form-feed-only paragraph strips to the empty string. P1 (_strip_frontmatter_metadata_leaks) loses it at its drop `continue`. F0's FOOTNOTE branch never called `_drop()` while the header/footer branch four lines above it does -- and a footnote is by definition the LAST content on its page, so the separator it consumed is a boundary more often than not. LateJoin and A4 keep their boundary through a new shared `keep_break_in_rejoin`, which re-emits it BEFORE the rejoined token: these sites CANNOT be page-scoped, because crossing the break is the whole point of them, and emitting the boundary INSIDE the statistic would hand consumers a token no paper printed. Corpus effect over the 70-paper sample: form feeds retained 393/994 (40%) at HEAD -> 829/994 (83%), and papers left at ZERO page boundaries 17 -> 0. The 160 still removed are ONE deliberate, documented site -- R3 collapses the page-break junction inside a bibliography so a reference entry split across a page rejoins -- and are left alone rather than swept in. (4) PER-LINE TELEMETRY. A character delta cannot say WHAT vanished; the title's disappearance was invisible in `changes_made`, and the differential that eventually caught it had to re-run two builds of the library over the same corpus. The strip now records `repeated_line_stripped:<arm>` per removed copy and `repeated_line_last_copy_kept` for the copy spared, both with the line text as the detail -- routed through the existing `record_fallback` channel that `normalize_text` already holds open and `batch.py` already copies onto ExtractionReport, because a NEW report field would need plumbing at every serialization layer and the last three telemetry fixes in this file each stopped one layer short of a consumer. THE `count >= 20` WATERMARK ARM WAS DELETED IN THIS VERSION -- and this sentence previously claimed the opposite ("WHAT DID NOT CHANGE ... nothing here licenses either keeping or removing it"), which was true of an earlier draft and stale by the time the code shipped. CORRECTED 2026-08-29; 1.9.61 was never released, so the record is amended rather than struck. The arm's zero across the 70-paper sample measured the INSTRUMENT: that corpus contains none of the three papers that exercise it. See v1.9.62. NEITHER GATE ANYONE WOULD REACH FOR CAN SEE THE TITLE DEFECT: the deletion is perfectly idempotent -- pass 1 and pass 2 byte-identical with the title absent from both -- and the canary's --quick paper is byte-identical under both versions, with none of its 8 configured papers showing the signature. Both run honestly and are blind. See tests/test_page_gate_never_deletes_the_last_copy.py, whose nine fixes were each reverted in isolation and watched RED. # v1.9.60 (2026-08-25): A REPEATED LINE IS FURNITURE BECAUSE OF WHERE IT SITS ON THE PAGE, NOT HOW FAR APART IT SITS IN THE FILE -- and `changes_made` now publishes a COUNT rather than a character delta. (1) THE REPEATED-LINE STRIP was gated on `min(gaps) >= 20`, the minimum LINE-INDEX distance between occurrences, as a proxy for "once per page". The proxy is not stable under line removal and its own comment predicted the failure ("causing idempotence drift when pass 2 has a shorter input"). MEASURED on ieee_access_5: the table column header `Performance metric` appears 9 times on pass 1 at [521, 545, 582, 651, 682, 972, 978, 1032, 1040] -- two tight pairs at the tail give min_gap 6, so it is KEPT; other steps then delete those four tail occurrences, so pass 2 sees five well-spaced ones, min_gap 22, and DELETES ALL FIVE, losing the label that says what the numbers underneath it are. No threshold fixes this: min-gap over a shrinking occurrence set is not monotone. The gate is now the PAGE DISTRIBUTION -- a line is furniture only if it occurs on >= 5 distinct pages AND either at most once per page (running header/footer) or >= 20 times (a watermark that repeats within each page). A line's page is a property of the document, so deleting other lines cannot move it. Over the 21-paper strided sample the two classes separate with NO OVERLAP: 16 running headers (5-21 pages, 1 per page) and 4 watermarks (on every page) against 13 lines of TABLE CONTENT the old rule was DELETING -- `Number of trained architectures`, the values 100/200/0.18/2/3/4/8, `Total`, `Other`, demography_3's 21 `***` significance markers (19 of them on ONE page, taken by the `count >= 20` path) and maier's 26 `X` marks (ALL on one page). So this was never only an idempotency bug. (2) THAT GATE NEEDED THE PAGE BOUNDARIES BACK, and five steps were destroying them: P0_page_footer_strip (113 form feeds over the sample), P0r_recurring_running_header_strip (74), S9_header_footer_removal (9), H0r and G5c2 (1 each), each dropping a whole line with a bare `continue` and taking the form feed glued to it. This is L-052's class, whose promise had been made three separate times in three LOCAL implementations -- and the sites that had not made it were the ones nobody had looked at. One shared `keep_page_break` / `page_break_residue` now defines it once. Corpus effect: 371 raw form feeds -> 85 (23%) at HEAD -> 290 (78%), and papers left at ZERO page boundaries 11 of 21 -> 0 of 21. (3) DELETE FURNITURE, NEVER DATA (rule 0g) is now actually consulted by the repeated-line strip, which never called `_carries_statistical_content`. It had to be: with the page gate in, `j_health_soc_behav_1`'s figure note `Note: Whiskers indicate 95% confidence intervals. N = 136,739 (women = 68,993, men = 67,746). Data are from the` sits once under each of five figures on five pages and is indistinguishable from a running footer BY POSITION. Its wrapped second line is caught by widening the data-source-caption marker so the year may sit anywhere inside the parenthesis group (`(Release 22, years 2001-2023)`), the same survey-plus-year-range shape that marker was written for. HEAD-vs-fix over the sample: 34 furniture lines newly removed, 10 lines recovered, ZERO lines of data lost, corpus non-idempotency 1 -> 0. (4) `NormalizationReport._track` takes an explicit `count=`, wired at W0g / W0q / W0h -- the three rules whose sum effectcheck publishes as `upstream_sign_rewrites`. NO PUBLISHED VALUE WAS WRONG, and this is stated plainly because the first draft of this entry claimed one was: measured over the 21-paper corpus the family fires on ONE paper reporting signs=6 delta=6, and ZERO papers diverge. What changes is that the agreement was a COINCIDENCE OF WHITESPACE and is now a contract. `changes_made` held `abs(len(before) - len(after))`, which for this family is the whitespace normalisation, and that equals the number of minus signs re-attached only when there is exactly one stray space per bound: `[- 0.58, - 0.18]` gives delta 2 / signs 2, but `[- 0.58 , - 0.18]` gives delta 3 / signs 2 and `[- 0.58, - 0.18]` gives delta 4 / signs 2. Neither divergent shape occurs in the corpus -- they are arithmetic probes, not prevalence claims -- and that is the point, because a latent divergence never announces itself. This is exactly the closure ESCImate's 2026-08-22 notice asked for: "exactness here rests on a property of the RULES, not of the metric". THE UNIT IS MINUS SIGNS ATTACHED TO A NUMERAL, uniform across the three rules, because one W0q firing repairs one bracket and can attach TWO signs -- a per-firing count was drafted first and reports 3 on that paper where the truth is 6, the mirror error. `_track` never INVENTS a count: a call site supplies one or the character delta stands unchanged. `changes_made_by_step` stays a character delta by design. See tests/test_changes_made_is_an_exact_count.py and tests/test_repeated_line_strip_is_page_scoped.py. # v1.9.59 (2026-08-22): A PAGE NUMBER IS IN THE MARGIN; A BARE INTEGER IN THE BODY IS A VALUE. The standalone-page-number strip was one MULTILINE substitution with no page context, so it deleted EVERY line whose whole content was a 1-3 digit integer -- and pdftotext emits a narrow numeric table column as ONE CELL PER LINE. It was silently selective: `-4`, `0.5` and `1000` never matched, `0`, `4` and `999` always did. MEASURED on 10.1136/bmj-2024-080924 (BMJ) supplementary appendix Table S1 p6, row "Number of Advancement Maneuvers (attempt #2)": the paper prints a coefficient of `0` with `(-1.5 to 1.5)` and `p = 0.999`, and we delivered the interval and the p-value WITH NO ESTIMATE -- worse than a wrong number, because an interval attached to nothing cannot even be attributed. This is the real content of ESCImate `2026-08-09/DP-14`, which both sides had diagnosed as a "column-major dump"; the source text layer is row-major and complete, and this rule punched the holes. The gate is TYPOGRAPHIC: a page number is drawn in the margin, so it must be among the first or last 2 non-blank lines of its page. A SECOND gate strips a PAGINATION RUN wherever it sits -- `value - page_index` constant across >=3 distinct pages -- because a two-column PDF puts the number mid-stream in pdftotext reading order (10.1016/j.jesp.2009.12.010 prints `495` between "non-agree-" and "ment and the status quo"); a table column cannot satisfy that, its integers sit on ONE page. Corpus effect over the 26-paper baseline, old rule vs new: 1,228 bare-integer lines RETAINED, 1,104 still stripped, and the LINE COUNT is identical on all 26 papers -- the parity v1.9.57 was measured against. Site census: 345 margin vs 1,987 body-interior sites in 26/26 papers, 239 of them beside an interval or a p-value (tools/diag/page_number_strip_blast_radius.py --baseline). The step had NO count, NO changes_made key and NO log line; it now tracks P0_standalone_page_numbers / page_numbers_stripped. A first draft of the fix recomputed the margin band after each removal, which promoted the next line into it and erased a table column of `1 2 3 4 5` inward -- caught by its own test, not by reading. ALSO: NormalizationReport.changes_made now ACCUMULATES instead of overwriting (three rules write dropped_minus_signs_recovered and three write minus_signs_recovered, so only the last survived; filed by ESCImate 2026-08-21 §4, who had to publish upstream_sign_rewrites as a LOWER BOUND), and the new changes_made_by_step records every changed step INCLUDING length-neutral ones -- a `2`->`-` glyph substitution has a delta of zero, so the rules this metric exists for were the ones most likely to vanish from it. See tests/test_page_number_strip_never_deletes_data.py and tests/test_changes_made_accumulates.py. # v1.9.58 (2026-08-21): A RUNNING HEADER'S DEBRIS MUST NOT VETO THE HEADING AFTER IT. v1.9.57 recorded that ONE stray U+0008 BACKSPACE made a running header unequal to its layout-channel twin and therefore unstrippable, and fixed it -- inside the F0 COMPARISON KEY only (_NONSPACE_CTRL_RE, used solely by _key). The character stayed in the EMITTED text, where an unrelated rule then landed on it: sections/annotators/text.py::_prior_paragraph_is_sentence_terminated walks back over space/tab/newline and requires the character underneath to be in '.!?/'. On 10.3389/fvets.2025.1645266 (PMC13137375) p2 the header arrives as FORMFEED + 'Abuna et al.' + BACKSPACE, so the walk lands on the BACKSPACE, the guard says the prior paragraph is unfinished, and the heading '1 Introduction: the need for regenerative solutions in reproductive medicine' is never emitted. Because partition_into_sections fills each span to the NEXT matched heading, the preceding KEYWORDS span then swallowed 69,849 characters -- the whole article. NEW STEP C0 _strip_furniture_controls, run BEFORE F0 so the comparison key and the output are ONE rule rather than two. THE CLASS IS ONE CHARACTER WIDE, AND MEASURED: over the 30-paper held-out PMC corpus all 33 U+0008 occurrences carry the identical context PERIOD + BS + NEWLINE (trailing furniture) and ZERO carry the overstrike signature (x)BS(x), so no doubled letter can be manufactured -- a reviewer predicted exactly that regression and the corpus refuted it. THE OTHER 16 CONTROL CHARACTERS ARE NOT FURNITURE AND ARE NOT STRIPPED: they are corrupted content glyphs (Schri<02>macher = Schrittmacher; No<04>allsanitat = Notfall...; A<03> -B<03> helices), and deleting them would destroy text. They are COUNTED instead, in the new NormalizationReport.residual_control_chars, because a known limitation written down without a measurement is an unpaid debt rather than a disclosure -- 49 of them live in 16 of the 30 papers. Measured knock-on, pinned by a test: with the BACKSPACE gone, H0's banner strip can finally match the header line it was always meant to catch, so the with-BS and without-BS inputs converge. Arena effect (offline harness, 30 held-out PMC papers): the body-label slice mean rises 0.7681 -> 0.7910 and PMC13137375 alone goes 0.0761 -> 0.7627. See tests/test_furniture_control_chars.py. # # v1.9.57 (2026-08-20): A PAGE NUMBER IS FURNITURE; A PAGE BOUNDARY IS STRUCTURE. The standalone-page-number strip was `^\s*\d{1,3}\s*$` under MULTILINE, and the whitespace class matches THE FORM FEED - so the rule could consume the page break standing beside the number it deleted. Wrong since it was written, held latent by a running footer sitting between the two; anything that stripped that footer took every form feed with it, and with them the `\n\f\f\n` marker separating the footnote appendix, folding it back into the body. TWO BASELINE PAPERS WERE ALREADY IN THAT STATE AT HEAD - 10.1016/j.jesp.2021.104154 and 10.1016/j.joep.2020.102350 report 15 and 18 footnotes through report.footnote_texts while the returned string carries no appendix at all. Measured over the 26-paper baseline against a git worktree of the prior tree, extracted in separate interpreters: 0 lines removed, 0 added; 16 papers gain page breaks (+1..+17); 2 appendices restored (0 -> 1,288 and 0 -> 2,165 bytes); 0 papers worse on any metric. Shipped as the named `_strip_standalone_page_numbers` so its test pins the SHIPPED rule, not a retyped pattern; the form feed is CAPTURED and restored rather than excluded, because a page number is often the first thing on a new page and excluding it stopped those lines matching at all. `_drop()` keeps the same promise inside F0's strip loop. See LESSONS L-052. # v1.9.56 (v2.4.134): THE EVIDENCE EACH REPAIR RESTS ON IS NOW DECLARED, AND ONE RULE STOPPED FABRICATING A SECOND MINUS SIGN. (1) `_ALREADY_SIGNED` is a ONE-CHARACTER lookbehind, so it refused `-0.38` and ACCEPTED `- 0.38`: on a DETACHED sign W0g read a bare-positive estimate, proved it negative from the CI, and emitted `d = - -0.38` - a double-signed effect size no paper printed. The comment above `_SIGNED_DASHES` records that `-2.68 -> --.68` already happened once and that "the fix then covered the one dash form in front of us"; it covered the ATTACHED form. Caught by the idempotency corpus gate, not by reading the rule. (2) W0q: `recover_dropped_minus_ci_upper_in_text` existed ONLY in the table channel, so a CI written in a results SENTENCE never met it - confirmed against the rasterized page of 10.1016/j.jesp.2021.104154 p13, which prints `d = -0.38, 95% CI [-0.58, -0.18]` while pdftotext detaches every minus. 3 brackets in 1 of 26 baseline papers, and the containment arithmetic repaired 0 of them (it had grabbed `S.D = 1.43` as the "estimate"). (3) That rule now splits TYPOGRAPHIC from INFERENTIAL: a DETACHED DASH is a glyph the renderer emitted and the comma proves it is a sign rather than a range separator, so group 5 - captured since the rule was written and never read (register O5) - finally decides. The containment arm is KEPT because chan_feldman_2025_cogemo Table 9 row 2bii has no dash and only the arithmetic recovers its published -0.33, but it is now DECLARED via `ci_upper_minus_inferred_from_containment`. (4) O10: `_recover_estimate_column_via_ci_column` treated any negative bound as proof of the 2-for-minus corruption - including bounds `recover_corrupted_minus_signs` had manufactured one line earlier. It now fires only on a bracket THIS pass actually repaired. (5) O8: W0j signature B is labelled INFERENTIAL in the code and records every firing; W0p records its positional pairing. (6) `NormalizationReport.fallbacks` - every `record_fallback` inside normalization was outside `extract_pdf_structured`'s window and therefore write-only, INCLUDING the ambiguous-pairing refusals added in v2.4.133 to make W0h/W0m observable. # v1.9.55 (v2.4.133): THE LAYOUT-GATED REPAIRS STOP ASSIGNING THEIR EVIDENCE POSITIONALLY. W0h/W0m proved "N glyphs of shape X are corrupt" in pdfplumber's stream and then rewrote the first N matching tokens in pdftotext's stream, document-wide with no page key - so a glyph proven on page 7 licensed flipping a token on page 2. REPRODUCED, not reasoned about: with a decoy `q = .428` prepended to the W0h source paper (ar_apa_j_jesp_2009_12_011), the old code flipped the DECOY and left the genuine coefficient corrupt - one number fabricated, one missed. Each evidence site now carries its own page and its own layout line text, and pairing REFUSES (recording `w0h_ambiguous_pairing_refused`) when the context cannot separate candidates, because pass-through is reversible for the consumer and a rewrite is not. Page-INDEX scoping was measured and rejected: by the time W0h runs the text holds 7 form feeds for a 12-page document, so aligning text page k to layout page k is an off-by-k that produces a confidently WRONG pairing rather than an empty one. W0m was the worse of the two - it counted beta glyphs and flipped the first N `b = <anything>` WITHOUT requiring the coefficient to match, so a beta proven on one page could relabel a genuine unstandardized `b` (a different statistic) elsewhere; the coefficient is now part of the identity. See tests/test_w0h_pairing_is_identity_based.py and docs/OVERHAUL_REGISTER.md G5. # v1.9.54 (v2.4.130): THE SEPARATION OF DUTIES, EXECUTED. Three rules that repaired the PAPER rather than canonicalising NOTATION are DELETED, together with the guard that existed only to serve them. A2 (dropped-decimal repair, `p = 38.` -> `p = .38.`) had NO CITED PAPER anywhere in its code; asked for one, BOTH of its firing sites across 297 English papers turned out to be the paper's own error, rasterized: 10.1177/0146167210380928 p13 prints `B = -0.28, SE = 0.31, p = 38.` and 10.1016/j.jesp.2016.11.001 p7 prints `t(186) = 3.90, p = 001`, each with correctly-dotted numbers on the same line. W0n (`p < 05` -> `p < .05`) is deleted in BOTH channels because its premise is false: the SAME shape has OPPOSITE OWNERS in two real English papers - 10.1016/j.jesp.2009.12.011 p3 PRINTS `p < 05` (the author dropped it; advance 2.00pt vs 3.90pt at a dotted site on the same page, no rect/curve/line in the gap) while 10.1177/0956797613482946 p6 PRINTS `p < .05` and our OCR text layer lost it. A calibrated layout-advance gate (0.51 vs 0.99) was built and REFUTED: Dong p6 is a SCAN whose char boxes come from an OCR engine, so the gate manufactures its own evidence for the exact case it exists to catch. Under irreducible ambiguity the default is PASS-THROUGH, because pass-through is reversible for the consumer and a repair is not. A3a (thousands strip) is deleted because ITS PURPOSE EVAPORATED: its own comment said it strips "so A3 sees the already-clean integer and leaves it alone", and A3 was deleted in v2.4.129. It also produced 1000x errors - 10.1177/0956797620935584 Table S2 p24 prints a Satterthwaite df of `185,178` (fractional by construction, i.e. 185.178) and we delivered `185178`; the collision is STRUCTURAL, since its discriminator is satisfied by construction for any comma-locale number with a 3-digit integer part and 3-decimal precision. It made the library answer one input THREE ways (standard preserved, academic+preserve_math_glyphs counted-but-preserved, academic stripped), and ITS TELEMETRY SAID THE OPPOSITE OF WHAT IT DID: step `A3a_thousands_separator_protect`, metric key `thousands_separators_preserved`, operation `.replace(",", "")` - a false all-clear, which is worse than silence because silence invites a check. ALSO IN THIS RELEASE, the biggest finding of the audit and one that indicts its own framing: THE RENDER CHANNEL DELETES PUBLISHED STATISTICS. The numeric rules were audited exhaustively; the same question was never asked of render.py, which is the channel that reaches the user. Measured on the baseline corpus, 10.1017/s1930297500009189 lost an ENTIRE published-results sentence (two correlations, a Hotelling's t, three p-values, two confidence intervals) to `_suppress_inline_duplicate_table_captions`, and 10.1001/jamanetworkopen.2023.48333 lost a hazard ratio `1.31 (1.20-1.44)` to `_strip_phantom_camelot_tables` - with NO count, NO key in changes_made and NO log line, because render_pdf_to_markdown() chained 54 `md = fn(md)` calls and returned a bare str. Fixed: `_carries_statistical_content` guards every deleting step (delete FURNITURE, never DATA, all-or-nothing per run), and an opt-in `RenderReport` gives the channel telemetry for the first time. See docs/SCOPE.md, LESSONS.md L-032, and tests/test_render_never_deletes_published_statistics.py.
29
29
 
30
30
  # The characters S4 and S5 rewrite, declared ONCE so the count and the
31
31
  # substitution cannot drift apart. Two copies of one character class is the
@@ -9518,12 +9518,30 @@ def _normalize_text(
9518
9518
  # cosmetic; asserting a reading is not, and only the second needs
9519
9519
  # evidence.
9520
9520
  _A4_SPACING_NEEDS_A_DECIMAL = r"(?=[^]\)]*\.\d)"
9521
+ # The same defect wearing the US hat (class sweep 2026-11-18): a tight
9522
+ # comma that groups exactly three digits is a thousands separator under
9523
+ # docpluck's English + US scope, so `t(1,234.5)` (one Welch df of
9524
+ # 1,234.5) and `[12,345.6]` keep their comma. Spacing them asserted a
9525
+ # two-number reading -- `t(1, 234.5)` -- while `t(1,234)` was left whole.
9526
+ # A tight F df pair printed as `F(1,234.5)` is ambiguous between the two
9527
+ # readings; it passes through as printed, which keeps both recoverable.
9528
+ _A4_GROUPED = re.compile(r"[\[(]\s*[-+]?[1-9]\d{0,2},\d{3}(?:\.\d+)?\s*[\])]")
9529
+
9530
+ def _a4_spacing(template: str):
9531
+ rep = keep_break_in_rejoin(template)
9532
+
9533
+ def _sub(m: "re.Match[str]") -> str:
9534
+ if _A4_GROUPED.fullmatch(m.group(0)):
9535
+ return m.group(0)
9536
+ return rep(m)
9537
+ return _sub
9538
+
9521
9539
  t = re.sub(r"\[" + _A4_SPACING_NEEDS_A_DECIMAL +
9522
9540
  r"\s*([-+]?\d*\.?\d+)\s*,\s*([-+]?\d*\.?\d+)\s*\]",
9523
- keep_break_in_rejoin(r"[\1, \2]"), t)
9541
+ _a4_spacing(r"[\1, \2]"), t)
9524
9542
  t = re.sub(r"\(" + _A4_SPACING_NEEDS_A_DECIMAL +
9525
9543
  r"\s*([-+]?\d*\.?\d+)\s*,\s*([-+]?\d*\.?\d+)\s*\)",
9526
- keep_break_in_rejoin(r"(\1, \2)"), t)
9544
+ _a4_spacing(r"(\1, \2)"), t)
9527
9545
  report._track("A4_ci_delimiter_harmonization", before, t, "ci_delimiters_fixed")
9528
9546
 
9529
9547
  # A5: Math symbol and Greek letter normalization