Repository navigation
fix(review): run-local parallel PR FETCH_HEAD race - #814
Merged
Merged
Conversation
Concurrent run-local.sh runs in one checkout overwrote FETCH_HEAD, so each prompt could review the wrong PR. Fetch into refs/pa-review/pr-<n> and record Head: in the prompt. Test-First: scripts/test-review-local.sh::parallel PR fetches keep distinct diffs (no shared FETCH_HEAD) Co-authored-by: Cursor <cursoragent@cursor.com>
Cuarroc
marked this pull request as ready for review
October 9, 2026 03:21
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
30 of 46 tasks
Contributor
Merge Queue Status
This pull request spent 14 minutes 42 seconds in the queue, including 14 minutes 27 seconds running CI. Required conditions to merge
|
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parallele lokale Reviews im selben Checkout haben sich gegenseitig den PR-Kopf überschrieben. Jeder Lauf holt den PR-Kopf jetzt in eine eigene Ref und schreibt die Head-SHA in den Prompt. Damit prüft jeder parallele Lauf wirklich seinen eigenen Diff.
Report
Package: REVIEW-RUNLOCAL-RACE
Model: Cursor auto
Base:
origin/main@3395c5852335849f6342020a4350b3132fd8649dHead:
6728653f92457f0f9fc039ec03b1a0086e309c87Tier: B (script only; no seam/runtime)
Files:
scripts/review/run-local.sh,scripts/test-review-local.sh(exclusive)What changed
FETCH_HEAD. It fetches intorefs/pa-review/pr-<n>(+pull/<n>/head:refs/pa-review/pr-<n>) andrev-parses that ref.Head: <sha>line so a reader can bind the review to the candidate.scripts/test-review-local.sh: a deterministic git wrapper overwritesFETCH_HEADafter a barepull/N/headfetch; with the private-ref fix, PR 7 and PR 8 each keep their own diff and Head SHA.Evidence
bash scripts/test-review-local.shFEHLER parallel PR FETCH_HEAD race)bash scripts/test-review-local.shbash scripts/ci/red-first.shbash scripts/ci/gates.sh lane prepushgit ls-remote origin cursor/review-runlocal-race6728653f92457f0f9fc039ec03b1a0086e309c87Trailer:
Test-First: scripts/test-review-local.sh::parallel PR fetches keep distinct diffs (no shared FETCH_HEAD)Architecture drift
No new findings; no allowlist change.
NICHT ABGEDECKT
#[cfg(windows)]tests; Windows lane verdict comes from the Mergify merge queue.Review
Review: ausstehend (Stufe B); pending Root dispatch.
Made with Cursor
Root-Abnahme (2026-10-09, head 6728653)
scripts/review/run-local.sh,scripts/test-review-local.sh)refs/pa-review/pr-<N>refs are never prunedpull/N/headfetches; it guards the FETCH_HEAD regression, not a different shared refVerdict: GLM approve. Tier B needs one reviewer outside the author family; the author is Cursor auto (family not exposed), GLM/Zhipu is not a Cursor auto pool family. Bound to head 6728653. Origin of the defect: Root observation 2026-10-09 ~04:50 (three parallel runs for #809/#811/#813 all reviewed the #813 diff).
NICHT ABGEDECKT (Root): no real concurrent run against GitHub in this review; the Windows Git-Bash path of run-local.sh is covered only by the merge-queue Windows lane.