Skip to content

fix(pkgset): stop duplicating global PATH/GOPATH entries#14

Merged
brianrobt merged 4 commits into
masterfrom
cursor/fix-global-pkgset-dup-80f5
Jul 19, 2026
Merged

fix(pkgset): stop duplicating global PATH/GOPATH entries#14
brianrobt merged 4 commits into
masterfrom
cursor/fix-global-pkgset-dup-80f5

Conversation

@brianrobt

@brianrobt brianrobt commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Fixes #8

Summary

Base Go environment files already embed the global pkgset. Copying that file to *@global and appending the same prefixes again duplicated GOPATH/PATH.

Changes

  • scripts/pkgset-create: for global, copy the base env and stop (no re-append). Non-global pkgsets unchanged.
  • binscripts/gvm-installer: system@global is a clean copy of system; remove the @TODO append block.
  • Tests: tests/gvm_pkgset_global_comment_test.sh (single-line fixture write — no heredoc); smoke checks for @global shape.
  • scripts/install: retry flaky go.dev binary downloads; ensure archive/ exists.
  • CI: timeout-minutes on smoke (30) and suite (45).
  • Repo hygiene: gitignore .cursor/, docs/plans/, and docs/brainstorms/ (AI rules/prompts and local plans stay off source control).

CI failure notes

  1. Ubuntu bash smoke earlier: transient go.dev download flake → retries added.
  2. Suite 6h timeout (macOS + Ubuntu): after gvm_listall finished, the new pkgset test ran cat <<EOF. tf runs each line as its own command, so cat blocked on stdin until Actions cancelled the job. Fixed by writing the fixture with a one-line printf.

Notes

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Bug Fixes
    • Prevented duplicated GOPATH/PATH entries when setting up or installing the global package set.
    • Improved global environment generation to keep it as a clean base copy (while preserving correct precedence for non-global package sets).
    • Made binary downloads more reliable with retries, redirect handling, and stronger failure handling.
  • Tests
    • Added checks to verify global environments don’t include duplicated prefixes and that non-global package sets include expected overrides.
  • Chores
    • Added repo safeguards to avoid committing local planning artifacts.
  • CI
    • Increased smoke and suite job timeouts.

Base Go environments already embed the global pkgset. Copying that file
to *@global and appending again doubled prefixes. Special-case global in
pkgset-create, align the installer, and add regression coverage (#8).

Co-authored-by: Brian Thompson <brianrobt@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@cursor[bot], you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2bb0231d-198f-40ff-9549-60bfdabb745a

📥 Commits

Reviewing files that changed from the base of the PR and between 5536cf0 and fcf7cd1.

📒 Files selected for processing (1)
  • .gitignore
📝 Walkthrough

Walkthrough

The change prevents duplicate global pkgset PATH/GOPATH entries, aligns installer behavior, adds validation coverage, improves binary download retries, sets CI timeouts, and ignores local planning artifacts.

Changes

Global pkgset environment handling

Layer / File(s) Summary
Global environment creation flow
scripts/pkgset-create, binscripts/gvm-installer
Global pkgset creation skips redundant environment exports, and system@global is copied directly from system. Non-global pkgsets retain their overrides and overlay setup.
Pkgset duplication validation
tests/gvm_pkgset_global_comment_test.sh, scripts/ci-smoke.sh, ChangeLog
Focused and smoke tests verify clean global environments and preserved non-global path behavior; the fix is documented as unreleased.

Binary download retries

Layer / File(s) Summary
Resilient binary download
scripts/install
Binary downloads now create the archive directory safely, follow redirects, fail on curl errors, clean partial files, and retry up to three times.

Repository maintenance

Layer / File(s) Summary
Planning artifact policy
.cursor/rules/no-commit-plan-files.mdc, .gitignore
Repository guidance and ignore rules cover local planning and brainstorming artifacts under docs/plans/ and docs/brainstorms/.
CI execution limits
.github/workflows/ci.yml
The smoke and suite jobs use 30-minute and 45-minute timeout limits.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also changes install retry logic, CI job timeouts, and repo hygiene files that are unrelated to fixing global PATH/GOPATH duplication. Split the install retry, CI timeout, and Cursor/gitignore updates into separate PRs unless they are required for the linked issue.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The pkgset-create and installer changes directly fix #8 and the new tests verify the clean global environment behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main fix: removing duplicated PATH/GOPATH entries for the global pkgset.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-global-pkgset-dup-80f5

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

Comment @coderabbitai help to get the list of available commands.

Ubuntu bash smoke failed on a transient go.dev download, not the pkgset
env checks. Retry binary downloads and ensure the archive dir exists.

Also remove the committed plan doc, gitignore docs/plans and
docs/brainstorms, and add a Cursor rule against committing plan files.

Co-authored-by: Brian Thompson <brianrobt@users.noreply.github.com>
@brianrobt
brianrobt marked this pull request as ready for review July 18, 2026 18:38
cursoragent and others added 2 commits July 19, 2026 12:06
tf executes each line as its own command, so `cat <<EOF` blocked on
stdin and held the suite jobs until the 6h Actions cancel. Write the
fixture with a one-line printf, fix the myset GOPATH grep, and add job
timeouts so a stuck test cannot burn the full budget again.

Co-authored-by: Brian Thompson <brianrobt@users.noreply.github.com>
Remove .cursor/rules from the repo and gitignore .cursor/. AI prompts
and rules stay on the machine unless explicitly requested in source
control.

Co-authored-by: Brian Thompson <brianrobt@users.noreply.github.com>
@brianrobt
brianrobt merged commit fba86cf into master Jul 19, 2026
7 checks passed
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.

Fix duplicated PATH/GOPATH entries for global pkgset environments

2 participants