fix: Use git protocol for retrace spec check#92
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: TMPDIR variable shadows standard environment variable
- Replaced TMPDIR with non-reserved WORK_DIR and updated all references to avoid environment variable shadowing.
Or push these changes by commenting:
@cursor push 4707bfc43f
Preview (4707bfc43f)
diff --git a/scripts/check-retrace-spec.sh b/scripts/check-retrace-spec.sh
--- a/scripts/check-retrace-spec.sh
+++ b/scripts/check-retrace-spec.sh
@@ -5,14 +5,14 @@
# To update: run this script's fetch logic manually and replace the hash.
TRACKED_BLOB="ae22ff183a460d25fc0cecdd2d34f5b32ae216d9"
-TMPDIR=$(mktemp -d)
-trap 'rm -rf "$TMPDIR"' EXIT
+WORK_DIR=$(mktemp -d)
+trap 'rm -rf "$WORK_DIR"' EXIT
-git init -q "$TMPDIR"
-git -C "$TMPDIR" remote add origin https://r8.googlesource.com/r8
-git -C "$TMPDIR" fetch --depth=1 origin refs/heads/main 2>/dev/null
+git init -q "$WORK_DIR"
+git -C "$WORK_DIR" remote add origin https://r8.googlesource.com/r8
+git -C "$WORK_DIR" fetch --depth=1 origin refs/heads/main 2>/dev/null
-LATEST_BLOB=$(git -C "$TMPDIR" ls-tree FETCH_HEAD -- doc/retrace.md | awk '{print $3}')
+LATEST_BLOB=$(git -C "$WORK_DIR" ls-tree FETCH_HEAD -- doc/retrace.md | awk '{print $3}')
if [ -z "$LATEST_BLOB" ]; then
echo "ERROR: Failed to read doc/retrace.md blob from r8 repo" >&2This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
3658656 to
933312e
Compare
loewenheim
approved these changes
Apr 7, 2026
933312e to
593ca15
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 593ca15. Configure here.
The Gitiles HTTP/JSON API frequently returns CAPTCHA/rate-limit pages on shared CI runner IPs, causing the check to fail with jq parse errors. Switch to shallow git fetch + blob hash comparison which uses the git protocol and avoids the CAPTCHA gate entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
593ca15 to
243f0be
Compare
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.


Summary
jq: parse errorgit fetch+ blob hash comparison, which uses the git protocol and isn't subject to Google's CAPTCHA gateTest plan
🤖 Generated with Claude Code