Repository navigation
Conversation
Architecture-Review: unchanged; queue admission and landing verification are unchanged while queue I/O now shares the existing wait deadline. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; the deadline applies to observations and leaves the merge request timeout in place. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; the resolution preserves both branches’ CLI tests. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 8ae6e30e0c806fb9b5fb424528f61c619562f7c5, 66.6s: approve (0 critical, 0 important, 3 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.
| return poll(0) | ||
| reported_timeout = False | ||
| try: | ||
| with github.bounded_reads(deadline, token=None, retry=True): |
There was a problem hiding this comment.
suggestion: A landing verified just before the deadline can still be dropped when the budget scope closes
_landed calls read_timeout(0) after merged_sha, so a returned SHA was verified before the deadline. That SHA then goes back through poll, and the exit of github.bounded_reads (github.py:135) calls read_timeout(0) again. If the deadline passes in that short gap, ReadDeadline is raised and _queue_wait returns None. The command then exits 3 even though the landing was verified in time, which goes against the acceptance rule that a landing verified before the deadline proceeds to cleanup. github.merge(..., observation_deadline=...) has the same race, because _verify_merge_request returns a SHA inside bounded_reads. The window is only microseconds, so this is unlikely in practice. Smallest fix: in _queue_wait, keep sha and return it when it is truthy even if the scope exit raises ReadDeadline. Make the same change in merge(), or move the final check so it only runs on the None path.
| try: | ||
| sha = github.merge(config.repo, pr.number, config.merge_strategy, pr.head_sha, observation_deadline=admit_by) | ||
| except github.ReadDeadline: | ||
| return None |
There was a problem hiding this comment.
suggestion: A deadline during direct-merge verification is reported as a merge-queue timeout
_merge_and_follow maps any ReadDeadline from merge()'s post-write verification to None. cmd_merge then prints timed out waiting for the merge queue to land PR #N. On a branch without a merge queue, the PR may already be merged directly. The user then sees a queue message and exit 3 with no cleanup. A rerun recovers, but the message is misleading. Consider a neutral message such as timed out verifying the merge of PR #N; rerun to verify and clean up.
| def _landed(config: Config, pr: github.PR, closed: list[github.GhError]) -> str | None: | ||
| """Merge SHA if landed; a closed-unmerged read is held as not final (GitHub lags a | ||
| queue merge) and re-raised by the caller only if it persists to the deadline.""" | ||
| """Merge SHA if landed; a closed-unmerged read is held as not final.""" |
There was a problem hiding this comment.
suggestion: _landed docstring lost the reason closed-unmerged reads are held
The old docstring explained that GitHub lags a queue merge, so a closed-unmerged read is held and only re-raised if it persists to the deadline. With _report_closed_observation, it is now re-raised, or printed as the last queue observation when the budget is spent. Keep a short note of this here or on _report_closed_observation so the double read_timeout(0) guards and the held-error handling stay understandable.
Architecture-Review: unchanged; existing wait semantics now bound queue observations while retaining current merge verification and transport behavior. Co-Authored-By: Codex <noreply@openai.com>
|
Closed as superseded while refreshing the merge-queue wait fix for #1155. Merging current main required conflict resolution, and the installed reviewer refused the delta across that merge. The follow-up work is in #1780. Its current merge projection exceeds both size caps, and its full check found an upstream test stub that rejects the deadline keyword. #1155 remains open. |
Keep merge queue polling inside the wait budget
Context and goal
Closes #1155
Acceptance
Notes
Supersedes Keep merge queue polling inside the wait budget #1214. Carries the approved diff from
cd4bf5ff0e2bplus the merge resolution in the CLI tests.Keep the existing admission rules and read endpoints. Bound polling with the deadline already used for source checks. Preserve timeout diagnostics that can be rendered using observations already received.
Pre-fix: GitHub accepted the fake late response and started with a 120-second read timeout. Mergify raised HTTP 503 after its normal retries. The focused merge and queue regression suite passed after the fixes.
Base
main @ a4fa169
Validation
Recorded for
cd4bf5ff0e2b(not current head)uv 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