Repository navigation
Conversation
Architecture-Review: unchanged; Mergify still uses head-and-queue markers and the existing worktree lock is released before queue polling. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 3aef68208cd733ca7be5c7a4eaf2a3ae43f8a131, 35.8s: 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.
| github._api(f"repos/{repo}/issues/{number}/comments", {"body": body}) | ||
| try: | ||
| github._api(f"repos/{repo}/issues/{number}/comments", {"body": body}) | ||
| except (github.GhError, github.ProcTimeout, OSError): |
There was a problem hiding this comment.
suggestion: A lost-reply re-read still allows a duplicate request if the comment shows up late
After _api raises ProcTimeout, request() reads the comments again right away. If GitHub accepted the POST but the comment isn't in the list yet (for example, the gh process was killed while GitHub was still committing the write), markers() returns False. The first invocation then raises and releases the lock, and the next invocation posts a second @mergifyio queue comment. The acceptance criteria allow this, since a missing marker counts as a failed POST, and Mergify mostly ignores a duplicate queue command. So this doesn't block the change. It is still the one race that remains. The smallest fix is a short bounded retry of the re-read, done only on ProcTimeout, before re-raising. It is also fine to leave this as is and document it.
| if not confirmed and confirmed_marker: | ||
| sha = github.merged_sha(config.repo, pr.number, expected_head=pr.head_sha) | ||
| if sha: | ||
| with _lock_task_state(wt): |
There was a problem hiding this comment.
suggestion: Admission lock waits with no bound and ignores the --wait budget
_lock_task_state calls a blocking flock(LOCK_EX). A second merge --wait N stays blocked for as long as the first invocation takes in its admission network calls: markers, membership, merged_sha, mark_confirmed and request, each with its own gh timeout. The second invocation only checks admit_by after it gets the lock. These calls have timeouts, so the wait is bounded in practice and the admission check still runs. However, the time spent waiting for the lock can use up most of the --wait budget without any message to the user. This is a non-blocking note. If it matters, you could print a line when the lock is contended, or use LOCK_NB in a poll loop bounded by admit_by.
…e-mergify-request
…rktree lock Architecture-Review: unchanged; admission still uses the existing marker and lock and queue waiting starts after the lock is released. Co-Authored-By: Codex <noreply@openai.com>
|
Superseded by #1428. Main’s queue-departure changes required a conflict resolution, and Loop Zero declined a delta review. The replacement preserves that behavior under the worktree lock. |
Serialize Mergify queue requests in a task worktree
Context and goal
Closes #1327
Acceptance
Notes
Base
Base: b69efec
Validation
(no
loopzero checkrun recorded)Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review