Uh oh!
There was an error while loading. Please reload this page.
guard: fix the perpetually-failing go list guards at the source - #6
Merged
Conversation
… failures TestVendorSDKsOnlyInTheirAdapters and TestNoGatewayInternalsOutsideGateway have been failing on every branch, blamed on desktop/node_modules. That was the trigger, not the cause. `go list` EXITS 0 and returns a complete, correct package list; the symlink lines are advisory warnings on stderr. The guard helpers used CombinedOutput(), which folded those warning lines into the package list — and each one was then handed back to `go list` as if it were a package path. `.../node_modules@electron/...` contains an `@`, which in module-aware mode reads as path@version and is only valid for `go get`/`go install`, so THAT invocation exited 1. The failure was the helper laundering stderr into data. Fixed at the source: one goListLines helper reading stdout only, used by deps, directImports, and modulePackages. Any `go list` warning is now inert, whatever its cause — an untracked node_modules tree from another branch (desktop/ is not tracked on main at all), a stray symlink, anything future. Genuine failures still fail: non-zero exit is fatal, and an empty package list is now explicitly fatal too, since that would let every guard below pass vacuously — the failure mode this class of test is least able to notice. Verified: full `go test ./...` is green with desktop/node_modules still in place, and the guards still catch a real violation (injecting an anthropic-sdk import into internal/wire fails TestWireIsStdlibOnly as it should). Also fixes two comments still pointing at docs/design/personal-agents.md, which was renamed to autonomous-agents.md in the consolidation.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
The failure
TestVendorSDKsOnlyInTheirAdaptersandTestNoGatewayInternalsOutsideGatewayhave been failing on every branch, generally blamed ondesktop/node_modules. That was the trigger, not the cause.go listexits 0 and returns a complete, correct package list — the symlink lines are advisory warnings on stderr. The guard helpers usedCombinedOutput(), which folded those warning lines into the package list. Each one was then handed back togo listas a package path, and.../node_modules@electron/...contains an@, which in module-aware mode reads aspath@versionand is only valid forgo get/go install. That invocation exited 1.The bug was the helper laundering stderr into data.
The fix
One
goListLineshelper reading stdout only, used bydeps,directImports, andmodulePackages. Anygo listwarning is now inert whatever its cause — an untrackednode_modulestree from another branch (desktop/isn't tracked on main at all), a stray symlink, anything future.Genuine failures still fail: non-zero exit is fatal, and an empty package list is now explicitly fatal too — that would otherwise let every guard below pass vacuously, which is the failure mode this class of test is least able to notice.
Verified
go test ./...green withdesktop/node_modulesstill in place.anthropic-sdk-goimport intointernal/wirecorrectly failsTestWireIsStdlibOnly.Also repairs two comments still pointing at
docs/design/personal-agents.md, renamed toautonomous-agents.mdduring the consolidation.