Files
mesh-lab/asks/merge-check.sh
T
jschoubben 3a486014fc
mesh/merge-gate pass: the change touches no module of the mesh's graph
mesh/repo-check pass: THE CHANGE ALTERS ITS OWN CHECK (merge-check.sh): main's version judged it; the change's judges the pull requests after it merges; it…
mesh/delivery superseded: a newer head of the same pull request
Prove the operator's answers end to end before anybody uses them (hq ADR 0259)
The bus the controller composes and raises, at its commit, for one machine; the mesh's runtime serving
the router and the Telegram channel on their own credentials; a fake Bot API as the phone. It links the
operator's account with the code shown on the desk, refuses an approval in the hour after a link,
performs an approval exactly once with who and how in the warrant and the router's record, refuses a
replayed tap and a redelivered warrant, tells the operator when another account answers, drops a tap from
a group, does nothing on Decline and on expiry, offers no approval while an agent can become root where
the channel runs, and has the bus refuse every forged warrant, ask and tap. live-acceptance.sh is the same
after rollout, with a drill the operator approves on the phone.
2026-10-09 11:08:42 +02:00

24 lines
761 B
Bash

#!/bin/sh
# The proof of the operator's answers (novox/hq ADR 0259): formatted, vetted, and run where the clones it
# builds are beside it (MESH_LAB_REPOS, or MESH_LAB_CONTROLLER, MESH_LAB_TOOLS and MESH_LAB_CATALOGUE);
# elsewhere it says NOT RUN and why. It takes about four minutes when it runs.
set -eu
cd "$(dirname "$0")"
export GOPRIVATE=git.novox.be
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "not gofmt'd:"
echo "$unformatted"
exit 1
fi
sh -n live-acceptance.sh
go vet ./...
out=$(mktemp)
status=0
go test -count=1 -timeout 25m -v -run '^TestTheOperatorsAnswerEndToEnd$' . >"$out" 2>&1 || status=$?
grep -E '^(--- | --- |ok|FAIL|PASS)|NOT RUN' "$out" || true
[ "$status" -eq 0 ] || tail -60 "$out"
rm -f "$out"
exit "$status"