Issue 169: two module-defined seats, and the gap — a seat definition has no neutral home

nfs-share and smb-share share an intent, not a contract; one seat would be
a union with every field optional. What the exemplar exposes is that a
seat declared inside one module cannot be implemented by another without
depending on it.
This commit is contained in:
2026-09-30 13:52:20 +02:00
parent a0a930b1cd
commit e33191161d
@@ -37,21 +37,28 @@ Under the mesh as it stands, this arrangement has no expression and one failure
- The clients are LAN devices, so this also meets [issue 154](../154-a-machines-own-network-is-not-a-reach/00-report.md) - The clients are LAN devices, so this also meets [issue 154](../154-a-machines-own-network-is-not-a-reach/00-report.md)
(no reach for the machine's own network). (no reach for the machine's own network).
## The proposal (the operator's, 2026-09-30) ## The proposal (the operator's, 2026-09-30, settled after two rounds)
**File sharing is a core seat — a role each machine has, defined by the control plane — and, as **Two module-defined seats, one per protocol, because NFS and SMB share an intent and not a
with package registries (ADR 0109), one seat per protocol, so several modules occupy the family:** contract.** A seat in the mesh's sense is a contract — what it accepts, emits and serves, and the
tools its holder must answer (ADR 0126, 0132) — and lined up, the two share almost none of it:
| seat | scope | delivers | held by | | | `nfs-share` | `smb-share` |
|---|---|---|---| |---|---|---|
| `node-nfs-share` | node | `nfs-share` | an `nfs` module | | serves | export path(s); the client ranges allowed (`sec=sys` authorises by address) | share name(s), path |
| `node-smb-share` | node | `smb-share` | a `samba` module | | pair credential | none | a user and password per consumer |
| … (`node-webdav-share`) | node | … | whatever comes next | | consumer's mount | `at:/path` | `//at/share` with credentials |
| holder's tools | export / unexport a path for a range | add / remove a share, create a user |
Named for their scope (ADR 0121), one holder per node (ADR 0110), each carrying its protocol One `file-share` seat would be the union with every field optional — a consumer could bind it and
(ADR 0129). A machine may hold both — nfs and samba on ace — and one module may hold several still not know how to mount what it got (the emptiness ADR 0129 warns against). "Export a path to
(0109: "gitea may hold several seats at once"). Adding a protocol is adding a seat and a the network" is a category, and the mesh needs no seat category: a consumer requires the one it
provision, not widening one. can mount. If "give me the library, however" is ever needed, it is a provision an umbrella module
serves, not a seat.
Both are node-scoped, one holder per node (ADR 0110), so ace holds both. `nfs` and `samba` are the
first implementations; a second (Ganesha for `nfs-share`, ksmbd for `smb-share`) is what proves
0126's promise that "replacing the implementation changes nothing for any caller".
The holder module: The holder module:
@@ -61,14 +68,19 @@ The holder module:
units, like `dnsmasq`/`sshd` do for theirs; units, like `dnsmasq`/`sshd` do for theirs;
- declares its endpoints (`nfs` 2049/tcp; `smb` 445/tcp, …) so the reach — internal, or the LAN - declares its endpoints (`nfs` 2049/tcp; `smb` 445/tcp, …) so the reach — internal, or the LAN
once 154 has an answer — is the assignment's, and converge keeps them open; once 154 has an answer — is the assignment's, and converge keeps them open;
- **provides** the seat's provision, serving the export path(s), so a consumer on another node - **provides** the seat's provision, so a consumer on another node `requires nfs-share` (or
`requires nfs-share` (or `smb-share`) and reads `${bound:nfs-share:at}` and the path from its `smb-share`) and reads `${bound:nfs-share:at}` and the path from its binding instead of a
binding instead of a hand-typed mount — a pair credential where the protocol has one (a Samba hand-typed mount.
user), none for `sec=sys` NFS.
What it would settle: ace's library becomes reachable from the mesh by declaration, the two host ## The design gap this exposes
services get an owner, converge stops being a trap for them, and a media module on another machine
(or a backup on novox) can mount the library the way it binds a database today. **A seat definition has no home outside the module that first declared it.** Today a seat is
declared inside a manifest (`showcase` declares `the-showcase`, `ca-trust` its own). If `nfs`
declared `nfs-share`, Ganesha could hold it only by depending on nfs's manifest — the coupling
0126 removed for callers, reintroduced for implementations. The protocol needs a neutral place in
the catalogue beside the modules (a seat definition registered like a manifest), with a module
saying which seats it implements. This is the first role with an obvious second implementation,
which is what makes it the exemplar for that mechanism.
## Open questions for the decision ## Open questions for the decision
@@ -77,5 +89,3 @@ services get an owner, converge stops being a trap for them, and a media module
entries in one file. entries in one file.
- How a consumer's binding expresses a *path* to mount (today bindings carry `at`, `port`, `as` and - How a consumer's binding expresses a *path* to mount (today bindings carry `at`, `port`, `as` and
whatever the provider `serves`), and whether one share can serve several paths. whatever the provider `serves`), and whether one share can serve several paths.
- Whether the seat should exist before its first module (a system seat is a decision, ADR 0110) —
the decision that adds the two seats can be the one that accepts this proposal.