Repository navigation
Check local receipts before remote readiness gates - #1842
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 46ee67f047e18d1c25b1a579f893adce69a4f574, 71.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: Branch PR lookup description is now wrong for ready and merge — Step 3 still says branch PR lookup starts with the remote head and the commit-to-PR endpoint, then falls back to listing PRs.
_pr_readinessnow passeslist_only=True(cli.py:1224), soreadyandmergeskip the branch and commit reads and go straight to the head-filtered list and detail path.status,merge --cancelandreviewstill use the commit path. Update the paragraph to say that ready and merge use only the head-filtered list. That way a reader won't put back the commit lookup and break the two-read replay. Also,pr_for_branchnow takes two mode flags (open_only,list_only). If the list path is enough for ready and merge, consider whether other callers need the commit path at all. Removing it would beat keeping two lookup modes that can drift apart.
Native Claude output is retained in the restricted local review receipt.
| return sha | ||
| confirmed = state is not None | ||
| if confirmed and not confirmed_marker: | ||
| _require_receipt(wt, config, pr.head_sha) |
There was a problem hiding this comment.
suggestion: Receipt guard on mark_confirmed is applied inconsistently
_merge_with_mergify now calls _require_receipt before mergify.mark_confirmed (line 1746), but _wait_for_mergify writes the same marker at line 1703 with no guard. The marker only records that Mergify already queued the PR; it doesn't advance readiness. So the guard at 1746 can only fail in a race, and then it stops the command for a PR that is already in the queue instead of following it. Either drop this guard, keeping receipt checks only on mark_ready, mergify.request and github.merge as the docs describe, or guard both places the same way.
| (True, "dirty", "check receipt was recorded in a dirty worktree."), | ||
| (True, "commands", "check receipt's plan differs from the trusted workflow."), | ||
| *((True, condition, "check receipt is incomplete.") for condition in ("empty", "checkpoint")), | ||
| @pytest.mark.parametrize("command", ["ready", "merge"]) |
There was a problem hiding this comment.
suggestion: Rewritten receipt test drops the valid-receipt case and the recovery-hint check
The old parametrization had a matching case, which proved a valid receipt passes and is not short-circuited. It also checked the full recovery hint ("Run loopzero check in this worktree ... local coordinator for delegated stages.") for the legacy and incompatible cases. The new test_delivery_requires_current_receipt only checks the first sentence of each reason. Acceptance item 3 says valid receipts still run the existing gates. Other tests may cover that indirectly, but a passing case next to the new early-exit cases, plus the recovery-text check, would pin it down cheaply.
|
@Mergifyio queue |
🚫 Left the queue · conflict with base branch3 min in the queue, with no time running CI. So far
Reason The pull request conflicts with Conflicting file: Before this, the pull request was held in the queue behind 1 pull request ahead of it. To get back in the queue
Times in UTC · dashboard · how the merge queue works |
|
No description provided. |
Architecture-Review: unchanged; the new fingerprint validator and receipt-first ordering both remain in effect. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; this clean base merge preserves receipt-first readiness. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on 283cc1086759ebf28e2c89eaa625d44a57a6ca1c, 10.9s: 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. |
Check local receipts before remote readiness gates
Context and goal
Closes #1405
Acceptance
Validation notes
The ready Git-call assertion now accounts for the worktree ownership guard before gates, after them, and before marking ready.
Base
Base: 839d8fa
Validation
Recorded for
283cc1086759uv 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