Repository navigation
fix: diagnostics survive recovery races end-to-end; exactly-once per recovery window (2.0.3, published) - #25
Merged
Conversation
…n is exactly-once per window (2.0.3) — the sirtify-routed last_error-wipe closed with its whole race family: a successful release now REPLAYS the row's admission-time diagnostic (http_503 stays visible through re-admission; only a fresh enqueue failure writes a new error); every fate-resolving outcome (mark_succeeded, mark_send_failed both forms, finalize_disable, and the stored 410 obligation itself) releases the enqueue claim in the same statement, so a reconciler whose enqueue raced the outcome finds the token gone; a release matching zero rows on a CLEARED claim classifies as benign completion (:reconciled, never :endpoint_error) via reload, with genuine contention (:stale_enqueue_claim) and a vanished row (:enqueue_reload_failed) as distinguishable labels; and the claim gate is the LEASE ALONE — a successful admission parks enqueue_lease_expires_at for one 30s horizon (release_enqueue/5 takes the explicit enqueue outcome; the error string carries the preserved diagnostic on success), so a concurrent sweep inside the horizon reports a contended :duplicate instead of re-admitting (the exactly-once contract was previously upheld only by SQLite statement serialization — the final PG coverage gate caught a true-concurrency double-admit; the forced-interleaving test now pins it structurally, and the horizon-passed re-claim keeps crashed-claim recovery). The reconcile_pending docstring states the new contract; the changelog names the consumer-observable consequence (sub-30s sweeps see :duplicate where 2.0.2 re-admitted). Three codex rounds + a claude final pass (receipts under .kimosabe/reviews + scratch), every finding fixed — including two of mine the round-3 review caught (the park keyed on is_nil(error) while success carries the diagnostic; the claim gate's token arm bypassing the parked lease) and the gate's own catches (an uncovered-clause collapse, a duplicate reload/3, three struct-bound lease fixtures). Gate on final source: format, compile --warnings-as-errors, credo --strict, hex.audit, currency, SQLite suite 787, PG coverage 823 passed / 100.00% total against the ephemeral-area PG + the real receiver, dialyzer 0, cheat-sheets --check, docs --warnings-as-errors, check-package bytes-match, the tour notebook executed green against the 2.0.3 archive, and the exact-Ash-floor qualification passed.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the sirtify-routed last_error-wipe finding WITH its whole race family, three codex rounds + a claude final pass deep. (1) A successful release replays the row's admission-time diagnostic; (2) every fate-resolving outcome releases the enqueue claim in the same statement; (3) a zero-row release on a cleared claim classifies as benign completion, with genuine contention and vanished rows as distinguishable labels; (4) the claim gate is the lease alone and successful admissions park it for one 30s horizon — exactly-once per recovery window at the seam, previously upheld only by SQLite statement serialization (the final PG coverage gate caught a true-concurrency double-admit; a forced-interleaving test now pins it structurally). Full gate on final source: SQLite 787, PG coverage 823/100%, dialyzer 0, credo strict, docs, package bytes-match, livebook vs archive, Ash-floor qualification. The 2.0.3 package is already published (hex.pm/packages/ash_hooks/2.0.3, checksum e8701e22…) from this exact tree; the tag is pushed; this PR lands protected main.