Development record
2026-07-25 — Record-id collisions across parallel branches (iss-115, iss-120)
2026-07-25 — Record-id collisions across parallel branches (iss-115, iss-120) fixed as a class: one canonical allocator primitive (recordid.MaxAcrossRefs) mints max+1 over the union of the working tree AND every git ref, so a committed id on another branch is seen; git-unreadable-over-a-repo degrades loudly to tree-only, a non-repo mints quietly (no refs to collide). Detection completes the class — a new spec_id_unique record-lint rule via the shared validateIDUnique primitive (ADR ids left out of scope: this directive is iss-/itd-/spc- only). Rejected: id-range leases per programme, mint-at-merge, and non-sequential/hash ids — all trade away human-readable sequential ids without a maintainer mandate. The residual uncommitted-mint window (both branches mint before either commits) is accepted behind the armed detectors on the merged PR union.
Frontmatter
| id | dcn-2607250000000001 |
|---|---|
| type | decision |
| date | 2026-07-25 |
.abcd/work/decisions/dcn-2607250000000001-record-id-collisions-across-parallel.md
open on GitHub ↗ · commit history ↗
mentions2
- iss-115There is no uniqueness lint for spec ids, so two concurrent branches always mint the same spc-N. abcd mints the next free id from the local tree, so any two branches cut from the same base collide silently: the itd-73/itd-67 programme and the itd-95/itd-96 programme both minted spc-10 and spc-11 on 2026-07-21. The collision is invisible on each branch and only appears on merge, where it breaks the bidirectional intent-spec link in BOTH directions at once — 'itd-95 names spc-10, but spc-10 claims itd-73' and 'itd-67 names spc-11, but spc-11 claims itd-96' — because whichever spec wins the store lookup leaves the other intent's link dangling. iss-74 added an issue-id uniqueness lint; specs need the same guard, and record-lint is the natural home so CI catches it on the PR rather than a human catching it at merge. Consider also whether minting should reserve ids in a way concurrent branches cannot duplicate.
- iss-120Sequential record ids are minted from the local tree, so two parallel programmes mint the same next id — both took spc-10, spc-11, iss-110 and iss-111, costing four renumber commits across the episode. This generalises iss-115 (spec ids lack a uniqueness lint): issue and intent ids have armed detectors via the shared validateIDUnique primitive, spec and ADR ids have none, and detection-after-collision is the only mitigation anywhere. The design call is whether detection everywhere is enough or minting itself should be made collision-free (id-range leases per programme, mint-at-merge), which trades away human-readable sequential ids.