Finding
tests/adr-contract.test.mjs carries two assertions marked { todo: true }:
// Known deviation, tracked separately: adr/0001-stakeholder-outreach-draft.md
// takes the 0001 prefix without being ADR 0001, so the directory holds two
// files claiming that number and one of them is absent from the index.
test('each ADR number is claimed by exactly one file', { todo: true }, () => {
test(
'every number-prefixed ADR file is listed in the index',
{ todo: true },
() => {
The deviation they document no longer exists. 3906846 ("adr: resolve
duplicate 0001 number and index missing draft", #385) renamed the draft to
adr/stakeholder-outreach-draft-for-0001.md, which has no number prefix and so
drops out of numberPrefixed entirely. adr/ now holds exactly
0001-site-ownership-and-cutover-path.md,
0002-peoplehub-fleet-status.md, README.md and that draft.
But tests/adr-contract.test.mjs has not been touched since 8a12910 (#282),
which predates #385 — so the markers outlived the deviation. Both assertions
pass today and have been passing, inert, ever since.
Why this matters
A todo test still runs; node --test simply does not let its failure fail
the suite. So the ADR contract these two describe — one file per ADR number,
every numbered ADR present in adr/README.md — has not been enforced on any
pull request since #385, and nothing in the output says so beyond a # TODO
suffix and a todo 2 line in the summary.
Demonstrated, not inferred
At main 6ccdaac, adding a second file claiming ADR number 0002:
adr/0002-duplicate-number.md
and running TZ=UTC node --test tests/adr-contract.test.mjs:
⚠ each ADR number is claimed by exactly one file (1.186005ms) # TODO
ℹ pass 11
ℹ fail 0
ℹ todo 2
Exit status 0. The duplicate-number violation the test exists to catch is
reported as a warning and merges.
Recommendation
Drop { todo: true } from both tests and replace the stale comment with the
history that explains why they were ever marked. Nothing else is needed: both
assertions pass against the current adr/ tree, so this is removing a
suppression, not writing a new check.
Verify by mutation rather than by the markers' absence:
- a second file claiming an existing ADR number must fail
each ADR number is claimed by exactly one file;
- a number-prefixed file missing from
adr/README.md must fail
every number-prefixed ADR file is listed in the index.
Completion criteria
Priority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 6ccdaac
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
Finding
tests/adr-contract.test.mjscarries two assertions marked{ todo: true }:The deviation they document no longer exists.
3906846("adr: resolveduplicate 0001 number and index missing draft", #385) renamed the draft to
adr/stakeholder-outreach-draft-for-0001.md, which has no number prefix and sodrops out of
numberPrefixedentirely.adr/now holds exactly0001-site-ownership-and-cutover-path.md,0002-peoplehub-fleet-status.md,README.mdand that draft.But
tests/adr-contract.test.mjshas not been touched since8a12910(#282),which predates #385 — so the markers outlived the deviation. Both assertions
pass today and have been passing, inert, ever since.
Why this matters
A
todotest still runs;node --testsimply does not let its failure failthe suite. So the ADR contract these two describe — one file per ADR number,
every numbered ADR present in
adr/README.md— has not been enforced on anypull request since #385, and nothing in the output says so beyond a
# TODOsuffix and a
todo 2line in the summary.Demonstrated, not inferred
At
main6ccdaac, adding a second file claiming ADR number 0002:and running
TZ=UTC node --test tests/adr-contract.test.mjs:Exit status 0. The duplicate-number violation the test exists to catch is
reported as a warning and merges.
Recommendation
Drop
{ todo: true }from both tests and replace the stale comment with thehistory that explains why they were ever marked. Nothing else is needed: both
assertions pass against the current
adr/tree, so this is removing asuppression, not writing a new check.
Verify by mutation rather than by the markers' absence:
each ADR number is claimed by exactly one file;adr/README.mdmust failevery number-prefixed ADR file is listed in the index.Completion criteria
tests/adr-contract.test.mjsis markedtodoadr/0001-stakeholder-outreach-draft.mdis gonenpm run test:unit:coverage:checkstill passesPriority
Filed by quality agent (hold-gated mode)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5n31| SHA:6ccdaac— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88