Phase 5: scaffold Crucible (sow-tools) — dispatcher + builder shims, container, PR-first CI, fail-closed (D11, D19).
This commit is contained in:
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
# Smoke test the built Crucible binaries:
|
||||
# - the dispatcher reports version + lists builders
|
||||
# - every builder fails closed (exit 70) until it is wired (Phase 5 scaffold)
|
||||
# - each standalone shim agrees with the dispatcher
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
bin=bin
|
||||
|
||||
[[ -x "${bin}/crucible" ]] || { echo "no ${bin}/crucible — run scripts/build-binaries.sh first" >&2; exit 1; }
|
||||
|
||||
"${bin}/crucible" version >/dev/null
|
||||
"${bin}/crucible" list >/dev/null
|
||||
|
||||
builders=(depot hak module topdata wiki)
|
||||
for b in "${builders[@]}"; do
|
||||
[[ -x "${bin}/crucible-${b}" ]] || { echo "missing ${bin}/crucible-${b}" >&2; exit 1; }
|
||||
|
||||
set +e
|
||||
"${bin}/crucible" "${b}" >/dev/null 2>&1
|
||||
via_dispatch=$?
|
||||
"${bin}/crucible-${b}" >/dev/null 2>&1
|
||||
via_shim=$?
|
||||
set -e
|
||||
|
||||
if [[ "${via_dispatch}" -ne 70 ]]; then
|
||||
echo "FAIL: crucible ${b} exit=${via_dispatch}, want 70 (unwired must fail closed)" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${via_shim}" -ne 70 ]]; then
|
||||
echo "FAIL: crucible-${b} exit=${via_shim}, want 70 (must match dispatcher)" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "smoke ok: dispatcher + ${#builders[@]} builders fail closed as expected"
|
||||
Reference in New Issue
Block a user