mesh/merge-gate head 21d038d3397c merged into trunk 5d70eb3e35a9 — pass, with a note: builds mesh-tools, node-tools (+39 dependent(s)) → ace, g14, novox, s…
mesh/repo-check head 21d038d3397c merged into trunk 5d70eb3e35a9 — pass: THE CHANGE ALTERS ITS OWN CHECK (merge-check.sh): main's version judged it; the ch…
mesh/delivery delivered
Closing the console shut its server down with a context that never ends, so a stop or restart of the tool runner waited on any mesh_wait in flight for up to ten minutes. The server's base context is now cancelled first, ending every wait at once, with a five-second shutdown as a backstop (second review of issue 745). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
3.9 KiB
Bash
56 lines
3.9 KiB
Bash
#!/bin/sh
|
|
# mesh-check-toolchain: go
|
|
#
|
|
# The tool runtime'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 Go toolchain — and by hand.
|
|
#
|
|
# The gate — every machine of the facts snapshot composed with this change — is the build seat's first
|
|
# layer (`mesh/merge-gate`), run because the mesh's module graph builds node-tools and mesh-tools from
|
|
# here. This is the code's own: node-tools (Go) formatted, vetted and its suite, every test on a bus of its
|
|
# own at the release the mesh runs (internal/meshtest), packages in parallel, under the race detector when
|
|
# the toolchain has a C compiler.
|
|
#
|
|
# **Said, never passed silently**: the runtime's and the console's tests launch TypeScript and Python
|
|
# bundles that import the mesh's own package (@novox/mesh-sdk), which comes from the package registry — and
|
|
# a check of code nobody has approved is given no credential for it. Where node and that package are not
|
|
# present those two packages are not tested here, and the TypeScript in node-tools/src neither.
|
|
set -eu
|
|
cd node-tools
|
|
|
|
unformatted=$(gofmt -l cmd internal)
|
|
if [ -n "$unformatted" ]; then
|
|
echo "not gofmt'd:"
|
|
echo "$unformatted"
|
|
exit 1
|
|
fi
|
|
CGO_ENABLED=0 go vet ./...
|
|
|
|
packages=$(go list ./...)
|
|
bundleless=""
|
|
if ! command -v node >/dev/null 2>&1 || [ ! -d node_modules/@novox/mesh-sdk ]; then
|
|
echo "NOT TESTED HERE: internal/runtime and internal/console launch bundles that need node and @novox/mesh-sdk"
|
|
packages=$(printf '%s\n' "$packages" | grep -v -e '/internal/runtime$' -e '/internal/console$')
|
|
# What of the console launches no bundle runs anyway: how an address resolves (novox/hq issue 287),
|
|
# and how a search ranks (novox/hq ADR 0245), and what discovery heard and how a round that heard nothing is
|
|
# answered (novox/hq issue 554), and how a session waits on the bus (novox/hq ADR 0367).
|
|
bundleless='^(TestMeshWait.*|TestTheManifestNamesTheFirstFamiliesOneByOne|TestASeatAndAModuleOfOneNameAreEachReached|TestSearch.*|TestASearchByCommandSaysWhatItReplaces|TestARuntimeThatAnswersLateIsFoundAndOneThatNeverDoesIsNamed|TestARuntimeHeardBeforeAndNotNowIsNamed|TestACallAfterARoundThatHeardNothingUsesWhatWasHeardBefore|TestAnAddressKnownOnlyFromAnEarlierAnswerSaysHowOld)$'
|
|
# And what of the runtime launches no bundle: how a bundle's seat traffic reaches the bus, what its
|
|
# environment holds, what a runtime on a module's own account serves (novox/hq ADR 0259), and that a write
|
|
# by compare-and-set loses no update under contention (novox/hq research 042), and a module's log verbs
|
|
# (novox/hq ADR 0297), and a key's history (novox/hq ADR 0307).
|
|
runtimeless='^(TestALogAnswersEachVerbOnTheBus|TestALogPageIsBoundedByItsBytes|TestAnAppendAtAStaleExpectIsRefusedAsALostUpdate|TestALogNotIssuedIsRefusedWithTheReason|TestWhatALogCannotHoldIsRefusedWithTheReason|TestALogRefusesAValueNamingACredential|TestAKeysHistoryIsEveryValueKeptOldestFirst|TestAKeysHistoryIsRefusedToAModuleNotIssuedTheState|TestARuntimeOnAModulesOwnAccountServesThatModuleAlone|TestNoBusWordReachesABundle|TestAToolCallNeverReachesASeatsEventAcceptOrProof|TestABundlesSeatTrafficGoesThroughItsModulesBus|TestALostCompareAndSetCarriesItsCode|TestTwoWritersIncrementingOneCounterOnTheBusLoseNoUpdate|TestAStaleWriteIsRefusedAndWritesNothing|TestACallOnTheCallerNamedSubjectReachesTheModuleWithItsCaller|TestTheSubjectThatNamesNoCallerStillWorksAndNamesNone)$'
|
|
fi
|
|
if command -v gcc >/dev/null 2>&1; then
|
|
CGO_ENABLED=1 go test -race -count=1 $packages
|
|
else
|
|
echo "NOT RACE-CHECKED: the toolchain holds no C compiler; the suite runs without the race detector"
|
|
CGO_ENABLED=0 go test -count=1 $packages
|
|
fi
|
|
if [ -n "$bundleless" ]; then
|
|
CGO_ENABLED=0 go test -count=1 -run "$bundleless" ./internal/console
|
|
fi
|
|
if [ -n "${runtimeless:-}" ]; then
|
|
CGO_ENABLED=0 go test -count=1 -run "$runtimeless" ./internal/runtime
|
|
fi
|
|
echo "NOT TESTED HERE: node-tools/src (TypeScript) needs @novox/mesh-sdk from the package registry"
|