Development record
A link repoint rewrites spec records that link to a moved path with no spec lock, and no spec writer takes one either: the spec store's only lock is the mint's (withMintLock in internal/core/spec/store.go). spec.Close renames a spec open/ to closed/ while a concurrent repoint (an intent plan, a capture resolve) that read the spec at open/ writes it back there through an atomic rename, which lands the spec in both status folders; a spec edit landing between the repoint's read and its write is erased. Closing it needs a spec-store writer lock every spec writer takes, ordered against the ledger and intent locks.
A link repoint rewrites spec records that link to a moved path with no spec lock, and no spec writer takes one either: the spec store's only lock is the mint's (withMintLock in internal/core/spec/store.go). spec.Close renames a spec open/ to closed/ while a concurrent repoint (an intent plan, a capture resolve) that read the spec at open/ writes it back there through an atomic rename, which lands the spec in both status folders; a spec edit landing between the repoint's read and its write is erased. Closing it needs a spec-store writer lock every spec writer takes, ordered against the ledger and intent locks.
Grounds
- pursued: a repoint racing spec close never leaves a spec in both status folders and a spec edit racing a repoint is kept; TestARepointRacingASpecCloseLeavesTheSpecInOneFolder, TestASpecEditRacingARepointIsNotLost or TestTheRecordLocksAreTakenLedgerThenIntentThenSpec failing would show it wrong
Frontmatter
| id | iss-2609262218309668 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2609262218309668-a-link-repoint-rewrites-spec-records.md
open on GitHub ↗ · commit history ↗