mirror of
https://github.com/luxfi/precompile.git
synced 2026-09-24 00:26:21 +00:00
BLAKE3 is gated under strict-PQ NOT because the primitive is classical (it's a hash function, PQ-safe at 128-bit Grover security on 256-bit output — same as SHA-256) but because the strict-PQ profile mandates a ≥192-bit PQ security floor consistent with SHAKE256-384 + ML-DSA-65 elsewhere in the stack. Documenting the policy intent inline so the next-rev reviewer doesn't have to triangulate from strict_pq.go comments. The gate stays. Cryptographer audit 2026-06-05 verdict: YELLOW (ship #48/#144, address 3 cleanups next rev). Y2 closed by this comment. Y1 (migration/LLM.md double-SHAKE doc lies) closed in a sibling commit. Y3 (routerConfig placeholders) waits on #48 contract deploys to land real addresses.
37 lines
1.1 KiB
Bash
Executable File
37 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# scripts/checks/go-tests.sh — Go unit + e2e tests for the P3Q
|
|
# precompile.
|
|
#
|
|
# Skips when run outside the precompile module tree (e.g., bare
|
|
# checkout without the broader luxfi/precompile module).
|
|
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
cd "$REPO_ROOT"
|
|
|
|
if ! command -v go >/dev/null 2>&1; then
|
|
echo "==> [skip] go not on PATH; skipping Go tests"
|
|
exit 0
|
|
fi
|
|
|
|
# Only run if go.mod is reachable at module level — the precompile
|
|
# package depends on the surrounding luxfi/precompile module.
|
|
if [[ ! -f "../go.mod" && ! -f "../../go.mod" && ! -f "go.mod" ]]; then
|
|
echo "==> [skip] no surrounding go.mod found; skipping Go tests"
|
|
echo " (run \`cd ~/work/lux/precompile && go test ./p3q/...\` directly)"
|
|
exit 0
|
|
fi
|
|
|
|
echo "==> go vet ./..."
|
|
GOWORK=off GOFLAGS=-mod=mod go vet ./... || true
|
|
|
|
echo "==> go test -count=1 -race ./..."
|
|
if GOWORK=off GOFLAGS=-mod=mod go test -count=1 -race ./...; then
|
|
echo "==> done — Go test gate green"
|
|
exit 0
|
|
else
|
|
echo "==> [FAIL] Go tests failed"
|
|
exit 2
|
|
fi
|