summaryrefslogtreecommitdiff
path: root/scripts/verify
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-16 19:46:44 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-16 19:46:44 +0000
commit17a36cc83980d278a8cab5132bf14de731b352ca (patch)
tree3eceb94fd0467492668692b1a0e4f840a941c9cf /scripts/verify
parentc2aa026f6ce1c9e216b99d74f294fc133d5fcddd (diff)
fix: repair test regressions and add pre-commit/pre-push verification gates
Fix four pre-existing bugs exposed after resolving a build failure: - sandboxCloneSource: accept any URL scheme for origin remote (was filtering out https://) - setupSandbox callers: fix := shadow variable so sandboxDir is set on BlockedError - parseGeminiStream: parse result lines to return execution errors and cost - TestElaborateTask_InvalidJSONFromClaude: stub Gemini fallback so test is hermetic Add verification infrastructure: - scripts/verify: runs go build + go test -race, used by hooks and deploy - scripts/hooks/pre-commit: blocks commits that don't compile - scripts/hooks/pre-push: blocks pushes where tests fail - scripts/install-hooks: symlinks version-controlled hooks into .git/hooks/ - scripts/deploy: runs scripts/verify before building the binary Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'scripts/verify')
-rw-r--r--scripts/verify17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/verify b/scripts/verify
new file mode 100644
index 0000000..4f9c52f
--- /dev/null
+++ b/scripts/verify
@@ -0,0 +1,17 @@
+#!/bin/bash
+# verify — Build and test the claudomator codebase
+# Usage: ./scripts/verify
+# Example: ./scripts/verify
+
+set -euo pipefail
+
+REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
+cd "${REPO_DIR}"
+
+echo "==> Building..."
+go build ./...
+
+echo "==> Testing (race detector on)..."
+go test -race ./...
+
+echo "==> All checks passed."