Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 |
Owner
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep this checkpoint as WIP: the new deterministic regression is red. Ownership checks do not atomically fence writes or deletes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checkpoint the isolated store operations before wiring stage publication. Eight memory and Modal-adapter tests pass; the previous lease-based integration remains incomplete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep base reads unchanged, hydrate matching criteria/result inputs, upload each composition to new keys, then append its immutable version and final event. Recover uncovered answers on terminal runs. Focused tests pass; forced dual-composer coverage and full verification remain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All four portable regressions fail on 2b696e4 and pass here. Cover stale lease release with two composers and immutable result objects, concurrent stale reads, busy acceptance, and a storage-to-marker crash. Broader orchestrator/result verification passes 242 tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record an internal event watermark on each immutable publication, filter late old emitters and duplicates, and retain historical finals. Recover a publication interrupted before its event. Keep confirmation retries idempotent when clientAt changes. Thirteen event, API, and runtime join tests pass; full Ruff check and format check pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Equal-coverage versions can publish changed verdicts without overwriting prior objects. Keep the existing final-event retry contract, reject missing result artifacts before publication, and retain criteria input isolation. Publication and orchestration integration: 262 passed; journal and fault tests: 25 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the retry slot durable before journaling the answer so an interrupted POST retains its confirmation ID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Publish pending runs before seeding; allow failed claim owners to be superseded without deleting history. Replay adopted answers in acceptance order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes the correction/completion races by making accepted confirmations and published results immutable. The lease remains an advisory duplicate-work guard because the shared StateStore protocol has atomic insert-if-absent but no compare-and-delete operation.
What changed
claim:<capture>:<confirmation>:<generation>usingput_if_absent. Only a failed owner permits the next generation. Competing claimants cannot overwrite each other or delete claim history.apply_pending, the real and stub reads stages idempotently import old workers' confirmation slots. Run creation also imports them. An interrupted import can resume without duplicating an answer.reads/reads.json.result_version:<run>:<sequence>. A version records the correction IDs it incorporated. Older versions are never overwritten.Why
Lease ownership checks cannot fence a later write or deletion across separate StateStore calls. Immutable records keep correction recovery independent of lease ownership. The earlier finalize retry fix also preserves queued work when a worker finishes or fails.
Round 4 ownership recovery
Acceptance review of
3d6d2a18found two remaining gaps: an answer could arrive after seeding but before the new run became eligible, or its selected owner could fail during acceptance. Ownerless acceptance and failed-owner claim generations replace that fixed-target design.Seven deterministic regressions fail on
3d6d2a18and pass here. They pause creation after seeding and during the pending state, fail a run during journal insertion or after acknowledgment, race two takeover claimants, and check that a delivered predecessor's result and events do not change. Events and barriers assert that each boundary was reached; no sleeps synchronize the tests.Claim unit tests cover generation contention on memory and local Modal backends, failed-owner takeover, delivered-owner protection, and acceptance-order replay after late adoption. Versioned publication, advisory leases, legacy import, and iOS-facing payloads remain in place.
Round 3 regression evidence at 3d6d2a1
The independent review of
dd6e645efound historical-run contamination, answers stranded on failed runs, missing legacy imports, and inactive test barriers. Round 3 addressed those cases; acceptance review then found the creation and failure windows covered below.Finalize overlap
This PR is stacked on
obv/burst14-bs-correction-finalize-races, PR #295. Its earlier finalize retry fix remains inbackend/server/api/finalize.py:_clear_slotat lines 145-153,_guardat 501-548, and_finish_loopat 551-562. Rounds 2 through 4 made no further edits to that file.At #327 head
7d3a996e, Zephyrus adds_non_finite_pointerat lines 77-98, validation at 240-242, and the packet acceptance claim with storage-failure cleanup at 281-297. The inspected diffs change the same file but do not directly intersect. No merge or conflict-resolution check ran.Verification
At pushed head
1b666409, frombackend:OMP_NUM_THREADS=1 uv run pytest -q: 1568 passed, 16 skipped, 4 failed, 14 errors, in 378.31 seconds.3d6d2a18had 1557 passed, 16 skipped, 4 failed, 14 errors. Both runs have the same four evaluation-gate failures and the missingload_receiptimport behind all 14 cold-restart errors. No new full-suite failure appeared.OMP_NUM_THREADS=1 uv run pytest -q server/orchestrator/tests server/api/tests/test_hooks_orchestrator.py tests/test_runtime_join_journey.py tests/test_result_published_inputs.py: 251 passed.3d6d2a18with lost-answer or missing-owner assertions and pass unchanged here.uv run ruff check .passes.uv run ruff format --check .passes for 517 files.dd6e645e. Mutations that skipped the busy path, swallowed storage errors, or dropped a contending answer each failed the strengthened tests.Earlier Round 2 evidence
At
dd6e645e, the four then-current portable races failed on2b696e4aand passed on the fix. The broader publication, orchestration, result, and runtime-join selection passed 262 tests. The archived2b696e4afull run had 1513 passes, 16 skips, six failures, and 14 errors. Its two additional failures involved CLI replay and SSR checks affected by missing Git metadata, so that archive was not a fully equivalent checkout.Risk
No production or remote Modal run occurred. Legacy compatibility uses injected old-format rows in local tests, not a live mixed-version deployment. Acceptance review covered
3d6d2a18; the Round 4 head still needs independent acceptance. Context7 remained unavailable because its monthly quota was exhausted.Checklist
Generated with Claude Code