Design 41: every file on a node is managed through node-files (WP9, ADR 0394, issue 900)
mesh/merge-gate waiting in the build queue since 11:01
mesh/delivery superseded: a newer head of the same pull request

This commit is contained in:
2026-10-16 11:00:46 +02:00
parent b9af4e373d
commit cf56649845
@@ -2,8 +2,9 @@
layer: to-be
status: in-progress
code: [mesh-host, mesh-controller, mesh-catalog]
updated: 2026-10-12
updated: 2026-10-16
decisions:
- "ADR 0394"
- "ADR 0310"
- "ADR 0268"
- "ADR 0252"
@@ -90,6 +91,7 @@ WP5 assign and prove (operator-gated) needs WP
WP6 a module puts the account in a group (mesh-host, mesh-controller, mesh-catalog) issue 247
WP7 the control-node withholds execute (mesh-controller, mesh-catalog) ADR 0268
WP8 a node's files and accounts are read (mesh-sdk, mesh-catalog, mesh-controller) ADR 0310, issue 418
WP9 every file on a node is managed (mesh-tools, mesh-controller) ADR 0394, issue 900
```
WP1, WP2 and WP4 are independent, and are built in parallel on one feature branch per repository
@@ -366,3 +368,32 @@ under the same issue.
`mesh-sdk` test of the content rule and one in each of its users; `mesh_search` for `cat`, `grep` and
`getent passwd` finding the verbs. Live, the kernel's RAID status file is read through the seat on the home
server, and the agent's credentials file on the laptop is refused.
## WP9 — Every file on a node is managed through `node-files`
*`mesh-tools`, `mesh-controller`. ADR 0394; tracked by issue 900.*
`node-reads` only reads, and as an account that cannot open a person's home, so nothing in the mesh could copy,
move, write or delete a file, and a cleanup needed a shell on the machine. Most files belong to no module: homes,
project folders, downloads, logs, scratch.
- **A node seat, `node-files`, on every node**, held by the tool runner, with a verb for each file action: list,
stat, read, search, write, copy, move, delete, make a folder, change mode, change owner, and the trash's list and
restore. Each says what it replaces (ADR 0245): `ls`, `stat`, `cat`, `grep`, `cp`, `mv`, `rm`, `mkdir`, `chmod`,
`chown`, and `ssh <node> cp` for a copy between nodes.
- **It may touch every file.** It runs with full rights and keeps each file's owner and modes as well as it
can: a copy or a move keeps them, a new file takes its folder's owner. Which files to touch is the caller's
responsibility; this first version judges no permission.
- **Nothing is lost at once.** A file deleted or overwritten goes to the node's trash with who asked and why, is
restorable for 7 days, and is emptied after.
- **A path a module owns is refused**, naming the module and its tool, unless the call says `override` with a
reason; an override is recorded and said to the operator.
- **No Approve is asked**; every act is recorded with its caller. Read and search never return the content
of a known credential file or a secret place (the mesh never prints a token); copying or moving one is
allowed.
**Proof.** The tool runner's tests: each verb against a temporary tree keeps owner and modes, a new file takes its
folder's owner, a delete is restorable from the trash and gone after 7 days, an owned path is refused and an
override recorded, a credential file's content is never returned. Live: the operator's `~/.claude` on shanks is listed, and a file copied from one node to another
arrives with its owner and modes.