Commit 26a9963
committed
build: unify the test+lint gate under
`just test-go`/`lint-go` ran go test/vet/golangci-lint in the devshell
against the real environment. Two bugs this session (the discovery_test
HOME/cwd env-leak and the SSE data-race/hang) were invisible there and
only surfaced in the merge hook. Make `nix flake check` the single
hermetic gate.
New checks (mirroring igloo's buildGoRace, used by madder):
- go-test-race: `go test -race ./...` on a lean base off `moxy`
(doCheck on, plugin postInstall dropped, MOXIN_PATH unset, CGO+race via
buildGoRace). The sandbox's fresh HOME makes env-dependent tests
isolated by construction — it immediately caught the asyncjob clown
stub's `/usr/bin/env bash` shebang (no /usr/bin/env in the pure
sandbox), now resolved via exec.LookPath. Folds in #348 (-race lane).
- go-vet: `go vet ./...` hermetically.
- go-lint: golangci-lint run offline against the buildGoApplication
module graph, --config pointed at the flake's .golangci.yml (the
dotfile isn't in the filtered moxySrc). Hermetic golangci-lint-in-nix
is novel across the eng fleet — proven feasible here.
- bats: the comprehensive bats-default lane (net_cap/host_only need
sandbox capabilities a flake check can't grant — they stay explicit
recipes; per-tag lanes stay packages for `just test-bats-tag`).
justfile: `default`/`test` route through `nix flake check`; the devshell
test-go/test-bats/lint recipes stay as fast iteration loops, with the
flake check as the source of truth. test-bats-net_cap + the runtime
smokes (validate-mcp, status) run alongside.
🤡 Generated with [Clown 0.3.10+44f75d5](amarbel-llc/clown@44f75d5)nix flake check (closes #347, #348)1 parent 85a0a99 commit 26a9963
3 files changed
Lines changed: 89 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
972 | 1018 | | |
973 | 1019 | | |
974 | 1020 | | |
| |||
983 | 1029 | | |
984 | 1030 | | |
985 | 1031 | | |
986 | | - | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
987 | 1047 | | |
988 | 1048 | | |
989 | 1049 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
24 | 34 | | |
25 | | - | |
| 35 | + | |
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
110 | 122 | | |
111 | | - | |
| 123 | + | |
112 | 124 | | |
113 | 125 | | |
114 | 126 | | |
| |||
0 commit comments