Shape the seat's Binding as the bus module sends it
mesh/delivery merged: source.main moved to novox/hq@6c1e759e267b
mesh/check being carried to d0760629e5fe on 6c1e759e267b | from f1fe609b3e85

The seat definition's Binding named a bus name and subjects while
created and recreated carry mesh-sdk's membership binding, which the
grants part needs; one form for the events and list's answer means the
generated contract must decode what is on the wire, unchanged.

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 10:14:07 +01:00
parent 27ec6f8500
commit d0760629e5
@@ -47,9 +47,17 @@ choice, to the bus module's. Each choice below says so.
no part waits on itself. Why: the design's choice under the operator's answer and ADR 0596 §2. How it is checked:
§8, the whole case.
- §2 **Each entry of `list`'s answer carries its binding.** The seat's `Held` gains the field `binding`, of the
seat's own form `Binding` (its bus name, its storage type, its template and, for a stream, its subjects), the same
value the bus module's `created` and `recreated` carry for that entry in their field `binding`, taken from the
entry's plan in the bus module's state `asked`. It is present on every entry whose objects the bus holds (the
seat's own form `Binding`, the same value the bus module's `created` and `recreated` carry for that entry in their
field `binding`, taken from the entry's plan in the bus module's state `asked`. **`Binding` is reshaped to the form
on the wire.** Today the seat's definition says `Binding` is a bus name, a storage type, a template and a stream's
subjects, while the bus module sends, and the grants part needs, mesh-sdk's membership binding: `local` (the local
name), `storage`, `template`, `stream` and `subject` (a stream's, and a ledger's history's subject), `bucket`,
`object-store`, and for a ledger `history`, `state`, `indexes` (each index's bucket by its name), `snapshot` and
`types` (which the bus module's events leave empty; the grants part copies them from `manifest-accepted`). The
definition's `Binding` takes exactly those fields, with those names and forms, so `created`, `recreated` and
`list`'s `binding` carry one form, the generated contract decodes what the bus module sends, and no byte changes
on the wire; the fields design 47 G §399 adds come on top of it. Why: the design's choice following this line's
own words (one value in the events and the answer), met by the developer on 2026-11-11 and directed by lead-47. It is present on every entry whose objects the bus holds (the
entries whose answer carries `settings`) and absent on one it does not hold (waiting to be made, or refused), as a
refused create hands no binding (design 25 bus-state §4). `show` and `orphans`, which answer `Held` too, carry it
alike. A field G's part adds to `Binding` (design 47 G §399: `objects` and `sent-objects`) reaches `list`'s answer
@@ -58,7 +66,9 @@ choice, to the bus module's. Each choice below says so.
mesh-contracts holds equal; the bus module's tools fill the field. **The size**: 18 entries in the new form are
asked by the manifests on main (counted 2026-11-11), so the answer is a few KiB, an estimate; it stays one reply
well under the bus's largest message (1 MiB) while the entries number in the hundreds, and from G a reply over that
limit goes as an object by design 47 G §407. Why: the design's choice. How it is checked: unit (the bus module's
limit goes as an object by design 47 G §407. Why: the design's choice. How it is checked: unit (mesh-contracts' generated contract), a
`created` body as the bus module's keeper writes it, a ledger's among them, decodes into the generated type and
encodes back to the same bytes; unit (the bus module's
tools), a row where `list`'s `binding` for an entry equals the `binding` its `created` carried, and a row where an
entry not held has none; the seat's fixtures.
- §3 **It is asked at every start and when asked again by hand, never on a timer.** The grants part's process asks