Hardens the #536 work-ahead slot pool release path (three Low findings from the clamp re-review, unreachable today but filed against a future second release site).
§1Release() clamps before decrementing (CAS loop guarded by current > 0) so it never publishes a negative count even transiently — closing the window where a concurrent TryAcquire reads phantom room and over-admits. Records the unbalanced release synchronously.
§3Release() returns bool; HlsSessionWorker logs a warning on the unbalanced return (in-band signal for a future second release site).
§2UnbalancedReleases doc corrected — it can under-count; no false positives, but zero doesn't prove correctness.
Test Release_Unbalanced_NeverPublishesNegativeCount (2M unbalanced releases vs 4 count-samplers) with a verified negative control. Full Core.Tests suite green (631). decisions.md entry added.
Hardens the #536 work-ahead slot pool release path (three Low findings from the clamp re-review, unreachable today but filed against a future second release site).
- **§1** `Release()` clamps *before* decrementing (CAS loop guarded by `current > 0`) so it never publishes a negative count even transiently — closing the window where a concurrent `TryAcquire` reads phantom room and over-admits. Records the unbalanced release synchronously.
- **§3** `Release()` returns `bool`; `HlsSessionWorker` logs a warning on the unbalanced return (in-band signal for a future second release site).
- **§2** `UnbalancedReleases` doc corrected — it can under-count; no false positives, but zero doesn't prove correctness.
- Test `Release_Unbalanced_NeverPublishesNegativeCount` (2M unbalanced releases vs 4 count-samplers) with a **verified** negative control. Full Core.Tests suite green (631). `decisions.md` entry added.
Independent cold review: MERGEABLE.
fixes #539
Independent cold adversarial review (concurrency-scoped) of the pushed diff: no correctness/concurrency/vacuity defects. Release() proven never-negative and lock-free, over-admit window closed, test sound with a verified negative control, docs accurate.
Independent cold adversarial review (concurrency-scoped) of the pushed diff: no correctness/concurrency/vacuity defects. Release() proven never-negative and lock-free, over-admit window closed, test sound with a verified negative control, docs accurate.
Review-verdict: MERGEABLE @ 59b38d4168b9a5d3d6f39812edc465a19e4e2acc
Re-verdict after the catalog regeneration (b70ab546): the only delta from the reviewed head (59b38d41) is one generated row in docs/decisions/README.md from build_decisions_catalog.py — no code or rationale change. Review still holds.
Re-verdict after the catalog regeneration (b70ab546): the only delta from the reviewed head (59b38d41) is one generated row in docs/decisions/README.md from build_decisions_catalog.py — no code or rationale change. Review still holds.
Review-verdict: MERGEABLE @ b70ab546f467ff110ffc5e04c73244c67ce7d601
Rebased on origin/main to resolve the append-only conflict with #541 (both appended a decisions.md entry); kept both entries and regenerated the catalog. Code diff (WorkAheadSlots.cs / HlsSessionWorker.cs / tests) is byte-identical to the reviewed version — only docs/decisions.md + generated README changed. Review holds.
Rebased on origin/main to resolve the append-only conflict with #541 (both appended a decisions.md entry); kept both entries and regenerated the catalog. Code diff (WorkAheadSlots.cs / HlsSessionWorker.cs / tests) is byte-identical to the reviewed version — only docs/decisions.md + generated README changed. Review holds.
Review-verdict: MERGEABLE @ 1ce5743bc15850279ff7fbe58dfc3c9aed8043c0
timothy
scheduled this pull request to auto merge when all checks succeed 2026-07-21 21:00:42 +02:00
timothy
merged commit 44d9e47e1c into main2026-07-21 21:20:43 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hardens the #536 work-ahead slot pool release path (three Low findings from the clamp re-review, unreachable today but filed against a future second release site).
Release()clamps before decrementing (CAS loop guarded bycurrent > 0) so it never publishes a negative count even transiently — closing the window where a concurrentTryAcquirereads phantom room and over-admits. Records the unbalanced release synchronously.Release()returnsbool;HlsSessionWorkerlogs a warning on the unbalanced return (in-band signal for a future second release site).UnbalancedReleasesdoc corrected — it can under-count; no false positives, but zero doesn't prove correctness.Release_Unbalanced_NeverPublishesNegativeCount(2M unbalanced releases vs 4 count-samplers) with a verified negative control. Full Core.Tests suite green (631).decisions.mdentry added.Independent cold review: MERGEABLE.
fixes #539
Independent cold adversarial review (concurrency-scoped) of the pushed diff: no correctness/concurrency/vacuity defects. Release() proven never-negative and lock-free, over-admit window closed, test sound with a verified negative control, docs accurate.
Review-verdict: MERGEABLE @ 59b38d4168b9a5d3d6f39812edc465a19e4e2acc
Re-verdict after the catalog regeneration (b70ab546): the only delta from the reviewed head (59b38d41) is one generated row in docs/decisions/README.md from build_decisions_catalog.py — no code or rationale change. Review still holds.
Review-verdict: MERGEABLE @ b70ab546f467ff110ffc5e04c73244c67ce7d601
timothy referenced this pull request2026-07-21 20:49:54 +02:00
b70ab546f4to1ce5743bc1Rebased on origin/main to resolve the append-only conflict with #541 (both appended a decisions.md entry); kept both entries and regenerated the catalog. Code diff (WorkAheadSlots.cs / HlsSessionWorker.cs / tests) is byte-identical to the reviewed version — only docs/decisions.md + generated README changed. Review holds.
Review-verdict: MERGEABLE @
1ce5743bc1