Skip to content

docs(parity): give every known-delta row an id of its own - #322

Merged
Andrei Kvapil (kvaps) merged 2 commits into
mainfrom
docs/parity-unique-row-ids
Nov 24, 2026
Merged

Andrei Kvapil (kvaps) merged 2 commits into
mainfrom
docs/parity-unique-row-ids

Conversation

@kvaps

Copy link
Copy Markdown
Member

Two rows of docs/cli-parity-known-deltas.md on main have id 86: the rd clone options row and the node interface modify --active row that came later with the website. A test comment and a scenario doc cite "row 86" for the second one, so the citation is ambiguous.

The later row moves to 98 and both citations follow it. A new test in tests/contract fails when two rows share an id.

Open PRs that add rows took the next free id on main when they were written, so together they reuse 95, 96, 97 and 100. Each of them now takes its own ids above 98, in PR order, so the table stays unique in any merge order:

PR was now
this PR (node interface modify --active) 86 98
#192 98 99
#271 96, 97 100, 101
#275 (and #287, which carries its commits) 95 102
#286 95 103
#287 96 104
#278 100 105
#301 100 106
#315 100 to 104 107 to 111

A row added after this merges takes the next id above 111; the test catches one that doesn't.

Testing

  • go test ./tests/contract/ -run TestKnownDeltaRowIDsAreUnique passes here and fails on main with row id 86 is used by more than one row.
  • The table of the integration branch that carries all PRs above, with every renumbering applied, has no duplicate id.

Not tested

  • cli-parity-refresh.sh against a stand. Its catalogue ids stop at 55, so none of the moved rows was matched by id; they are matched by command and tag as before.

Two rows of the accept-list carried id 86: the clone options row and
the node interface row the website change added later. A citation of
row 86 from a test comment or a scenario doc no longer said which one
it meant. The later row moves to 98, its two citations follow it, and
a test now refuses a table where two rows share an id, so branches
that add rows at the same next free id collide in CI, not on main.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I checked that no other citation of row 86 is left in the tree, that 98 is free on main, and that the refresh script only matches ids against the COMMANDS catalogue (01 to 55), so the renumbering does not change what it whitelists. The test reads the real file and fails on an empty match, so it cannot pass vacuously.

One heads-up, not blocking: #325 also adds a row 98, so it will trip this test once this lands and will need a new id. The same goes for row 99, which #325 and #192 both add.

The test is right, but it reports the collision after the fact. Five of the PRs I re-approved today carry a commit that only renumbers rows after a merge of main. If a new row took its PR number as the id, parallel branches would stop colliding, and existing rows could keep their numbers. That is a follow-up, not something for this PR.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@kvaps
Andrei Kvapil (kvaps) merged commit 29c6ecb into main Nov 24, 2026
6 of 8 checks passed
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.

2 participants