Files
mesh-lab/merge-check.sh
T
jschoubben a076ccfe51 Run the proof of the operator's answers in the Go toolchain on every pull request, and say NOT RUN loudly where it cannot
The review of 2026-10-09: the build seat runs the lab's merge-check.sh in the TypeScript toolchain, which
holds no Go, so the proof never ran there. It is now a declared part of its own (mesh-check-also), run
against the controller, runtime and catalogue cloned beside the lab; a missing clone or a controller
without the proof's fixture is said NOT RUN in capitals instead of failing every lab change.
2026-10-09 12:02:28 +02:00

38 lines
2.0 KiB
Bash

#!/bin/sh
# mesh-check-toolchain: typescript
# mesh-check-also: go replays/merge-check.sh
# mesh-check-also: go asks/merge-check.sh
#
# The lab's own check (novox/hq ADR 0237 as amended): the second layer of a pull request's merge check,
# `mesh/repo-check`, run by the build seat — and by hand.
#
# The mesh builds no module from the lab, so no gate runs for its pull requests (`mesh/merge-gate` says the
# change touches no module of the graph); this is all that is checked before a change to it merges. The lab
# is in two languages, and each part runs in its own toolchain's container (novox/hq issue 302):
#
# - this script, in the TypeScript toolchain: installed from the lock file, type-checked, sources and
# tests, and the unit suite;
# - replays/merge-check.sh, in the Go toolchain, declared above: the replays register and its prover
# formatted, vetted and compiled, and the register's own tests;
# - asks/merge-check.sh, in the Go toolchain, declared above: the proof of the operator's answers, run
# against the controller, runtime and catalogue cloned beside the lab (novox/hq ADR 0259).
#
# **Said, never passed silently**: the integration suite raises a lab on a workstation, and the replays
# raise containers through the container runtime — neither is given to code nobody has approved. The
# replays run from the lab's main, reviewed, in every gate of a core change; a change to them is proven by
# `go run ./replays/cmd/prove` by hand before it merges.
set -eu
npm ci --no-audit --no-fund --loglevel=error
npm run typecheck
npm test
# By hand, with Go at hand, the Go part runs here too; on the build seat it runs in the Go toolchain.
if command -v go >/dev/null 2>&1; then
sh replays/merge-check.sh
sh asks/merge-check.sh
else
echo "replays/ and asks/ (Go) are checked by their merge-check.sh, which the build seat runs in the Go toolchain"
fi
echo "NOT RUN HERE: the integration suite and the replays — they need a lab and the container runtime"