#1 [high] Audit of PR #705 (selene/helios service_store retry storm) — conclusions
No Blocker/Major correctness bug found. Verified sound:
- disk_stored (composite.rs:656-720): returns false ONLY on ENOSPC pressure (line 687
return !pressure), which arms retry_after (line 668); every other path returns true. poll()'s Stored arm (1610-1614) is the only progress loss; Fetched/other still bump (1615-1623). - retry_after edge (1656-1660) clears unconditionally and bumps progress once; 50ms cadence bounded.
- 1:1 jobs<->parked.writing invariant holds: only writer is spill() at 857-859 right after start_write Ok (607/616); all removers (disk_stored 660/662/689, drop_parked_children 736, poll expired 1584 which excludes writing, close 1759) keep them consistent.
- helios publications are uniquely indexed (2803-2819 dedupe, 2823-2826, 2829, 2858 all guard on publication_index) => seen_waiting.insert at 2884/2936 always returns true; no dropped waiters.
- can_retry_slabs returning false always has a future wake source: writing>=MAX_SPILLS or covered_slots>=short (=> a write completion bumps progress) or backoff_active (=> timer edge bumps progress). No stalled deferred publication.
- Inflight retries are self-limiting because Inflight paths (1284/1296-1301/1319/1326/1343) all depend on in-flight work that completes => progress. Findings: F1 Major heap rescan multiplicity in can_retry_slabs+store gate; F2 Minor debug_assert_eq over all parked; F3 Minor declared held[0] metric contract deviation vs docs/prefix-cache-offload.md:1364-1370.