Repository navigation
docs(parity): give every known-delta row an id of its own - #322
Conversation
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>
|
Caution Review failedThe pull request is closed.
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. |
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
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>
Two rows of
docs/cli-parity-known-deltas.mdon main have id 86: therd cloneoptions row and thenode interface modify --activerow 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/contractfails 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:
node interface modify --active)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 TestKnownDeltaRowIDsAreUniquepasses here and fails on main withrow id 86 is used by more than one row.Not tested
cli-parity-refresh.shagainst 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.