Design 42 zfs-owns-zfs: A-41, the keeper publishes on its events stream's subject

This commit is contained in:
2026-11-13 01:29:19 +01:00
parent f7d066fb32
commit 230dc73bc1
@@ -149,3 +149,9 @@ settles it (`00-META/principles.md`), cited as "design 42 zfs-owns-zfs A-n". The
- **A-40** (A-36, met in develop; principle 3) A ledger instance not yet written is the tool runner's answer to
`mesh/ledger.get` with a state `null` and sequence 0 (the tool runner's `internal/ledger/read.go` `Get`, in mesh-tools), never
an error: the module reads it so, and recognises no error by its text.
- **A-41** (§25, A-37, A-38, review round 1; principles 1 and 7; shared code belongs in mesh-sdk) The events stream a
module asks for by template `events` captures `mesh.bus.<module>.<local>.>` (the bus module's keeper, `PlanOf`), and
that is what the grants of A-38 give. The keeper publishes each event there, as a JetStream publish the bus
acknowledges, on `mesh.bus.<module>.<local>.<event>`, the subject named by a new mesh-sdk helper
`process.Account.BusSubject(local, event)` beside `EventSubject` and `StreamSubject`; never `process.Conn.Emit`,
which publishes on the module's old event subjects.