fix(scripts): resolve go version wrappers via GOBIN, prune stale ones#111
Merged
Conversation
GO_VERSION=1.26 install reported before/after <none> and skipped both the SDK download and the go1.26 cycle symlink whenever GOPATH/bin was off PATH: the post-install check used 'have go1.26.5' (a PATH lookup) although go install always lands in GOBIN. Every auto-update run then left another orphaned goX.Y.Z wrapper (12 accumulated in the field). - resolve wrappers via go env GOBIN/GOPATH explicitly (install check, SDK download, symlink update, and the before/after version probes) - prune superseded same-cycle wrappers and their ~/sdk trees after a successful update; other cycles untouched - drop unused TOOL var (pre-existing SC2034 blocking the shellcheck hook on this file) Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
CybotTM
added a commit
that referenced
this pull request
Jul 17, 2026
## Summary Retro follow-ups from this week's bug chain (#106–#111): 1. **`scripts/AGENTS.md` — four hard-won invariants**, each of which caused a shipped bug: never verify installs via PATH lookup (resolve the manager's bin dir; pass detected paths into removal code), environments ≠ installations (both detection layers must stay in sync), quiet command wrappers detach stdin and surface failures, and the shellcheck hook lints the whole changed file. 2. **CI `Shell Tests` job** running `tests/test_guide_multi_install.sh` (52 assertions) and `tests/test_reconcile_dryrun.sh` (7 assertions) — they were wired into no job, and a dormant assertion in the former (`classify nvm path returns npm(...)`) predicted the pnpm/nvm misclassification fixed in #106 long before it bit. Both suites verified green locally before wiring. Came from /retro: yes
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
make upgrade-all's go@1.26 step printedbefore: <none> / after: <none>while claiming success, and~/go/binaccumulated 12 orphaned version wrappers (go1.25.5…go1.26.5).Root cause — same class as #107: after
go install golang.org/dl/go1.26.5@latestthe script checkedhave go1.26.5(PATH lookup), butgo installlands in GOBIN (defaultGOPATH/bin), which may be off PATH. The SDK download andgo1.26cycle-symlink update were then silently skipped, and each run left another orphaned wrapper.go env GOBIN/GOPATH— install verification, SDK download, symlink update, and the before/after version probes~/sdktrees after a successful update (go1.26.0,go1.26.2→ gone oncego1.26.5is in place); other cycles are untouchedTOOLvar (pre-existing SC2034 that blocked the shellcheck hook on this file)Tests
tests/test_go_multiversion.py(3 tests, red→green, go/curl/python3 PATH-stubbed with GOPATH/bin deliberately off PATH): SDK download + symlink happen despite GOBIN off PATH, after-version probes GOBIN instead of reporting<none>, superseded same-cycle wrappers and SDKs pruned while other cycles survive