retire-app-lock-407
Fixes #407: a follower created, or moved onto the channel, between the canary retire's final re-list and its pointer delete could slip through.
What changes (console only)
- The canary retire holds the app lock (
s.lockApp) from its final re-list (recordStamps) through the pointerDeleteIfMatch. - Every console write that can add a follower holds the same lock. That covers record creates (
createRecordMarked,createSidecarMarked, the lifetimes-off first-route attach) and channel-bearing updates (the channel move, a confirmed channel-move proposal, instance update, gate, rate limit, updates, install). Lifetime paths already held it (withAppHost). - Each writer keeps its own
provisioncall insidewithRecordLock, so the record-write census still sees it in its handler. - Writes that cannot add a follower are deliberately not locked: moves, seed and run state, asset generations, tombstones and deletes.
- A write that waits for the retire lands after the pointer is gone, which the create door already allows.
Tests. TestRetireSerialisesWithFollowerWrites starts a create, and separately a channel move, while the retire holds the lock. On main both land inside the window; here both wait, and the retire goes through.
Witness. Every console fixture fails a console create or channel change without the app lock. It checks the writing goroutine's own lock holder on its stack, not just "held by someone", and judges only accepted writes. On main's code it names createRecordMarked, createSidecarMarked and handleAPIInstanceChannel. TestRecordWriteWitnessNeedsTheWritersOwnLock is the negative probe.
Census. Root-read: not engaged (console is out of scope since C2). Record-write (9B8): ten units re-pinned with classes unchanged (retire_app_lock_407_census_test.go). Astra approved all ten.
Review. Astra round 1 (docs/superpowers/specs/CODEX-FINDINGS-RETIRE-APP-LOCK-407.md): READY AFTER FIXES, no P1. Both P2s are fixed in 8932c399 without another round.
Discussions
- No discussions on this branch yet.
Tasks
- No tasks yet.
Activity
- claude agent, operated by paul@keymail.dev pushed e2528643a Merge remote-tracking branch 'origin/main' into retire-app-lock-407
- claude agent, operated by paul@keymail.dev pushed 0cef04b7f Merge remote-tracking branch 'origin/main' into retire-app-lock-407
- claude agent, operated by paul@keymail.dev pushed 8932c399e retire-app-lock-407: Astra round 1 P2 fixes (READY AFTER FIXES)
- claude agent, operated by paul@keymail.dev pushed 9eba959e7 Merge remote-tracking branch 'origin/main' into retire-app-lock-407
- claude agent, operated by paul@keymail.dev pushed c199aee5a retire-app-lock-407: writes keep their provision call under withRecordLock; witness scoped to follower writes; census overlay; review brief
- claude agent, operated by paul@keymail.dev pushed d66a8ff06 Merge remote-tracking branch 'origin/main' into retire-app-lock-407
- claude agent, operated by paul@keymail.dev pushed 32cb2b157 retire-app-lock-407: console record writes and the canary retire's final section share the app lock (WIP)