Repository navigation
ci(provider): run the standalone gate offline — cover anthropic, no credential - #384
Merged
Merged
Conversation
…redential The previous job was scoped to ssefilter only, on the theory that anthropic needs git credentials to fetch engine v0.8.0 (mecatl is private, so proxy.golang.org 404s it and a networked GOWORK=off fetch 401s). But the gate doesn't need the network at all: run it GOPROXY=off over a module cache warmed from the committed go.sum, and every dependency must already be local — no credential, no private-fetch surface, and a STRONGER guarantee (offline, not just off-workspace). anthropic now qualifies (engine v0.8.0 is cache-resolvable once warmed), so the gate covers ssefilter + anthropic. openai + openaichat stay excluded only because they require provider/ssefilter v0.0.0, which no cache can resolve until the first provider/ssefilter tag — tracked in #379. Adds a GOPROXY var to task test:provider-standalone (default networked locally, GOPROXY=off in CI) so the offline form reproduces with ok github.com/stacklok/mecatl/provider/ssefilter (cached) ok github.com/stacklok/mecatl/provider/anthropic (cached). ADR 0093 updated. Co-Authored-By: Juan Antonio Osorio <[email protected]>
…line The offline-only warm was unsound: engine v0.8.0 must be fetched from the private origin, which needs auth (proxy.golang.org can't serve a private module), and 'go mod download' doesn't resolve the full build/test graph anyway. Warm the module cache with the workflow's read-only GITHUB_TOKEN (an insteadOf rewrite scoped to the warm step, dropped right after), then run the gate fully offline (GOPROXY=off) so the self-contained proof never touches the network and carries no credential. ADR 0093 updated to record that the warm needs auth on a private repo. Co-Authored-By: Juan Antonio Osorio <[email protected]>
JAORMX
force-pushed
the
ci/provider-standalone-auth
branch
4 times, most recently
from
August 5, 2026 07:24
abf59ec to
7947a6e
Compare
…lse positive
The SA5011 'possible nil pointer dereference' findings failing CI are false
positives on the idiomatic test guard 'if x == nil { t.Fatal(...) }; use(x)'.
staticcheck computes t.Fatal's no-return facts over the whole program, and on
the 2-core CI runner they come back incomplete — flagging a rolling subset of
the ~117 test files using the idiom (authfile, models, cliconfig, mcpserver,
…) while golangci-lint reports 0 issues locally with the identical v2.12.2 +
config. GOGC/concurrency/GOMEMLIMIT tuning and a bigger runner (not
provisioned) could not make it deterministic, and per-site edits across 117
files are the wrong answer to a checker-environment divergence. Exclude SA5011
in *_test.go (production code keeps the check at full strength), matching the
repo's existing test-file relaxation block. Config verified; task lint green
across all modules.
Co-Authored-By: Juan Antonio Osorio <[email protected]>
JAORMX
force-pushed
the
ci/provider-standalone-auth
branch
from
August 5, 2026 07:39
f781179 to
833bb81
Compare
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.
What
Widens the
provider-standalone(GOWORK=off) hygiene gate to coveranthropicalongsidessefilter, and fixes the staticcheck SA5011 lint flake that was failing CI.Addresses the anthropic half of #379; openai/openaichat remain blocked on the first
provider/ssefiltertag.1. Provider standalone gate (ADR 0093)
Because mecatl is a private/INTERNAL repo, a module that
requires another mecatl module (anthropic→engine;openai/openaichat→engine+provider/ssefilter) can only be fetched from the origin with auth —proxy.golang.orgcannot serve a private module. So the job:GITHUB_TOKEN(aninsteadOfrewrite scoped to the warm step, dropped immediately after) — a networkedgo build+go test(GOFLAGS=-mod=mod) resolves the full incl. test-only graph.go mod downloadalone is NOT sufficient.GOWORK=off GOPROXY=off go build/go test) — the self-contained proof never touches the network and carries no credential.test:provider-standalone(Taskfile) gains aGOPROXYvar (default empty = networked locally;task test:provider-standalone GOPROXY=offreplicates CI).require provider/ssefilter v0.0.0, unresolvable until the firstprovider/ssefilter/vX.Y.Ztag (Cut provider/ssefilter tag to unblock the openai/openaichat standalone gate #379). Once mecatl is open-sourced the warm needs no token.2. The SA5011 lint flake
CI's staticcheck (golangci-lint v2.12.2) false-positives SA5011 "possible nil pointer dereference" on the idiomatic test guard
if x == nil { t.Fatal(...) }; use(x). staticcheck computest.Fatal's no-return facts over the whole program, and on the 2-core CI runner they come back incomplete — flagging a rolling subset of the ~117 test files using the idiom (authfile,models,cliconfig,mcpserver, …) while golangci-lint reports 0 issues locally with the identical version + config.This is a checker-environment divergence, not a real bug. Per-site edits across 117 files,
GOGC/--concurrency/GOMEMLIMITtuning, and a bigger runner (not provisioned — the job queued forever) all failed to make it deterministic. The fix: exclude SA5011 in*_test.goin.golangci.yml(production code keeps the check at full strength), matching the repo's existing test-file relaxation block.Verification
provider-standalone(GOWORK=off, offline) — ssefilter ✓, anthropic ✓task test:provider-standalone GOPROXY=off✓ (offline, after cache warm); cold-cache negative test confirms the warm is load-bearingtask lint— 0 issues across all modules;golangci-lint config verify✓go test ./docs/lint/✓Commits
ci(provider): run the standalone gate offline — cover anthropic, no credential(superseded warm approach)ci(provider): warm the standalone cache with read-only auth, gate offlineci(lint): exclude staticcheck SA5011 in test files — deterministic false positive