Skip to content

docs(review-checklist): dedupe rules 18/19 and put every rule in numeric order so rendered numbers match their literals - #1736

Merged
lilyshen0722 merged 2 commits into
mainfrom
kai/task045-review-checklist-dedupe
Sep 18, 2026
Merged

lilyshen0722 merged 2 commits into
mainfrom
kai/task045-review-checklist-dedupe

Conversation

@lilyshen0722

@lilyshen0722 lilyshen0722 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Two changes to docs/development/review-checklist.md, both from one property of the file: its rule numbers are cited externally (ADR-028 cites rule 23, ADR-019 cites rule 9, REVIEW.md cites §7), while markdown numbers ordered-list items by position, not by the literal number in the source. Whenever a rule's number did not match its position, the rendered document disagreed with every citation.

Docs only. No rule is renumbered, no prose is rewritten, and the two relocated rules are byte-identical.

1. Duplicate copies removed (18 ×3, 19 ×4)

rule copies kept why
18 357w, 576w, 576w a 576w copy the 357w copy is a strict prefix of it; the other two are word-identical
19 511w, 612w, 723w, 1029w the 1029w copy copies 1, 3 and 4 are word-subsequence subsets of it

Rule 19's 612-word copy is the exception, and dropping it is the point. It carries "the only reader in any route or controller … routes/admin/agentEvents.ts (:75, :92) — an admin-only surface". The surviving copy corrects that to three readers in the whole tree, one of them scripts/seat-output.ts, and records the earlier wording and why the count is load-bearing ("a scoped count is one careless quotation away from a false one"). The stale sentence is the only thing that goes.

2. Numeric order restored — and rules 24 and 25 are my own mistake

Rules 24 and 25 came from my previous PR, #1735 (merged as a204e72b). I appended them to the tail of the ## Tests and assertions and ## Guards and predicates lists, so by the same mechanism rule 24 rendered as 5 and rule 25 as 7 — and the numbers 24 and 25 appeared nowhere in the rendered file. That is the class of defect this PR fixes, introduced by the PR that "fixed" the file; the placement paragraph in #1735's body is superseded by this one.

Rendered rule numbers, read back from each <ol start> and item count with marked@12:

revision rendered numbers in document order rule 18 rule 23 rules 24/25
main before this PR (duplicates intact) 1–4, 5–6, 7–8, 9, 10–20, 19–23, 20,21,22 renders 19 renders 18 24 → 5, 25 → 7
this PR 1–4, 5–6, 7–8, 9, 10–18, 19, 20–25 renders 18 renders 23 render 24, 25

Document order is now 1…25, and each rule renders under its literal number. Rule 23's text is byte-identical (sha1 dc9909b051); rules 24 and 25 are byte-identical to what #1735 merged.

Judgement call worth a look before pressing merge

Rules 23, 24 and 25 now sit under ## Failure direction rather than in their thematic sections — 23 is a mocked-sweep rule, 24 a fixtures-and-schema rule, 25 a guards rule. That is the price of numbering that agrees with the citations. The alternative is to keep each rule in its section and force a list restart; <!-- --> does interrupt a list in marked, but I could not verify it against GitHub's cmark-gfm locally, and a numbering fix that holds on only one renderer is worse than a rule filed one section over. If you would rather have theme than number, say so and I will do the section-break version so we can check it on GitHub itself.

Evidence

  • git diff origin/main --numstat → 6 insertions(+), 10 deletions(-) across the two commits.
  • Word-subsequence check: for every dropped copy, each word still appears in order in the surviving copy of the same rule — three of four pass; the fourth is the documented correction above.
  • Literal rule numbers in document order after the change: exactly 1…25, no duplicates.
  • Rendering before/after with marked@12 on both revisions; numbers read back from each <ol>'s start and its direct <li> children — direct children specifically, for the reason in the correction below. Vera re-ran the same comparison with a different parser (mdast) and got the same sequences, 5,5,7,7…19,20,19,20 on main and 1…25 on this head.
  • Relocated rules compared byte-for-byte against their pre-move text (all three identical).

Correction: rule 9 is not a defect, and an earlier version of this body said it was

An earlier version of this body reported that rule 9's two sub-points render as ordered-list items 10 and 11, colliding with the real rules 10 and 11. That was wrong, and the error was in my instrument, not in the file. The sub-points are a nested bullet list inside item 9 — the rendered HTML is <ol start="9"><li>…<ul><li>… — so rule 9 renders as 9 and nothing collides. My counting script read every <li> inside each <ol> while stripping nested <ol> elements, but not nested <ul> elements, so two bullet items were counted as ordered items of the parent list. Counting direct children only gives the correct sequences above.

The trap is worth naming because the same script produced the numbers this PR is built on, and they happened to survive it: the miscounts landed on rule 9 (which has a nested bullet list) and not on rules 1–8 or 10–25, none of which nest. A list-item count is only a count of the list if it counts direct children — and the failure is silent, producing a plausible document defect out of correct markdown. There is no rule 9 fix to make, and no follow-up row: it was filed as TASK-046 and is now closed as not-a-defect.

…le 23 last so rendered numbers match their literals

Rules 18 and 19 had accumulated duplicate copies from successive appends.

18 (3 copies): the first is a strict prefix of the third; the second and third
are word-identical. Keep one.
19 (4 copies): copies 1, 3 and 4 are strict subsets of copy 4 — every word of
each still appears in order in copy 4 — so dropping them loses nothing. Copy 2
is the exception and is dropped deliberately: it carries the stale count claim
('the only reader in any route or controller ... an admin-only surface') that
copy 4 corrects to three readers in the whole tree, one of them
scripts/seat-output.ts. Copy 4 also records that earlier wording and why the
count is load-bearing, so the correction survives the deletion.

Rule 23 moves to the end (text byte-identical) because markdown numbers list
items by position, not by their literal number. With 23 sitting between 17 and
18 in one list, the rendered document showed rule 23 as '18' and rule 18 as '19'
(verified by rendering both revisions with marked@12). Document order 18..23
makes every one of the 23 rules render as its literal number. No rule is
renumbered: numbers are cited externally (ADR-028 rule 23, ADR-019 rule 9,
REVIEW.md §7).
… and 7

My own #1735 (merged as a204e72) appended these two rules to the tail of the
'Tests and assertions' and 'Guards and predicates' lists. Markdown numbers
ordered-list items by position, so rule 24 rendered as 5 and rule 25 as 7, and
neither 24 nor 25 appeared anywhere in the rendered document — measured with
marked@12: [1,2,3,4,24] renders 1..5 and [5,6,25] renders 5,6,7.

Relocating both after rule 23 makes document order ascend 1..25, so every rule
renders under its literal number. Text is byte-identical to what #1735 merged.
This supersedes that PR's placement paragraph.
@samxu01
samxu01 force-pushed the kai/task045-review-checklist-dedupe branch from 859287f to 6eb3761 Compare September 18, 2026 09:18
@lilyshen0722 lilyshen0722 changed the title docs(review-checklist): one copy of rules 18/19, and rule 23 moved last so rendered numbers match their literals docs(review-checklist): dedupe rules 18/19 and put every rule in numeric order so rendered numbers match their literals Sep 18, 2026
@lilyshen0722
lilyshen0722 merged commit d720685 into main Sep 18, 2026
30 of 38 checks passed
lilyshen0722 added a commit that referenced this pull request Sep 18, 2026
…er (#1737)

Adding a rule to the tail of its thematic section is the intuitive move, and it
silently breaks the numbering: markdown numbers ordered-list items by position,
so the new rule renders under the section's next number and its own number
appears nowhere. #1735 did exactly that — rules 24 and 25 rendered as 5 and 7 —
and #1736 (d720685) fixed the instances by putting every rule in ascending
document order.

Rule numbers are cited by number elsewhere (ADR-028 rule 23, ADR-019 rule 9,
REVIEW.md §7), so a rendered number that disagrees with the citation is the
failure that reaches a reader. This states the convention where the next
contributor will see it, in the file's existing header style.

Docs only, one line. Rendered numbers are unchanged at 1..25 (marked@12), and
the note adds no list item.
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