You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(docs): nothing enforces that the two ADR indexes agree with the ADR files #1390
This repository keeps two ADR indexes and requires both to be updated. Nothing enforces it, and they have already drifted.
docs/engineering/adrs/README.md states the rule:
Until bodies move under this folder, add new ADR markdown under docs/adr/ and update both
Both indexes are hand-maintained tables. There is no test comparing them against each other or against the ADR files on disk.
How it was found
ADR 0033 merged today in PR #1383, which updated docs/adr/README.md and not docs/engineering/adrs/README.md. Nothing failed. The omission surfaced only because a later agent happened to read the second README while adding ADR 0034, and repaired both.
That is the same class of defect as the stale crate inventories repaired in #1373: a hand-maintained list that has to agree with reality, with no mechanism making it agree. Those inventories had drifted silently for three crates and were caught only by an unrelated investigation.
Requirements
Add a fail-closed check that the set of ADR files under docs/adr/ matches both index tables, by number and by filename.
Catch the three ways they can disagree: a file present in neither index, a file present in one index only, and an index row naming a file that does not exist.
Fix any drift the check reveals beyond the 0033 row already repaired.
Acceptance criteria
A test fails when an ADR file is missing from either index.
A test fails when an index row names a file that does not exist.
The test is proven to fail closed by removing an entry and observing the failure, not merely by passing.
Both indexes agree with the ADR directory at the time this lands.
The check runs in an existing suite; no new standalone gate.
Non-goals
Moving ADR bodies under the second directory. The path coordination question is separate and this issue takes no position on it.
Changing ADR numbering or content.
Validating ADR body structure, status fields or supersession links. Worth considering later; this issue is about the indexes agreeing with the filesystem.
Relationships
Found while adding ADR 0034 under #858. Same class as #1373, which repaired stale hand-maintained release inventories and added the divergence test that now protects them.
Problem
This repository keeps two ADR indexes and requires both to be updated. Nothing enforces it, and they have already drifted.
docs/engineering/adrs/README.mdstates the rule:Both indexes are hand-maintained tables. There is no test comparing them against each other or against the ADR files on disk.
How it was found
ADR 0033 merged today in PR #1383, which updated
docs/adr/README.mdand notdocs/engineering/adrs/README.md. Nothing failed. The omission surfaced only because a later agent happened to read the second README while adding ADR 0034, and repaired both.That is the same class of defect as the stale crate inventories repaired in #1373: a hand-maintained list that has to agree with reality, with no mechanism making it agree. Those inventories had drifted silently for three crates and were caught only by an unrelated investigation.
Requirements
docs/adr/matches both index tables, by number and by filename.scripts/ci/test-crate-publish-plan.pyis the recent precedent for this pattern, added by fix(release): three crates are in the publish plan but missing from every release inventory #1373.Acceptance criteria
Non-goals
Relationships
Found while adding ADR 0034 under #858. Same class as #1373, which repaired stale hand-maintained release inventories and added the divergence test that now protects them.