test-gate: go list through discover too (Astra round 3)
The three go list calls ran in the foreground, so a TERM during a stalled module download waited for go list before stopping the jobs. They now go through discover with output in a file, and set -e stops the gate on their status. Round 3 found nothing new at P1 or P2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+8
−4
.amadan/test-gate.sh+8 −4
CI passed — run details
diff --git a/.amadan/test-gate.sh b/.amadan/test-gate.sh| index 54cac6bce..f1f02c9cd 100755 |
| --- a/.amadan/test-gate.sh |
| +++ b/.amadan/test-gate.sh |
| @@ -143,12 +143,15 @@ start gofmt sh -c 'fmt_out=$(gofmt -l .); if [ -n "$fmt_out" ]; then echo "gofmt |
| # by import path, so match TEST_SPLIT's directories through `go list`. |
| split_paths="" |
| for spec in $TEST_SPLIT; do |
| - split_paths="$split_paths $(go list "${spec%=*}")" |
| + discover go list "${spec%=*}" >"$out/go-list" |
| + split_paths="$split_paths $(cat "$out/go-list")" |
| done |
| # go list runs on its own, not in a pipeline: a pipeline's status is its |
| # last command's, and a go list that failed halfway would hand on a short |
| -# package list with a zero status. |
| -all=$(go list ./...) |
| +# package list with a zero status. Each go list goes through discover, and |
| +# set -e stops the gate on its status. |
| +discover go list ./... >"$out/go-list" |
| +all=$(cat "$out/go-list") |
| if [ -z "$all" ]; then |
| echo "go list ./... found no packages" >&2 |
| exit 1 |
| @@ -169,7 +172,8 @@ fi |
| for spec in $TEST_SPLIT; do |
| dir=${spec%=*} |
| shards=${spec#*=} |
| - pkg=$(go list "$dir") |
| + discover go list "$dir" >"$out/go-list" |
| + pkg=$(cat "$out/go-list") |
| tag=$(echo "$dir" | sed 's|^\./||; s|^\.$|root|; s|/|_|g') |
| # -list compiles the test binary, which the shards below then reuse |