From 622b414e4e49b82fe7a2b030111badf3923ccab7 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 31 Aug 2026 11:53:16 +0200 Subject: [PATCH] Take the resolver off before expecting a machine to leave the network MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mesh-resolver requires name resolution, which requires the network — so unassigning the domain module alone leaves the machine on the network, pulled back by its own requirement. The mesh was right and the test was wrong. Which is the requirement graph doing its job: a module cannot quietly lose something it depends on because somebody removed the thing that first brought it in. --- test/integration/mesh.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/integration/mesh.test.ts b/test/integration/mesh.test.ts index eab9188..166ab6b 100644 --- a/test/integration/mesh.test.ts +++ b/test/integration/mesh.test.ts @@ -1342,6 +1342,11 @@ test("every name under a machine resolves to that machine", { // It follows the machines. A node leaving the private network must stop being answered for, // because a wildcard pointing at nothing resolves and then hangs — where an unresolvable name // fails at once and says which name it was. + // + // Both, and that is not tidiness: `mesh-resolver` requires name resolution, which requires the + // network, so unassigning the domain module alone leaves the machine on the network — pulled + // back by its own requirement. The mesh was right and this test was wrong the first time. + await mesh("unassign laptop mesh-resolver"); await mesh("unassign laptop networking"); await mesh("push anchor"); await new Promise((r) => setTimeout(r, 15_000)); @@ -1354,7 +1359,6 @@ test("every name under a machine resolves to that machine", { await mesh("assign laptop networking"); await mesh("unassign anchor mesh-resolver"); - await mesh("unassign laptop mesh-resolver"); await mesh("push"); await new Promise((r) => setTimeout(r, 15_000)); });