Genesis now writes the container runtime's trust of the mesh's registry itself. It does this at the registry step (step 7), before the registry is installed and before the push (step 8). It refuses before any push unless the runtime says it trusts every name. What can be known without writing is checked in preflight (step 1).
internal/bootstrap/trust.go:
RegistryNames returns the names to trust: the address given and the node's mesh name <node>.<suffix>. Both use the node's registry port Ports.Registry, never the module's default. Loopback is left out because dockerd trusts 127.0.0.0/8 already.
TrustTheRegistry writes them through internal/apply, with the same two resources the docker module declares: /etc/docker/daemon.json written into (into: json, beside every other key, ADR 0102) and docker.service reloaded on it, never restarted. A re-run changes nothing and does not reload. It then polls docker info --format '{{json .RegistryConfig}}' until each name is listed as not secure or falls in a trusted range. If one never does, it refuses with the names and says nothing was pushed.
RuntimeWillTakeTheTrust runs in preflight and writes nothing. It refuses three cases: daemon.json exists and is not a JSON object; docker.service is not loaded and active; dockerd was started with --insecure-registry, which makes it reject the same directive in its file and so ignore the reload.
bootstrap.go: steps 7 and 8 are now one function, RegistryAndPublish, so a test can hold their order. The result reports registry-trusted, and the dry run says which names would be trusted.
Why
Issue 92: genesis pushed the control plane's image to the plain-HTTP registry (ADR 0082) before anything told the runtime to trust it. The docker module, which writes that trust from the artifact store's reach, is applied long after the push. This builds the decision recorded on the issue on 2026-10-11:
genesis writes the trust itself, with the same writer, for every name the mesh uses for the registry;
the port comes from what the registry serves on the node;
the docker module takes the trust over afterwards;
genesis refuses if the runtime still does not trust the registry.
TLS and loading the image instead of pushing it were not taken.
Handover, and what it assumes
Genesis keeps no record of what it writes. A carried record would not survive: the retire step re-applies the bundle and removes any carried record the bundle does not name.
The docker module, applied later, declares the mesh name on the node's port. It finds that entry already in a file it has no record of, and under ADR 0102 takes it as its own. That entry does not change at the handover. The module's first apply usually still changes the file and reloads the runtime once, because it also writes live-restore, log-driver and log-opts. A reload stops nothing.
The address the operator gave, when it differs from the mesh name, stays in the file as part of the machine's own configuration, as the hand-written workaround would have.
Assumption, written in the code: the module takes the mesh name over only because its first apply on the node already declares it. Genesis assigns no docker module before the network step (16). If docker were applied earlier, while the reach is empty or 127.0.0.1:<port>, the mesh name would stay the machine's for good. Installing the node's seat holders earlier in genesis must revisit this.
The suffix: the mesh name's suffix is read from MESH_INTERNAL_SUFFIX (default internal), the same variable and default the controller's overlay.InternalName uses. Genesis reads it from its own environment and the controller from its own, so a mesh with a custom suffix must set it for both. The code is copied rather than imported, because the node-engine and its installer depend on nothing that must be installed first (ADR 0005 §3, "Static binary").
How it was tested
internal/bootstrap/trust_test.go uses a fake runtime that trusts whatever its file said at its last reload.
The order:TestNothingIsPushedToTheRegistryBeforeTheRuntimeTrustsIt drives RegistryAndPublish (steps 7 and 8) against a runtime that refuses a push to an untrusted registry with the error the first genesis met. It asserts that the reload and the docker info confirmation both come before the first docker tag or docker push. I checked that it fails both when the TrustTheRegistry call is removed and when it is moved after the publish.
Writing the trust: both names are written beside the machine's own keys and entries, with one reload and no restart or stop; a re-run does not reload. The port follows the node's setting, loopback is left out, and the suffix variable is honoured.
Refusals: a runtime that still refuses after the write is refused before any push. The preflight check refuses the three cases above, accepts a good runtime and an absent file, and never writes the file.
The handover: the docker module's declaration applied afterwards leaves the entry, does not reload, and records the entry as its own. An address inside a trusted range counts as trusted.
The ordering test does not run on the parent commit, because RegistryAndPublish did not exist there. It cannot serve as a replay laid over the parent. A replay that runs on the parent would be a mesh-lab bed whose base image does not pre-trust the documentation ranges, as review 73 describes.
The whole ./merge-check.sh passes locally.
Fixes issue 92.
## What
Genesis now writes the container runtime's trust of the mesh's registry itself. It does this at the registry step (step 7), before the registry is installed and before the push (step 8). It refuses before any push unless the runtime says it trusts every name. What can be known without writing is checked in preflight (step 1).
- `internal/bootstrap/trust.go`:
- `RegistryNames` returns the names to trust: the address given and the node's mesh name `<node>.<suffix>`. Both use the node's registry port `Ports.Registry`, never the module's default. Loopback is left out because dockerd trusts `127.0.0.0/8` already.
- `TrustTheRegistry` writes them through `internal/apply`, with the same two resources the `docker` module declares: `/etc/docker/daemon.json` written into (`into: json`, beside every other key, ADR 0102) and `docker.service` reloaded on it, never restarted. A re-run changes nothing and does not reload. It then polls `docker info --format '{{json .RegistryConfig}}'` until each name is listed as not secure or falls in a trusted range. If one never does, it refuses with the names and says nothing was pushed.
- `RuntimeWillTakeTheTrust` runs in preflight and writes nothing. It refuses three cases: `daemon.json` exists and is not a JSON object; `docker.service` is not loaded and active; dockerd was started with `--insecure-registry`, which makes it reject the same directive in its file and so ignore the reload.
- `bootstrap.go`: steps 7 and 8 are now one function, `RegistryAndPublish`, so a test can hold their order. The result reports `registry-trusted`, and the dry run says which names would be trusted.
## Why
Issue 92: genesis pushed the control plane's image to the plain-HTTP registry (ADR 0082) before anything told the runtime to trust it. The `docker` module, which writes that trust from the artifact store's reach, is applied long after the push. This builds the decision recorded on the issue on 2026-10-11:
- genesis writes the trust itself, with the same writer, for every name the mesh uses for the registry;
- the port comes from what the registry serves on the node;
- the `docker` module takes the trust over afterwards;
- genesis refuses if the runtime still does not trust the registry.
TLS and loading the image instead of pushing it were not taken.
## Handover, and what it assumes
Genesis keeps no record of what it writes. A carried record would not survive: the retire step re-applies the bundle and removes any carried record the bundle does not name.
The `docker` module, applied later, declares the mesh name on the node's port. It finds that entry already in a file it has no record of, and under ADR 0102 takes it as its own. That entry does not change at the handover. The module's first apply usually still changes the file and reloads the runtime once, because it also writes `live-restore`, `log-driver` and `log-opts`. A reload stops nothing.
The address the operator gave, when it differs from the mesh name, stays in the file as part of the machine's own configuration, as the hand-written workaround would have.
**Assumption, written in the code:** the module takes the mesh name over only because its first apply on the node already declares it. Genesis assigns no `docker` module before the network step (16). If `docker` were applied earlier, while the reach is empty or `127.0.0.1:<port>`, the mesh name would stay the machine's for good. Installing the node's seat holders earlier in genesis must revisit this.
**The suffix:** the mesh name's suffix is read from `MESH_INTERNAL_SUFFIX` (default `internal`), the same variable and default the controller's `overlay.InternalName` uses. Genesis reads it from its own environment and the controller from its own, so a mesh with a custom suffix must set it for both. The code is copied rather than imported, because the node-engine and its installer depend on nothing that must be installed first (ADR 0005 §3, "Static binary").
## How it was tested
`internal/bootstrap/trust_test.go` uses a fake runtime that trusts whatever its file said at its last reload.
- **The order:** `TestNothingIsPushedToTheRegistryBeforeTheRuntimeTrustsIt` drives `RegistryAndPublish` (steps 7 and 8) against a runtime that refuses a push to an untrusted registry with the error the first genesis met. It asserts that the reload and the `docker info` confirmation both come before the first `docker tag` or `docker push`. I checked that it fails both when the `TrustTheRegistry` call is removed and when it is moved after the publish.
- **Writing the trust:** both names are written beside the machine's own keys and entries, with one reload and no restart or stop; a re-run does not reload. The port follows the node's setting, loopback is left out, and the suffix variable is honoured.
- **Refusals:** a runtime that still refuses after the write is refused before any push. The preflight check refuses the three cases above, accepts a good runtime and an absent file, and never writes the file.
- **The handover:** the `docker` module's declaration applied afterwards leaves the entry, does not reload, and records the entry as its own. An address inside a trusted range counts as trusted.
The ordering test does not run on the parent commit, because `RegistryAndPublish` did not exist there. It cannot serve as a replay laid over the parent. A replay that runs on the parent would be a mesh-lab bed whose base image does not pre-trust the documentation ranges, as review 73 describes.
The whole `./merge-check.sh` passes locally.
Fixes issue 92.
Genesis pushed the control plane's image to the mesh's plain-HTTP registry
before anything told the container runtime to trust it; the docker module
that writes that trust is applied long after. Genesis now writes the trust
itself at the registry step, with the same into-json writer and a reload,
for the address given and the node's mesh name on the node's registry
port, and refuses before any push unless the runtime says it trusts each.
The docker module later finds the mesh name there and takes it over
without a change.
Deliverynovox/mesh-host@0818e4c29ae4 — delivered since 2026-10-12T14:36:21Z
Delivery plan — builds nothing: the change touches no module of the mesh's graph
Transitions
2026-10-12 14:29 (new) → proposed (announced): novox/mesh-host#91's head announced
2026-10-12 14:31 proposed → checked (checked): the verdict names this commit
2026-10-12 14:31 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
2026-10-12 14:36 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
2026-10-12 14:36 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-host@0818e4c29ae4` — **delivered** since 2026-10-12T14:36:21Z
**Delivery plan** — builds nothing: the change touches no module of the mesh's graph
**Transitions**
- 2026-10-12 14:29 (new) → proposed (announced): novox/mesh-host#91's head announced
- 2026-10-12 14:31 proposed → checked (checked): the verdict names this commit
- 2026-10-12 14:31 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
- 2026-10-12 14:36 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
- 2026-10-12 14:36 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`.
Independent review against issue 92's 2026-10-11 decision note, ADR 0082 and ADR 0102. I read the diff, the apply package's into-json writer, mesh-controller overlay and artifactStoreAddress on main, the catalogue's docker module on main, and the mesh-lab README and replays. Locally at the head, go vet ./..., go test -race ./internal/bootstrap ./internal/apply and ./merge-check.sh all pass.
Blocking
Nothing tests the fix itself, which is the order of the steps. The fault in issue 92 is that the push comes before the trust. I replaced the TrustTheRegistry call in Run with a no-op, and go test ./internal/bootstrap still passed. The new tests cover TrustTheRegistry on its own. No test fails if a later edit moves or drops the call, so the ordering the issue is about is not held by anything. Please add a test that holds the trust before any push: for example, split step 7–8 into a function that takes Deps and assert that no docker push or docker tag to the registry happens before the trust is written and confirmed. That test would also be the natural base for the replay (see 8).
Non-blocking (fix in the PR text or as a follow-up)
The PR body cites a wrong decision and step number. It says "tier 0 depends on nothing installed first (ADR 0041)". ADR 0041 is "Events are a relationship", so that citation is wrong. The body also says "step 9", but the code numbers the registry step 7 and the push step 8. The placement itself is right: the trust is written before InstallRegistry and before step 8's push, and the dry run names it.
The handover claim is stronger than the code. The comment and body say the docker module's later apply leaves the file unchanged and does not reload. That holds only for insecure-registries. The real module also writes live-restore, log-driver and log-opts, so its first apply usually changes the file and reloads once. A reload is harmless (it is not a restart), but the text should say so. The handover test models a module with only live-restore (pre-seeded) and insecure-registries.
Adoption also works only if the module's first apply on the node already declares <node>.<suffix>:<port>. addMembers adopts a present member only when there is no record (unrecorded). If the docker module were first applied while the controller's reach was empty or 127.0.0.1:<port> (artifactStoreAddress returns that for a holder that is not yet on the network), its record would exist without the mesh name. The mesh name would then stay "the machine's own" for good, and undeclaring would never remove it. Genesis does not assign docker before step 16 today, so this holds now. It breaks if genesis ever installs the node's seat holders (ADR 0207) early. Please name that assumption in the comment.
Preflight. The decision note asks that the runtime be checked after the write and refused with the reason. runtimeWillSpeakTo does this, and the refusal names the names and says nothing was pushed. However, a refusal now comes at step 7, after the foundation is applied and the node enrolled. Some checks need no write and could be done in step 1: /etc/docker/daemon.json must parse as a JSON object (applyInto refuses otherwise), docker.service must exist and be active, and insecure-registries must not already be a dockerd flag (dockerd rejects a directive given as both flag and file, so the reload is silently ignored). Suggested as a follow-up issue.
Checked and fine
ADR 0102 (merge, reload, re-run): the file is written through applyInto, so other keys and existing list members are kept and the original mode is kept. The service resource takes the ReloadService path (systemctl reload), never a restart. The test checks one reload and zero restarts or stops, and that a re-run neither writes nor reloads. The apply runs under store.Lock(o.State) with an empty known state and does not persist a record, so nothing the running host holds is removed.
Names:cmd/mesh-bootstrap reconciles --registry's port with Ports.Registry, so the address given and the mesh name use the port the registry is served on. The controller's reach for mesh-artifact-store is overlay.InternalName(holder) + ":" + port, or 127.0.0.1:<port> before the network. The builder pushes to that reach, the controller pulls from it, and the docker module trusts it, so <node>.<suffix>:<port> covers all three. Loopback is left out correctly, because dockerd trusts 127.0.0.0/8 by default. No other name (an overlay IP, the controller's own name) is used for this registry during genesis.
MESH_INTERNAL_SUFFIX: the default internal and the leading-dot trim match mesh-controller internal/overlay/names.go. There is one caveat: genesis reads the bootstrap process's environment, and the controller reads its own container's environment. A mesh with a custom suffix must set it in both places. That is worth one line in the comment.
The docker info poll: each call is bounded by o.Timeout (30 s), the whole poll by o.Wait (3 min), it polls every answerEvery and stops when the context is cancelled. On a refusal, failed(StepRegistry, …) returns before InstallRegistry and the push. untrusted reads IndexConfigs[name].Secure == false or an IP literal inside InsecureRegistryCIDRs, which matches how dockerd records the two kinds of entry. A missing docker or a podman machine fails earlier, at the apply (systemctl on docker.service), with "the registry's trust could not be written … Nothing has been pushed". That is a clear refusal, though the underlying cause is only in the wrapped error. On rootless docker, state: running would start the system docker.service. That is an edge genesis does not support anyway.
Statuses on the head:mesh/merge-gate success ("the change touches no module of the mesh's graph"), mesh/repo-check success ("its merge-check.sh passed"), and mesh/delivery success ("ready: it delivers once merged"). The earlier pending entries were superseded. No reviews existed before this one.
Replay (8)
replay-none would not be honest. A replay is feasible two ways:
In mesh-host: the ordering test asked for in 1. It can be laid over the parent commit only if it drives Run (or code that existed there) with fakes.
In mesh-lab, as a bed: the base image (src/lifecycle/base.ts) pre-trusts the documentation ranges in daemon.json, which hides the IP case, as the issue says. A bed that skips that line and runs mesh-bootstrap --registry <doc-range IP>:<port> would fail at step 8 on the parent commit and pass on this fix. The mesh-name case (anchor.internal:5000) is not covered by those ranges even today.
I recommend registering R92 as the bed variant, or as the in-repository test once item 1 exists.
Verdict: request changes at 41e640d66888072454a0b17eb01b8bc6aa182690
Independent review against issue 92's 2026-10-11 decision note, ADR 0082 and ADR 0102. I read the diff, the apply package's into-json writer, mesh-controller `overlay` and `artifactStoreAddress` on main, the catalogue's `docker` module on main, and the mesh-lab README and replays. Locally at the head, `go vet ./...`, `go test -race ./internal/bootstrap ./internal/apply` and `./merge-check.sh` all pass.
## Blocking
1. **Nothing tests the fix itself, which is the order of the steps.** The fault in issue 92 is that the push comes before the trust. I replaced the `TrustTheRegistry` call in `Run` with a no-op, and `go test ./internal/bootstrap` still passed. The new tests cover `TrustTheRegistry` on its own. No test fails if a later edit moves or drops the call, so the ordering the issue is about is not held by anything. Please add a test that holds the trust before any push: for example, split step 7–8 into a function that takes `Deps` and assert that no `docker push` or `docker tag` to the registry happens before the trust is written and confirmed. That test would also be the natural base for the replay (see 8).
## Non-blocking (fix in the PR text or as a follow-up)
2. **The PR body cites a wrong decision and step number.** It says "tier 0 depends on nothing installed first (ADR 0041)". ADR 0041 is "Events are a relationship", so that citation is wrong. The body also says "step 9", but the code numbers the registry step 7 and the push step 8. The placement itself is right: the trust is written before `InstallRegistry` and before step 8's push, and the dry run names it.
3. **The handover claim is stronger than the code.** The comment and body say the `docker` module's later apply leaves the file unchanged and does not reload. That holds only for `insecure-registries`. The real module also writes `live-restore`, `log-driver` and `log-opts`, so its first apply usually changes the file and reloads once. A reload is harmless (it is not a restart), but the text should say so. The handover test models a module with only `live-restore` (pre-seeded) and `insecure-registries`.
Adoption also works only if the module's **first** apply on the node already declares `<node>.<suffix>:<port>`. `addMembers` adopts a present member only when there is no record (`unrecorded`). If the `docker` module were first applied while the controller's reach was empty or `127.0.0.1:<port>` (`artifactStoreAddress` returns that for a holder that is not yet on the network), its record would exist without the mesh name. The mesh name would then stay "the machine's own" for good, and undeclaring would never remove it. Genesis does not assign `docker` before step 16 today, so this holds now. It breaks if genesis ever installs the node's seat holders (ADR 0207) early. Please name that assumption in the comment.
4. **Preflight.** The decision note asks that the runtime be checked after the write and refused with the reason. `runtimeWillSpeakTo` does this, and the refusal names the names and says nothing was pushed. However, a refusal now comes at step 7, after the foundation is applied and the node enrolled. Some checks need no write and could be done in step 1: `/etc/docker/daemon.json` must parse as a JSON object (`applyInto` refuses otherwise), `docker.service` must exist and be active, and `insecure-registries` must not already be a dockerd flag (dockerd rejects a directive given as both flag and file, so the reload is silently ignored). Suggested as a follow-up issue.
## Checked and fine
- **ADR 0102 (merge, reload, re-run):** the file is written through `applyInto`, so other keys and existing list members are kept and the original mode is kept. The service resource takes the `ReloadService` path (`systemctl reload`), never a restart. The test checks one reload and zero restarts or stops, and that a re-run neither writes nor reloads. The apply runs under `store.Lock(o.State)` with an empty known state and does not persist a record, so nothing the running host holds is removed.
- **Names:** `cmd/mesh-bootstrap` reconciles `--registry`'s port with `Ports.Registry`, so the address given and the mesh name use the port the registry is served on. The controller's reach for `mesh-artifact-store` is `overlay.InternalName(holder) + ":" + port`, or `127.0.0.1:<port>` before the network. The builder pushes to that reach, the controller pulls from it, and the docker module trusts it, so `<node>.<suffix>:<port>` covers all three. Loopback is left out correctly, because dockerd trusts `127.0.0.0/8` by default. No other name (an overlay IP, the controller's own name) is used for this registry during genesis.
- **`MESH_INTERNAL_SUFFIX`:** the default `internal` and the leading-dot trim match mesh-controller `internal/overlay/names.go`. There is one caveat: genesis reads the bootstrap process's environment, and the controller reads its own container's environment. A mesh with a custom suffix must set it in both places. That is worth one line in the comment.
- **The `docker info` poll:** each call is bounded by `o.Timeout` (30 s), the whole poll by `o.Wait` (3 min), it polls every `answerEvery` and stops when the context is cancelled. On a refusal, `failed(StepRegistry, …)` returns before `InstallRegistry` and the push. `untrusted` reads `IndexConfigs[name].Secure == false` or an IP literal inside `InsecureRegistryCIDRs`, which matches how dockerd records the two kinds of entry. A missing docker or a podman machine fails earlier, at the apply (`systemctl` on `docker.service`), with "the registry's trust could not be written … Nothing has been pushed". That is a clear refusal, though the underlying cause is only in the wrapped error. On rootless docker, `state: running` would start the system `docker.service`. That is an edge genesis does not support anyway.
- **Statuses on the head:** `mesh/merge-gate` success ("the change touches no module of the mesh's graph"), `mesh/repo-check` success ("its merge-check.sh passed"), and `mesh/delivery` success ("ready: it delivers once merged"). The earlier pending entries were superseded. No reviews existed before this one.
## Replay (8)
`replay-none` would not be honest. A replay is feasible two ways:
- **In mesh-host:** the ordering test asked for in 1. It can be laid over the parent commit only if it drives `Run` (or code that existed there) with fakes.
- **In mesh-lab, as a bed:** the base image (`src/lifecycle/base.ts`) pre-trusts the documentation ranges in `daemon.json`, which hides the IP case, as the issue says. A bed that skips that line and runs `mesh-bootstrap --registry <doc-range IP>:<port>` would fail at step 8 on the parent commit and pass on this fix. The mesh-name case (`anchor.internal:5000`) is not covered by those ranges even today.
I recommend registering R92 as the bed variant, or as the in-repository test once item 1 exists.
The fix is an order, and nothing failed if the trust call moved after the
push or went: steps 7 and 8 are now one function a test drives against a
runtime that refuses an untrusted push. Preflight now refuses, before
anything is raised, a runtime file that is no JSON object, a docker.service
that is not loaded and active, and a dockerd started with
--insecure-registry, which would refuse the reload. The comment names the
order the docker module's takeover rests on.
Re-review against review 73. Every point from it is addressed. Locally at this head, go vet ./..., go test -race ./internal/bootstrap ./internal/apply and ./merge-check.sh all pass. The three statuses on the head are green: mesh/merge-gate ("the change touches no module of the mesh's graph"), mesh/repo-check ("its merge-check.sh passed") and mesh/delivery ("ready: it delivers once merged").
Review 73, point by point
The order is now held by a test (was blocking). Steps 7 and 8 are one function, RegistryAndPublish. TestNothingIsPushedToTheRegistryBeforeTheRuntimeTrustsIt runs it against a runtime that refuses a push to an untrusted registry with the error the first genesis met. It asserts the order: reload, then the docker info confirmation, then the first tag or push. I checked that it fails both ways:
With the TrustTheRegistry call replaced by a no-op, the push is refused and the test fails.
With the call moved after PublishControlPlane, the push again comes first and the test fails.
One gap remains, and I am not blocking on it: Run calling RegistryAndPublish is itself untested. That one-line call is low risk.
PR text. It now says step 7 and step 8. "Depends on nothing that must be installed first" is now cited as ADR 0005 §3 ("Static binary"), which I checked in the knowledge base.
Assumption comment.trust.go now says that the docker module's first apply usually reloads the runtime once, for live-restore, log-driver and log-opts. It also names the order assumption (no docker module before the network step 16), what happens if that ever changes, and that installing seat holders earlier must revisit it.
Preflight.RuntimeWillTakeTheTrust runs in step 1, only when genesis pivots and only when there is a non-loopback name to trust. It refuses three cases: daemon.json exists and is not a JSON object, docker.service is not loaded and active, or dockerd was started with --insecure-registry. The table test covers each refusal, plus a good runtime and an absent file, and checks that the file is never written.
Suffix note. The comment says that genesis and the controller each read MESH_INTERNAL_SUFFIX from their own environment, so a custom suffix must be set for both.
Can the preflight check refuse a healthy machine?
Socket activation: the check runs after waitForRuntime and RefuseAMachineInUse, which have already had the daemon answer docker calls. A socket-activated docker.service is therefore active by then, not merely its socket.
Process name: the check reads only the arguments of MainPID's command line, never the program name. A wrapper or a renamed binary is no problem. Flags expanded from an EnvironmentFile appear in that command line, so they are caught. An unreadable /proc/<pid>/cmdline or a MainPID of 0 lets the machine pass rather than refusing it.
The flag refusal is correct even when the flag already trusts the right names. dockerd rejects a directive given both as a flag and in its file. Writing the file would then make the reload fail, and the next start of dockerd would fail outright. The docker module would hit the same conflict later.
Two narrow edges are refused by design. A runtime not run by systemd as docker.service (rootless docker, podman, a snap) is refused with a reason that says so. Genesis does not support those today, and the bundle declares docker.service itself.
One transient false refusal is possible. A unit caught mid-reload (ActiveState=reloading) would be refused. Re-running genesis clears it. I mention it only for completeness.
Replay
The PR text says correctly that the ordering test cannot run on the parent commit, because RegistryAndPublish did not exist there. As review 73 said, the replay that can run on the parent is a mesh-lab bed whose base image does not pre-trust the documentation ranges. Issue 92 should be resolved with that replay registered, or with a reason no replay exists if the bed is not built. A reason would be weak here, because the bed is feasible.
Verdict: approve at 0818e4c29ae48e5b909f4eec97f1130951448c35
Re-review against review 73. Every point from it is addressed. Locally at this head, `go vet ./...`, `go test -race ./internal/bootstrap ./internal/apply` and `./merge-check.sh` all pass. The three statuses on the head are green: `mesh/merge-gate` ("the change touches no module of the mesh's graph"), `mesh/repo-check` ("its merge-check.sh passed") and `mesh/delivery` ("ready: it delivers once merged").
## Review 73, point by point
1. **The order is now held by a test (was blocking).** Steps 7 and 8 are one function, `RegistryAndPublish`. `TestNothingIsPushedToTheRegistryBeforeTheRuntimeTrustsIt` runs it against a runtime that refuses a push to an untrusted registry with the error the first genesis met. It asserts the order: reload, then the `docker info` confirmation, then the first tag or push. I checked that it fails both ways:
- With the `TrustTheRegistry` call replaced by a no-op, the push is refused and the test fails.
- With the call moved after `PublishControlPlane`, the push again comes first and the test fails.
One gap remains, and I am not blocking on it: `Run` calling `RegistryAndPublish` is itself untested. That one-line call is low risk.
2. **PR text.** It now says step 7 and step 8. "Depends on nothing that must be installed first" is now cited as ADR 0005 §3 ("Static binary"), which I checked in the knowledge base.
3. **Assumption comment.** `trust.go` now says that the `docker` module's first apply usually reloads the runtime once, for `live-restore`, `log-driver` and `log-opts`. It also names the order assumption (no `docker` module before the network step 16), what happens if that ever changes, and that installing seat holders earlier must revisit it.
4. **Preflight.** `RuntimeWillTakeTheTrust` runs in step 1, only when genesis pivots and only when there is a non-loopback name to trust. It refuses three cases: `daemon.json` exists and is not a JSON object, `docker.service` is not loaded and active, or dockerd was started with `--insecure-registry`. The table test covers each refusal, plus a good runtime and an absent file, and checks that the file is never written.
5. **Suffix note.** The comment says that genesis and the controller each read `MESH_INTERNAL_SUFFIX` from their own environment, so a custom suffix must be set for both.
## Can the preflight check refuse a healthy machine?
- **Socket activation:** the check runs after `waitForRuntime` and `RefuseAMachineInUse`, which have already had the daemon answer `docker` calls. A socket-activated `docker.service` is therefore active by then, not merely its socket.
- **Process name:** the check reads only the arguments of `MainPID`'s command line, never the program name. A wrapper or a renamed binary is no problem. Flags expanded from an `EnvironmentFile` appear in that command line, so they are caught. An unreadable `/proc/<pid>/cmdline` or a `MainPID` of 0 lets the machine pass rather than refusing it.
- **The flag refusal is correct even when the flag already trusts the right names.** dockerd rejects a directive given both as a flag and in its file. Writing the file would then make the reload fail, and the next start of dockerd would fail outright. The `docker` module would hit the same conflict later.
- **Two narrow edges are refused by design.** A runtime not run by systemd as `docker.service` (rootless docker, podman, a snap) is refused with a reason that says so. Genesis does not support those today, and the bundle declares `docker.service` itself.
- **One transient false refusal is possible.** A unit caught mid-reload (`ActiveState=reloading`) would be refused. Re-running genesis clears it. I mention it only for completeness.
## Replay
The PR text says correctly that the ordering test cannot run on the parent commit, because `RegistryAndPublish` did not exist there. As review 73 said, the replay that can run on the parent is a mesh-lab bed whose base image does not pre-trust the documentation ranges. Issue 92 should be resolved with that replay registered, or with a reason no replay exists if the bed is not built. A reason would be weak here, because the bed is feasible.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Genesis now writes the container runtime's trust of the mesh's registry itself. It does this at the registry step (step 7), before the registry is installed and before the push (step 8). It refuses before any push unless the runtime says it trusts every name. What can be known without writing is checked in preflight (step 1).
internal/bootstrap/trust.go:RegistryNamesreturns the names to trust: the address given and the node's mesh name<node>.<suffix>. Both use the node's registry portPorts.Registry, never the module's default. Loopback is left out because dockerd trusts127.0.0.0/8already.TrustTheRegistrywrites them throughinternal/apply, with the same two resources thedockermodule declares:/etc/docker/daemon.jsonwritten into (into: json, beside every other key, ADR 0102) anddocker.servicereloaded on it, never restarted. A re-run changes nothing and does not reload. It then pollsdocker info --format '{{json .RegistryConfig}}'until each name is listed as not secure or falls in a trusted range. If one never does, it refuses with the names and says nothing was pushed.RuntimeWillTakeTheTrustruns in preflight and writes nothing. It refuses three cases:daemon.jsonexists and is not a JSON object;docker.serviceis not loaded and active; dockerd was started with--insecure-registry, which makes it reject the same directive in its file and so ignore the reload.bootstrap.go: steps 7 and 8 are now one function,RegistryAndPublish, so a test can hold their order. The result reportsregistry-trusted, and the dry run says which names would be trusted.Why
Issue 92: genesis pushed the control plane's image to the plain-HTTP registry (ADR 0082) before anything told the runtime to trust it. The
dockermodule, which writes that trust from the artifact store's reach, is applied long after the push. This builds the decision recorded on the issue on 2026-10-11:dockermodule takes the trust over afterwards;TLS and loading the image instead of pushing it were not taken.
Handover, and what it assumes
Genesis keeps no record of what it writes. A carried record would not survive: the retire step re-applies the bundle and removes any carried record the bundle does not name.
The
dockermodule, applied later, declares the mesh name on the node's port. It finds that entry already in a file it has no record of, and under ADR 0102 takes it as its own. That entry does not change at the handover. The module's first apply usually still changes the file and reloads the runtime once, because it also writeslive-restore,log-driverandlog-opts. A reload stops nothing.The address the operator gave, when it differs from the mesh name, stays in the file as part of the machine's own configuration, as the hand-written workaround would have.
Assumption, written in the code: the module takes the mesh name over only because its first apply on the node already declares it. Genesis assigns no
dockermodule before the network step (16). Ifdockerwere applied earlier, while the reach is empty or127.0.0.1:<port>, the mesh name would stay the machine's for good. Installing the node's seat holders earlier in genesis must revisit this.The suffix: the mesh name's suffix is read from
MESH_INTERNAL_SUFFIX(defaultinternal), the same variable and default the controller'soverlay.InternalNameuses. Genesis reads it from its own environment and the controller from its own, so a mesh with a custom suffix must set it for both. The code is copied rather than imported, because the node-engine and its installer depend on nothing that must be installed first (ADR 0005 §3, "Static binary").How it was tested
internal/bootstrap/trust_test.gouses a fake runtime that trusts whatever its file said at its last reload.TestNothingIsPushedToTheRegistryBeforeTheRuntimeTrustsItdrivesRegistryAndPublish(steps 7 and 8) against a runtime that refuses a push to an untrusted registry with the error the first genesis met. It asserts that the reload and thedocker infoconfirmation both come before the firstdocker tagordocker push. I checked that it fails both when theTrustTheRegistrycall is removed and when it is moved after the publish.dockermodule's declaration applied afterwards leaves the entry, does not reload, and records the entry as its own. An address inside a trusted range counts as trusted.The ordering test does not run on the parent commit, because
RegistryAndPublishdid not exist there. It cannot serve as a replay laid over the parent. A replay that runs on the parent would be a mesh-lab bed whose base image does not pre-trust the documentation ranges, as review 73 describes.The whole
./merge-check.shpasses locally.Fixes issue 92.
Delivery
novox/mesh-host@0818e4c29ae4— delivered since 2026-10-12T14:36:21ZDelivery plan — builds nothing: the change touches no module of the mesh's graph
Transitions
The commit's note under
refs/notes/mesh-plankeeps every transition:git log --notes=mesh-plan.Verdict: request changes at
41e640d668Independent review against issue 92's 2026-10-11 decision note, ADR 0082 and ADR 0102. I read the diff, the apply package's into-json writer, mesh-controller
overlayandartifactStoreAddresson main, the catalogue'sdockermodule on main, and the mesh-lab README and replays. Locally at the head,go vet ./...,go test -race ./internal/bootstrap ./internal/applyand./merge-check.shall pass.Blocking
TrustTheRegistrycall inRunwith a no-op, andgo test ./internal/bootstrapstill passed. The new tests coverTrustTheRegistryon its own. No test fails if a later edit moves or drops the call, so the ordering the issue is about is not held by anything. Please add a test that holds the trust before any push: for example, split step 7–8 into a function that takesDepsand assert that nodocker pushordocker tagto the registry happens before the trust is written and confirmed. That test would also be the natural base for the replay (see 8).Non-blocking (fix in the PR text or as a follow-up)
InstallRegistryand before step 8's push, and the dry run names it.dockermodule's later apply leaves the file unchanged and does not reload. That holds only forinsecure-registries. The real module also writeslive-restore,log-driverandlog-opts, so its first apply usually changes the file and reloads once. A reload is harmless (it is not a restart), but the text should say so. The handover test models a module with onlylive-restore(pre-seeded) andinsecure-registries.Adoption also works only if the module's first apply on the node already declares
<node>.<suffix>:<port>.addMembersadopts a present member only when there is no record (unrecorded). If thedockermodule were first applied while the controller's reach was empty or127.0.0.1:<port>(artifactStoreAddressreturns that for a holder that is not yet on the network), its record would exist without the mesh name. The mesh name would then stay "the machine's own" for good, and undeclaring would never remove it. Genesis does not assigndockerbefore step 16 today, so this holds now. It breaks if genesis ever installs the node's seat holders (ADR 0207) early. Please name that assumption in the comment.runtimeWillSpeakTodoes this, and the refusal names the names and says nothing was pushed. However, a refusal now comes at step 7, after the foundation is applied and the node enrolled. Some checks need no write and could be done in step 1:/etc/docker/daemon.jsonmust parse as a JSON object (applyIntorefuses otherwise),docker.servicemust exist and be active, andinsecure-registriesmust not already be a dockerd flag (dockerd rejects a directive given as both flag and file, so the reload is silently ignored). Suggested as a follow-up issue.Checked and fine
applyInto, so other keys and existing list members are kept and the original mode is kept. The service resource takes theReloadServicepath (systemctl reload), never a restart. The test checks one reload and zero restarts or stops, and that a re-run neither writes nor reloads. The apply runs understore.Lock(o.State)with an empty known state and does not persist a record, so nothing the running host holds is removed.cmd/mesh-bootstrapreconciles--registry's port withPorts.Registry, so the address given and the mesh name use the port the registry is served on. The controller's reach formesh-artifact-storeisoverlay.InternalName(holder) + ":" + port, or127.0.0.1:<port>before the network. The builder pushes to that reach, the controller pulls from it, and the docker module trusts it, so<node>.<suffix>:<port>covers all three. Loopback is left out correctly, because dockerd trusts127.0.0.0/8by default. No other name (an overlay IP, the controller's own name) is used for this registry during genesis.MESH_INTERNAL_SUFFIX: the defaultinternaland the leading-dot trim match mesh-controllerinternal/overlay/names.go. There is one caveat: genesis reads the bootstrap process's environment, and the controller reads its own container's environment. A mesh with a custom suffix must set it in both places. That is worth one line in the comment.docker infopoll: each call is bounded byo.Timeout(30 s), the whole poll byo.Wait(3 min), it polls everyanswerEveryand stops when the context is cancelled. On a refusal,failed(StepRegistry, …)returns beforeInstallRegistryand the push.untrustedreadsIndexConfigs[name].Secure == falseor an IP literal insideInsecureRegistryCIDRs, which matches how dockerd records the two kinds of entry. A missing docker or a podman machine fails earlier, at the apply (systemctlondocker.service), with "the registry's trust could not be written … Nothing has been pushed". That is a clear refusal, though the underlying cause is only in the wrapped error. On rootless docker,state: runningwould start the systemdocker.service. That is an edge genesis does not support anyway.mesh/merge-gatesuccess ("the change touches no module of the mesh's graph"),mesh/repo-checksuccess ("its merge-check.sh passed"), andmesh/deliverysuccess ("ready: it delivers once merged"). The earlier pending entries were superseded. No reviews existed before this one.Replay (8)
replay-nonewould not be honest. A replay is feasible two ways:Run(or code that existed there) with fakes.src/lifecycle/base.ts) pre-trusts the documentation ranges indaemon.json, which hides the IP case, as the issue says. A bed that skips that line and runsmesh-bootstrap --registry <doc-range IP>:<port>would fail at step 8 on the parent commit and pass on this fix. The mesh-name case (anchor.internal:5000) is not covered by those ranges even today.I recommend registering R92 as the bed variant, or as the in-repository test once item 1 exists.
Verdict: approve at
0818e4c29aRe-review against review 73. Every point from it is addressed. Locally at this head,
go vet ./...,go test -race ./internal/bootstrap ./internal/applyand./merge-check.shall pass. The three statuses on the head are green:mesh/merge-gate("the change touches no module of the mesh's graph"),mesh/repo-check("its merge-check.sh passed") andmesh/delivery("ready: it delivers once merged").Review 73, point by point
RegistryAndPublish.TestNothingIsPushedToTheRegistryBeforeTheRuntimeTrustsItruns it against a runtime that refuses a push to an untrusted registry with the error the first genesis met. It asserts the order: reload, then thedocker infoconfirmation, then the first tag or push. I checked that it fails both ways:TrustTheRegistrycall replaced by a no-op, the push is refused and the test fails.PublishControlPlane, the push again comes first and the test fails.One gap remains, and I am not blocking on it:
RuncallingRegistryAndPublishis itself untested. That one-line call is low risk.trust.gonow says that thedockermodule's first apply usually reloads the runtime once, forlive-restore,log-driverandlog-opts. It also names the order assumption (nodockermodule before the network step 16), what happens if that ever changes, and that installing seat holders earlier must revisit it.RuntimeWillTakeTheTrustruns in step 1, only when genesis pivots and only when there is a non-loopback name to trust. It refuses three cases:daemon.jsonexists and is not a JSON object,docker.serviceis not loaded and active, or dockerd was started with--insecure-registry. The table test covers each refusal, plus a good runtime and an absent file, and checks that the file is never written.MESH_INTERNAL_SUFFIXfrom their own environment, so a custom suffix must be set for both.Can the preflight check refuse a healthy machine?
waitForRuntimeandRefuseAMachineInUse, which have already had the daemon answerdockercalls. A socket-activateddocker.serviceis therefore active by then, not merely its socket.MainPID's command line, never the program name. A wrapper or a renamed binary is no problem. Flags expanded from anEnvironmentFileappear in that command line, so they are caught. An unreadable/proc/<pid>/cmdlineor aMainPIDof 0 lets the machine pass rather than refusing it.dockermodule would hit the same conflict later.docker.service(rootless docker, podman, a snap) is refused with a reason that says so. Genesis does not support those today, and the bundle declaresdocker.serviceitself.ActiveState=reloading) would be refused. Re-running genesis clears it. I mention it only for completeness.Replay
The PR text says correctly that the ordering test cannot run on the parent commit, because
RegistryAndPublishdid not exist there. As review 73 said, the replay that can run on the parent is a mesh-lab bed whose base image does not pre-trust the documentation ranges. Issue 92 should be resolved with that replay registered, or with a reason no replay exists if the bed is not built. A reason would be weak here, because the bed is feasible.