Fixed and merged as 78c2365 (branch retire-app-lock-407), using the app-lock option.
- The canary retire holds
s.lockAppfrom its final re-list (recordStamps) through the pointerDeleteIfMatch. - Every console write that can add a follower holds the same lock. That covers record creates (lifetimes-off instance create, sidecar create, first-route attach) and channel-bearing updates (the channel move, a confirmed proposal, instance update, gate, rate limit, updates, install). Each keeps its own provision call inside
withRecordLock. Lifetime creates already held it throughwithAppHost. - Writes that cannot add a follower (moves, seed and run state, asset generations, tombstones, deletes) are deliberately not locked.
- A create or channel move that waits for the retire lands after the pointer is gone, which the create door already allows.
TestRetireSerialisesWithFollowerWrites starts a create, and separately a channel move, while the retire holds the lock. Both landed inside the window on the old code; now they wait, and the retire goes through. A witness in every console fixture fails any console create or channel change made without the writer's own app lock. On the old code it names createRecordMarked, createSidecarMarked and handleAPIInstanceChannel.
Review: Astra round 1, READY AFTER FIXES. No P1, both P2s (witness lock ownership, losing conditional writes) fixed. Record-write census: ten units approved, plus one re-pin after merging region-ha-p1a, also approved (#280). Console only, and CI was green on the tip after re-merging main.