Repository navigation
Reconcile eligibility dispatch after finding resolution - #1754
Conversation
Architecture-Review: unchanged; dispatch reconciliation uses the configured base, trusted publishers and existing workflow input. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on f80655ba38ec4ad297d72f166154d5fc57f62568, 58.2s: 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)
Native Claude output is retained in the restricted local review receipt.
|
|
||
| def refresh_eligibility(repo: str, pr: PR, branch: str, base: str, publishers: tuple[str, ...]) -> None: | ||
| args = eligibility_dispatch_args(repo, pr.number, base) | ||
| since = datetime.fromtimestamp(time.time(), UTC).isoformat(timespec="seconds") |
There was a problem hiding this comment.
suggestion: An empty run list is treated as proof that no dispatch happened, but it may only mean the run isn't visible yet
since comes from the local clock, and the lookup runs only 5 s after the failed POST. If the POST actually went through, two things can hide that run: (1) the local clock is ahead of GitHub's clock by more than the dispatch latency, so created>=since filters the run out; (2) GitHub creates workflow_dispatch runs asynchronously, and listing can lag. That lag is most likely during the same 5xx incidents that trigger this path. In either case _eligibility_dispatched returns False and a second dispatch goes out. The duplicate is mostly harmless because the source job's concurrency group queues it with cancel-in-progress: false. Still, it contradicts the note that an observation you can't trust should not authorize a duplicate. Smallest fix: before treating an empty list as absence, either take since from a server-side timestamp (for example the Date header of the PR read), or subtract a small margin and keep only same-PR runs whose created_at is after the resolution. At minimum, document the residual risk.
| except (GhError, ProcTimeout, OSError) as exc: | ||
| retry = shlex.join(("gh", *args)) | ||
| raise GhError(("refresh Loop-zero Eligibility",), f"{exc}\nRun manually: {retry}") from exc | ||
| raise GhError(("refresh Loop-zero Eligibility",), |
There was a problem hiding this comment.
suggestion: The final error repeats "refresh Loop-zero Eligibility failed"
The head-changed, findings-appeared and could-not-identify errors are raised as GhError(("refresh Loop-zero Eligibility",), ...). The outer handler wraps them again with the same command tuple, so the user sees refresh Loop-zero Eligibility failed: Finding on PR #7 is resolved. refresh Loop-zero Eligibility failed: .... Fix: raise the inner errors with a plain message (for example a ValueError caught by the outer handler), or use exc.tail when exc already carries this command.
| try: | ||
| _gh(*args) | ||
| except (GhUnavailable, ProcTimeout) as exc: | ||
| if isinstance(exc, GhUnavailable) and not _transient_error(exc.tail, False): |
There was a problem hiding this comment.
suggestion: The transient check repeats a decision _gh already made
_gh raises GhUnavailable for a non-read request only when the error was rate limited or transient. Re-running _transient_error(exc.tail, False) is only there to drop the rate-limit case, and nothing says so. Add a short comment, or have _gh mark rate-limit failures explicitly, so the two classifications can't silently drift apart.
|
@Mergifyio queue |
❌ Left the queue ·
|
|
No description provided. |
…eligibility-dispatch-v2
There was a problem hiding this comment.
loopzero delta review by claude on 922ee2e0912bba1c35094acd09e8b28b1af60e83, 8.0s: approve (0 critical, 0 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)
Findings without a file location:
- suggestion: I found nothing to review: the diff since the last review is empty — The header says
diff_utf8_bytesis 0, and nothing follows it, so there are no changes since the previous review. HEAD 922ee2e is a merge of origin/main into the branch. Any changes the merge added to the branch's own work are not in this delta, so this review checks none of the #1509 acceptance criteria. If the merge was supposed to resolve conflicts in the dispatch-recovery code, review the merge result against main. Pay particular attention to how it interacts with #1652 (bounded task-state lock acquisition) and #1870 (GitHub response parsing), because the retry and observation logic depends on both.
Native Claude output is retained in the restricted local review receipt.
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on ae032ea2f6ae73af9c9b8d073739455becef3bad, 10.1s: 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. |
Context and goal
After resolving a finding, look for a matching workflow run before retrying an ambiguous dispatch. Check the current head and trusted findings before issuing a second write.
Closes #1509. Supersedes #1562, whose approved head conflicts with a resolve fixture update on main.
Validation
Recorded for
ae032ea2f6aeuv 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 0The original delivery head passed the full check and primary review. Focused resolve tests passed after the merge conflict was reconciled. GitHub workflow-run visibility remains unverified live. Python source +32 lines, tests +0.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review