Check the SDK's own code before it merges (hq ADR 0237)

A merge-check.sh, the repository's layer of the mesh's merge check (mesh/repo-check), in
the TypeScript toolchain: install from the lock file, type-check, run the suite. The Go,
Python, Rust and C bindings are said as not tested there, never passed silently.
This commit is contained in:
jochen
2026-10-06 22:05:24 +02:00
parent 89da342b9a
commit 43b0dde771
+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
# mesh-check-toolchain: typescript
#
# The SDK'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 in the mesh's TypeScript toolchain — and by hand.
#
# The gate is the build seat's first layer (`mesh/merge-gate`), run because the mesh's module graph builds
# mesh-sdk from here — and every module whose build packages it. This is the SDK's own: the TypeScript
# spine every module imports, type-checked and its suite run, its dependencies installed from the lock
# file alone (public packages: the SDK depends on nothing of the mesh's).
#
# **Said, never passed silently**: the Go, Python, Rust and C bindings are not tested in this toolchain.
# The Go binding's tests run when a Go compiler is present (a person's run), and are said as not run when not.
set -eu
npm ci --no-audit --no-fund --loglevel=error
node node_modules/typescript/bin/tsc --noEmit
npm test
if command -v go >/dev/null 2>&1; then
(cd go && test -z "$(gofmt -l .)" && go vet ./... && go test -count=1 ./...)
else
echo "NOT TESTED HERE: go/ (the Go binding) — the TypeScript toolchain holds no Go compiler"
fi
echo "NOT TESTED HERE: python/, rust/, c/ — no toolchain of theirs runs a merge check"