Skip to content

fix(ci): unblock periodic checks (flaky socks5 test, govulncheck PATH, golangci-lint install) - #2

Merged
onokonem merged 1 commit into
mainfrom
fix/periodic-checks
Aug 9, 2026
Merged

fix(ci): unblock periodic checks (flaky socks5 test, govulncheck PATH, golangci-lint install)#2
onokonem merged 1 commit into
mainfrom
fix/periodic-checks

Conversation

@onokonem

@onokonem onokonem commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

The weekly periodic workflow (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)

dialSOCKS read the 10-byte CONNECT reply through a bufio.Reader and then discarded the reader. When early tunnel bytes (the origin's ROUTING-IGNORED greeting) arrived in the same read syscall as the reply, they were silently lost — the test observed a closed-but-empty tunnel (EOF).

  • Reproduced locally: ~1 in 10 runs fails; 100% correlated with br.Buffered() > 0 (instrumented: "dialSOCKS lost 15 buffered tunnel bytes").
  • Fix: return a conn that serves buffered bytes first, mirroring the repo's existing cascade.bufferedConn pattern (the production code was already correct — only the test helper lost data).
  • Verified: 200/200 isolated runs with -race, full go test -race ./... green (12/12 packages).

2. dependency-check — govulncheck: command not found

go install puts 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 | sh of the upstream master install.sh fails hash_sha256_verify against 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 supported go 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.md promises "This issue auto-closes when the next periodic run passes", but nothing implements it (create-an-issue only opens). Added a close-issue-on-success job 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)
  • YAML validated

…, 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).
@onokonem
onokonem merged commit 54596f5 into main Aug 9, 2026
2 checks passed
@onokonem
onokonem deleted the fix/periodic-checks branch August 9, 2026 13:13
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.

1 participant