mesh-knowledge: run watch as the account the health tool reads as (hq issue 479) #209

Merged
mesh-admin merged 1 commits from fix/479-the-watch-verdict-is-readable into main 2026-10-11 09:55:36 +00:00
Contributor

Fixes hq issue 479: mesh-knowledge on novox is unhealthy because knowledge_health cannot open health.json (permission denied).

Cause. The watch process names no user, so it runs as root. It writes its verdict into the state directory, owned by root with mode 0600. The bundle, and with it the health tool, runs as the machine's account. The controller makes the state directory, and the files the bundle's environment names, that account's, but nothing makes the verdict file readable to it, so the tool cannot open it. The mounts module avoids this by writing its status 0644 under /run. The zfs module runs its watch as ${machine:account} in a directory that account owns.

Fix. watch runs as ${machine:account}, as the zfs module's watch does. It reads database.url, which that account already owns, and writes the verdict as that account into the directory that account owns. The rename replaces the old root-owned file. keep and prepare are unchanged.

Test. TestItsProcessesAreThePreparationTheActAndTheJudge now asserts that watch runs as ${machine:account}. It failed before the manifest change and passes after. go test -race passes, merge-check.sh passes, and the module check is ok, with the count of resources without health still 69.

This does not touch go.mod or callerOf (those are in #207). Changed: module.json (one line), manifest_test.go, and the README.

After it is delivered: the condition module.mesh-knowledge.novox.unhealthy should clear within the watch's next looks.

Fixes hq issue 479: mesh-knowledge on novox is unhealthy because `knowledge_health` cannot open `health.json` (permission denied). **Cause.** The `watch` process names no `user`, so it runs as root. It writes its verdict into the state directory, owned by root with mode 0600. The bundle, and with it the health tool, runs as the machine's account. The controller makes the state directory, and the files the bundle's environment names, that account's, but nothing makes the verdict file readable to it, so the tool cannot open it. The mounts module avoids this by writing its status 0644 under /run. The zfs module runs its watch as `${machine:account}` in a directory that account owns. **Fix.** `watch` runs as `${machine:account}`, as the zfs module's watch does. It reads `database.url`, which that account already owns, and writes the verdict as that account into the directory that account owns. The rename replaces the old root-owned file. `keep` and `prepare` are unchanged. **Test.** `TestItsProcessesAreThePreparationTheActAndTheJudge` now asserts that `watch` runs as `${machine:account}`. It failed before the manifest change and passes after. `go test -race` passes, `merge-check.sh` passes, and the module check is ok, with the count of resources without health still 69. This does not touch `go.mod` or `callerOf` (those are in #207). Changed: `module.json` (one line), `manifest_test.go`, and the README. After it is delivered: the condition module.mesh-knowledge.novox.unhealthy should clear within the watch's next looks.
mesh-admin added 1 commit 2026-10-11 09:35:12 +00:00
Run mesh-knowledge's watch as the account the health tool reads as (hq issue 479)
mesh/merge-gate pass: builds mesh-knowledge → novox; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery delivered
a3f4387e26
The watch ran as root and wrote its verdict root's and 0600 into the state
directory, which the mesh gives to the account the runtime runs the bundle as;
knowledge_health could not open it, so the module read unhealthy with nothing
wrong. Run watch as that account, as zfs's watch does.
Author
Contributor

Delivery novox/mesh-catalog@a3f4387e2630 — delivered since 2026-10-11T10:11:55Z

Delivery plan — builds mesh-knowledge → novox; no bus step

  • tier 0: mesh-knowledge
  • novox: receives mesh-knowledge

Machines

  • mesh-issues on novox: passed — healthy 3 times over 2m41s
  • mesh-knowledge on novox: passed — judged with mesh-issues: healthy 3 times over 2m41s
  • mesh-sdk on every machine running it: sent
  • mesh-issues on the rest running it: sent
  • mesh-knowledge on the rest running it: sent

Transitions

  • 2026-10-11 09:35 (new) → proposed (announced): novox/mesh-catalog#209's head announced
  • 2026-10-11 09:40 proposed → checked (checked): the verdict names this commit
  • 2026-10-11 09:40 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-11 09:57 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 10:07 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-11 10:11 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-catalog@a3f4387e2630` — **delivered** since 2026-10-11T10:11:55Z **Delivery plan** — builds mesh-knowledge → novox; no bus step - tier 0: mesh-knowledge - novox: receives mesh-knowledge **Machines** - mesh-issues on novox: passed — healthy 3 times over 2m41s - mesh-knowledge on novox: passed — judged with mesh-issues: healthy 3 times over 2m41s - mesh-sdk on every machine running it: sent - mesh-issues on the rest running it: sent - mesh-knowledge on the rest running it: sent **Transitions** - 2026-10-11 09:35 (new) → proposed (announced): novox/mesh-catalog#209's head announced - 2026-10-11 09:40 proposed → checked (checked): the verdict names this commit - 2026-10-11 09:40 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-11 09:57 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 10:07 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-11 10:11 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`.
Author
Contributor

Merge check at a3f4387e

  • mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: mesh-knowledge)
  • mesh/repo-check: PASS — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)

Delivery plan — builds mesh-knowledge → novox; no bus step

  • tier 0: mesh-knowledge
  • novox: receives mesh-knowledge
  • read by no module's build: modules/mesh-knowledge/README.md, modules/mesh-knowledge/cmd/mesh-knowledge/manifest_test.go

Run by the build seat on g14 as build-1791711339358653279 (builds --log build-1791711339358653279).

--- the gate: mesh-knowledge
note: mesh-knowledge uses the seat "operator-channel", which no module declares and the mesh does not define among the manifests given; registration judges it against the whole catalogue, and passing the declaring module's manifest too judges it here
mesh-knowledge: ok, 1 tool(s), invokes seat:issue-tracker.reserve, claude-code.claude_code_judge, records.records_status, records.records_list, records.records_read, seat:operator-channel.notify, ready: keep by unit every 30s; watch by its tool knowledge_health every 1m0s
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 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-11T09:30:02Z 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-11T09:30:02Z

modules the change moves:
  - mesh-knowledge (changed)

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-knowledge

notes:
  - modules/mesh-knowledge/README.md and modules/mesh-knowledge/cmd/mesh-knowledge/manifest_test.go read by no module's build, and rebuild nothing (issue 280)
--- its merge-check.sh (go toolchain)
ok  	git.novox.be/novox/mesh-catalog/checks/words	0.002s
words: 12 retired words and 70 daemons' lines, none in the 41389 strings of 672 files
ok  	git.novox.be/novox/mesh-catalog/checks/agenthome	0.010s
agent-home: no archive and no file written into under the agent's home
ok  	git.novox.be/novox/mesh-catalog/checks/paths	0.005s
paths: no module names another's state on its machine (3 known, listed to go)
long-running resources without health: 69, as kept
testing modules/mesh-knowledge
ok  	mesh-knowledge/cmd/mesh-knowledge	91.537s
--- its merge-check-typescript.sh (typescript toolchain)
**Merge check** at `a3f4387e` - `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: mesh-knowledge) - `mesh/repo-check`: **PASS** — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript) **Delivery plan** — builds mesh-knowledge → novox; no bus step - tier 0: mesh-knowledge - novox: receives mesh-knowledge - read by no module's build: modules/mesh-knowledge/README.md, modules/mesh-knowledge/cmd/mesh-knowledge/manifest_test.go Run by the build seat on g14 as `build-1791711339358653279` (`builds --log build-1791711339358653279`). ``` --- the gate: mesh-knowledge note: mesh-knowledge uses the seat "operator-channel", which no module declares and the mesh does not define among the manifests given; registration judges it against the whole catalogue, and passing the declaring module's manifest too judges it here mesh-knowledge: ok, 1 tool(s), invokes seat:issue-tracker.reserve, claude-code.claude_code_judge, records.records_status, records.records_list, records.records_read, seat:operator-channel.notify, ready: keep by unit every 30s; watch by its tool knowledge_health every 1m0s 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 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-11T09:30:02Z 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-11T09:30:02Z modules the change moves: - mesh-knowledge (changed) 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-knowledge notes: - modules/mesh-knowledge/README.md and modules/mesh-knowledge/cmd/mesh-knowledge/manifest_test.go read by no module's build, and rebuild nothing (issue 280) --- its merge-check.sh (go toolchain) ok git.novox.be/novox/mesh-catalog/checks/words 0.002s words: 12 retired words and 70 daemons' lines, none in the 41389 strings of 672 files ok git.novox.be/novox/mesh-catalog/checks/agenthome 0.010s agent-home: no archive and no file written into under the agent's home ok git.novox.be/novox/mesh-catalog/checks/paths 0.005s paths: no module names another's state on its machine (3 known, listed to go) long-running resources without health: 69, as kept testing modules/mesh-knowledge ok mesh-knowledge/cmd/mesh-knowledge 91.537s --- its merge-check-typescript.sh (typescript toolchain) ```
mesh-admin merged commit 300406e0dd into main 2026-10-11 09:55:36 +00:00
mesh-admin deleted branch fix/479-the-watch-verdict-is-readable 2026-10-11 09:55:36 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-catalog#209