fix(ci): unblock periodic checks (flaky socks5 test, govulncheck PATH, golangci-lint install) - #2
Merged
Merged
Conversation
…, golangci-lint install) The weekly periodic run has failed on every job since it was added (Aug 3). Three independent root causes: - test: dialSOCKS discarded its bufio.Reader after reading the 10-byte CONNECT reply. Early tunnel bytes (the origin's greeting) that arrived in the same read syscall stayed in that buffer and were lost, so TestServe_NoRoutingPolicyApplied flakily observed a closed-but-empty tunnel (EOF instead of ROUTING-IGNORED). Reproduced locally: ~1 in 10 runs, 100% correlated with br.Buffered() > 0. Fix mirrors cascade.bufferedConn — return a conn that serves buffered bytes first. Verified: 200/200 isolated runs with -race, full repo -race suite green. - dependency-check: govulncheck is installed to GOPATH/bin, which is not on the runner PATH; export it before running. - latest-linter: the upstream master install.sh fails its own checksum verification against the golangci-lint 2.12.2 release assets (reproduced on both linux/amd64 CI and darwin/arm64 locally). Install via `go install ...@latest` instead. Also add the missing close-issue-on-success job: PERIODIC_FAILURE.md promises the failure issue auto-closes on a passing run, but nothing implemented that (create-an-issue only opens).
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
The weekly
periodicworkflow (added ~Aug 3) has failed on every job in its only run, opening issue #1. Three independent root causes, each reproduced and verified:1. test — flaky
TestServe_NoRoutingPolicyApplied(data loss in test helper)dialSOCKSread the 10-byte CONNECT reply through abufio.Readerand then discarded the reader. When early tunnel bytes (the origin'sROUTING-IGNOREDgreeting) arrived in the same read syscall as the reply, they were silently lost — the test observed a closed-but-empty tunnel (EOF).br.Buffered() > 0(instrumented: "dialSOCKS lost 15 buffered tunnel bytes").cascade.bufferedConnpattern (the production code was already correct — only the test helper lost data).-race, fullgo test -race ./...green (12/12 packages).2. dependency-check —
govulncheck: command not foundgo installputs the binary in$(go env GOPATH)/bin, which is not on the GitHub runner's PATH. Fix: export PATH before running.3. latest-linter — golangci-lint install.sh checksum failure
curl | shof the upstream masterinstall.shfailshash_sha256_verifyagainst the 2.12.2 release assets. Reproduced on both linux/amd64 (CI) and darwin/arm64 (local) — a real script/release mismatch, not a flaky download. Fix: install via the officially supportedgo install github.com/golangci/golangci-lint/cmd/golangci-lint@latest(still "latest", still distinct from the pinned version used by pr.yml).4. Missing auto-close for the failure issue
.github/PERIODIC_FAILURE.mdpromises "This issue auto-closes when the next periodic run passes", but nothing implements it (create-an-issueonly opens). Added aclose-issue-on-successjob that closes the stale "Periodic CI check failed" issue on a fully green run.Verification
go test -race ./...— all 12 packages ok (from a clean path)gofmt— my changes are clean (two pre-existing gofmt nits in test files left untouched, out of scope)