From 43b0dde7710ded6d70c7e113ce5f90052484ebca Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 6 Oct 2026 22:05:24 +0200 Subject: [PATCH] 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. --- merge-check.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 merge-check.sh diff --git a/merge-check.sh b/merge-check.sh new file mode 100644 index 0000000..32c532f --- /dev/null +++ b/merge-check.sh @@ -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" -- 2.54.0