Add retry-safe projection batch claims - #342
Open
dills122 wants to merge 4 commits into
Open
Conversation
Claim canonical projection batches before effects so rollback and ambiguous-commit retries cannot repeat projection work. Add a stable identity contract, deadline/watermark-safe cleanup, guards for both persistence paths, and PostgreSQL regression coverage.
Drive same-store effects from the exact claimed member set, apply the configured retry horizon on both persistence paths, and restore the frozen measurement-before-tuning gates. Add PostgreSQL concurrency, duplicate-claim, and horizon regressions.
Start separated-store authority before candidate acquisition so stale paused batches expire before cleanup or claim. Enforce completed result counts against claimed membership in migrated and compatibility contracts, with PostgreSQL regressions.
Retain completed batch authority for the full database-clock retry horizon, keep stale selectors fenced, and make projector failure injection roll back atomically. Harden ambiguity coverage and repair the live transactional crash gate so these guarantees are exercised end to end.
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.
Summary
Why
An ambiguous database commit or delayed stale selector must not repeat non-idempotent projection effects. This slice makes the claimed canonical membership the durable authority and fails closed when that authority is incomplete, expired, or conflicts with immutable projection semantics.
Verification
./gradlew check— passed, including JaCoCo coverage verificationnode --test scripts/dev/db/migrate.test.mjs— 25/25 passedmake dev-smoke-venue-event-crash-gate— passed on a fresh isolated Docker stackgit diff --check— passedScope
This completes the Slice 1A correctness foundation. It does not claim the final projection throughput target; DigitalOcean scaling gates remain the next evidence step.