Skip to content

ci(review): wait out another repository's review for the agy lock - #665

Merged
doublegate merged 3 commits into
mainfrom
ci/agy-lock-wait
Nov 15, 2026
Merged

doublegate merged 3 commits into
mainfrom
ci/agy-lock-wait

Conversation

@doublegate

@doublegate doublegate commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

The Antigravity reviewer waited 300 s for the agy lock. That lock is shared by every repository's review on the host, so a review elsewhere could make this one time out and go red with no review. That happened to RustyNES_MiSTer #79 when it opened together with #664.

  • AGY_LOCK_WAIT: 300 to 1800 s.
  • timeout-minutes: 45 to 80.

The worst case is 1800 + 2 × 900 + 15 = 3615 s, checked by scripts/agy-review-selftest.sh (all checks passed). actionlint is clean.

The runner is self-hosted, so the longer wait bills nothing. The lock still fails closed.

This is the same change as RustyNES_MiSTer #79 (fa3dbbb), where both later reviews ran green. The reviewer template got it too.

🤖 Generated with Claude Code


Note

Low Risk
CI-only timing and documentation; no changes to review logic or security gates beyond longer worst-case job duration.

Overview
Raises AGY_LOCK_WAIT from 300s to 1860s and the review job’s timeout-minutes from 45 to 80 so one repository’s review can wait out a full hold of the host-wide shared agy lock (another repo’s two 900s attempts plus backoff).

Documents AGY_LOCK_WAIT in .github/AGY-REVIEWER.md and adds troubleshooting for "agy lock timed out" (red job, no comment) when concurrent PRs on the same runner queue across repositories.

Reviewed by Cursor Bugbot for commit 59005c3. Bugbot is set up for automated code reviews on this repo. Configure here.

The agy lock (~/.gemini/antigravity-cli/.agy-review.lock) serialises
EVERY repository's review on the host, because agy is one singleton
language server per user. AGY_LOCK_WAIT was 300 s, shorter than one
review elsewhere. Observed 2026-11-15: RustyNES_MiSTer PR #79 and
RustyNES PR #664 opened together, #664's review of a large diff took the
lock, and #79's job gave up ("agy lock timed out after 300s", run
43685337620) and went red without reviewing anything. Any two PRs opened
at once in two repositories on the same runner host can hit it, from
either side.

AGY_LOCK_WAIT 300 -> 1800 s, which outlasts another review's two
attempts at a 15-minute cap; timeout-minutes 45 -> 80 so the worst case
still fits: 1800 + 2 x 900 + 15 = 3615 s ("worst case 3615s 80m (job
timeout) fits with 2 minutes to spare" from scripts/agy-review-selftest.sh;
all checks passed; actionlint clean). The runner is self-hosted, so the
longer wait bills nothing, and the lock still fails closed: a timeout
exits rather than running agy unserialised.

The same change landed on RustyNES_MiSTer #79 (fa3dbbb), where both
reviews after it ran green; this applies it here, at the maintainer's
request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014qfTKi2M3swo7qnwvYCkDj
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9d3a6a8 and 59005c3.

Files selected for processing: 2

  • .github/AGY-REVIEWER.md
  • .github/workflows/antigravity-review.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T07:15:55.389836Z 0ec26e3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Nov 15, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 2c534f3b-c856-48c8-b36e-2d567600545f)

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Antigravity review (Gemini via Ultra)

Raises AGY_LOCK_WAIT from 300 to 1860 seconds and the workflow timeout-minutes from 45 to 80 in .github/workflows/antigravity-review.yml (with matching documentation in .github/AGY-REVIEWER.md) so a queued review job can wait out another repository's full two-attempt review on the shared host lock.

Blocking issues

None found.

Suggestions

  • Assert AGY_LOCK_WAIT >= single-review hold in the selftest (.github/workflows/antigravity-review.yml:72-76, scripts/agy-review-selftest.sh:552-565): budget_verdict in scripts/agy-review-selftest.sh only verifies that lock_s + hold < job_min * 60 - 120, not that lock_s itself exceeds one review's worst-case hold (retries * per + delay * retries * (retries - 1) / 2). If AGY_PRINT_TIMEOUT_MAX_SECONDS, AGY_PRINT_TIMEOUT, or AGY_RETRIES is later raised alongside timeout-minutes, the selftest will still pass even if AGY_LOCK_WAIT silently falls back below a single review's hold duration.
  • Note the queue-depth assumption in the documentation (.github/AGY-REVIEWER.md:275, .github/AGY-REVIEWER.md:285-291, .github/workflows/antigravity-review.yml:134-138): because flock -w "$AGY_LOCK_WAIT" starts its timer as soon as a job reaches flock, 1860 seconds covers waiting behind one active review (1815 seconds worst case), not two or more already in flight across other repositories on the same host. Calling out that 1860 seconds is sized for a queue depth of 1 avoids surprise if three repositories trigger reviews simultaneously.

Nitpicks

  • scripts/agy-review.sh:255 default (600) vs. documented invariant (.github/AGY-REVIEWER.md:275): the script's fallback default AGY_LOCK_WAIT=600 is shorter than a single maxed-out attempt (AGY_PRINT_TIMEOUT_MAX_SECONDS=1800 in the script, 900 in the workflow), so callers invoking scripts/agy-review.sh outside the workflow env overrides still have a lock wait shorter than one review.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Earlier review rounds (newest first)
Round reviewed at 2026-11-15 16:47 UTC

Antigravity review (Gemini via Ultra)

Increases AGY_LOCK_WAIT from 300 to 1860 seconds and raises the review job's timeout-minutes from 45 to 80 in .github/workflows/antigravity-review.yml so a queued review can wait out a full worst-case lock hold (2 * 900 + 15 = 1815 s) from another repository sharing the host's singleton agy instance.

Blocking issues

None found.

Suggestions

  • .github/workflows/antigravity-review.yml:131-139: 1860 seconds covers waiting behind one worst-case review (1815 s) or roughly two to three typical large-diff reviews (6–8 minutes each), which resolves the two-repo collision described in the comment. If three or more repositories on the same host ever queue large diffs simultaneously and more than one hits retry/timeout ceilings, the third waiter can still exceed 1860 s. No change needed unless multi-repo batching (>2 concurrent PRs across repos) becomes common.
  • .github/AGY-REVIEWER.md:267-279: Consider documenting AGY_LOCK_WAIT (and the agy lock timed out failure mode) in the configuration table and troubleshooting section of .github/AGY-REVIEWER.md so downstream repos using the template know how AGY_LOCK_WAIT interacts with timeout-minutes.

Nitpicks

None. This is a trivial configuration update and the worst-case timeout arithmetic (3675 s < 80 min) remains consistent with scripts/agy-review-selftest.sh.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Round reviewed at 2026-11-15 07:19 UTC

Antigravity review (Gemini via Ultra)

Increases AGY_LOCK_WAIT from 300s to 1800s and raises timeout-minutes from 45 to 80 in antigravity-review.yml so a PR review job can wait out a concurrent review running in another repository on the same self-hosted runner. This is a trivial configuration and comment update.

Blocking issues

None found.

Suggestions

  • antigravity-review.yml: The comment states that 1800 s outlasts another review's two attempts at a 15-minute cap, but in agy-review.sh the flock on fd 9 is held across the entire retry loop including the 15s inter-attempt sleep (2 * 900 + 15 = 1815s plus process overhead). If the goal is to strictly outlast a peer job's worst-case lock hold time across two full-timeout attempts, bump AGY_LOCK_WAIT slightly above 1815 (e.g., "1860") or clarify the comment that 1800s covers two 900s attempts excluding retry backoff.

Nitpicks

  • .github/AGY-REVIEWER.md: Consider adding AGY_LOCK_WAIT (600, workflow: 1800) to the Configuration (workflow env:) table alongside AGY_PRINT_TIMEOUT_MAX_SECONDS and AGY_RETRIES.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

Antigravity on RustyNES #665: the comment said 1800 s "outlasts another
review's two attempts at a 15-minute cap", but agy-review.sh holds the
flock across the whole retry loop, the 15 s pause between attempts
included, so another review can hold it for 2 x 900 + 15 = 1815 s plus
process start-up. AGY_LOCK_WAIT 1800 -> 1860; the comment now gives the
real arithmetic. Worst case 1860 + 2 x 900 + 15 = 3675 s, inside the
80-minute job timeout ("worst case 3675s 80m (job timeout) fits with 2
minutes to spare"; selftest: all checks passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014qfTKi2M3swo7qnwvYCkDj
@cursor

cursor Bot commented Nov 15, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 7428ecc1-a2ab-43bf-bb26-f7ed3fab99f6)

…lure

Antigravity on #665 (no blocking issues): the configuration table and the
troubleshooting section did not mention AGY_LOCK_WAIT, so a repository
using the template had no way to learn that the lock is shared by every
repository's review on the host, how the wait interacts with
timeout-minutes, or what the red "agy lock timed out after Ns" job means.
Added a table row (default 600, workflow 1860; why 1860 outlasts one
review's whole hold; that raising it means raising timeout-minutes, which
the selftest checks) and a troubleshooting entry (cause, re-run, how to
size the wait, fail-closed).

Its other suggestion, that 1860 s can still be exceeded when three or more
repositories queue large diffs at once, is left as is: the reviewer itself
says no change is needed unless that becomes common, and a longer wait
would only lengthen every job's worst case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014qfTKi2M3swo7qnwvYCkDj
@cursor

cursor Bot commented Nov 15, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: cb236c1e-c693-4d02-b52e-69682a551d4f)

@doublegate

doublegate commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner Author

Antigravity rounds: answered

  • 1800 s versus the real hold (round on 0ec26e3): fixed in 9e7c711. The lock is held across both attempts and the 15 s pause between them, 1815 s in all, so the wait is now 1860 s. The worst case is 3675 s, inside the 80-minute timeout (selftest: all checks passed).
  • Three or more repositories queueing large diffs at once (round on 9e7c711): no change. The review itself says none is needed unless that becomes common, and a longer wait would lengthen every job's worst case.
  • Document AGY_LOCK_WAIT (same round): done in 59005c3. There is a configuration-table row and a troubleshooting entry for the agy lock timed out failure. The same text is in the reviewer template.

🤖 Generated with Claude Code

@doublegate
doublegate merged commit ca578b6 into main Nov 15, 2026
29 checks passed
@doublegate
doublegate deleted the ci/agy-lock-wait branch November 15, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant