From cf566498454b1a34a5b229bda586cdd49af1b645 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 16 Oct 2026 11:00:46 +0200 Subject: [PATCH] Design 41: every file on a node is managed through node-files (WP9, ADR 0394, issue 900) --- ...-the-shell-and-the-accounts-environment.md | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/03-DESIGN/01-to-be/41-the-shell-and-the-accounts-environment.md b/03-DESIGN/01-to-be/41-the-shell-and-the-accounts-environment.md index 2a5c8705..f5b9c46d 100644 --- a/03-DESIGN/01-to-be/41-the-shell-and-the-accounts-environment.md +++ b/03-DESIGN/01-to-be/41-the-shell-and-the-accounts-environment.md @@ -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 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. +