A test that reads another repository judges what the check clones, never the desktop's checkout (issue 432) #217

Merged
mesh-admin merged 2 commits from fix/432-a-test-reads-what-it-carries into main 2026-10-11 01:21:15 +00:00
Contributor

Fixes novox/hq issue 432.

What was wrong

Seventeen test files read ../../../mesh-catalog or ../../../mesh-host directly. On a desktop, the verdict depended on whatever checkout sat beside the controller: a stale or dirty one failed the tests (a leftover cloudflare-dns/ build directory, a node-engine checkout 150 commits behind). Where no sibling was found, the tests skipped and printed nothing.

On the build node, the build seat clones the catalogue (at main) and the node-engine (at the commit the mesh runs) beside the check (besideRefs, MESH_CHECK_BESIDE). So these tests most likely do run in mesh/repo-check. That conclusion comes from reading the code: go test without -v prints no skips, so the build node's log cannot confirm it. A missing clone there would still have been a silent skip.

What changes

  • A new package, internal/beside, gives every such test its input. When MESH_CHECK_BESIDE is set (the merge check sets it), the test reads $MESH_CHECK_BESIDE/<repo>, and a repository missing there fails the test instead of skipping it. Anywhere else, the test reads a copy captured in testdata/beside at the commits named in testdata/beside/CAPTURED (mesh-catalog b9de0018, mesh-host bd5cc698). A developer's own checkout is never read unless they set the variable themselves.
  • The captured manifests are stored as module.json.captured and renamed to module.json in a temporary directory during the test. A module.json committed anywhere in this repository would count as a new module to the forge's announcer and to the planner (touchedBy), and the merge would build and register 125 copies of the catalogue's modules.
  • Every skip-when-absent in these tests is now a failure, including the "no manifests read" skips.
  • TestTheRetiredNetworkingModulesAreNotInTheCatalogue counts a module only when its directory holds a manifest. A leftover build directory no longer fails it.
  • TestTheBuilderRequiresTheRegistryTheNpmSeatDelivers read the builder module, which ADR 0190 retired. Since then it skipped without a word. It now reads build-agent, and it passes.
  • TestTheCataloguesBarRendersEveryExampleOfTheShape: its skip is now a failure.
  • TestTheServiceManagerReadsTheSystemdRenderingAsMeant: systemd's generator also reads the machine's own environment.d directories, and nothing can point it elsewhere. The desktop's snapd file appended /var/lib/snapd/snap/bin to PATH, which is why this test failed on main. The test now runs the generator once without the mesh's file and leaves what the machine adds out of the verdict. Where no generator exists (the toolchain image), it skips with a NOT JUDGED message naming the byte-for-byte test that holds the rendering there.

Not changed

  • internal/link/conformance_test.go still reads ../../../mesh-sdk. It is outside this change because open PRs touch internal/link; it is a follow-up.
  • TestPlacedDirectoriesKeepTheirPaths is a by-hand comparison of two catalogue checkouts that runs only when asked (MESH_CATALOGUE_BEFORE). It guards nothing in a check and is left as it is.

Checked

  • go vet ./... passes, and go test -count=1 passes for internal/catalogue, internal/broker, internal/testbus and cmd/mesh-controller (the store-backed tests skip without MESH_TEST_POSTGRES). make check was not run.
  • Each converted test still fails when what it guards is broken:
    • cloudflare-dns/module.json brought back, and route-proxy requiring acme-ca: the retired-modules test fails.
    • A leftover cloudflare-dns/dist directory with no manifest: the test passes.
    • MESH_CHECK_BESIDE pointing at a directory with no catalogue: the tests fail with "not beside this check".
    • The bus image pinned to 9.9.9: the testbus test fails.
    • The template's accounts file removed: the broker genesis test fails.
    • claimProblems broken: three tests fail (TestEveryCatalogueManifestParses, TestEveryManifestInUseClaimsASeatTheMeshDefines, TestModuleCheckPassesTheCatalogue).
    • The second PATH line of the systemd rendering overwriting PATH: the systemd reading test fails.
Fixes novox/hq issue 432. ## What was wrong Seventeen test files read `../../../mesh-catalog` or `../../../mesh-host` directly. On a desktop, the verdict depended on whatever checkout sat beside the controller: a stale or dirty one failed the tests (a leftover `cloudflare-dns/` build directory, a node-engine checkout 150 commits behind). Where no sibling was found, the tests skipped and printed nothing. On the build node, the build seat clones the catalogue (at main) and the node-engine (at the commit the mesh runs) beside the check (`besideRefs`, `MESH_CHECK_BESIDE`). So these tests most likely do run in `mesh/repo-check`. That conclusion comes from reading the code: `go test` without `-v` prints no skips, so the build node's log cannot confirm it. A missing clone there would still have been a silent skip. ## What changes - A new package, `internal/beside`, gives every such test its input. When `MESH_CHECK_BESIDE` is set (the merge check sets it), the test reads `$MESH_CHECK_BESIDE/<repo>`, and a repository missing there **fails** the test instead of skipping it. Anywhere else, the test reads a copy captured in `testdata/beside` at the commits named in `testdata/beside/CAPTURED` (mesh-catalog `b9de0018`, mesh-host `bd5cc698`). A developer's own checkout is never read unless they set the variable themselves. - The captured manifests are stored as `module.json.captured` and renamed to `module.json` in a temporary directory during the test. A `module.json` committed anywhere in this repository would count as a new module to the forge's announcer and to the planner (`touchedBy`), and the merge would build and register 125 copies of the catalogue's modules. - Every skip-when-absent in these tests is now a failure, including the "no manifests read" skips. - `TestTheRetiredNetworkingModulesAreNotInTheCatalogue` counts a module only when its directory holds a manifest. A leftover build directory no longer fails it. - `TestTheBuilderRequiresTheRegistryTheNpmSeatDelivers` read the `builder` module, which ADR 0190 retired. Since then it skipped without a word. It now reads `build-agent`, and it passes. - `TestTheCataloguesBarRendersEveryExampleOfTheShape`: its skip is now a failure. - `TestTheServiceManagerReadsTheSystemdRenderingAsMeant`: systemd's generator also reads the machine's own environment.d directories, and nothing can point it elsewhere. The desktop's snapd file appended `/var/lib/snapd/snap/bin` to PATH, which is why this test failed on main. The test now runs the generator once without the mesh's file and leaves what the machine adds out of the verdict. Where no generator exists (the toolchain image), it skips with a `NOT JUDGED` message naming the byte-for-byte test that holds the rendering there. ## Not changed - `internal/link/conformance_test.go` still reads `../../../mesh-sdk`. It is outside this change because open PRs touch `internal/link`; it is a follow-up. - `TestPlacedDirectoriesKeepTheirPaths` is a by-hand comparison of two catalogue checkouts that runs only when asked (`MESH_CATALOGUE_BEFORE`). It guards nothing in a check and is left as it is. ## Checked - `go vet ./...` passes, and `go test -count=1` passes for `internal/catalogue`, `internal/broker`, `internal/testbus` and `cmd/mesh-controller` (the store-backed tests skip without `MESH_TEST_POSTGRES`). `make check` was not run. - Each converted test still fails when what it guards is broken: - `cloudflare-dns/module.json` brought back, and `route-proxy` requiring `acme-ca`: the retired-modules test fails. - A leftover `cloudflare-dns/dist` directory with no manifest: the test passes. - `MESH_CHECK_BESIDE` pointing at a directory with no catalogue: the tests fail with "not beside this check". - The bus image pinned to 9.9.9: the testbus test fails. - The template's accounts file removed: the broker genesis test fails. - `claimProblems` broken: three tests fail (`TestEveryCatalogueManifestParses`, `TestEveryManifestInUseClaimsASeatTheMeshDefines`, `TestModuleCheckPassesTheCatalogue`). - The second PATH line of the systemd rendering overwriting PATH: the systemd reading test fails.
mesh-admin added 1 commit 2026-10-11 00:55:26 +00:00
Judge tests that read another repository against what the check clones, never the desktop's checkout (issue 432)
mesh/merge-gate pass: the change touches no module of the mesh's graph
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery superseded: a newer head of the same pull request
eb72075104
Tests that read ../../../mesh-catalog or ../../../mesh-host gave a verdict
that depended on what sat beside the checkout: a stale or dirty sibling
failed them on a desktop, and a missing one skipped them unseen. They now
read the clone the build seat puts in MESH_CHECK_BESIDE, failing when it is
absent there, and elsewhere a copy captured at a named commit.

The skip had hidden that the builder test read a module retired by ADR 0190.
The systemd reading test no longer counts the machine's own environment.d.
Author
Contributor

Delivery novox/mesh-controller@68fbd99e8944 — delivered since 2026-10-11T01:21:32Z

Delivery plan — builds nothing: the change touches no module of the mesh's graph

Transitions

  • 2026-10-11 01:00 (new) → proposed (announced): novox/mesh-controller#217's head announced
  • 2026-10-11 01:05 proposed → checked (checked): the verdict names this commit
  • 2026-10-11 01:05 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-11 01:21 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
  • 2026-10-11 01:21 published → delivered (done): nothing for a walk to move

The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-controller@68fbd99e8944` — **delivered** since 2026-10-11T01:21:32Z **Delivery plan** — builds nothing: the change touches no module of the mesh's graph **Transitions** - 2026-10-11 01:00 (new) → proposed (announced): novox/mesh-controller#217's head announced - 2026-10-11 01:05 proposed → checked (checked): the verdict names this commit - 2026-10-11 01:05 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-11 01:21 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move - 2026-10-11 01:21 published → delivered (done): nothing for a walk to move The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
jschoubben added 1 commit 2026-10-11 01:00:31 +00:00
Say how a check's clones are chosen and what the captured copy carries (issue 432 review)
mesh/merge-gate pass: the change touches no module of the mesh's graph
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
68fbd99e89
mesh-admin merged commit 8305e4e3d1 into main 2026-10-11 01:21:15 +00:00
mesh-admin deleted branch fix/432-a-test-reads-what-it-carries 2026-10-11 01:21:15 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-controller#217