Skip to content

check_table_shapes never runs on .agents/issue-index.md, so both malformed #995 rows were invisible to every gate #1033

Description

@localai-bot

check_table_shapes (scripts/check-agent-record.py:1292) already counts unescaped pipes per table row with exactly the regex needed to catch a malformed row:

pipes = len(re.findall(r"(?<!\\)\|", line))

Its call site (scripts/check-agent-record.py:1527-1530) passes roadmap_v1.md, coordination.md, *MATRIX_PATHS and *spec_paths. .agents/issue-index.md is not in that list, and no other checker counts its cells.

Derived, not asserted

Pointing the existing function at the index on origin/main (4f2d91756), with no change to the function itself:

$ python3 -c '<import check-agent-record; call check_table_shapes([".agents/issue-index.md"])>'
check_table_shapes on issue-index.md would report 2 errors:
   .agents/issue-index.md:270: table has 6 pipes; expected 5
   .agents/issue-index.md:272: table has 4 pipes; expected 5

A cell-part histogram over all 255 rows of the index reads {6: 253, 7: 1, 5: 1} — the only two malformed rows in the file are lines 270 and 272:

  • line 272 lacks its trailing |, so it is a 3-cell row in a 4-column table
  • line 270 contains an unescaped | inside a code span (`git diff origin/main...HEAD | grep '^+.*VT_MOE_EXPERT'`, at column 790), so it renders as 5 cells

Both render wrong on GitHub today, and every gate in the repository is silent about it.

Why it matters beyond cosmetics

These two rows are the two #995 duplicates behind #1022 / #1027 / #1031. The missing trailing pipe on line 272 arrived with 45b022cdc (#997) and the unescaped pipe on line 270 with 332aed738 (#996). Had check_table_shapes covered this path, the malformed row would have been red in #997's own preflight, before it landed — the duplicate would still have needed a decision, but the index would not have silently mis-rendered for two days.

This is the "a gate that cannot say how many things it examined has not reported" shape: the index passed every checker while two of its rows were structurally broken.

Scope

This is a semantic checker change (a new path gains a gate that currently reds), so per AGENTS.md § Changing the rules or a checker it needs a spec, a red-before test and green-after evidence — not a one-line edit in someone else's flow. It is deliberately NOT fixed in flow for that reason.

It is also gated on the duplicate repair landing first: adding the index to check_table_shapes while lines 270/272 are still malformed makes check-agent-record red for a second, independent reason. Land #1025 first, which makes all 254 rows 6-part, then arm this.

Not a duplicate of

Found while verifying the #995 duplicate repair on origin/main at 4f2d91756.

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