Repository navigation
Observe passing source checks closer to the wait deadline - #1812
Conversation
Carry the verified net change from #1743. Architecture-Review: unchanged; Keep the approved deadline accounting with main’s explicit branch lookup. Co-Authored-By: Codex <noreply@openai.com> Architecture-Review: unchanged; ready and merge both account for observed read latency within the existing wait deadline. Architecture-Review: unchanged; the final source observation uses its existing read deadline and preserves zero-wait behavior.
There was a problem hiding this comment.
loopzero primary review by claude on 78fadc53374c7f8c87dea4194ef4ab789c9d6173, 76.1s: 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)
Findings without a file location:
- suggestion: Re-entry after the in-wait ready transition drops the read latency measured so far —
_wait_for_checkscalls itself at line 1566 aftermark_ready, but does not passinitial_read_time. The new_poll_untilgenerator therefore starts withlongest_read=0. Any slow reads the parent loop already measured, including the initial_pr_readinesslatency, are lost. The first real read in the child generator partly makes up for this. However, if that read is fast and an earlier one was slow, the final poll reserves onlybaselineinstead of2*longest_read, so it is more likely to hitReadDeadlineinstead of reading a passing check. Smallest fix: forwardinitial_read_time=initial_read_timein the recursive call. Better: have the caller track the max observed read time and pass that, so the late-poll reserve stays consistent across the transition. This is the only other place in the diff where a wait starts without the latency already measured. The ready, ready-after-mark and merge entry points all forward it.
Native Claude output is retained in the restricted local review receipt.
| # Poll late enough to see a settled check while reserving time to read it. | ||
| baseline = min(5.0, max(0.5, remaining / 10)) | ||
| allowance = min(remaining / 2, max(baseline, 2 * longest_read)) | ||
| _sleep(remaining - allowance) |
There was a problem hiding this comment.
suggestion: Late source poll shrinks the time merge has left for Mergify/merge admission
In merge --wait, the source wait and admission share one deadline (admit_by = deadline). The last source read now happens at deadline - allowance, where allowance can be as small as 0.5s (max(0.5, remaining/10), or 2*longest_read). That applies even when the check passed well before the old midpoint. Before, such a check was seen at the midpoint and admission had about half the final interval. Now the markers/membership/merged_sha reads and the admit_by check in _merge_with_mergify (lines 1755-1775), or the github.merge gate at line 1837, often have only seconds left. This can turn a green check into timed out before requesting Mergify (exit 3). Recovery works (rerun), so this is not blocking. Consider reserving admission time in the merge path, or documenting the trade-off in the comment at line 1459.
| def test_source_wait_reads_once_before_first_interval( | ||
| wt, gh, capsys, monkeypatch, source_queue_api, command, | ||
| ): | ||
| def test_source_wait_reads_once_before_first_interval(wt, gh, capsys, monkeypatch, source_queue_api, command): |
There was a problem hiding this comment.
suggestion: Test-line budget met by reformatting, not by tightening coverage
The 'without increasing test lines' target is met partly by joining a 3-line signature into one line of about 112 chars (line-length = 100 in pyproject, though E501 is not selected). It also deletes the blank line before the nested def slow_check (line 3376). cli.py:1491 likewise now runs past 100 columns. None of this fails lint, but it is formatting churn traded for a line count. Prefer wrapping the long _wait_with_deadline call in cli.py, and keep the test formatting as it was.
Architecture-Review: unchanged; pass the observed initial read time through main’s shared wait call. Co-Authored-By: Codex <noreply@openai.com>
|
Main #1611 introduced one conflict in
The remerge resolution is one line: |
There was a problem hiding this comment.
loopzero delta review by claude on be8c63cc9f7cdba6a67dc0c21bf71d9f269a9f16, 9.0s: 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.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Observe passing source checks closer to the wait deadline
Context and goal
Closes #1303
Acceptance
Base
Base: bb2aae1
Validation
Recorded for
be8c63cc9f7cuv 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