Repository navigation
SCA-5199: Bound memory visibility contention retries - #26547
Merged
Git-on-my-level merged 3 commits intoNov 28, 2026
Merged
Conversation
Co-authored-by: multica-agent <[email protected]>
Codex Review Summary: ✅ CompletedThis 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: multica-agent <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Co-authored-by: multica-agent <[email protected]>
Git-on-my-level
deleted the
agent/multica-worker-1-codex-sol/daff45db5e15
branch
November 28, 2026 03:36
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.
What changed and why
The memory visibility PATCH retries stale canonical plans and Firestore transaction aborts using fresh reads, fresh transactions and jittered backoff. The app PATCH starts its eight-second Firestore RPC budget before preflight. Materialization and the toggle share that deadline, with time reserved for rollback and receipt lookup. Best-effort historical cleanup inherits the original deadline on the cleanup executor and leaves canonical suppression authoritative. Confirmed contention exhaustion returns HTTP 409 and transient storage failures return HTTP 503 with a retry hint. The Developer API uses the same HTTP mapping.
An uncertain Commit is never replayed. A bounded read of the exact operation receipt confirms the write and lets the existing post-commit persona refresh and event run without a second item read. Without confirmation the route returns 503 and skips both. SDK RPC attempts are single-shot within the budget. Only definitive contention is replayed by the adapter. A bounded warning records contention exhaustion.
Product invariants affected
How it was verified
UI-Evidence: none -- generated API declarations and backend handling only
Failure-Class: FC-immediate-retry-loses-shared-cas
Line-Count-Exception: backend/database/memory_apply_store.py | 2883 -> 2891 | Expose a single SDK transaction attempt at the canonical write boundary.
Line-Count-Exception: backend/routers/developer.py | 3032 -> 3036 | Map visibility contention consistently in the existing Developer API route.
Line-Count-Exception: backend/utils/memory/canonical_memory_adapter.py | 4038 -> 4221 | Keep bounded materialization retries and exact commit confirmation alongside canonical apply.
Line-Count-Exception: backend/utils/memory/memory_service.py | 4814 -> 4841 | Share the retry deadline with historical materialization and use one HTTP error mapping.