Why (issue 358; the decision note of 2026-10-11 asks for this first; review 47 on #87). #87 gives a mesh directory its mode and owner only through a walk from / that follows no link another account could make. A directory behind such a link is then refused and its module gated, and on the control-node that could stop mesh-controller or mesh-host. novox cannot be checked by any tool today. So the engine first learns to answer, read-only, which directories that walk would refuse. This merges and delivers before #87, and the list goes into #87's body.
What changes (the node-engine; nothing in how anything is applied)
internal/apply/mesh_dirs.go, mesh_dirs_linux.go: the walk #87 uses (from /, O_DIRECTORY|O_NOFOLLOW per component; a parent link followed only when the link is root's and every directory from / to it is root's and writable by no other account; anything else a LinkInPathError naming the link and who could replace it). Here only in its read-only mode, judgeMeshDir: a missing component ends the walk as placed (an apply would make it as root), and nothing is made, chmodded or chowned.
apply.JudgeDirectories(declaration): one line per declared directory: placed, would be refused: <why>, refused already by the placement guard: <why> (issue 339), or below the home … (ADR 0266's walk, unchanged). A first line counts them.
Over the bus: mesh.node.<node>.ask.judge-directories, a signed ask held to exactly the hand-over's checks (believed: signed by the mesh under its own context novox-mesh judge-directories v1, this node, unexpired, once, no path). The engine judges the declaration it keeps (store.ReadDeclared) and answers {said} on the reply. Wired like the setuid search (issue 361): HearDirectoryJudgements, Queue.JudgeDirectories, run.go.
At the machine: nox-mesh-host judge-directories, run as root, gives the same answer for a machine the controller cannot ask.
The controller half is not in this PR. The controller needs a terminal verb to sign and send the ask, plus the bus grants (engine subscribe on mesh.node.<node>.ask.judge-directories, controller publish), the same pieces as node setuid-search. Until those land, the ask has no sender, and the engine's subscription is refused by a bus whose user list lacks the grant. That refusal is said by the client and is harmless. The at-machine command works without them.
How it was tested
internal/apply/judge_directories_test.go: three directories (plain, behind a link in a world-writable tree, missing). The test checks they are said placed, would be refused (naming the link and every account), and placed. The missing one is not made, and no mode changes. A link only root could have made is followed and the directory said placed.
internal/link/judge_directories_test.go: the subject and context words; an ask refused under a setuid-search signature, for another node, with a path, expired, or taken twice; no answer without a reply subject.
./merge-check.sh green (gofmt, vet, every test under race; bus tests skipped, no nats-server here).
Part of issue 358 (the fix itself is #87, which rebases onto this).
**Why** (issue 358; the decision note of 2026-10-11 asks for this first; review 47 on #87). #87 gives a mesh directory its mode and owner only through a walk from `/` that follows no link another account could make. A directory behind such a link is then refused and its module gated, and on the control-node that could stop mesh-controller or mesh-host. novox cannot be checked by any tool today. So the engine first learns to answer, read-only, which directories that walk would refuse. This merges and delivers before #87, and the list goes into #87's body.
**What changes** (the node-engine; nothing in how anything is applied)
- `internal/apply/mesh_dirs.go`, `mesh_dirs_linux.go`: the walk #87 uses (from `/`, `O_DIRECTORY|O_NOFOLLOW` per component; a parent link followed only when the link is root's and every directory from `/` to it is root's and writable by no other account; anything else a `LinkInPathError` naming the link and who could replace it). Here only in its read-only mode, `judgeMeshDir`: a missing component ends the walk as placed (an apply would make it as root), and **nothing is made, chmodded or chowned**.
- `apply.JudgeDirectories(declaration)`: one line per declared directory: `placed`, `would be refused: <why>`, `refused already by the placement guard: <why>` (issue 339), or `below the home …` (ADR 0266's walk, unchanged). A first line counts them.
- **Over the bus**: `mesh.node.<node>.ask.judge-directories`, a signed ask held to exactly the hand-over's checks (`believed`: signed by the mesh under its own context `novox-mesh judge-directories v1`, this node, unexpired, once, no path). The engine judges the declaration it keeps (`store.ReadDeclared`) and answers `{said}` on the reply. Wired like the setuid search (issue 361): `HearDirectoryJudgements`, `Queue.JudgeDirectories`, `run.go`.
- **At the machine**: `nox-mesh-host judge-directories`, run as root, gives the same answer for a machine the controller cannot ask.
**The controller half is not in this PR.** The controller needs a terminal verb to sign and send the ask, plus the bus grants (engine subscribe on `mesh.node.<node>.ask.judge-directories`, controller publish), the same pieces as `node setuid-search`. Until those land, the ask has no sender, and the engine's subscription is refused by a bus whose user list lacks the grant. That refusal is said by the client and is harmless. The at-machine command works without them.
**How it was tested**
- `internal/apply/judge_directories_test.go`: three directories (plain, behind a link in a world-writable tree, missing). The test checks they are said placed, would be refused (naming the link and `every account`), and placed. The missing one is not made, and no mode changes. A link only root could have made is followed and the directory said placed.
- `internal/link/judge_directories_test.go`: the subject and context words; an ask refused under a setuid-search signature, for another node, with a path, expired, or taken twice; no answer without a reply subject.
- `./merge-check.sh` green (gofmt, vet, every test under race; bus tests skipped, no nats-server here).
Part of issue 358 (the fix itself is #87, which rebases onto this).
mesh/merge-gate pass: builds mesh-host → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
Once a mesh directory's mode and owner go only through a walk that follows no
link another account could make, a directory behind such a link is refused
and its module gated: on the control-node that could stop the controller.
The operator is to be told which directories that walk would refuse on every
node before it lands. So the engine judges the declaration it keeps with the
same walk, making and changing nothing: on a signed ask from the controller
(mesh.node.<node>.ask.judge-directories, held to the hand-over's checks) and
as `nox-mesh-host judge-directories` at the machine.
Deliverynovox/mesh-host@b92fb6811610 — delivered since 2026-10-12T13:04:14Z
Delivery plan — builds mesh-host → ace, g14, novox, shanks; no bus step
tier 0: mesh-host
ace: receives mesh-host
g14: receives mesh-host
novox: receives mesh-host
shanks: receives mesh-host
grants step: if this changes what the bus's user list says (a new tool, subject or user), novox is sent that list alone, every build there kept, before mesh-host is judged on its first machine
composed together: pass — every machine composes with the change as it did without (4 of 4 compose)
Machines
mesh-host on ace: passed — healthy 3 times over 2m31s
mesh-host on the rest running it: sent
Transitions
2026-10-12 11:58 (new) → proposed (announced): novox/mesh-host#88's head announced
2026-10-12 12:01 proposed → checked (checked): the verdict names this commit
2026-10-12 12:01 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
2026-10-12 13:00 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 13:00 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path — not a failed walk that carried a later commit for it, after which it waits for a walk of its own commit
2026-10-12 13:04 delivering → delivered (done): its walk is done, carrying its own commit: every machine of its deploy plan passed, or was left as its policy says
The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.
<!-- mesh-delivery:view -->
**Delivery** `novox/mesh-host@b92fb6811610` — **delivered** since 2026-10-12T13:04:14Z
**Delivery plan** — builds mesh-host → ace, g14, novox, shanks; no bus step
- tier 0: mesh-host
- ace: receives mesh-host
- g14: receives mesh-host
- novox: receives mesh-host
- shanks: receives mesh-host
- grants step: if this changes what the bus's user list says (a new tool, subject or user), novox is sent that list alone, every build there kept, before mesh-host is judged on its first machine
**Group** `fix/358-judge-directories-read-only`, in order: novox/mesh-controller@7385d9c092cc → novox/mesh-host@b92fb6811610
- novox/mesh-controller@7385d9c092cc before novox/mesh-host@b92fb6811610: built by, over engine before controller
- composed together: pass — every machine composes with the change as it did without (4 of 4 compose)
**Machines**
- mesh-host on ace: passed — healthy 3 times over 2m31s
- mesh-host on the rest running it: sent
**Transitions**
- 2026-10-12 11:58 (new) → proposed (announced): novox/mesh-host#88's head announced
- 2026-10-12 12:01 proposed → checked (checked): the verdict names this commit
- 2026-10-12 12:01 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
- 2026-10-12 13:00 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 13:00 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path — not a failed walk that carried a later commit for it, after which it waits for a walk of its own commit
- 2026-10-12 13:04 delivering → delivered (done): its walk is done, carrying its own commit: every machine of its deploy plan passed, or was left as its policy says
The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: mesh-host)
mesh/repo-check: PASS — its merge-check.sh passed
Delivery plan — builds mesh-host → ace, g14, novox, shanks; no bus step
tier 0: mesh-host
ace: receives mesh-host
g14: receives mesh-host
novox: receives mesh-host
shanks: receives mesh-host
grants step: if this changes what the bus's user list says (a new tool, subject or user), novox is sent that list alone, every build there kept, before mesh-host is judged on its first machine
read by no module's build: internal/apply/judge_directories_test.go, internal/link/judge_directories_test.go
Run by the build seat on shanks as build-1791806318433639409 (builds --log build-1791806318433639409).
--- the gate: mesh-host
mesh-host: ok
long-running resources without health: 0
files asking for a setting without saying whether it is trusted: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 0 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T11:52:38Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-12T11:52:38Z
machines:
- a machine (f35): composes
- holds mesh-dns-resolver (idt): composes
- holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
- a machine (yvbpsm): composes
a merge would rebuild 1 module(s) in 1 tier(s): mesh-host
notes:
- internal/apply/judge_directories_test.go and internal/link/judge_directories_test.go read by no module's build, and rebuild nothing (issue 280)
--- its merge-check.sh (go toolchain)
ok github.com/novox/mesh-host/cmd/mesh-bootstrap 1.011s
ok github.com/novox/mesh-host/cmd/mesh-host 5.648s
ok github.com/novox/mesh-host/examples 1.021s
ok github.com/novox/mesh-host/internal/accounts 1.512s
ok github.com/novox/mesh-host/internal/apply 5.941s
ok github.com/novox/mesh-host/internal/bootstrap 1.714s
ok github.com/novox/mesh-host/internal/bundle 1.045s
ok github.com/novox/mesh-host/internal/declaration 1.095s
ok github.com/novox/mesh-host/internal/firewall 1.869s
ok github.com/novox/mesh-host/internal/identity 1.139s
ok github.com/novox/mesh-host/internal/image 1.050s
ok github.com/novox/mesh-host/internal/inventory 1.056s
ok github.com/novox/mesh-host/internal/link 10.496s
ok github.com/novox/mesh-host/internal/liveness 2.159s
ok github.com/novox/mesh-host/internal/meshcli 1.597s
ok github.com/novox/mesh-host/internal/network 1.080s
ok github.com/novox/mesh-host/internal/outward 1.056s
ok github.com/novox/mesh-host/internal/profile 1.541s
ok github.com/novox/mesh-host/internal/reachable 1.050s
ok github.com/novox/mesh-host/internal/store 1.286s
ok github.com/novox/mesh-host/internal/system 1.058s
ok github.com/novox/mesh-host/internal/tunnel 1.055s
ok github.com/novox/mesh-host/internal/units 1.060s
ok github.com/novox/mesh-host/internal/upgrade 1.216s
ok github.com/novox/mesh-host/internal/witness 6.230s
ok github.com/novox/mesh-host/packaging 1.043s
? github.com/novox/mesh-host/rootsearch [no test files]
ok github.com/novox/mesh-host/validate 1.033s
**Merge check** at `b92fb681`
- `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: mesh-host)
- `mesh/repo-check`: **PASS** — its merge-check.sh passed
**Delivery plan** — builds mesh-host → ace, g14, novox, shanks; no bus step
- tier 0: mesh-host
- ace: receives mesh-host
- g14: receives mesh-host
- novox: receives mesh-host
- shanks: receives mesh-host
- grants step: if this changes what the bus's user list says (a new tool, subject or user), novox is sent that list alone, every build there kept, before mesh-host is judged on its first machine
- read by no module's build: internal/apply/judge_directories_test.go, internal/link/judge_directories_test.go
Run by the build seat on shanks as `build-1791806318433639409` (`builds --log build-1791806318433639409`).
```
--- the gate: mesh-host
mesh-host: ok
long-running resources without health: 0
files asking for a setting without saying whether it is trusted: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 0 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T11:52:38Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-12T11:52:38Z
machines:
- a machine (f35): composes
- holds mesh-dns-resolver (idt): composes
- holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
- a machine (yvbpsm): composes
a merge would rebuild 1 module(s) in 1 tier(s): mesh-host
notes:
- internal/apply/judge_directories_test.go and internal/link/judge_directories_test.go read by no module's build, and rebuild nothing (issue 280)
--- its merge-check.sh (go toolchain)
ok github.com/novox/mesh-host/cmd/mesh-bootstrap 1.011s
ok github.com/novox/mesh-host/cmd/mesh-host 5.648s
ok github.com/novox/mesh-host/examples 1.021s
ok github.com/novox/mesh-host/internal/accounts 1.512s
ok github.com/novox/mesh-host/internal/apply 5.941s
ok github.com/novox/mesh-host/internal/bootstrap 1.714s
ok github.com/novox/mesh-host/internal/bundle 1.045s
ok github.com/novox/mesh-host/internal/declaration 1.095s
ok github.com/novox/mesh-host/internal/firewall 1.869s
ok github.com/novox/mesh-host/internal/identity 1.139s
ok github.com/novox/mesh-host/internal/image 1.050s
ok github.com/novox/mesh-host/internal/inventory 1.056s
ok github.com/novox/mesh-host/internal/link 10.496s
ok github.com/novox/mesh-host/internal/liveness 2.159s
ok github.com/novox/mesh-host/internal/meshcli 1.597s
ok github.com/novox/mesh-host/internal/network 1.080s
ok github.com/novox/mesh-host/internal/outward 1.056s
ok github.com/novox/mesh-host/internal/profile 1.541s
ok github.com/novox/mesh-host/internal/reachable 1.050s
ok github.com/novox/mesh-host/internal/store 1.286s
ok github.com/novox/mesh-host/internal/system 1.058s
ok github.com/novox/mesh-host/internal/tunnel 1.055s
ok github.com/novox/mesh-host/internal/units 1.060s
ok github.com/novox/mesh-host/internal/upgrade 1.216s
ok github.com/novox/mesh-host/internal/witness 6.230s
ok github.com/novox/mesh-host/packaging 1.043s
? github.com/novox/mesh-host/rootsearch [no test files]
ok github.com/novox/mesh-host/validate 1.033s
```
Independent review of PR #88 (issue 358) at head b92fb68116. I made a fresh clone, read the whole diff and the code it calls (believed, refusePath, homeAbove), and ran go vet, go test -race ./... and ./merge-check.sh at this head (all green). GOOS=darwin go build ./... also builds.
Read-only: holds
judgeMeshDir builds a meshWalk with create=false, so the Mkdirat branch is never reached. A missing component returns errNotThereYet (fd closed) before any mkdir. The only system calls on the path are open("/"), openat(O_RDONLY|O_DIRECTORY|O_NOFOLLOW), fstat, fstatat(AT_SYMLINK_NOFOLLOW) and readlinkat. There is no mkdir, chmod, chown or rename on any path, error paths included. Every descriptor is closed on every return path I traced.
JudgeDirectories adds only refusePath (lstat and link resolution, no writes) and homeAbove. The test proves that nothing is made and that no mode changes, also for a directory that was not there.
Signed ask: matches the hand-over's
AnswerJudgeDirectories goes through the same believed as the hand-over and the setuid search. That means: body size capped (MaxHandOverAsk), signed by the mesh's key under its own context novox-mesh judge-directories v1, Node equal to this node, unexpired and not good for longer than an ask may be, a nonce of at least 16 bytes taken once, By one short line, and no path (withPath=false). The subscription builds HandOverCheck{Signer, Node} exactly as the other two do, and no answer is sent without a reply subject.
The tests cover a setuid-search signature, another node, a path, expired, taken twice and no reply subject. The handler is not reached on any refusal.
Answers bounded
The ask is bounded by believed. The answer is one line per declared directory plus a count line, so the declaration bounds it. There is no explicit cap. Non-blocking: if a declaration ever pushed the answer past the bus's maximum payload, Respond would fail silently and the asker would see a timeout. A cap with a "… and N more" line would make that failure loud.
Judges what an apply would
It is the same walk (meshWalk.fromRoot) that #87's openMeshDir uses with create=true. A missing component is said placed, which is correct because the apply makes it as root in a directory the walk reached. The guard's refusals (issue 339) and below-home directories (ADR 0266) are said separately, in the same order refusedPlaces judges them in #87.
Non-blocking: JudgeDirectories does not skip handed-over directories, and #87's apply does skip them. The apply gives a handed-over directory its own walk, which refuses any link. So a handed-over directory behind a root-only link such as /var/run would be said placed here and refused by the apply. That refusal is not new with issue 358, so this does not distort the survey #87 needs. A fourth line kind ("handed over: its own walk, which follows no link") would make the judgement exact.
Checks: mesh/merge-gate pass (4 of 4 compose) and mesh/repo-check pass at b92fb68. The base is main 3f7f797.
The controller half (the terminal verb that signs and sends the ask, plus the bus grants) is not here, as the body says. Until it exists, novox's list comes only from nox-mesh-host judge-directories run as root at novox's terminal.
Verdict: approve at b92fb68
Independent review of PR #88 (issue 358) at head b92fb6811610. I made a fresh clone, read the whole diff and the code it calls (`believed`, `refusePath`, `homeAbove`), and ran `go vet`, `go test -race ./...` and `./merge-check.sh` at this head (all green). `GOOS=darwin go build ./...` also builds.
**Read-only: holds**
- `judgeMeshDir` builds a `meshWalk` with `create=false`, so the `Mkdirat` branch is never reached. A missing component returns `errNotThereYet` (fd closed) before any mkdir. The only system calls on the path are `open("/")`, `openat(O_RDONLY|O_DIRECTORY|O_NOFOLLOW)`, `fstat`, `fstatat(AT_SYMLINK_NOFOLLOW)` and `readlinkat`. There is no mkdir, chmod, chown or rename on any path, error paths included. Every descriptor is closed on every return path I traced.
- `JudgeDirectories` adds only `refusePath` (lstat and link resolution, no writes) and `homeAbove`. The test proves that nothing is made and that no mode changes, also for a directory that was not there.
**Signed ask: matches the hand-over's**
- `AnswerJudgeDirectories` goes through the same `believed` as the hand-over and the setuid search. That means: body size capped (`MaxHandOverAsk`), signed by the mesh's key under its own context `novox-mesh judge-directories v1`, `Node` equal to this node, unexpired and not good for longer than an ask may be, a nonce of at least 16 bytes taken once, `By` one short line, and no path (`withPath=false`). The subscription builds `HandOverCheck{Signer, Node}` exactly as the other two do, and no answer is sent without a reply subject.
- The tests cover a setuid-search signature, another node, a path, expired, taken twice and no reply subject. The handler is not reached on any refusal.
**Answers bounded**
- The ask is bounded by `believed`. The answer is one line per declared directory plus a count line, so the declaration bounds it. There is no explicit cap. Non-blocking: if a declaration ever pushed the answer past the bus's maximum payload, `Respond` would fail silently and the asker would see a timeout. A cap with a "… and N more" line would make that failure loud.
**Judges what an apply would**
- It is the same walk (`meshWalk.fromRoot`) that #87's `openMeshDir` uses with `create=true`. A missing component is said placed, which is correct because the apply makes it as root in a directory the walk reached. The guard's refusals (issue 339) and below-home directories (ADR 0266) are said separately, in the same order `refusedPlaces` judges them in #87.
- Non-blocking: `JudgeDirectories` does not skip handed-over directories, and #87's apply does skip them. The apply gives a handed-over directory its own walk, which refuses any link. So a handed-over directory behind a root-only link such as `/var/run` would be said `placed` here and refused by the apply. That refusal is not new with issue 358, so this does not distort the survey #87 needs. A fourth line kind ("handed over: its own walk, which follows no link") would make the judgement exact.
**Checks**: mesh/merge-gate pass (4 of 4 compose) and mesh/repo-check pass at b92fb68. The base is main 3f7f797.
The controller half (the terminal verb that signs and sends the ask, plus the bus grants) is not here, as the body says. Until it exists, novox's list comes only from `nox-mesh-host judge-directories` run as root at novox's terminal.
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.
Why (issue 358; the decision note of 2026-10-11 asks for this first; review 47 on #87). #87 gives a mesh directory its mode and owner only through a walk from
/that follows no link another account could make. A directory behind such a link is then refused and its module gated, and on the control-node that could stop mesh-controller or mesh-host. novox cannot be checked by any tool today. So the engine first learns to answer, read-only, which directories that walk would refuse. This merges and delivers before #87, and the list goes into #87's body.What changes (the node-engine; nothing in how anything is applied)
internal/apply/mesh_dirs.go,mesh_dirs_linux.go: the walk #87 uses (from/,O_DIRECTORY|O_NOFOLLOWper component; a parent link followed only when the link is root's and every directory from/to it is root's and writable by no other account; anything else aLinkInPathErrornaming the link and who could replace it). Here only in its read-only mode,judgeMeshDir: a missing component ends the walk as placed (an apply would make it as root), and nothing is made, chmodded or chowned.apply.JudgeDirectories(declaration): one line per declared directory:placed,would be refused: <why>,refused already by the placement guard: <why>(issue 339), orbelow the home …(ADR 0266's walk, unchanged). A first line counts them.mesh.node.<node>.ask.judge-directories, a signed ask held to exactly the hand-over's checks (believed: signed by the mesh under its own contextnovox-mesh judge-directories v1, this node, unexpired, once, no path). The engine judges the declaration it keeps (store.ReadDeclared) and answers{said}on the reply. Wired like the setuid search (issue 361):HearDirectoryJudgements,Queue.JudgeDirectories,run.go.nox-mesh-host judge-directories, run as root, gives the same answer for a machine the controller cannot ask.The controller half is not in this PR. The controller needs a terminal verb to sign and send the ask, plus the bus grants (engine subscribe on
mesh.node.<node>.ask.judge-directories, controller publish), the same pieces asnode setuid-search. Until those land, the ask has no sender, and the engine's subscription is refused by a bus whose user list lacks the grant. That refusal is said by the client and is harmless. The at-machine command works without them.How it was tested
internal/apply/judge_directories_test.go: three directories (plain, behind a link in a world-writable tree, missing). The test checks they are said placed, would be refused (naming the link andevery account), and placed. The missing one is not made, and no mode changes. A link only root could have made is followed and the directory said placed.internal/link/judge_directories_test.go: the subject and context words; an ask refused under a setuid-search signature, for another node, with a path, expired, or taken twice; no answer without a reply subject../merge-check.shgreen (gofmt, vet, every test under race; bus tests skipped, no nats-server here).Part of issue 358 (the fix itself is #87, which rebases onto this).
Delivery
novox/mesh-host@b92fb6811610— delivered since 2026-10-12T13:04:14ZDelivery plan — builds mesh-host → ace, g14, novox, shanks; no bus step
Group
fix/358-judge-directories-read-only, in order: novox/mesh-controller@7385d9c092 → novox/mesh-host@b92fb68116Machines
Transitions
The commit's note under
refs/notes/mesh-plankeeps every transition:git log --notes=mesh-plan.Merge check at
b92fb681mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: mesh-host)mesh/repo-check: PASS — its merge-check.sh passedDelivery plan — builds mesh-host → ace, g14, novox, shanks; no bus step
Run by the build seat on shanks as
build-1791806318433639409(builds --log build-1791806318433639409).Verdict: approve at
b92fb68Independent review of PR #88 (issue 358) at head
b92fb68116. I made a fresh clone, read the whole diff and the code it calls (believed,refusePath,homeAbove), and rango vet,go test -race ./...and./merge-check.shat this head (all green).GOOS=darwin go build ./...also builds.Read-only: holds
judgeMeshDirbuilds ameshWalkwithcreate=false, so theMkdiratbranch is never reached. A missing component returnserrNotThereYet(fd closed) before any mkdir. The only system calls on the path areopen("/"),openat(O_RDONLY|O_DIRECTORY|O_NOFOLLOW),fstat,fstatat(AT_SYMLINK_NOFOLLOW)andreadlinkat. There is no mkdir, chmod, chown or rename on any path, error paths included. Every descriptor is closed on every return path I traced.JudgeDirectoriesadds onlyrefusePath(lstat and link resolution, no writes) andhomeAbove. The test proves that nothing is made and that no mode changes, also for a directory that was not there.Signed ask: matches the hand-over's
AnswerJudgeDirectoriesgoes through the samebelievedas the hand-over and the setuid search. That means: body size capped (MaxHandOverAsk), signed by the mesh's key under its own contextnovox-mesh judge-directories v1,Nodeequal to this node, unexpired and not good for longer than an ask may be, a nonce of at least 16 bytes taken once,Byone short line, and no path (withPath=false). The subscription buildsHandOverCheck{Signer, Node}exactly as the other two do, and no answer is sent without a reply subject.Answers bounded
believed. The answer is one line per declared directory plus a count line, so the declaration bounds it. There is no explicit cap. Non-blocking: if a declaration ever pushed the answer past the bus's maximum payload,Respondwould fail silently and the asker would see a timeout. A cap with a "… and N more" line would make that failure loud.Judges what an apply would
meshWalk.fromRoot) that #87'sopenMeshDiruses withcreate=true. A missing component is said placed, which is correct because the apply makes it as root in a directory the walk reached. The guard's refusals (issue 339) and below-home directories (ADR 0266) are said separately, in the same orderrefusedPlacesjudges them in #87.JudgeDirectoriesdoes not skip handed-over directories, and #87's apply does skip them. The apply gives a handed-over directory its own walk, which refuses any link. So a handed-over directory behind a root-only link such as/var/runwould be saidplacedhere and refused by the apply. That refusal is not new with issue 358, so this does not distort the survey #87 needs. A fourth line kind ("handed over: its own walk, which follows no link") would make the judgement exact.Checks: mesh/merge-gate pass (4 of 4 compose) and mesh/repo-check pass at
b92fb68. The base is main3f7f797.The controller half (the terminal verb that signs and sends the ask, plus the bus grants) is not here, as the body says. Until it exists, novox's list comes only from
nox-mesh-host judge-directoriesrun as root at novox's terminal.