Repository navigation
Conversation
Architecture-Review: unchanged; polling cadence changes preserve the wait budget and exact-head checks. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; the bounded read retains its original deadline. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 1a3f5c960157c0141a3e5151ff953027c49d1b68, 43.6s: request_changes (0 critical, 1 important, 1 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: The polls variable is unnecessary
polls = _poll_until(...) followed by for _ in polls: adds a name that is used only once. Inline it as for _ in _poll_until(started, timeout, admitted=lambda: confirmed): to keep the diff smaller. The lambda reads the confirmed local through its closure, so the reassignment at line 1469 is still seen and the admission reset behaves as intended.
Architecture-Review: unchanged; the adaptive allowance stays inside the existing source wait deadline. Co-Authored-By: Codex <noreply@openai.com>
1fdca97 to
f690e5d
Compare
There was a problem hiding this comment.
loopzero delta review by claude on f690e5d5bfad027aba52d6f50e4f656fc6ef448b, 35.6s: request_changes (0 critical, 1 important, 1 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.
| assert wt.exists() and all(c["argv"][:2] != ["pr", "merge"] for c in gh.calls) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("command,timeout,green_at,read_time", [ |
There was a problem hiding this comment.
important: Test-line size budget still fails the full check
scripts/size_budget.sh sets TESTS_CAP=13500. It fails when the tree is over that cap and has grown against its base. The tests in this worktree currently count 13,503 lines, and this delta adds about 11 lines to test_source_wait_observes_late_green. The task notes also say the gate blocks the full check (13,522 against 13,500). As things stand, loopzero check and CI fail on the size gate, so this does not meet acceptance. Smallest fix: drop the separate read_time=0 handling and the view = github.pr_view alias by wrapping the original inline, keep the parametrize table on fewer lines, or trim redundant lines elsewhere in this test so the total is back at or under 13,500. Don't raise the cap to get around it.
| longest_read = 0.0 | ||
| while True: | ||
| was_admitted = admitted is not None and admitted() | ||
| read_started = time.monotonic() |
There was a problem hiding this comment.
suggestion: 'Read latency' counts the whole consumer loop body
read_started/now measure all the time the generator is suspended. That includes work after the read in the consumer: mark_ready, printing, _readiness workflow lookups, and in the Mergify loop, mark_confirmed. That is fine as a conservative estimate. Because the value is a lifetime maximum, though, one slow outlier, such as a retried API call, keeps the final allowance high, up to remaining/2, for the rest of the wait. This is bounded and safe. Consider renaming it to something like longest_pass so the comment matches what is measured. You could also note that longest_read is unused when bounded=False.
Shorten waits for Mergify landing and source checks
Context and goal
Fixes #1302
Fixes #1303
Acceptance
Base
Base: 2ef0b72
Notes
Offline replays failed before the fix. Landing was first detected at 313.5s and is now detected at 228s following admission at 199.5s. Ready and merge both returned timeout before the fix for the late-green cases. The focused tests pass with the fix, including timeout when a read exhausts its remaining allowance and the existing zero-budget and queue verdicts.
The full suite caught a one-second wait that needs 250ms for the final read. The final interval now preserves up to half a second for short waits, bounded by half the remaining time. The short-budget case and audit replays pass together.
The 49 focused offline tests pass, including seven seconds of fake read latency. The source cap passes after merging #1272. The test-line gate blocks the full check at 13,522 lines against its 13,500 limit.
Validation
Recorded for
9e32e37e74e2(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 1Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review