Repository navigation
fix(sync): size the cap-hold bound to one sweep and log a full ledger as backpressure (SCA-2886) - #25745
Merged
Git-on-my-level merged 1 commit intoNov 19, 2026
Conversation
… as backpressure (SCA-2886) Verify found the projection release serving but the Done check unmet: owners legitimately hold 201-205 live reservations, so MAX_OPEN = 200 refused them on every sweep. One sweep admits up to 100 turns x 10 items for a single owner before any batch outcome can settle, so a page-sized bound sat below a legitimate burst. - MAX_OPEN 200 -> 1000, matching that sweep ceiling; the ledger document stays ~150 KB, far under Firestore's 1 MiB limit. - A full ledger raises ReservationBoundExceeded (a ValueError) carrying the live and settled counts and logs outcome=bound_exceeded. The worker logs outcome=reservation_full without a traceback, so a legitimate refusal is no longer counted as a worker failure. settled=0 is backpressure; settled>0 is the deadlock signature. - open_units() and reserve() share one settle pass (_open_ledger).
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Git-on-my-level
deleted the
agent/omi-control-opencode-deepseek/ec436d17dede
branch
November 19, 2026 02:43
This was referenced Nov 19, 2026
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 this fixes
#25697 released a cap-hold reservation when its projection is observed and made a full ledger run the terminal-outcome settle pass before refusing. Verify found it serving (
a6824b8, 2026-11-19T00:49Z) but the Done check unmet:MAX_OPEN = 200still refused owners who legitimately hold 201-205 live reservations, soValueError: cap-hold reservation bound exceededcould not reach zero.The bound was sized for a backlog page (
PAGE = 10), but one sweep admits up to 100 turns x 10 items for a single owner before any batch outcome can settle. A page-sized bound therefore sat below a legitimate burst, and the refusal was logged as a generic worker failure with a traceback, which made the deadlock class uncountable.The change
MAX_OPEN200 -> 1000, matching the sweep ceiling. The ledger document stays ~150 KB, far under Firestore's 1 MiB limit. The settle pass keeps terminal entries out, so the bound now counts live work only.ReservationBoundExceeded(aValueError) carryingliveandsettled, and logsoutcome=bound_exceeded. The worker catches it and logsoutcome=reservation_fullwithout a traceback.settled=0is backpressure (every entry is live);settled>0is the deadlock signature.open_units()andreserve()share one settle pass (_open_ledger), so the two cannot drift.No schema change; no change to what a committed hold means; revert by reverting the commit.
Done check (revised)
After this serves,
ValueError: cap-hold reservation bound exceededinbackend-synclogs is zero over 24 h. If any refusal appears, itsoutcome=bound_exceeded live= settled=line must showsettled=0and neversettled>0.batch_admittedholds track live batch work against the 18,951 baseline (2026-11-17T22:25Z), withREADBACK:on SCA-2789 quoting both numbers.Verification
python3 -m py_compileon the three changed files.live=MAX_OPEN, settled=0and logsoutcome=bound_exceeded; the worker logsoutcome=reservation_fulland nooutcome=deferred; the existing full-ledger recovery test still passes.Failure-Class: FC-cap-bound-pins-owner-without-release-path