Repository navigation
Share GitHub request and delivery evidence handling - #1811
Conversation
Co-Authored-By: Codex <noreply@openai.com> Architecture-Review: unchanged; GitHub retains ownership of PR and check evidence, with the same endpoints and verification rules.
There was a problem hiding this comment.
loopzero primary review by claude on 05b8afc34f1e4ace994e8b8625df41890b98cd2d, 51.6s: 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.
| message_tail=None if diagnostic_api else tail) | ||
| if diagnostic_api or patch_error else tail) | ||
|
|
||
| error_command, detail = (command if rate_limited else argv), tail |
There was a problem hiding this comment.
suggestion: Post-loop error path depends on loop-scoped variables implicitly
After the for delay in delays loop, _gh now reads rate_limited, transient, response, tail, done and selected, which are only bound inside the loop body. That works today because every exit is covered: a timeout on the last attempt re-raises, and a final delay=None makes _retry_pause/_rate_limit_delay return False, which forces a break. The invariant isn't written down anywhere, though. If someone later changes delays so it no longer ends in None, or adds a continue path, the code could raise UnboundLocalError or fall through using stale values from the previous iteration. Smallest fix: add a one-line comment at the loop saying the last delay is always None, so every iteration that reaches the status check either returns or breaks.
| raise GhError(("gh", "api", endpoint), "PR changed during branch lookup") | ||
| states = {"CLOSED", "MERGED"} if state == "CLOSED" else {state} | ||
| if pr.state not in states or not _matches_branch(detail["head"], repo, branch): | ||
| lookup = "completion" if state == "MERGED" else "branch" |
There was a problem hiding this comment.
suggestion: Error wording now keyed implicitly on the requested state
_confirm_branch_pr picks "completion" vs "branch" lookup from state == "MERGED". This matches the old messages because only merged_pr_for_branch passes "MERGED" (pr_for_branch passes only OPEN/CLOSED). The coupling is easy to miss: a future caller that passes "MERGED" from a branch lookup would silently get the "completion" wording. Non-blocking. Passing the lookup label explicitly, or noting the coupling in a comment, would make it clearer.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Share GitHub request and delivery evidence handling
Context and goal
Refs #575
Replaces #1787. This carries its net change as one commit on current main. Lean's verification of the conflict resolution applies to the patch carried forward here.
Acceptance
Validation
Recorded for
05b8afc34f1euv 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