Issue 127 resolved; design 29 says what wildcards are and how the rule is checked

Every module named its events the way the old bus spelled a routing key, so on the
new bus every cross-module subscription pointed at a namespace nobody publishes to.
Nothing failed — the services started and none of them reacted. Converted, and the
rule now has checks at both scales: at registration for one manifest, and as a test
across the whole catalogue where a consumed event's emitter is present.

It was larger than the report said, in two directions nobody had looked. Forty-three
files of module code pass the event name at runtime, so the code mattered as much as
the manifests. And both clients had to learn the mapping — without that, converting
the modules would have broken the mesh that is actually running, which is the
opposite of what fixing this was for.

Design 29 gained three things it did not say: what a wildcard is (`*` for one name,
`**` for the rest, spelled the mesh's way and derived to each bus's own), that an
event about a role belongs on the seat and why that is not yet possible, and how the
rule is checked — because "a subscription that matches nothing is silence" is exactly
why nobody noticed thirty-seven manifests being wrong the same way.

4.2 and 4.3 are unblocked. The catch-up half of 4.5 is not: it is a decision, and it
narrowed rather than closed. It cannot be a reply to a module's inbox, because that
needs the blanket grant design 25 §4 refuses.
This commit is contained in:
2026-09-27 14:45:08 +02:00
parent dd577e9ebe
commit c4a8455e2e
4 changed files with 168 additions and 14 deletions
+20 -9
View File
@@ -518,10 +518,11 @@ it, and the beds that need a mesh living on NATS can finally run.
What none of them can stand in for is a mesh raising itself, which is what this bed is — so this
is where the code stops and the lab starts
- [ ] 4.2 a build source's change reaches the builder over the bus, and the build that follows is
the one the change asked for — **blocked by
[issue 127](../../04-ISSUES/127-a-module-event-derives-a-subject-nothing-publishes/00-report.md)**
the one the change asked for — **unblocked**:
[issue 127](../../04-ISSUES/127-a-module-event-derives-a-subject-nothing-publishes/00-report.md)
is resolved, so an emitter and a consumer of the same event now land on the same subject
- [ ] 4.3 an installation completes over the bus, with the same outcome as the path it replaces —
**blocked by the same**
**unblocked, same**
- [~] 4.4 a person's client — **the account is done**: a person is not a module and holds no
seat, so their authority is a list of tools (or `*` for an administrator) and nothing else.
Held to four properties, each a way of being wrong that would not announce itself: nothing
@@ -533,12 +534,22 @@ it, and the beds that need a mesh living on NATS can finally run.
Still to build: the client program itself — the command line and the MCP surface over it.
It needs nothing from the consume side, so it is not blocked by step 3.
- [~] 4.5 reports and catch-up: a node that was unreachable catches up rather than losing them —
**the reports half is in and proved against a server** (3.4): held through the store's
absence by the server rather than by the controller, superseded ones settled by the digest
they carry. The catch-up half is where issue 127 bites hardest: the controller replays a
build announcement under its **own** name rather than the builder's, so a catalogue
filtering the builder's subject hears nothing. Whether the controller may sign an event as
another module is a design question, not a wiring one, and it is open in that issue.
**the reports half is in and proved against a server** (3.4): held through the store's absence
by the server rather than by the controller, superseded ones settled by the digest they carry.
**The catch-up half is a decision, and issue 127 narrowed it.** The controller answers a
catalogue's request by re-publishing builds under its *own* name, which nothing subscribing the
builder's subject hears, and for which it holds no grant. Publishing them under the builder's
subject would be the controller signing an event as another module, which the derived namespace
exists to prevent. And it cannot become a reply to the catalogue's inbox either: answering a
module's inbox needs `_INBOX.>`, the blanket grant design 25 §4 refuses — found while giving the
controller the one narrow inbox it does need, to answer enrolments.
So two options are left, and they differ in kind. A subject the controller may publish and a
catalogue may subscribe — the mesh's own event space, which does not exist yet. Or a durable
consumer that starts at the beginning of the stream, which removes the need to ask at all and
leans on retention instead: sound while the events are still there, and silent when they have
aged out, which is the failure the request was invented to avoid.
**Done when.** Each converted flow is proved against the behaviour it replaced, and the full genesis
bed is green. **Observation is not in this step** — heartbeats, conditions and key-value state are
@@ -2,7 +2,7 @@
layer: to-be
status: proposed
code: []
updated: 2026-09-26
updated: 2026-09-27
decisions:
- 02-DECISIONS/0118-a-module-declares-its-own-seats.md
- 02-DECISIONS/0119-amqp-is-a-provision-not-the-bus.md
@@ -53,6 +53,33 @@ the catalogue, and the mesh would have hundreds of copies of a decision it made
| seat `telegram-sender`, `accepts: send` | work-queue consumer on `mesh.seat.telegram-sender.accept.send` |
| `uses: telegram-sender` | publish on that seat's `accept` subjects, and nothing else |
**Wildcards, and they are the mesh's rather than a bus's.** *Added 2026-09-27, from
[issue 127](../../04-ISSUES/127-a-module-event-derives-a-subject-nothing-publishes/00-report.md).* A
consumer may write `*` for one name and `**` for the rest: `*.download.completed` is that event from
any module, and `**` on its own is every event in the mesh, which an audit logger wants and says in
one token. Spelled this way rather than the wire's, for the reason everything else here is local —
the bus the mesh runs on today spells these `*` and `#`, the one being built spells them `*` and
`>`, and a manifest naming either would stop being true when the wire changed. An emitted event
carries no wildcard: it names one event.
**A module publishes under its own name, and an event about a role belongs to the seat.** *Added
2026-09-27, same source.* The bus enforces that a namespace belongs to the module it is named for, so
an event named for somebody else cannot be published at all. Where the event is really about a role —
"the artifact store accepted an image" — the seat is the right home, because that name outlives
whoever fills it, and a consumer written against the holder's own name breaks when the holder
changes. **Not yet possible in practice**: seats carry protocol in the manifest and in the permission
model, and the shared library has no way for a module to publish on one. Until it does, such an event
lives under the emitting module's own name and the consumer carries that coupling.
**How the rule is checked, because it was not.** *Added 2026-09-27, same source.* Two checks, because
the mistake happens at two scales. Per manifest, at registration: an event is a local name, and the
old bus's form is refused with the name to write instead. Across the whole catalogue, as a test:
where a consumed event's emitter is present, it must emit that event. The second cannot demand a live
emitter for everything — a module lives in its own repository and may be installed long before the
one whose events it wants — so it says nothing about an absent emitter and everything about a present
one. **A subscription that matches nothing is not an error, it is silence**, which is why nothing
reported thirty-seven manifests being wrong the same way.
**It is `tools:`, not `serves:`.** Revision, found while implementing: the manifest already uses
`serves` for the facts a consumer needs in order to reach a provision, and two meanings under one
key in the file a module author reads most is a footgun. Worth noting that until now a module's
@@ -73,6 +100,13 @@ and every manifest in the catalogue is still correct. That is the property
[ADR 0039](../../02-DECISIONS/0039-what-the-sdk-holds-and-refuses.md) gave the sdk, applied to
declarations.
**A handler names an event the way its manifest does.** *Added 2026-09-27, found while fixing issue
127.* The runtime handed a handler the event name alone, so a manifest declaring
`consumes: builder.built` produced a pattern that could never match the key it was compared against,
and a module consuming one event from two emitters could tell them apart only by reading a header.
The subject already carries the emitter, so the key a module sees names it too — which makes a
disagreement between a manifest and the code a typo rather than a category error.
## 2. Three namespaces, and nothing else
**Its own** — `mesh.mod.<module>.>`. Its events and its tools. Nothing else may publish into it,