Skip to content

Name a row of the wrong width in every reader (#43) - #63

Merged
duizendstra merged 6 commits into
mainfrom
workshop/index-width
Nov 8, 2026
Merged

duizendstra merged 6 commits into
mainfrom
workshop/index-width

Conversation

@duizendstra

@duizendstra duizendstra commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Option A from #43, as ruled there (D1). Refs #43; it does not close it, because the json diffract-index block (B) follows in 0.5.0.

What changes

  • check_review.py:
    • scorecard_cells() takes an optional failures. A Scorecard row that is not two cells wide is named, not dropped, so the failure is the cause and not "Scorecard has no 'Governors' row".
    • Only check_scorecard passes the list. lenses_run_row reads the same table and does not, so each row is reported once.
    • The index's column-count failure uses the same helper, wrong_width().
  • Rule rows. table_parts() takes the rule row to be the line after each table's header, as GFM does.
    • A rule row of the wrong width is named.
    • A later all-dash row is named as a stray, because GitHub shows it as data.
    • A row of empty cells is no longer taken for a rule row.
    • The header is the row above the rule row, by position. It is skipped only when it reads ID, and then named if it is the wrong width; a finding in its place is named, and so is a later row repeating its ID.
  • render_scorecard.py: fix_row() refuses a wrong-width row (exit 2), and a stray is refused too. Both used to pass through.
  • score_seeds.py: findings() exits, naming every wrong-width or stray index row. It used to skip them, so the seed score could undercount.
  • The hint. A row that is too wide ends with the PROMPT.md:637-639 rule: a literal | inside a cell is written \|. A narrow row ("is 1 column") gets no hint, because no escape restores a lost cell.
    • This narrows D1's wording ("with the escape hint") on purpose.
    • Sample: Scorecard row 'Governors' is 3 columns, expected 2: a literal | inside a cell is written \|.
  • CHANGELOG [Unreleased] gains the sentence. It names the three older siblings, each filed: a row GitHub renders that no reader reads, with no outer | or indented (A table row GitHub renders but no reader reads: no outer pipe, or indented #64, widened); a mandated table with no rule row or split by a blank line (A mandated table GitHub does not render as one table passes every reader #65); a Scorecard metric written twice or not in the template (A Scorecard metric written twice, or not in the template, passes unread #66). The W5H-4 wording at "narrowed, not closed" is untouched.

Tests: the test_43_* fixtures in test_scripts.py. check.py: all checks pass. test_scripts.py: 54 tests, OK.

The placebo tables and each blind Opus verdict, pinned to its head, are in the comments.

🤖 Generated with Claude Code

check_review.py's Scorecard dropped a row that was not two cells wide and
then reported the row as missing; render_scorecard.py passed such a row
through uncorrected; score_seeds.py skipped a wrong-width index row, so the
seed score could undercount without a word. All three now fail the row by
name, through one helper, with the escape hint PROMPT.md states: a literal
| inside a cell is written \|. The Scorecard row is reported once, by
check_scorecard only.

Fixtures for each reader in test_scripts.py; MANIFEST regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first commit named data rows only. A rule row of any width and a header
row of any width were still dropped unread, and `^:?-*:?$` matched an empty
cell, so a row of empty cells was taken for a rule row. Rule rows now need
a dash (RULE_CELL), rule_rows() returns what table_rows() drops so each
reader can name one of the wrong width, and an index header is dropped only
at width 8. The pipe hint is given only to a row that is too wide.

The row with no closing pipe is a different class, left and filed as #64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@duizendstra

Copy link
Copy Markdown
Member Author

Review at 6b67c18: SEND BACK. Blind reviewer, claude-opus-5-5.

The blocker: the CHANGELOG said every reader names a wrong-width row, but three cases still passed silently.

  • A rule row of any width. GitHub renders no table at all in that case.
  • A row of empty cells. ^:?-*:?$ matches an empty cell, so the row was taken for a rule row.
  • An index header row of any width.

Notes:

  • The \| hint was also given to rows that are too narrow.
  • A row with no closing pipe is read by no reader. That case is older than this PR.
  • The reviewer's own mutant run was refused by its read-only guard, so its placebo check rests on reading the tests.

Fixed at 1ef0f95.

  • RULE_CELL now requires a dash.
  • rule_rows() returns the rows that table_rows() drops. The Scorecard, the index and score_seeds.py each name one of the wrong width.
  • An index header is skipped only at width 8.
  • The hint goes only to rows that are too wide.
  • New fixtures: rule row (Scorecard and index), empty-cell row, index header, narrow row.
  • The no-closing-pipe case is left and filed as A table row GitHub renders but no reader reads: no outer pipe, or indented #64. CHANGELOG says so.

Author's placebo run at 1ef0f95, not a reviewer's. Each mutant fails at least one #43 fixture. The MANIFEST and repository-check failures are expected for any edited script.

Mutant Fails
M1 check_scorecard stops passing failures …named_once, …rule_row_of_the_wrong_width…, …narrow_row…
M2 fix_row stops refusing …render_scorecard_refuses…, …rule_row_of_the_wrong_width…
M3 score_seeds stops exiting …score_seeds_names…, …index_header…
M4 the Scorecard failure appended twice …named_once
M5 RULE_CELL back to -* …row_of_empty_cells…
M6 no Scorecard rule-row check …rule_row_of_the_wrong_width_is_named
M7 no index header width check …index_header…
M8 score_seeds skips a header at any width …index_header…
M9 hint on every width …narrow_row_gets_no_pipe_hint
M10 no index rule-row check …index_rule_row…
M11 no score_seeds rule-row check …index_rule_row…

check.py: all checks pass. test_scripts.py: 49 tests, OK. A fresh blind review of 1ef0f95 follows.

🤖 Generated with Claude Code

@duizendstra

Copy link
Copy Markdown
Member Author

Blind review verdict: SEND BACK · head 1ef0f95876495107b1b7cd0d0272ee6065bda31f · base b2f2360 · reviewer model claude-opus-5-5 (blind re-review)

What passed.

Blocker B1.

  • is_rule() treats any row whose cells are all dashes as a rule row, wherever it sits.
  • In GFM only the line straight after the header is the rule row. A later dash row renders as data.
  • Probes:
    • eight - cells after the index rule row;
    • a second index rule row of the right width;
    • |---|---| inside the Scorecard.
  • Each probe exited 0 from all three readers, which never mentioned the row.
  • So the CHANGELOG's "One sibling is left" is false.

Notes.

  • The hint is given only to rows that are too wide. That differs from D1's wording, but is deliberate.
  • The PR body is stale for this head.
  • "is 1 columns" is ungrammatical.
  • A two-cell row of empty cells in the Scorecard is read and not named. Unknown Scorecard keys were never checked.

Fix follows on a new head, with a fresh blind review.

A later row of dashes was dropped as a rule row by all three readers,
though GitHub shows it as a data row. table_parts() now counts the rule
row per table, and every reader names a stray by its position.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@duizendstra

Copy link
Copy Markdown
Member Author

Fix for B1 at df1e985, on top of 1ef0f95.

table_parts() takes only the line after each table's header as its rule row. Every other all-dash row is a stray, and each reader names it:

  • check_review (Scorecard and index);
  • render_scorecard (refused);
  • score_seeds (exits).

The message: <where> row '---' is all dashes below the rule row: GitHub shows it as a data row. The CHANGELOG now says so. #64 is still the one sibling left.

Placebo run (author's, not a reviewer's). Each mutant was run in a scratch copy, with MANIFEST regenerated for it.

Mutant Fixture that fails
S1 every all-dash row is a rule row again …dash_row_below_the_index_rule…, …dash_row_in_the_scorecard_body…
S2 scorecard_cells stops naming strays …dash_row_in_the_scorecard_body…
S3 index_rows stops naming strays …dash_row_below_the_index_rule…
S4 score_seeds stops naming strays …dash_row_below_the_index_rule…
S5 render_scorecard stops refusing strays …dash_row_in_the_scorecard_body…
S6 no per-table reset …each_table_has_its_own_rule_row

check.py: all checks pass. test_scripts.py: 52 tests, OK. A fresh blind Opus review of df1e985 follows.

@duizendstra

Copy link
Copy Markdown
Member Author

Blind review verdict: SEND BACK · head df1e985d2dcdadec5390c973d3c0e12d9decc0e7 · base b2f2360 · reviewer model claude-opus-5-5 (blind, third pass)

What passed.

Blocker. The CHANGELOG's claim "one sibling is left (#64)" is false. Three older shapes are not fixed or filed:

  • (a) A body row with no leading |, or indented 1–3 spaces. GitHub renders it, but no reader reads it. score_seeds exits 0 and the row is dropped. A table row GitHub renders but no reader reads: no outer pipe, or indented #64 covers only a missing closing |.
  • (b) A mandated table with no rule row, or split by a blank line. All three readers exit 0, though GitHub renders no table, or renders only part of it.

Notes.

  • A duplicate Scorecard key passes, and the row GitHub shows first is never named. This is a different class from this PR's.
  • "is 1 columns" is ungrammatical.
  • One CHANGELOG line is over-long.

Next: the siblings are named and filed, and the CHANGELOG is reworded on a new head, which gets a fresh blind review.

The CHANGELOG said one sibling was left. Review found two more shapes
and a duplicate-key case, all older than this; #64 is widened and #65
and #66 are filed, and the sentence names all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@duizendstra

Copy link
Copy Markdown
Member Author

Fix for the third verdict at b632fdf. There is no code change to the readers' logic:

check.py: all checks pass. test_scripts.py: 52 tests, OK. A fresh blind Opus review follows.

@duizendstra

Copy link
Copy Markdown
Member Author

Blind review verdict: SEND BACK · head b632fdfaaba2addba850bbc9402195719787bc51 · base b2f2360 · reviewer model claude-opus-5-5 (blind, fourth pass)

What passed.

B1.

  • The header row is still chosen by content, not position. Any 8-wide row whose first cell is ID is skipped wherever it sits, in both index_rows and score_seeds.
  • Probe: | ID | Subtract | 1 | x | Major | Fix | hidden finding | High | under the index rule row. It passes check_review.py with rc 0, and score_seeds.py gives rc 0 with the row unscored.
  • No PR change or filed issue covers it.

B2. The reviewer's own placebo run was refused by its read-only guard, so it is still owed.

Note. An unknown Scorecard key passes silently. It is close to #66.

Next: the header is chosen by position, a later ID row is named, the note is folded into #66, and a fresh blind review follows.

A data row whose first cell read ID was skipped as the header wherever
it sat, by check_review.py and score_seeds.py alike. table_parts() now
records each table's header as the row above its rule row, and a later
row repeating it is named.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@duizendstra

Copy link
Copy Markdown
Member Author

Fix for the fourth verdict at 65809dc.

B1.

  • table_parts() now returns heads: each table's header, taken as the row above its rule row, by position.
  • index_rows and score_seeds skip only that row.
  • A later row whose first cell is ID is named: index row 'ID' repeats the header but is not the table's header: GitHub shows it as a data row.
  • New fixture: test_43_a_row_repeating_the_index_header_is_named, which uses the reviewer's probe row.

Note. The unknown-Scorecard-key case is folded into #66, which is retitled. The CHANGELOG says so.

Placebo run (author's, not a reviewer's). Each mutant was run in a scratch copy, with MANIFEST regenerated for it.

Mutant Fixtures that fail
H1 index_rows skips a repeated ID row silently …row_repeating_the_index_header…
H2 score_seeds skips it silently …row_repeating_the_index_header…
H3 no header is recorded 25, including every published review
H4 the header is not taken at position 0 25, including …each_table_has_its_own_rule_row
H6 score_seeds stops naming a wrong-width header …index_header_of_the_wrong_width…

check.py: all checks pass. test_scripts.py: 53 tests, OK. A fresh blind Opus review follows.

@duizendstra

Copy link
Copy Markdown
Member Author

Blind review verdict: SEND BACK · head 65809dcf1b9071a27f58ecb8504ba2c0b5a8eec1 · base b2f2360 · reviewer model claude-opus-5-5 (blind, fifth pass)

What passed.

B1: a regression introduced by 65809dc.

  • The positional header is skipped whatever its content, so a finding in a header's place is dropped unnamed.
  • Probe B: a second index table whose first line is a finding (SUB-9). main fails this review. This head passes it with rc 0.
  • Probe D: no ID line, so SUB-1 becomes the header. score_seeds gives 4/4 on main and 3/4 on this head, an undercount that names nothing.
  • This is not a new case of the same kind. It is a regression, so it is fixed here, not filed.

Notes.

  • CHANGELOG line 39 is over-long.
  • In probe C, the finding is dropped, but the review fails for the right reason.

Next: a positional header is skipped only when it reads as the header. Otherwise it is named. Fixtures for probes B and D, then a fresh blind review.

65809dc took the header by position and skipped it whatever it read.
A finding above a rule row was then dropped unread: a second table
under the index opened by one, or an index whose ID line was lost, so
score_seeds.py undercounted where main had failed. A row in the
header's place is now skipped only when it reads ID; any other is
named, in check_review.py and score_seeds.py alike. Refs #43.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@duizendstra

Copy link
Copy Markdown
Member Author

Fix for the fifth pass, at cb14b0e.

The fifth pass found B1, a regression from 65809dc: the header was skipped by position whatever it read, so a finding in the header's place went unread.

  • Fix: a row in the header's place is skipped only when it reads ID. Any other row there is named: index row 'SUB-9' is above the rule row: GitHub shows it as the header, not as a row. This applies in check_review.py and score_seeds.py alike.
  • Fixture: test_43_a_finding_in_the_header_place_is_named covers both probes, each through check_review.py (exit 1, named once) and score_seeds.py (exits, named).
    • B: a second table under the index, opened by a finding.
    • D: the ID line lost, so SUB-1 sits in the header's place.
  • Placebos: reverting either half of the fix fails that fixture.
  • Suites: check.py says all checks pass, and test_scripts.py runs 54 tests, OK.

A sixth blind review on Opus follows, pinned to cb14b0e.

@duizendstra

Copy link
Copy Markdown
Member Author

Sixth blind review: PUSH WITH NOTE · head cb14b0e · base b2f2360 · reviewer model claude-opus-5-5

  • No regressions. The reviewer ran 31 mutated reviews against main and the head: 14 Scorecard variants and 17 index variants. No probe that main fails passes on the head.
    • On the published reviews, score_seeds.py and render_scorecard.py print the same output on both trees, and every CI review passes, including the two hash-pinned 0.3.0 ones.
  • Shapes named. Every in-scope wrong-width, stray, repeated-ID or misplaced-header row is now named. That includes the fifth pass's B1 regression, a finding in the header's place.
  • Placebos. 22 single-guard mutants, and every one fails a named test.
  • Suites. check.py says all checks pass, and test_scripts.py runs 54 tests, OK. MANIFEST is current.
  • Blockers: none.

Notes, all filed. None was introduced by this PR.

Ready for Jasper to merge. Refs #43; this PR does not close it.

@duizendstra
duizendstra merged commit 347e28a into main Nov 8, 2026
1 check passed
@duizendstra
duizendstra deleted the workshop/index-width branch November 8, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant