Skip to content

bug(tables): degenerate row repetition ships 865 blank rows into the assembled .md (27% of document) #97

Description

@r-uben

Problem

A page whose VLM table extraction degenerates into repeated identical empty rows
is written to the page fragment and then stitched into the final assembled .md
with no guard, no audit event, and no doc-level signal. On the document below,
867 of the 3177 lines in the final markdown (27%) are the single repeated row
| | | | | | | |.

Dual-pass flagged the page for other reasons, but nothing detected or reported
the repetition itself.

Evidence

Doc: OBR Economic and fiscal outlook, November 2022 (68 pages, born-digital).
Run: HPC strict-local / qwen3-vl:30b-a3b-instruct, 2026-07-17.

Output dir (local data, not in repo):
~/data/fiscal-ballast/regulation_ocr/uk/2022-11-17_efo-november-2022/

Page 62 fragment (pages/00062.md):

$ wc -l pages/00062.md
904
$ grep '^|' pages/00062.md | sort | uniq -c | sort -rn | head -2
 865 | | | | | | | |
   1 | Wages and salaries⁴ | | | | | | |

The fragment opens with a legitimate, correctly-parsed table (Real GDP | 1.7 | -0.9 | ...), then degenerates into 865 consecutive empty rows and ends on a
truncated row | | | | | | with the wrong column count.

Propagation into the assembled document:

$ wc -l 2022-11-17_efo-november-2022.md
3177
$ grep -c '^| | | | | | | |$' 2022-11-17_efo-november-2022.md
867

Doc-level reporting (metadata.json) mentions only an unrelated page:

status: partial
error:  "page(s) 46 produced no usable output"

audit_log.json counts for this run contain no repetition-related kind:

dualpass_flagged: 24, native_table_verifier_warn: 12,
value_guard_row_count_warning: 9, table_region_unverifiable: 1,
page_failed: 1, native_fallback: 5, chart_asset_page: 2,
figure_cap_reached: 1, native_table_verifier_exact_pass: 3

Expected

At least one of:

  1. A repeat guard that truncates emission when the same row (especially an
    all-empty row) repeats beyond a documented, named bound, and
  2. An audit event (e.g. table_row_repetition_truncated) carrying the page and
    the observed repeat count, and
  3. Inclusion of the affected page in the doc-level failure/warning surface, so a
    downstream consumer gating on metadata sees it.

Actual

Silent. The rows reach pages/00062.md, survive _rewrite_all_fragments, and
land in the final .md. Neither metadata.json nor audit_log.json names
page 62 as having a repetition problem.

Scope note

This is distinct from the known table-quality issues:

This one is a generation-runaway with no detector at all. Filed separately
because the fix is a bounded guard plus an audit kind, independent of the
routing/escalation design in #96.

Environment

  • socr on HPC, strict-local agentic routing (--strict-local)
  • local model qwen3-vl:30b-a3b-instruct
  • 68-page born-digital PDF

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions