Repository navigation
Restart Mergify backoff when admission is confirmed - #1813
Conversation
Carry the verified net change from #1709. Architecture-Review: unchanged; Mergify admission backoff and the existing fake-clock coverage are unchanged. Co-Authored-By: Codex <noreply@openai.com> Architecture-Review: unchanged; the iterator reads the same confirmation transition and wait budget. Architecture-Review: unchanged; the initial interval resumes after confirmed admission with the same timeout and queue verdicts.
There was a problem hiding this comment.
loopzero primary review by claude on 3c353c1fa66784dcc7385b7795426e0894bbebe8, 30.3s: approve (0 critical, 0 important, 2 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| deferred_landing_read = False | ||
| print(f"PR #{pr.number} following Mergify queue {queue}; head {pr.head_sha[:12]}; waiting up to {timeout:g}s") | ||
| for _ in _poll_until(started, timeout): | ||
| polls = _poll_until(started, timeout, admitted=lambda: confirmed) |
There was a problem hiding this comment.
suggestion: Unneeded polls temporary
The polls variable is only used once, in the for loop on the next line, and nothing else reads the generator. Calling _poll_until(...) directly in the for statement, as before, keeps the diff smaller and makes it clearer that nothing else uses the generator.
| ) -> Iterator[None]: | ||
| delay = WAIT_INTERVAL | ||
| while True: | ||
| was_admitted = admitted is not None and admitted() |
There was a problem hiding this comment.
suggestion: Admission is checked twice per tick through a closure
_poll_until calls admitted() before and after each yield to detect the transition. This works because the lambda reads the reassigned confirmed local of _wait_for_mergify. However, the reset depends on a side effect inside the loop body, and the generic poller now carries Mergify-specific state. A one-line comment at the call site would help, saying the lambda deliberately reads the live confirmed. Another option is to have the loop body tell the generator to reset, for example with polls.send(...). That would remove the double evaluation. The current code is correct and every existing _poll_until caller and monkeypatch still works: line 1545 passes bounded=..., line 1611 uses positional arguments only, and the lambda *_ stub at tests/test_cli.py:4752 is only used through _wait_for_merge.
Architecture-Review: unchanged; admission resets the queue interval and source reads keep their deadline allowance. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on 05d4fa24df56296db436e138a147a1606fbdcad6, 8.5s: approve (0 critical, 0 important, 0 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
|
Merged main at |
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Restart Mergify backoff when admission is confirmed
Context and goal
Closes #1302
Acceptance
Base
Base: bb2aae1
Validation
Recorded for
05d4fa24df56uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review