* ci: add PR wrapper command surface * ci: collect wrapper timing in PR checks * docs: record initial CI wrapper measurements * ci: add manual measurement workflow * ci: allow branch measurement dispatch * ci: keep measuring independent commands after failures * docs: record branch-dispatched CI measurement * ci: keep measuring package suites after failures * docs: record CI measurement batch * fix: repair CI-measured test failures * test: make local Go gates hermetic * ci: add sharded integration measurement lane * test: fix internal beads integration TestMain * docs: record fixed integration shard measurement * ci: add hybrid integration sharding measurement * ci: speed up cmd/bd test shard discovery * ci: add 16-way integration sharding measurement * ci: measure prebuilt cmd bd sharding * docs: record prebuilt sharding measurement * docs: design CI build artifact stage * docs: record repeat prebuilt integration measurement * ci: add build artifact stage * ci: reuse build artifact in linux test lane * ci: promote main linux integration shards * ci: gate legacy platform tests to main * ci: satisfy workflow shell lint * ci: ignore archived migrations in duplicate check * ci: add package gate wrappers * test: clean up testing short boundaries * ci: allow unreleased version docs lag * ci: gate releases on package checks * ci: split workflow by tier * ci: add aggregate PR gates
52 lines
1.4 KiB
Bash
Executable file
52 lines
1.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Ensure testing.Short() is only used for true runtime/stress/large-fixture skips.
|
|
|
|
set -euo pipefail
|
|
|
|
allowed=$(
|
|
cat <<'EOF'
|
|
internal/hooks/hooks_test.go::TestRunSync_Timeout
|
|
internal/hooks/hooks_test.go::TestRunSync_KillsDescendants
|
|
internal/testutil/fixtures/fixtures_test.go::TestXLargeDolt
|
|
internal/testutil/fixtures/fixtures_test.go::TestLargeFromJSONL
|
|
internal/storage/dolt/concurrent_test.go::TestHighContentionStress
|
|
EOF
|
|
)
|
|
|
|
status=0
|
|
|
|
while IFS=: read -r file line _; do
|
|
file="${file#./}"
|
|
if [[ -z "$file" || -z "$line" ]]; then
|
|
continue
|
|
fi
|
|
|
|
func=$(
|
|
awk -v target="$line" '
|
|
NR <= target && /^func [A-Za-z0-9_]+\(/ {
|
|
current = $0
|
|
sub(/^func /, "", current)
|
|
sub(/\(.*/, "", current)
|
|
}
|
|
END { print current }
|
|
' "$file"
|
|
)
|
|
key="${file}::${func}"
|
|
|
|
if ! grep -Fxq "$key" <<<"$allowed"; then
|
|
printf 'Disallowed testing.Short() at %s:%s in %s\n' "$file" "$line" "${func:-unknown}" >&2
|
|
status=1
|
|
fi
|
|
done < <(find . -type f -name '*.go' -not -path './.git/*' -exec grep -n 'testing\.Short()' {} + || true)
|
|
|
|
if (( status != 0 )); then
|
|
cat >&2 <<'EOF'
|
|
|
|
testing.Short() is reserved for true runtime, stress, or large-fixture skips.
|
|
Use build tags, environment checks, or named wrappers for integration/e2e/API
|
|
boundaries instead.
|
|
EOF
|
|
exit "$status"
|
|
fi
|
|
|
|
printf 'testing.Short() usage is limited to approved runtime/stress/large-fixture skips.\n'
|