check / check (push) Successful in 51s
script/test now runs go test -timeout 30s -race -cover ./..., quiet on success and rerunning verbose on failure. -race exposed a data race on the process-global apex/log logger: Init reconfigured it on every CLI run while other goroutines logged through it. internal/log now mutates the global under the write lock and reads it under the read lock; WithError is dropped because its Entry logged outside that lock, and run() reports a failed command's error via log.Errorf instead (still shown under -q). The corruption fuzz test is scaled to 1500 files / 100 iterations to fit the budget under -race; it pins the same claims at reduced breadth. Independent review ran the Docker lint gate uncached. Model: opus-4-8 (implementation, review) model: claude-fable-5
29 lines
690 B
Bash
Executable File
29 lines
690 B
Bash
Executable File
#!/bin/sh
|
|
# script/test: run the test suite.
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|
|
|
# Regenerate mfer/mf.pb.go from mfer/mf.proto if it is missing or stale
|
|
# (mirrors the old Makefile prerequisite; the generated file is
|
|
# committed, so this is normally a no-op).
|
|
ensure_pb() {
|
|
if [ ! -f mfer/mf.pb.go ] ||
|
|
[ -n "$(find mfer/mf.proto -newer mfer/mf.pb.go 2>/dev/null)" ]; then
|
|
(cd mfer && go generate .)
|
|
fi
|
|
}
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
ensure_pb
|
|
go test -timeout 30s -race -cover ./... ||
|
|
{
|
|
echo "--- Rerunning with -v for details ---"
|
|
go test -timeout 30s -race -v ./...
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
main "$@"
|