J26 item 1: build-node tests ask a stand-in registry, never the mesh's

Every TypeScript module of a fetch gets the registry's latest SDK (ADR 0573 §2,
A-284), so the harness's machine named the real registry and 11 tests (9 unit,
11 integration runs) reached the network; with the resolver down they failed.
The harness now serves a registry of the test's own holding one SDK release,
and the userconfig test reads its address from it.

Builds: design 47 G A-284, A-285

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-12 18:02:54 +01:00
parent ea4bb70a21
commit 49ab6c00ea
2 changed files with 7 additions and 8 deletions
@@ -207,9 +207,7 @@ func TestAnotherNovoxPackageIsInstalledFromTheRegistryThroughAUserconfig(t *test
files := typeScriptModule(`{"dependencies":{"@novox/other":"^1","lodash":"^4"}}`)
files["modules/m/package-lock.json"] = `{}`
m, f := fetchMachine(t, files, map[string]string{"@novox/other/index.js": "o", "lodash/index.js": "l"})
m.Toolchain.Registry = func() (Registry, error) {
return Registry{URL: "https://git.novox.be/api/packages/novox/npm/"}, nil
}
reg, _ := m.Toolchain.Registry()
var npmrc string
inner := f.effect
f.effect = func(c call) {
@@ -226,7 +224,7 @@ func TestAnotherNovoxPackageIsInstalledFromTheRegistryThroughAUserconfig(t *test
t.Fatal(err)
}
// Reads are anonymous (ADR 0346, CAT-BN3): the config names the scope's registry and no credential.
if !strings.Contains(npmrc, "@novox:registry=https://git.novox.be/api/packages/novox/npm/") || strings.Contains(npmrc, "_auth") {
if !strings.Contains(npmrc, "@novox:registry="+reg.URL+"\n") || strings.Contains(npmrc, "_auth") {
t.Errorf("npm ci was given the config %q", npmrc)
}
r := out.(FetchResult)