Repository navigation
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; this clean base update preserves both the receipt-first behavior and the current review rules.
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by codex on 4d6491636003e59bf590d5ba0f643c83e4a8fadc, 43.1s: request_changes (0 critical, 1 important, 1 suggestion)
Same-family fallback: independent reviewers failed: claude: not authenticated. Cross-family review is preferred.
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model gpt-6.2-astra (effort medium); CLI-reported model gpt-6.2-astra (effort medium); configured model gpt-6.2-astra (effort medium)
Raw reviewer output
Native Codex transcript retained in the restricted local review receipt; public evidence is publisher-derived, not backend attestation. Exact raw SHA256: 8fd82ab77667ba4fc45523888cdfa17864f362758a282d6f1a06a102308f8429
| head or an eligible review covering an ancestor, blocking findings | ||
| (unresolved threads a review publisher opened with a head-bound marker line), | ||
| target branch and required CI. The receipt must record a clean passing run | ||
| target branch and required CI. Ready and merge stop on an invalid receipt |
There was a problem hiding this comment.
Reviewer location src/loopzero/cli.py:1253 is not in the diff; anchored here.
important: Bound PR discovery before checking the receipt
Both ready and merge --wait call _require_pr before reaching the new receipt check. If the remote branch exists but its commit has no matching open PR association, pr_for_branch reads the branch, commit associations, the open PR list, and PR detail. That takes four REST requests even when the receipt is missing. A full page of commit associations also triggers another request. The new merge replay uses arm_pr, which returns 404 for the branch lookup and skips the association path. Use a bounded head-filtered PR lookup for these commands, retaining detail validation and the closed-PR fallback for merged cleanup. Cover the existing-branch fallback and pagination cases in the request-budget tests.
| return github.Readiness(False, (hold,)) | ||
| report = _load_report(wt) | ||
| receipt_problem = _check_report_problem(report, wt, config, head) | ||
| if reviews is None: |
There was a problem hiding this comment.
suggestion: Make status diagnostic behavior explicit
Whether _readiness collects remote diagnostics for an invalid receipt now depends on whether its caller supplied cached reviews. If status later lets _readiness fetch reviews, it will silently lose diagnostics. Give status an explicit diagnostic option and use reviews is None only to decide whether reviews need fetching.
Architecture-Review: unchanged; the readiness short circuit retains branch detail, pushed head, and merge-authority verification. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by codex on eac1be9605cc492b8019ce6a6ad18f62738bb269, 42.9s: request_changes (0 critical, 3 important, 0 suggestion)
Same-family fallback: independent reviewers failed: claude: not authenticated. Cross-family review is preferred.
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model gpt-6.2-astra (effort medium); CLI-reported model gpt-6.2-astra (effort medium); configured model gpt-6.2-astra (effort medium)
Raw reviewer output
Native Codex transcript retained in the restricted local review receipt; public evidence is publisher-derived, not backend attestation. Exact raw SHA256: dbacf16f0050db0cac9cbd22928de06440f9369f62ded4def671a147065e2e62
| head or an eligible review covering an ancestor, blocking findings | ||
| (unresolved threads a review publisher opened with a head-bound marker line), | ||
| target branch and required CI. The receipt must record a clean passing run | ||
| target branch and required CI. Ready and merge stop on an invalid receipt |
There was a problem hiding this comment.
Reviewer location src/loopzero/cli.py:290 is not in the diff; anchored here.
important: Preserve the receipt check on every readiness poll
_wait_for_checks calls _readiness directly on subsequent polls for both ready --wait and merge --wait. If another check replaces a passing receipt with a failing one while the command waits, the next poll now fetches reviews, CI, and potentially Mergify configuration before returning the receipt failure. A remote error can also mask the repair diagnostic. Restore the receipt check immediately after hold validation when reviews is None. Status supplies reviews explicitly and can still collect all diagnostics.
| head = worktree.head(wt) | ||
| _require_task_branch(config, branch) | ||
| pr = _require_pr(config, branch, allow_merged=allow_merged) | ||
| problem = _check_report_problem(_load_report(wt), wt, config, head) |
There was a problem hiding this comment.
important: Keep receipt read failures from masking holds and merged cleanup
Reading the receipt before _require_pr makes PR diagnostics and merged cleanup depend on the local receipt being readable. For example, if the receipt path is a directory, _load_report raises IsADirectoryError before ready can report a hold or merge can clean up an already merged PR. Use a bounded PR lookup first, validate the pushed head, and handle merged and held PRs before opening the receipt.
| def pr_for_branch(repo: str, branch: str, *, open_only: bool = False, list_only: bool = False) -> PR | None: | ||
| """Return the open PR, falling back to the most recent closed PR unless open_only.""" | ||
| endpoint, matches = _commit_branch_prs(repo, branch) | ||
| endpoint, matches = ("", ()) if list_only else _commit_branch_prs(repo, branch) |
There was a problem hiding this comment.
important: Include REST retries in the three-request limit
list_only bounds the number of endpoints, but _gh retries each GET independently. With a missing receipt and an open PR, one transient 503 on the list request and one on the detail request produce four REST requests even when both retries succeed. Apply a shared three-attempt budget or disable retries for this bounded lookup, and cover a transient response in the request-count replay.
Check the local receipt before fetching remote readiness evidence
Context and goal
Closes #1405
Acceptance
Notes
Base
main @ 1e5711a
Base: 1e5711a
Validation
Recorded for
1ba887c3d732(not current head) (unverified, runloopzero check)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