Designs and glossary follow ADR 0634 and ADR 0635: shared code lives with its owner
The registry milestone now moves the Delivery domain out of mesh-sdk, creates a contracts module per domain it moves and the first domain SDK, defines 25 seats whole with their states, reads the seat list from the bus and renames two seats. Design 26's *Where a seat's code goes* is what the review and the developer read to place every new name, so it must say this before develop starts. - design 26: definitions carry states; the 25 seats by contracts module; the seat list from the bus; the two renames; the domain SDK and a module's own package; the transfer in the Delivery domain's SDK; checks per ADR 0634 §10 and ADR 0635 §6 - design 20, playbook 06: the homes of shared code, the first that fits - design 47: the seat mesh-module-assigner - glossary: domain SDK added; seat-set package retired; mesh-module-assigner, mesh-wants, mesh-node-enroller and the-private-network in their domains - preparer and code reviewer definitions: the homes, without the retired word Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
@@ -83,21 +83,30 @@ Three questions, answered from the machine:
|
||||
thing works: the credential authenticates, a wrong one is refused, the containers reach each
|
||||
other, the data survives a restart.
|
||||
|
||||
## A module that calls or holds a seat
|
||||
## A module that calls or holds a seat, or shares code
|
||||
|
||||
*Added 2026-11-04* (ADR 0625, ADR 0627). Where each piece of a seat's code goes is
|
||||
[design 20](../../03-DESIGN/01-to-be/20-writing-a-module.md) *Where a seat's code goes*; in short:
|
||||
*Added 2026-11-04, widened 2026-11-05* (ADR 0625, ADR 0627, ADR 0634, ADR 0635). Where each piece of shared code goes
|
||||
is [design 20](../../03-DESIGN/01-to-be/20-writing-a-module.md) *Where a seat's code goes*: shared code lives with its
|
||||
owner. In short:
|
||||
|
||||
- **Import the seat's contract and, where it has one, its client package**, from the seat's contracts module
|
||||
(`mesh-contracts` today), never the holder module and never a copy of the seat's types in your own code.
|
||||
- **Import the seat's contract and, where it has one, its client package**, from the seat's domain's contracts module
|
||||
(`mesh-<domain>-contracts`, or `mesh-contracts` for the Core domain and a domain with none), never the holder module
|
||||
and never a copy of the seat's types in your own code. The list of seats your module needs is read from the bus,
|
||||
never compiled in.
|
||||
- **Logic you would write over a seat that another caller would write too** belongs in that seat's client package,
|
||||
through a change of the contracts module; it never goes into mesh-sdk, and never into the holder.
|
||||
- **Logic and state layouts only your module owns**, where it holds no seat for them, are your module's own package;
|
||||
another repository's module imports it only by a published version, so your manifest declares it as a package
|
||||
artifact.
|
||||
- **Logic your domain's modules share, owned by no one module and carried by no seat**, is your domain's SDK's
|
||||
(`mesh-<domain>-sdk`); only what modules of more than one domain use goes into mesh-sdk.
|
||||
- **Holding a seat** means implementing its contract in your module. A seat you define yourself gets a contracts
|
||||
module of its own (it may share your repository); a role no other module could ever take over is your module's
|
||||
own tools and events, not a seat.
|
||||
|
||||
The review of the pull request checks this; the checks design 26 lists refuse a stray file in a contracts module,
|
||||
a seat named in mesh-sdk and a client reaching another seat's client.
|
||||
The review of the pull request checks the home of every new exported name; the checks design 26 lists refuse a stray
|
||||
file in a contracts module, a seat named in mesh-sdk, an import of a contracts module from mesh-sdk, and a client
|
||||
reaching another seat's client.
|
||||
|
||||
## What the first port actually cost
|
||||
|
||||
|
||||
Reference in New Issue
Block a user