mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-30 02:57:34 +00:00
Expired replacements and restored checkpoints can refer to repository views that already serve admitted announcements. Expiry must protect those views while still removing abandoned directories regardless of who created them. Take the repository lifecycle lock and try an identifier activity writer, query admission for the complete owner/identifier coordinate, then recheck the candidate ID and deadline under its entry lock. Admission, uploads, fetching and promotion hold shared activity guards through their mutations. A nonblocking writer permits nested processing without lock inversion. In both expiry phases, delete views only when no announcement is admitted. Retain pending entries for retry on query or deletion failures. Checkpoint age and historical creation ownership do not exempt directories from expiry. Retire already admitted or superseded candidates without marking them expired. Promotion rechecks view existence after acquiring its guard so queued work cannot advertise a directory removed by expiry. Explicit deletion handling, repair of already missing admitted views, and scanning directories without pending entries are outside this change. The reported deployment incident's cause remains unconfirmed. Validation: 14 focused expiry regressions pass, including legacy checkpoints, preexisting views, both-phase retries, changing admission, concurrent lifecycle activity and queued promotion. Formatting and git diff --check pass. Earlier revision passed full local suites and CI; these were not rerun for this policy correction. No fixed sleeps were added. Assisted-by: GPT-6