Artifact 92defb82cb0c502ed0928e082934fe19c5046ce32d1c27c123e7699c818b622b:
- Executable file
.githooks/pre-commit
— part of check-in
[eda7960b81]
at
2026-04-23 19:23:42
on branch trunk
— rename module to github.com/danmestas/EdgeSync
Fix the case-sensitive module path to match the actual GitHub repo URL (danmestas/EdgeSync). Remove tracked leaf/leaf binary and ignore .claude/skills/ scratchpad dirs. (user: [email protected], size: 1159) [annotate] [blame] [check-ins using] [more...]
#!/bin/sh # EdgeSync pre-commit hook # Runs fast tests (~8s) before every commit. # Full DST/sim sweep available via: make dst-full / make sim-full # # Install: git config core.hooksPath .githooks # Skip: git commit --no-verify (emergency only) set -e # run_test: suppress output on success, show full diagnostics on failure. run_test() { label="$1" shift if output=$("$@" 2>&1); then echo " $label: OK" else echo " $label: FAILED" echo "" echo "$output" echo "" exit 1 fi } echo "=== pre-commit: unit tests ===" run_test "leaf/agent" go test ./leaf/agent/ -short -count=1 -timeout=30s run_test "bridge/bridge" go test ./bridge/bridge/ -short -count=1 -timeout=30s echo "=== pre-commit: DST quick (1 seed) ===" run_test "dst" go test ./dst/ -run TestDST -count=1 -timeout=30s echo "=== pre-commit: sim unit tests ===" run_test "sim (unit)" go test ./sim/ -run "TestFaultProxy|TestGenerateSchedule|TestBuggify" -count=1 -timeout=30s echo "=== pre-commit: sim serve tests ===" run_test "sim (serve)" go test ./sim/ -run "TestServeHTTP|TestLeafToLeaf|TestAgentServe" -count=1 -timeout=60s echo "=== pre-commit: all passed (~8s) ==="