Repository navigation
live demand gate: failed heartbeat retries next loop, unavailable read at decide - #22471
Merged
Merged
Conversation
…d at decide Follow-up to #22465 review (SCA-829 lows): - A timed-out non-admitted heartbeat no longer consumes its 10s slot, so consecutive timeouts cannot age a hidden sibling entry out of the 30s lease. - run() folds _presence_unavailable into visible before decide(), so a second miss found by an observe() publish forces the vendor in the same iteration. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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. |
Git-on-my-level
added a commit
that referenced
this pull request
Oct 19, 2026
, #22362, #22461, #22471 sync) - config/feature-flags.yaml: kept both new rows (LISTEN_LOOP_METRICS_ENABLED from main, ENRICHMENT_ROUTE from integration); rendered doc regenerated. - #21932 moved the legacy sync runner's 500/503 into _run_sync_job_attempt: known gaps and the task-target KNOWN set gain the four _run_sync_job_attempt keys (legacy, leave with C11), drop the _run_sync_job_body/503 keys and recover_quarantine/503 (fixed by #22476).
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
Follow-up to #22465 (merged as ffec86b), from the Grok review lows (SCA-829). Both changes only move toward the vendor.
_presence_publishedis stamped only after a successful presence write (demand_routing.py,publish()), so a timed-out non-admitted heartbeat retries on the next 1 s loop instead of waiting another 10 s. Without it, two consecutive timeouts could let a hidden sibling entry age out of the 30 s lease and send an admitted sibling to the vendor.run()evaluatesdecide(visible=visible or self._presence_unavailable), so anobserve()-spawned publish that records a second consecutive miss between the loop's read anddecide()forces the vendor in the same iteration rather than one loop later. Trivial, so included rather than deferred.Admitted routing is otherwise unchanged;
can_admit_windowstays strict.How it was verified
Layer: unit,
nice -n 19, backend venv.pytest tests/unit/test_live_demand_presence.py test_live_demand_consumers.py test_live_demand_switch.py test_live_demand_telemetry.py-> 99 passed. New tests: failed non-admitted heartbeat retries next loop; first failed heartbeat retried immediately; concurrent unavailable forces vendor in the same iteration. Not verified live; rides the next listen deploy.Product invariants affected
none
Failure class (fixes)
No
fix:commits were detected; no declaration is required.🤖 Generated with Claude Code