Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a17f5bba05 | ||
|
|
ba7eadab55 | ||
|
|
d9582244e7 | ||
|
|
35ddd45e8a | ||
|
|
38117a687c | ||
|
|
f845e9f900 | ||
|
|
4b71fcbda9 |
+3
-1
@@ -306,7 +306,9 @@ controller and the store; for module assignment, by the seat `mesh-module-assign
|
||||
- **transport fault** — a failure of a call or a step because the part it asks did not answer for a moment, not
|
||||
because of what it asked: a name lookup that timed out; a connection refused, reset or unreachable; a seat verb
|
||||
answered with no responders while a holder of that seat is named in the assignments (ADR 0664 §1); and, for a call,
|
||||
its own deadline passing (ADR 0668 §1). A build or check step that meets one is given again by the bus, at most
|
||||
its own deadline passing (ADR 0668 §1); a holder's `away` to a seat ask, its word that a part it depends on did
|
||||
not answer, naming that part (ADR 0668 §1, ADR 0664 §1, insights of 2026-11-21); and a 401 or 5xx answer of the forge to
|
||||
a step's fetch of its source (ADR 0664 §1, insight of 2026-11-21). A build or check step that meets one is given again by the bus, at most
|
||||
three runs (ADR 0664 §1, §2); a kept call is called again. A fault in what was asked (a compile error, an unknown
|
||||
revision, a seat no holder is named for) is not one, and ends the step or the call at once.
|
||||
*Not:* ~~transient error~~ (hq), ~~network blip~~ (hq)
|
||||
|
||||
@@ -3,7 +3,7 @@ layer: to-be
|
||||
status: in-progress
|
||||
design: 47
|
||||
milestone: H
|
||||
updated: 2026-11-20
|
||||
updated: 2026-11-21
|
||||
decisions:
|
||||
- "ADR 0682"
|
||||
- "ADR 0681"
|
||||
@@ -425,7 +425,7 @@ own pipeline), in this order, the next starting when the previous one's delivery
|
||||
|---|---|---|---|
|
||||
| H0 | the design says the one model whole (section 4) | hq, the knowledge base | the four reviewers by architectural domain approve the batch; the operator's four answers are in |
|
||||
| H1 | the one chain works with no hand act (section 5) | `mesh-delivery`, `mesh-catalog`, `mesh-host`, `mesh-tools`, `mesh-sdk`, `mesh-contracts` | the two proofs of step 7 |
|
||||
| H2 | the builder, the build modules and the registries follow the latest lines (section 3.4; versions, publish again, the floor, a step with nothing to run, a module with no registration) | mesh-delivery, mesh-catalog | a version is skipped by nothing; every registered module has a pipeline with steps |
|
||||
| H2 | the work H1's live run owes, as the lines of its own part, [H2-the-delivery-systems-owed-work](H2-the-delivery-systems-owed-work.md) and [H2-stores-and-tools](H2-stores-and-tools.md) (design 47 H2 §775 to §821): every ask a kept call through a part away, the work queues and journal lines of the asks, the fingerprint over a module's own build source, the stores capped and read in parts, the gate's ledger per module and its delivery times, hq a watched source | mesh-delivery, mesh-catalog, `mesh-host`, `mesh-tools`, `mesh-sdk` | H2 §816 and §817: a change to a delivery part, and a package with its importer in two repositories, each running everywhere within ten minutes of its merge call with no hand act |
|
||||
| H3 | the gate and the forge module carry only the one model; groups by the operator's answer; the forge module without its merge-check machinery | mesh-catalog, mesh-delivery | a group of two repositories delivers as one; every delivery record ends |
|
||||
| H4 | every delivery part wakes on its inputs alone and is steered by its tools (sections 3.6, 7): the shared wake-up shape (mesh-config's full pass per event and its reads through module tools, the indexer's re-read after every verdict, the node-engine's retry clocks, the build modules' idle pull), the view and the watchman without reads of another part's state, the SDK's generic state tools with the fill against a cap, the missing tools per module, rates on the bus | `mesh-sdk`, `mesh-delivery`, `mesh-catalog`, `mesh-host` | the bus's slow consumers and behind counts at 0 for an hour; every module's tools pass the principle-4 table |
|
||||
| H4b | the grants part says what it holds as events and reads nothing of another part's bus state (ADR 0596) | `mesh-delivery` | the grants part's own `filling` and `room` and no bucket watch in its code |
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
---
|
||||
layer: to-be
|
||||
status: in-progress
|
||||
design: 47
|
||||
milestone: H2
|
||||
updated: 2026-11-21
|
||||
---
|
||||
# 47 H2 build map: `mesh-catalog`
|
||||
|
||||
Read at `origin/main` `553bfb0ccf7c` (2026-11-21 18:30 UTC), from an archive of that commit. Design: hq `35ddd45e`.
|
||||
DMC-n and DQ-n are the entries at the end of [H2-the-delivery-systems-owed-work](../H2-the-delivery-systems-owed-work.md).
|
||||
|
||||
## What exists today
|
||||
|
||||
Searches as run, from the archive's root `mesh-catalog/`: the holders of each seat by `"name": "<seat>"` in
|
||||
`modules/*/module.json` with `claims`; `grep -n "function \|mint\|vault\|lease\|401" modules/gitea/token.ts`;
|
||||
`grep -rn "not the sweep\|purge\|chunk" --include='*.go' modules/distribution`; `grep -rn "check-needs\|NeedsMarker"
|
||||
--include='*.go' modules/mesh-build-go`; `grep -rn "over-budget\|budget" --include='*.go' modules/mesh-self-check
|
||||
modules/mesh-delivery-gate`; `grep -rn "H-A-237\|cancel" --include='*.go' modules/nats/internal/keeper/requests.go`; each
|
||||
tool of the H2 tools table by its quoted name.
|
||||
|
||||
1. **What exists today.**
|
||||
- Holders: the seat `git`, `go-package-registry` and `npm-package-registry` are `gitea`'s (the forge module, TypeScript);
|
||||
`oci-artifact-registry`, `container-image-registry` and `mesh-artifact-store` are `distribution`'s; the sweep's seat is
|
||||
`mesh-artifact-sweep`, held by `artifact-store-tools`; `node-packet-filter` is `nftables`' (TypeScript, verbs `rules`,
|
||||
`reload`, `remove`, one tool `firewall_rules`); `mesh-broker` is `nats`'; `mesh-self-check` is `mesh-self-check`'s;
|
||||
`mesh-delivery` is the gate's (`modules/mesh-delivery-gate`).
|
||||
- The forge module mints its admin token per process into a 0600 file in its state directory with a lock file beside it
|
||||
(`modules/gitea/token.ts:5-33`, `:131-285`); it answers a refused admin as `AdminRefused` worded as an account to create
|
||||
(`token.ts:95-101`); its seat error answers say `refused` or `failed` (`modules/gitea/seat.ts:71`). No tool reads a
|
||||
token lease; no `forge_merged`.
|
||||
- The gate keeps the ledger `records` (requires, ledger template, 768 MiB; `modules/mesh-delivery-gate/module.json`
|
||||
`requires`) and the state `source`; its tools include `gate_record`, `gate_records`; no `gate_times`.
|
||||
- The self-check holds no delivery budget probe (search above found none).
|
||||
- The build modules ask for `steps` (state, TTL 172,800 s, objects 256 MiB), `detected-steps`, and the Go one
|
||||
`kept-builds` objects; none keeps `outputs` (`modules/mesh-build-{go,node,image}/module.json` `requires`).
|
||||
`check-needs` is a marker file in a package's directory, chosen "not a manifest field"
|
||||
(`modules/mesh-build-go/cmd/mesh-build-go/digest.go:59-66`).
|
||||
- The registry refuses a removal by any caller but the sweep (`modules/distribution/internal/holder/verbs.go:165-166`);
|
||||
its `list` takes `name` only (the seat's definition in `mesh-delivery`); its chunk delete is
|
||||
`cmd/distribution-tools/bounded.go:62`.
|
||||
- The bus module's tools: `nats_consumer` (one), `nats_connections`, `nats_backlog`; no `nats_consumers`
|
||||
(`modules/nats/module.json` `tools`). The keeper asks a drop or recreate at the approve level, naming H-A-237
|
||||
(`modules/nats/internal/keeper/requests.go:75`, `:334`); a refused request does not cancel its ask (no cancel call in
|
||||
that file).
|
||||
- The vault's seat serves `own` to the node-engine of a machine only, read-only, sealed to the machine's key, and a
|
||||
two-step sealed write exists only for the licence manager (`licence-put`) (the seat's definition in `mesh-contracts`
|
||||
`identity-and-access/seats/mesh-vault/seat.json`; claim in `modules/mesh-vault/module.json`). No verb writes a
|
||||
module's own secret from the module.
|
||||
- `nfs-server` and `pacman` hold 0 and 3 integration tests by `-tags integration` (below).
|
||||
2. **What the change touches, and what relies on each.** The token file and its lock (`token.ts`): read only by the forge
|
||||
module's processes. The removal refusal (`verbs.go:165`): relied on by nobody else (every account may call every
|
||||
verb, §813 (7)). The registry's `list` answer whole: read by the sweep (`modules/artifact-store-tools`). The marker
|
||||
file `check-needs`: read by the Go build module's digest (`digest.go:68-80`) and `mesh-delivery-sdk`
|
||||
`steprun.AskNeeds`. The gate's whole-revision ledger entry: read by `gate_record`, `gate_records`, `delivery_status`,
|
||||
the gate's `deliveries` and `show` verbs (`cmd/mesh-delivery-gate/recordtools.go`, `verbs.go`).
|
||||
3. **Fates.** The per-process mint goes (§808); the refusal "not the sweep's" goes (§813 (7)); the whole-revision entry
|
||||
goes (§809); the Node build module's and the recovery module's setup bounds in code go (§800); the marker file's fate
|
||||
against §800's manifest field is DMC-6. New parts and their lines: state `token-lease` (§808, §820), `outputs` objects
|
||||
(§791, §820), settings `owed-away-bound` (§807, the bridge's), `token-ttl`, `mint-lease` (§808), `budget-core`,
|
||||
`budget-leaf` (§810), `again-delays` (§799), tools `forge_token_lease`, `forge_merged`, `gate_times` (the tools table).
|
||||
|
||||
## Rows
|
||||
|
||||
| line | files and functions | subtask | acceptance (cites) | test |
|
||||
|---|---|---|---|---|
|
||||
| §776 | `modules/gitea/seat.ts:71`, `token.ts:95-101`, the version read | C1 forge says `away` (waits DMC-2) | a 401 with the version read failing answers `away`; with the read passing and the fresh token refused answers `refused`; the store stopped 30 s, a merge call answers `away` and lands when called again (§776) | unit, whole (forge module) |
|
||||
| §775 | `modules/gitea` the seat `git`'s act verbs (`writes.ts`, `mergecall.ts`): take an ask once by its id, state `taken` | C2 forge takes once | a holder given the same ask id twice acts once (§775) | unit |
|
||||
| §796 | `modules/gitea` `tags` (`seat.ts`, `readall.ts`) answers `commit` per tag | C3 tags with commit (uses `mesh-delivery` D5) | §796 whole (builder) | whole |
|
||||
| §808 | `modules/gitea/token.ts` (vault read and write, lease `mint` in `token-lease`, delete the replaced token), `modules/gitea/tools` `forge_token_lease`, manifest settings | C4 one mint at a time (waits DQ-7) | two processes, one holding the old token, both refused, mint one token in all; the forge holds one token after; a minter killed holding the lease is replaced after `mint-lease` (§808) | unit, whole |
|
||||
| §812 | `modules/gitea/tools` `forge_merged` (repository, from, to) | C5 merged pull requests | per tools table (§812) | unit |
|
||||
| §815 | `modules/gitea/mergecall.ts`, `failedsteps.ts`: judge a source-only head by its registration's policy from the runner's step events | C6 merge a source-only head | an hq pull request whose Go checks fail is refused naming the failed step (§815) | whole |
|
||||
| §809 | `modules/mesh-delivery-gate/cmd/mesh-delivery-gate/record.go`, `recordevents.go`, `recordtools.go`: head entry `<branch>.<source>`, per mover `<branch>.<source>.<module>`, refusal over 64 KiB, finding `record-too-large`; manifest `records` 1 GiB | GT1 ledger per module | 126 movers write 127 entries, none over 64 KiB; an entry made too large raises the finding, cleared at the end (§809) | whole (gate) |
|
||||
| §810 | `record.go` (end: `delivery-time`, `class`, `phases`), `settings.go` (`budget-core`, `budget-leaf`), tool `gate_times` | GT2 delivery times (uses `mesh-delivery` D2) | §810 whole (gate and probe) | whole |
|
||||
| §811 | `verbs.go` `deliveries` filters and cap | GT3 filtered reads (uses D6) | `deliveries` by repository over 4 MB answers under 768 KB (§811) | unit |
|
||||
| §815 | `takenin.go`, `record.go`: a source-only merge watched as any branch, record ends `nothing to deliver` | GT4 source-only record | raises no `head-untaken` and ends `nothing to deliver` (§815) | whole |
|
||||
| §810 | `modules/mesh-self-check` a probe reading the gate's times, condition `over-budget` by class | SC1 over-budget probe | a core record 11 min after `merge-called` raises `over-budget` for `core`; the next within ten minutes clears it (§810) | whole |
|
||||
| §799 | `modules/mesh-build-go`, `mesh-build-node`, `mesh-build-image`: fetch and publish faults end the run `again`; setting `again-delays`; third run `fetch:` or `publish:` | BM1 again on a part away (waits DMC-7) | the kit holds a fetch met by a 401 and a publish met by no responders to `again`, and three such runs to failed with `fetch:` and `publish:` (§799) | conformance kit |
|
||||
| §800 | `modules/mesh-build-go` summary `not-run`, setup bound from `MESH_TEST_LEVEL_BOUND`, could-not-run at the third starved setup; unpack an install archive | BM2 not run and starved setup (waits DMC-6) | the forge module's whole-seat test runs with its npm tree; a starved setup runs again and ends could-not-run at the third (§800) | whole (Go build module) |
|
||||
| §800 | `modules/mesh-build-node`: accepted kind `install`, `npm ci` with no install scripts, the archive in `outputs` under the lock's digest; its setup bound in code goes | BM3 install | an install runs no script (§800) | unit (Node build module) |
|
||||
| §791 | the three build modules: `outputs` objects (1 GiB, 7 days), the verb `output` | BM4 outputs kept | §791 whole (Go build module) | whole |
|
||||
| §801 | the three build modules: `current` per holder, steps read tools never empty while steps run | BM5 current | a paused holder answers `paused` (§801) | whole |
|
||||
| §775 | `modules/distribution` publish: take an ask once by its id, state `taken` | RG1 registry takes once | §775 unit | unit |
|
||||
| §813 (7) | `modules/distribution/internal/holder/verbs.go:165` (refusal goes), `list` paged by `module` and cursor; `modules/artifact-store-tools` reads page by page | RG2 paged list and sweep removals (waits DMC-10) | a pass over 20,000 artifacts removes what it judges (§813 (7)) | whole (sweep) |
|
||||
| §813 (8) | `modules/distribution/cmd/distribution-tools/bounded.go:62`: purge a deleted chunk's subjects | RG3 chunk leftovers | after 1,000 chunks deleted, messages equal live objects (§813 (8)) | whole (registry) |
|
||||
| §813 (5) | `modules/nats/cmd/nats-tools/consumer.go`, `main.go`: `nats_consumers` sorts, `nats_connections` busiest subscriptions | N1 flow tools (waits DMC-11) | unit (§813 (5)) | unit |
|
||||
| §813 (6) | `modules/nats/internal/keeper/requests.go`: a refused request cancels its ask on `operator-channel` | N2 keeper cancels | unit | unit |
|
||||
| §813 (11) | `requests.go:75`, `:334`: the bend's line names the research as its end | N3 bend line | a drop asks at the approve level (§813 (11)) | unit |
|
||||
| §813 (4) | `modules/nftables/client.ts`, `tools/index.ts`: read a port's scope from `rules` | P1 scope from the rule (waits DMC-12) | `allow` without a source is refused for a `private-network` port (§813 (4)) | whole (packet filter) |
|
||||
| §781 | `modules/nftables`: ask `converged` within the verb's `timeout` | P2 converged (waits DMC-12) | §790 | whole |
|
||||
| §808 | `modules/mesh-vault/cmd/mesh-vault` a write verb of a module's own secret (H-A-345) | VA1 (waits DQ-7) | per its answer | unit |
|
||||
| §800 | `modules/mesh-recovery` tests' setup bound in code goes | MR1 | §800 | unit |
|
||||
| §783, §812, §820 | manifests of the gate, the three build modules, `distribution`, `gitea`: findings stream, caps | M1 manifests (waits DQ-5) | the manifest check of §814 | whole |
|
||||
| §819 | `modules/nfs-server`, `modules/pacman` tests | NP1 shrink to 50 integration | the check's counts | check |
|
||||
|
||||
## Order and writers
|
||||
|
||||
- After `mesh-delivery`'s D3, D4, D5, D6 and mesh-sdk's S1 to S3, S6, S11. C3 after D5; GT2 after D2; BM1 to BM5 after D3
|
||||
and the kit (`mesh-delivery` `modules/mesh-delivery-sdk/steprun/conformance`, written by this map's build modules'
|
||||
agent). P1 after the node-engine's render (the node-engine's map, E6).
|
||||
- One writer per file: one agent for `modules/gitea` (TypeScript); one for the gate and the self-check; one for the three
|
||||
build modules and the conformance kit; one leaf agent for `distribution`, `artifact-store-tools`, `nats`, `nftables`,
|
||||
`mesh-vault`, `mesh-recovery`, `nfs-server`, `pacman`.
|
||||
|
||||
## Local facts
|
||||
|
||||
- Placement of the siblings: as the `mesh-delivery` map says (`modules/mesh-build-go/cmd/mesh-build-go/workspace.go:17-60`).
|
||||
The TypeScript modules (`gitea`, `nftables`) build with their `package.json`; their tests are not counted by `go test`.
|
||||
|
||||
## Test budget (§819), `go test -list '.*'`, without and with `-tags integration`, top-level functions
|
||||
|
||||
Counted 22:20 to 22:30 CET (unit / integration): gate 30 / 2; Go build module 205 / 15; Node build module 117 / 8; image
|
||||
build module 56 / 6; `distribution` 9 / 1; `artifact-store-tools` 23 / 1; `nats` 38 / 7; `mesh-self-check` 10 / 1;
|
||||
`mesh-vault` 143 / 2; `mesh-recovery` 24 / 1; `nfs-server` 51 / 0; `pacman` 118 / 3; `gitea`'s Go part 176 / 2. §819's
|
||||
"NFS server 51 integration, package manager 121 integration" are the build node's counts, which take untagged tests in
|
||||
(plan section 10: the build node counts untagged tests into a module's integration count); by the tag they hold 0 and 3 (DQ-14).
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
layer: to-be
|
||||
status: in-progress
|
||||
design: 47
|
||||
milestone: H2
|
||||
updated: 2026-11-21
|
||||
---
|
||||
# 47 H2 build map: `mesh-contracts`
|
||||
|
||||
Read at `origin/main` `87eab81be134` (2026-11-20 07:12 UTC), from an archive of that commit. Design: hq `35ddd45e`.
|
||||
DMC-n and DQ-n are the entries at the end of [H2-the-delivery-systems-owed-work](../H2-the-delivery-systems-owed-work.md).
|
||||
|
||||
## What exists today
|
||||
|
||||
Searches as run: `ls seats */seats`; the verbs of `seats/node-engine/seat.json`, `seats/mesh-broker/seat.json`,
|
||||
`identity-and-access/seats/mesh-vault/seat.json` by `python3`; `grep -rn "DisallowUnknownFields" --include='*.go' go`;
|
||||
`grep -rl '"node-packet-filter"'` over every repository (found only in `mesh-sdk`'s test seat list); live: `mesh_search`
|
||||
"node-engine composition" answered `mesh-vault.own` "from the node-engine o…" (22:27 CET).
|
||||
|
||||
1. **What exists today.**
|
||||
- The node-engine seat: 18 verbs, none `converged`, none with `timeout` (`seats/node-engine/seat.json`).
|
||||
- `mesh-broker`: `list`, `show`, `check`, `orphans`, `create`, `apply`, `recreate`, `drop` and the snapshot verbs
|
||||
(`seats/mesh-broker/seat.json`): §783's and §812's reads through `show`, `list`, `apply` exist.
|
||||
- `mesh-vault`: `own` answers the node-engine of one machine about its own machine (the caller as the bus proves it),
|
||||
sealed to the key it stated with `node-key`, read-only; `get` answers one secret sealed to the asker's key to an
|
||||
asker the vault allows; `licence-put` is a two-step sealed write for the licence manager alone; no verb writes a
|
||||
module's own secret from that module (`identity-and-access/seats/mesh-vault/seat.json`, verbs `own`, `get`,
|
||||
`licence-put`, `rotate`, `move-in`).
|
||||
- Every generated decoder here refuses unknown fields (`go/seats/meshmoduleassigner/contract.go` 8 places,
|
||||
`go/seats/nodeengine/contract.go` 9, `go/seats/meshconfig/contract.go` 1, `go/clients/nodeengineclient` 2); no
|
||||
definition carries `form`.
|
||||
- No seat definition of `node-packet-filter` here.
|
||||
2. **What relies on each.** Every module importing a generated contract here (the node-engine, the assigner, the tool
|
||||
runner, the vault, the provisioner) reads with these decoders.
|
||||
3. **Fates.** Regenerated tolerant (§780). New parts: the vault's write verb (§808, H-A-345; DQ-7), `converged` and
|
||||
`timeout` (§781; DMC-12).
|
||||
|
||||
## Rows
|
||||
|
||||
| line | files | subtask | acceptance (cites) | test |
|
||||
|---|---|---|---|---|
|
||||
| §780 | every `seats/*/seat.json` and `*/seats/*/seat.json` (`form`), regenerated `go/`, `ts/` with `mesh-delivery`'s `seatgen` | K1 regenerate tolerant, `form` | §780 unit | unit |
|
||||
| §808 | `identity-and-access/seats/mesh-vault/seat.json`: a write of a module's own secret (H-A-345) | K2 vault write verb (waits DQ-7) | the forge module writes and reads its token through the vault seat (§808) | unit, whole (forge module) |
|
||||
| §781 | `seats/node-engine/seat.json`: `converged` with `timeout` (waits DMC-12) | K3 | §781 | unit |
|
||||
|
||||
## Order and writers
|
||||
|
||||
K1 after `mesh-delivery` G1 (the generator); K2 before `mesh-catalog` C4 and VA1; K3 before `mesh-catalog` P2. One agent.
|
||||
|
||||
## Test budget (§819)
|
||||
|
||||
Not a module H2's count names; its packages' tests are read in the check.
|
||||
@@ -0,0 +1,191 @@
|
||||
---
|
||||
layer: to-be
|
||||
status: in-progress
|
||||
design: 47
|
||||
milestone: H2
|
||||
updated: 2026-11-21
|
||||
---
|
||||
# 47 H2 build map: `mesh-delivery`
|
||||
|
||||
Read at `origin/main` `7e597a623eb2` (2026-11-21 21:01 UTC), from an archive of that commit (`git archive origin/main`),
|
||||
never a working tree. The design read is hq `35ddd45e` (branch `design/47-H2-part`). Every row cites the design line it
|
||||
builds ("design 47 H2 §n"). Where a line meets code that cannot take it, the row points to the entry under *Design meets
|
||||
code* (DMC-n) or *Design questions* (DQ-n) at the end of
|
||||
[H2-the-delivery-systems-owed-work](../H2-the-delivery-systems-owed-work.md); such a subtask waits for its answer.
|
||||
|
||||
## What exists today
|
||||
|
||||
Searches as run, from the archive's root `mesh-delivery/`:
|
||||
`grep -rn "CallKept\|DoKept\|DoRepeatable" --include='*.go' modules`; `grep -rn "Subscribe(" --include='*.go'
|
||||
modules/mesh-delivery-builder/cmd modules/mesh-delivery-assigner/cmd`; `python3` over every
|
||||
`modules/mesh-delivery-contracts/seats/*/seat.json` listing verbs, accepts and events; `grep -rn "DisallowUnknownFields"
|
||||
--include='*.go' modules`; each tool of the H2 tools table searched by its quoted name in every `module.json` and Go
|
||||
file; live: `nats.nats_streams` with `stream` `SEAT_MESH_BUILDS` and `SEAT_MESH_WANTS` (answered by novox, 22:25 CET).
|
||||
|
||||
1. **What exists today.**
|
||||
- The kept call is built in mesh-sdk (`CallKept`, `busretry.DoRepeatable`, `DoKept`) and used by the runner
|
||||
(`cmd/mesh-delivery-pipeline/drop.go`, `main.go`, `verbs.go`), the assigner (`main.go`, `puts.go`, `askended.go`,
|
||||
`compositionrun.go`), the builder (`buildrun/asks.go:183`, `cmd/.../reads.go`), the bridge (`moves.go`, `bound.go`).
|
||||
The runner puts step asks by a JetStream publish with the ask id as message id
|
||||
(`modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline/asks.go:27-42`), one try.
|
||||
- Seats `mesh-builds` and `mesh-wants` each accept one kind, `step` (`seats/mesh-builds/seat.json` `accepts`,
|
||||
`seats/mesh-wants/seat.json` `accepts`); neither declares `ask-taken` nor `version-reserved`. The grants part derives
|
||||
their work-queue streams `SEAT_MESH_BUILDS` and `SEAT_MESH_WANTS` with a shared worker, ack wait 60 s, max deliver 5,
|
||||
max age 7 days (`modules/mesh-grants/internal/buscompose/derived.go:86-110`, `:343-358`). The builder hears asks by a
|
||||
plain subscription (`modules/mesh-delivery-builder/cmd/mesh-delivery-builder/step.go:78`), the assigner likewise
|
||||
(`modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/compositionstep.go:257`). Live: `SEAT_MESH_BUILDS` holds
|
||||
1,558 messages, `SEAT_MESH_WANTS` 1,598, each with 0 consumers, max age 168 hours.
|
||||
- The runner treats `mesh-builds` and `mesh-wants` as silent seats with `ask-silent-bound` (45 min) and the build seats
|
||||
as seats that say `ask-taken`, with a second put under `AgainID` and a second bound key `ask2.`
|
||||
(`modules/mesh-delivery-pipeline/internal/pipeline/asks.go:17-160`, `cmd/.../askbounds.go:20-35`).
|
||||
- The runner's step record has no `asked-at` or `taken-at`; `pipeline-ended` has no `phases` or `unfinished`
|
||||
(`seats/mesh-pipeline-runner/seat.json`). Its stalled bound is the constant `StalledAfter` 5 minutes
|
||||
(`internal/pipeline/consumers.go:26`). It keeps step outputs in objects `step-outputs` (`internal/pipeline/steps.go:138`,
|
||||
`cmd/.../steps.go:100`; manifest `objects` `step-outputs` 1,024 MiB). Its tools: 14 (`module.json`), with
|
||||
`runner_health`; no `runner_show`, `runner_movers`, `runner_cancel`, `runner_step_output` or `runner_unfinished*`.
|
||||
- Delivery modules ask for their stores in the manifest's old sections (`state`, `streams`, `objects`): the runner's
|
||||
findings stream `mesh-delivery-pipeline-findings` 16 MiB 7 days (`module.json:222-232`), the builder's likewise
|
||||
(`module.json:140`); the bridge asks for `performed` in `requires` by the state template, TTL 604,800 s
|
||||
(`modules/mesh-delivery-forge-bridge/module.json:40-45`).
|
||||
- Generated seat decoders refuse unknown fields (`DisallowUnknownFields` in every `go/seats/*/contract.go`); no seat
|
||||
definition carries `form` (each has the file's `format: 1`). The seat generator is `modules/mesh-delivery-sdk/seatgen`
|
||||
(`gogen.go`, `tsgen.go`), not in mesh-sdk.
|
||||
- Two copies of the contracts and the delivery SDK stand: `contracts/` and `sdk/` at the repository's root (used only by
|
||||
each other) and `modules/mesh-delivery-contracts`, `modules/mesh-delivery-sdk` (used by every module).
|
||||
- The build-step part (`modules/mesh-delivery-contracts/parts/build-step.json`) already has the verbs `current`
|
||||
(answer: the steps running, capacity, paused), `output` (a chunked whole answer by `ask` and `call`), `drop`, and the
|
||||
event `ask-taken` on `ask-taken.<node>`.
|
||||
- The builder's tag form is `go/v<version>` (`modules/mesh-delivery-builder/internal/versions/tag.go:4`,
|
||||
`reserve.go:264`); its floor reads tags by `TagPrefix` (`claim.go:50-56`). Its unbuildable plans are said per module
|
||||
(`buildrun/buildseats.go:114`). Its publish items are a state bucket (`cmd/mesh-delivery-builder/publishitem.go:44-110`),
|
||||
read with `builder_publish_queue` (exists). Its published mark keeps `published-at` and kept releases keep `digest`
|
||||
(`internal/versions/reserve.go:57-59`, `:95-98`, `:102-106`, `:460-463`): §798 is built on main.
|
||||
- The fingerprint is computed in the indexer alone (`modules/mesh-delivery-indexer/internal/fingerprint/fingerprint.go:1-5`,
|
||||
`Of`), over the directory's tree or the named paths (`internal/index/inputs.go:97-118`); a repository's commit enters
|
||||
through unpublished packages and the import form's versions (`internal/index/form.go:27-50`, `:113-125`).
|
||||
- The indexer's dry run is a copy of its states kept in memory that still writes manifests and packages to the bus
|
||||
(`internal/index/dryrun.go:12-40`). The validate step and `causedProblems` are the assigner's
|
||||
(`cmd/mesh-delivery-assigner/validatestep.go:124`, `:203-230`), counting every problem of a touched module. The seat
|
||||
`mesh-catalog` has `seat-definitions`, no `seat-list`; a registration is keyed `<module>` and requires `module`,
|
||||
`origin`, `path`, `branches`, `policy` (`seats/mesh-catalog/seat.json` `defs.Registration`).
|
||||
- The teller keeps a wait for room and its tests (`modules/mesh-delivery-teller/cmd/mesh-delivery-teller/ends.go:16-68`,
|
||||
`room_test.go`).
|
||||
2. **What the change touches, replaces or removes, and what relies on each.**
|
||||
- Plain subscriptions on `mesh.seat.mesh-builds.accept.step` and `mesh.seat.mesh-wants.accept.step`: written by the
|
||||
runner (`asks.go:27`), heard by the builder (`step.go:78`) and the assigner (`compositionstep.go:257`); nothing else
|
||||
subscribes (search above).
|
||||
- `ask-silent-bound`, `SilentWhy`, `AgainID`, `ask2.` keys: written and read only in the runner
|
||||
(`internal/pipeline/asks.go`, `bounds.go`, `cmd/.../askbounds.go`, `main.go:172`); the setting's file
|
||||
`MESH_RUNNER_ASK_SILENT_BOUND_FILE` is named in the runner's manifest.
|
||||
- Objects `step-outputs`: written by the runner's hearer (`internal/pipeline/steps.go:305`), read by `read.go:25-42`.
|
||||
- The builder's publish-items bucket: written by `publishitem.go:96`, read by `republish.go` and the tools bundle
|
||||
(`cmd/mesh-delivery-builder-tools/republish.go:37`).
|
||||
- The runner's drop of `kept-revisions` before the seat decode (`internal/pipeline/steps.go:203-207`, `verbs.go:609`,
|
||||
`moverkeys.go:294-300`).
|
||||
- The tag form `go/v<version>`: read by the builder's floor (`claim.go:213`) and by Go's toolchain at fetch.
|
||||
- The teller's room wait: written and read in the teller only (`ends.go`, `assignerasks.go:20-24`).
|
||||
3. **What happens to each, and the test.** Plain subscriptions go (design 47 H2 §777; proven by the whole-module tests of
|
||||
§777). `ask-silent-bound` and its key go (§777); `AgainID` and `ask2.`: no line gives their fate on the build seats
|
||||
(DQ-4). `step-outputs` goes, dropped through the bus module (§791; the search for its name finds no reader). The
|
||||
publish-items bucket goes after one move (§793). The `kept-revisions` drop goes (§780). `go/v` tags go from new
|
||||
versions (§796). The room wait goes (§813 (10); the teller's suite holds no such test). New exported parts and their
|
||||
placing lines: `ask-taken` and `version-reserved` events (§777, §805, §821), `phases` and `unfinished` (§785, §786),
|
||||
`asked-at`, `taken-at` (§778), states `unfinished` (§786, §820), `taken` (§775, §820), `dry-runs` (§804, §820), work
|
||||
queue `publishes` (§793, §820), verb `seat-list` (§814), the source-only registration (§815; its key is DQ-9).
|
||||
|
||||
## Rows: each design line, where it lands, its subtask
|
||||
|
||||
Labels: `D` contracts (`modules/mesh-delivery-contracts`, regenerated by `seatgen`), `G` the generator
|
||||
(`modules/mesh-delivery-sdk`), `R` the runner, `B` the builder, `I` the indexer, `A` the assigner, `F` the bridge, `T` the
|
||||
teller, `V` the view. Each acceptance cites its design line's *How it is checked*.
|
||||
|
||||
| line | files and functions | subtask | acceptance (cites) | test |
|
||||
|---|---|---|---|---|
|
||||
| §780 | `modules/mesh-delivery-sdk/seatgen/gogen.go`, `tsgen.go`, `load.go` (decoders, `form`, the generator's check) | G1 tolerant decoders and `form` (waits DMC-4) | a value, event, answer with an unknown field decode and return their form; absent `form` reads 1; a definition whose fields changed with `form` unchanged fails (§780) | unit, `seatgen` |
|
||||
| §780 | every `go/seats/*/contract.go`, `ts/` (regenerated) | D0 regenerate all seats from G1 | the generated decoders keep unknown fields (§780) | unit, `mesh-delivery-contracts` |
|
||||
| §777, §821, §805 | `seats/mesh-builds/seat.json`, `seats/mesh-wants/seat.json`: accepted kinds as work queues with their settings, `ask-taken` (`<seat>.ask-taken.<ask>`: `ask`, `node`, `at`), `version-reserved` (`module`, `artifact`, `path`, `version`, `fingerprint`, `revision`) | D1 queues and events of the two seats (waits DQ-1, DQ-2, DMC-1) | the seat list carries each family and name (§821) | unit, `mesh-delivery-contracts` fixtures |
|
||||
| §778, §785, §786, §789, §821 | `seats/mesh-pipeline-runner/seat.json`: step `asked-at`, `taken-at`; `pipeline-ended` `phases`, `unfinished`; `show` filters `mover`, `step`, `state`, answer `capped`, `total`, `next`; the re-pin's event (DQ-13) | D2 runner seat | `pipeline-ended` of two movers carries each step kind's span (§785) | unit, fixtures |
|
||||
| §791, §800, §801 | `parts/build-step.json` (`output` input `ask`, answer last 64 KB, size, failing tests, "no longer kept"; `current` per holder takes or why not, every ask; summary `not-run`), `seats/node-build-node/seat.json` (accepted kind `install`) | D3 build-step part (waits DMC-6, DMC-16) | per §791, §800, §801 checks | unit, fixtures |
|
||||
| §806, §814, §815 | `seats/mesh-catalog/seat.json`: `registrations` filters `module`, `repository`, `capped`, cursor; verb `seat-list` (`digest`, `size`, `object`); the source-only registration (`repository`, `branch`, `policy`, `check`) | D4 catalog seat (waits DQ-9) | §806 unit; §815 whole | unit, fixtures |
|
||||
| §776, §796 | `seats/git/seat.json`: `tags` answer `commit` per tag, the listing's description of `not-found`, `ErrorKind` gains `away` | D5 git seat (waits DMC-2, DMC-3) | §796 whole (builder) | unit, fixtures |
|
||||
| §811 | `seats/mesh-delivery/seat.json`: `deliveries` filters `repository`, `module`, `outcome`, `since`, answer `capped`, `total`, cursor | D6 delivery seat | `deliveries` by repository over 4 MB answers under 768 KB (§811) | unit (gate) |
|
||||
| §775 | `modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline/asks.go` `busStepAsker.AskStep`, every seat call of the runner | R1 asks as kept calls with the pace and `ask-unanswered-bound` | a composition ask whose holder is away 40 s passes its step with no hand act (§775) | whole, runner |
|
||||
| §777, §778 | `internal/pipeline/asks.go` (`Silent`, `AskClock`, `AskUnanswered`), `bounds.go`, `cmd/.../askbounds.go`, `consumers.go` (hear `ask-taken` of both seats), the step record | R2 bound from the pull, untaken bound, drop at the bound, put again only on a transport fault (waits DMC-15, DQ-4) | ask taken 9 min before a restart with a 10 min bound ends 1 min after start and is dropped; untaken for `stalled-bound` named by health; untaken for the whole bound ends could-not-run naming the holder; a put refused for a full stream is said and asked again (§777, §778) | unit, runner |
|
||||
| §784 | `internal/pipeline/steps.go` (the one place saying `step-ended`), the place an ask is put | R3 journal lines | each way a step ends writes that line once (§784) | unit |
|
||||
| §785 | `internal/pipeline/steps.go` `endPipeline` (`:731`) | R4 phases | two movers end with each kind's span (§785) | unit |
|
||||
| §786 | new state `unfinished`; `endPipeline`; the take-in consumer; tools bundle `runner_unfinished`, `_drop`, `_place` | R5 movers put in a pipeline again | of two movers one fails unit; `pipeline-ended` names the other; the next take-in's pipeline carries it; it is wanted (§786) | whole, runner |
|
||||
| §787, §780 fate | `internal/pipeline/steps.go:203-207`, `verbs.go:609`, `moverkeys.go:294-300` | R6 `kept-revision-unread`, drop of `kept-revisions` goes | unit (§787) | unit |
|
||||
| §788 | `internal/pipeline/registration_missing.go`, the registrations view, `runner_health` | R7 registrations read first | a start with the view unread raises none, answers `registrations-read` false, places once read (§788) | unit |
|
||||
| §789 | `internal/pipeline/read.go` `Show`, the `show` verb, new tools `runner_show`, `runner_movers` | R8 a pipeline in parts (waits DMC-8) | one mover of 129 under 64 KB; `runner_movers` of 1,000 under 768 KB (§789) | unit |
|
||||
| §790 | `internal/pipeline/consumers.go:26` `StalledAfter` to the setting `stalled-bound`; process and tools program read it | R9 stalled bound a setting (uses mesh-sdk S6) | at one minute, health names such a pipeline after one minute, not once a step is placed (§790) | whole |
|
||||
| §791 | new tool `runner_step_output`; `step-outputs` dropped (`internal/pipeline/steps.go:138`, `:305`, `read.go`) | R10 step output where kept | a failing unit test's words read through `runner_step_output`; past max-age "no longer kept" (§791) | whole (Go build module) |
|
||||
| §815 | the run on request of a source-only registration's head as one step (`cmd/.../testruns.go`, `internal/pipeline` run path) | R11 a source-only check | a source-only pull request is run on request (§815) | whole (indexer, runner, gate) |
|
||||
| §783, §820 | `modules/mesh-delivery-pipeline/module.json` (findings stream 8 MiB, `findings-max-age`; `unfinished`; `taken`; setting `stalled-bound`; drop `step-outputs` and `ask-silent-bound`) | R12 runner's manifest (waits DQ-5) | 10,000 findings past the cap refuse none (§783) | whole |
|
||||
| §775, §777 | `cmd/mesh-delivery-builder/step.go` `serveSteps` (pull the worker, in-progress, ack at the end, `ask-taken`, `taken`); `buildrun/asks.go` publish asks to registries as kept calls | B1 pull and take once | a build ask put while the builder is stopped is taken and ended after its start (§777) | whole, builder |
|
||||
| §777 | new tools `builder_asks`, `builder_ask_drop` | B2 queue tools | per tools table | unit |
|
||||
| §792 | `step.go` (the build step's finish) | B3 answered line | unit (§792) | unit |
|
||||
| §793 | `cmd/mesh-delivery-builder/publishitem.go`, `internal/versions/republish.go`, tools `builder_publish_queue` (exists), `builder_publish_drop`, `builder_publish_first`; the one move of the bucket | B4 publishes work queue (waits DQ-6) | a live publish behind 100 `again` is sent first; a dropped item never sent; a move run twice puts each once (§793) | whole |
|
||||
| §794 | `internal/versions/heard.go` (handling of `published`, `package-published`), health | B5 one read and one write | 1,000 events over 2,000 reservations: one read and one write each; a backlog held six minutes named (§794) | unit, whole |
|
||||
| §795 | `buildrun/buildseats.go:114`, new tool `builder_unbuildable` | B6 one summary line | 6,500 unbuildable plans write one line (§795) | unit |
|
||||
| §796 | `internal/versions/claim.go`, `reserve.go:264`, `tag.go` | B7 tags read before reserve, `version-tagged-elsewhere`, tag `<directory>/v<version>` | a tag at another commit makes the next number and the finding, cleared at the next release (§796) | whole |
|
||||
| §797 | `modules/mesh-delivery-sdk/buildrecord` and the builder's writer | B8 build record end | unit (§797) | unit |
|
||||
| §798 | `internal/versions/reserve.go:57-106`, `:452-466` | none: built on main | a publish heard now answers its time (§798): read the existing test | unit (exists) |
|
||||
| §799 | the builder's reading of a step's why (`buildrun/heardends.go`, `faults.go`) | B9 `fetch:` and `publish:` said apart | per §799 | unit |
|
||||
| §801 | new tool `build_current` (asks every holder's `current`) | B10 build current | an ask the builder put is listed by `current` while it runs (§801) | whole (Go build module) |
|
||||
| §805 | `internal/versions/reserve.go` (say `version-reserved` at the reservation) | B11 version-reserved | §805 whole (indexer) | whole |
|
||||
| §802 | the builder's read of the fingerprint (`internal/build/run.go`) | B12 builder takes the new fingerprint (waits DMC-5) | §802 whole (indexer) | whole |
|
||||
| §783, §820 | `modules/mesh-delivery-builder/module.json` (findings, `publishes`, `taken`) | B13 builder's manifest (waits DQ-5) | §783 | whole |
|
||||
| §802 | `internal/fingerprint/fingerprint.go` `Of`, `internal/index/form.go` `formOf`, `lineVersions` | I1 fingerprint over the module's own build source (waits DMC-5, DQ-8) | a commit touching two test files of two modules of 36 moves those two and their importers alone (§802) | whole, indexer |
|
||||
| §803 | the take-in's waits on the seat `git`, versions, a registry; value of `takeins` (`waiting-on`); finding `take-in-waiting` | I2 take-in says what it waits on | 70 s writes one line and `waiting-on`; six minutes raises the finding, cleared at the answer (§803) | unit |
|
||||
| §804 | `internal/index/dryrun.go`, `runcandidates.go:213`; state `dry-runs`; tool `indexer_dry_runs` | I3 dry run's own state | trunk packages byte for byte as before; a start finds `dry-runs` empty (§804) | whole |
|
||||
| §805 | the re-pin path (`internal/index` pins, the consumer of `package-published`), consume `version-reserved` | I4 re-pin once at the reservation | a release importing twenty packages of its pipeline keeps one re-pin revision (§805) | whole |
|
||||
| §806 | the `registrations` verb, new tool `indexer_registrations` | I5 registrations in one call | unit (§806) | unit |
|
||||
| §814 | verb `seat-list` (one object in the indexer's objects by digest), `cmd/mesh-judge` reads it by address, `judge/rules.go` refuses an uncapped store of a delivery module, tool `indexer_validate_before` | I6 seat list and the uncapped refusal (waits DMC-9, DQ-10) | a run by hand against `seat-list` gives the live validate's verdicts for the builder's and the runner's manifests; an uncapped entry refused, a foundation part's capped old-section entry not (§814) | whole, unit |
|
||||
| §815 | registrations state and `register`; take-in of a source-only branch with no movers; refusal when the repository holds a manifest | I7 source-only registration (waits DQ-9) | §815 whole | whole |
|
||||
| §818 | `indexer_recompute` (exists) | none: a run, not code | the lead reads `runner_movers` (§818) | live |
|
||||
| §775 | `cmd/mesh-delivery-assigner/compositioninputs.go:24`, `:109` (`compose-candidate` as kept call, `compose-ask-bound`) | A1 compose-candidate kept | §775 whole (runner) | whole |
|
||||
| §777 | `compositionstep.go:257` (pull), new tools `assigner_asks`, `assigner_ask_drop` | A2 pull validate and compose (waits DQ-1) | a validate ask put while the assigner is stopped is taken after its start; after a pipeline's end both consumers hold 0 pending (§777) | whole, assigner |
|
||||
| §792 | `compositionstep.go`, `validatestep.go` | A3 answered line | unit | unit |
|
||||
| §813 (1) | the composition writer (`compositionrun.go`, `puts.go`): `run`, compare-and-set refusing a lower `run` | A4 one writer per composition key (waits DQ-12) | unit (§813 (1)) | unit |
|
||||
| §813 (2) | the keeping of assignment graph revisions (`revisions.go`, `graphkept.go`), setting `keeping-retry`, finding `keeping-failed`, tool `assigner_keep_now` | A5 failed keeping runs again | unit (§813 (2)) | unit |
|
||||
| §814 | `validatestep.go:203-230` `causedProblems` (drop the touched clause) | A6 only new problems (waits DMC-9) | a problem the before case holds is not counted (§814) | unit |
|
||||
| §807 | `cmd/mesh-delivery-forge-bridge/acts.go`, `call.go`, `bound.go` (`owed-away-bound`), `cmd/mesh-delivery-forge-bridge-tools/owed.go` (`bridge_owed_again` `record`, preconditions again) | F1 owed through a part away | forge away 60 s: a note act is performed after, no hand act; a closed pull request's act is ended (§807) | whole, bridge |
|
||||
| §811, §812 | `bridge_owed` by pull request in the process; `performed` prune and `performed-keep` | F2 performed capped | a write past 70 % prunes to 50 %; a key under `state_keep` survives (§812) | whole, bridge |
|
||||
| §813 (10) | `modules/mesh-delivery-teller/cmd/mesh-delivery-teller/ends.go`, `assignerasks.go`, `room_test.go` | T1 room wait goes | the teller's suite holds no such test (§813 (10)) | unit |
|
||||
| §813 (9) | `modules/mesh-delivery-view` usage reading | V1 usage by `current` | unit (view) | unit |
|
||||
|
||||
## Order and writers
|
||||
|
||||
- **Order.** G1, then D0 (regenerate), then D1 to D6 (one contracts agent, one commit each). mesh-sdk's S1, S2, S3, S6,
|
||||
S8, S11 (the mesh-sdk map) come before every user. Then R, B, I, A, F, T, V start from D's last commit. Within the
|
||||
runner, R1 before R2; R2 before R3, R5, R8. Within the builder, B1 before B2, B4; B11 before I4. I1 and B12 land in one
|
||||
commit pair read together (§802: one release). Merge order of the group: contracts and generator, then the indexer
|
||||
and the builder (§802), the assigner after the node-engine's tolerant reading (§813 (1)'s edge, the node-engine's map),
|
||||
then the runner, bridge, teller and view.
|
||||
- **Ordering edges.** §813 (1): the node-engine that reads `run` tolerantly runs before the assigner writes it (an edge
|
||||
of the module graph). §818: once the indexer and builder of §802 run, the recompute moves every module once, before
|
||||
the proofs. §777's stream rebuild through `nats_recreate` runs before the new builder and assigner start (a live act on
|
||||
the operator's warrant, not code).
|
||||
- **One writer per file.** One agent per module directory: the contracts agent writes `modules/mesh-delivery-contracts`
|
||||
and `modules/mesh-delivery-sdk/seatgen`; the runner agent `modules/mesh-delivery-pipeline`; the builder agent
|
||||
`modules/mesh-delivery-builder` and `modules/mesh-delivery-sdk/buildrecord`; the indexer agent
|
||||
`modules/mesh-delivery-indexer`; the assigner agent `modules/mesh-delivery-assigner`; one leaf agent the bridge, the
|
||||
teller and the view. `modules/mesh-delivery-sdk/steprun/conformance` is the build modules' agent's (mesh-catalog map).
|
||||
- **Not to touch.** `contracts/` and `sdk/` at the repository's root (no line names them).
|
||||
|
||||
## Local facts
|
||||
|
||||
- Worktree per playbook 07 item 2 under `.work/<slug>/mesh-delivery`, branch `feat/<slug>`; `TMPDIR` under the worktree.
|
||||
- **Placement of the siblings**, as the Go build module places them (`mesh-catalog`
|
||||
`modules/mesh-build-go/cmd/mesh-build-go/workspace.go:17-60`): a `go.work` that `use`s the module and, transitively,
|
||||
every module it requires at the zero version `v0.0.0-00010101000000-000000000000`, each found by module path among the
|
||||
sibling clones (`mesh-sdk`, `mesh-contracts`, `mesh-delivery`, `mesh-catalog`, `mesh-tools`, `mesh-host`,
|
||||
`mesh-networking`), with `replace <path> v0.0.0-00010101000000-000000000000 => <dir>` for each. No agent writes another.
|
||||
- Unit suite: `GOWORK=<that go.work> go test ./...` per module; integration compiled: `go vet -tags integration ./...`.
|
||||
|
||||
## Test budget (§819), by `go test -list '.*'` without and with `-tags integration`, top-level functions
|
||||
|
||||
Counted at this commit, 22:20 to 22:30 CET (unit / integration): runner 105 / 4; builder 167 / 18; indexer 167 / 6;
|
||||
assigner 86 / 9; bridge 10 / 2; teller 50 / 5; view 84 / 8; `mesh-delivery-sdk` 149 / 12; `mesh-delivery-contracts` 47 / 0.
|
||||
§819 names the indexer 170 / 6 and the assigner 87 / 9: the counts differ by 3 and 1 (DQ-14). Each module H2 changes ends
|
||||
below its start.
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
layer: to-be
|
||||
status: in-progress
|
||||
design: 47
|
||||
milestone: H2
|
||||
updated: 2026-11-21
|
||||
---
|
||||
# 47 H2 build map: `mesh-host` (the node-engine)
|
||||
|
||||
Read at `origin/main` `637cfb1fd044` (2026-11-21 20:48 UTC), from an archive of that commit. Design: hq `35ddd45e`.
|
||||
DMC-n and DQ-n are the entries at the end of [H2-the-delivery-systems-owed-work](../H2-the-delivery-systems-owed-work.md).
|
||||
|
||||
## What exists today
|
||||
|
||||
Searches as run, from `mesh-host/`: `grep -rn "TOOL_ENV\|RuntimeToolEnv" --include='*.go' internal`;
|
||||
`grep -rn "compose-candidate\|ComposeCandidate" --include='*.go' internal`; `grep -rn "comment" --include='*.go'
|
||||
internal/firewall`; `grep -rln "engine_" --include='*.go' .`; `grep -rln "node-tools\|tool runner" --include='*.go'
|
||||
internal`; the node-engine seat's verbs from `mesh-contracts` `seats/node-engine/seat.json`; live: `mesh_search`
|
||||
"node-engine composition" (22:27 CET).
|
||||
|
||||
1. **What exists today.**
|
||||
- The node-engine composes `MESH_TOOL_ENV`, each module's words by module, into the tool runner's process
|
||||
(`internal/compositions/composed.go:296-336`, `internal/compose/composed.go:369-410`, `:476`); a module's settings
|
||||
reach its own process as files the manifest names (`${config:<key>}`), and whether they reach its tools bundle's
|
||||
words is not said in the code read (DMC-13).
|
||||
- The verb `compose-candidate` answers within `candidateWithin` (`internal/selfcompose/candidate.go:44-49`,
|
||||
`:101-104`); it takes no ask id and keeps no `taken`.
|
||||
- The node-engine renders each opening as a ufw rule with the comment `Mark`: `mesh-host <id> <digest>`
|
||||
(`internal/firewall/firewall.go:415-427`, `:782`), and recognises its own rules by that mark (`markedFor`, `:426`).
|
||||
- The node-engine has no tools of its own: it serves the seat `node-engine`'s verbs (live: `ace/node-engine.composition`,
|
||||
`.compose`, `.packages`, `.compose-candidate`, each also on g14, novox, shanks); no `engine_composition_diff`.
|
||||
- The node-engine seat has no verb `converged` and no verb carries `timeout` (`mesh-contracts`
|
||||
`seats/node-engine/seat.json`, 18 verbs, each `timeout` absent).
|
||||
- The composition's value carries `run` as a string (`mesh-contracts` `go/seats/nodeengine/contract.go:1764`); the
|
||||
generated decoders refuse unknown fields (9 places in that file).
|
||||
- The tool runner is placed as a unit of the node-engine's composition (`internal/compose/input_held.go`,
|
||||
`internal/link/engineseat.go`); no drain wait before the new one starts was found.
|
||||
2. **What relies on each.** The mark `mesh-host <id> <digest>`: read by the node-engine's own reconciling
|
||||
(`firewall.go:426`, `:452`, `:536-616`) and by the packet filter's holder reading `rules` (`mesh-catalog`
|
||||
`modules/nftables/client.ts`). `MESH_TOOL_ENV`: read by the tool runner (`mesh-tools` `internal/launch`).
|
||||
`compose-candidate`: asked by the assigner (`mesh-delivery` `compositioninputs.go:109`).
|
||||
3. **Fates.** The mark's form against §813 (4)'s comment is DQ-11. New parts: `run` as the composition run's sequence
|
||||
(§813 (1)), the setting `drain-bound` read by the node-engine (§813 (12)), the tool `engine_composition_diff` (§813 (3);
|
||||
its place is DQ-12b).
|
||||
|
||||
## Rows
|
||||
|
||||
| line | files and functions | subtask | acceptance (cites) | test |
|
||||
|---|---|---|---|---|
|
||||
| §780 | the node-engine's readers of another part's values (`internal/link`, the generated `nodeengine` contract from `mesh-contracts`) | E1 tolerant reading | §780 unit (mesh-sdk) | unit |
|
||||
| §775 | `internal/selfcompose/candidate.go` `ComposeCandidate`: take an ask once by its id (`taken`) | E2 compose-candidate once | a holder given the same ask id twice acts once (§775) | unit |
|
||||
| §781 | `internal/compositions/composed.go:296-336`: a module's settings into its slice of `MESH_TOOL_ENV` | E3 settings to the tools program (waits DMC-13) | §781 unit (mesh-sdk) | unit |
|
||||
| §813 (1) | the apply of a composition (`internal/apply`, `internal/compositions`): apply again only when a readable part differs and `run` is newer; journal names the run | E4 only a newer run (waits DQ-12) | unit (§813 (1)) | unit |
|
||||
| §813 (3) | a composition diff by resource, environment by name, secrets masked | E5 composition diff (waits DQ-12b) | unit (§813 (3)) | unit |
|
||||
| §813 (4) | `internal/firewall/firewall.go` `Mark`, `:782`: comment `derived <module> <listen> scope <any\|private-network\|local-network>` | E6 derived rule's scope (waits DQ-11) | unit (node-engine render) (§813 (4)) | unit |
|
||||
| §813 (12) | the replacement of the tool runner's unit: wait `drain-bound` for the old to exit | E7 drain wait | the new tool runner starts only after the old exits or the bound passes (§813 (12)) | unit |
|
||||
| §819 | the node-engine's tests | E8 shrink | the check's counts against the start | check |
|
||||
|
||||
## Order and writers
|
||||
|
||||
- E1 first (the edge of §813 (1): the node-engine reading `run` tolerantly runs before the assigner writes it); then E2 to
|
||||
E7. E6 before `mesh-catalog` P1. One agent writes this repository.
|
||||
|
||||
## Local facts
|
||||
|
||||
- Placement as the `mesh-delivery` map says; `mesh-networking` is among the siblings.
|
||||
|
||||
## Test budget (§819)
|
||||
|
||||
1,715 unit and 11 integration top-level tests by `go test -list` (22:30 CET); §819 names 1,716 and 11 (DQ-14). Over the
|
||||
budget of 500 unit: H2's change ends below 1,715.
|
||||
@@ -0,0 +1,82 @@
|
||||
---
|
||||
layer: to-be
|
||||
status: in-progress
|
||||
design: 47
|
||||
milestone: H2
|
||||
updated: 2026-11-21
|
||||
---
|
||||
# 47 H2 build map: `mesh-sdk`
|
||||
|
||||
Read at `origin/main` `bdc5cff0d63d` (2026-11-21 15:51 UTC), from an archive of that commit. Design: hq `35ddd45e`.
|
||||
DMC-n and DQ-n are the entries at the end of [H2-the-delivery-systems-owed-work](../H2-the-delivery-systems-owed-work.md).
|
||||
|
||||
## What exists today
|
||||
|
||||
Searches as run, from `mesh-sdk/go/`: `grep -n -i "kept" process/call.go`; `sed -n 1,60p busretry/busretry.go`;
|
||||
`grep -rn "\"refused\"\|ErrorKind" --include='*.go' .`; `grep -rn "func .*Setting" --include='*.go' .`;
|
||||
`grep -rn "func .*Fingerprint" --include='*.go' .`; `grep -n "Fill\|StateFilled" buscalls/buscalls.go`;
|
||||
`grep -rln "findings" --include='*.go' views`; `grep -rn "func (s KeptState)" state.go`.
|
||||
|
||||
1. **What exists today.**
|
||||
- The kept call: `Conn.CallKept`, `CallKeptOn`, `CallKeptWhileOpen` (`process/call.go:54-104`) over
|
||||
`busretry.DoRepeatable` and `DoKept` (`busretry/busretry.go:81`, `:116`), with process-wide `Bound` 30 s,
|
||||
`FirstWait` 250 ms, `MostWait` 4 s (`busretry.go:29-33`), no jitter, no ask id, no per-caller bound, no journal line
|
||||
per seat. No `taken` helper.
|
||||
- No seat error answer in mesh-sdk: error kinds are each seat definition's own (`git`'s `ErrorKind`: `refused`,
|
||||
`not-found`, `failed`, in `mesh-delivery`'s contracts).
|
||||
- The bundle's state page: `KeptState.Page(after, maxBytes, budget)` (`state.go:120`), served by the tool runner's
|
||||
`mesh/state.page` in key order after a key (the mesh-tools map).
|
||||
- No settings reader: each module reads `${config:<key>}` files its manifest names (for example the runner's
|
||||
`askbounds.go:20-35` in `mesh-delivery`); the tool runner hands each bundle its module's words from
|
||||
`MESH_TOOL_ENV` (`catalogue/runtime.go:39-43`).
|
||||
- The findings writer keeps the state `findings` and says three events (`views/writer.go:23-125`); its history stream
|
||||
is each module's manifest entry, not the writer's.
|
||||
- A state write answers its revision only (`state.go:177`, `:190`); `buscalls.Fill` and `StreamFilled` exist for a
|
||||
`fill` call (`buscalls/buscalls.go:87-92`, `:255-260`), not in a write's answer.
|
||||
- The seat list's bootstrap copy of `git` is `seatlist/bootstrap/git.json`, with its test copy
|
||||
`seatlist/seatlisttest/seats/git.json`.
|
||||
- No fingerprint function: the indexer holds the one (`mesh-delivery`
|
||||
`modules/mesh-delivery-indexer/internal/fingerprint/fingerprint.go:1-5`, "left mesh-sdk").
|
||||
- The seat generator is not here (`mesh-delivery` `modules/mesh-delivery-sdk/seatgen`).
|
||||
- The test bus is `testbus` (`testbus/testbus.go:36`, `:58`); no setup bound from the environment.
|
||||
2. **What relies on each.** Every caller of `CallKept*` (the `mesh-delivery` map lists them; also `mesh-host`
|
||||
`internal/link/engineseat.go`, `mesh-tools` `cmd/node-tools/approvals.go`, `mesh-catalog` `modules/restic`,
|
||||
`modules/mesh-recovery`); every test that sets `busretry.Waits` (`busretry.go:35-45`); every user of `KeptState.Page`
|
||||
(`views/views.go`, `views/tools.go`, the assigner's `store_pages.go`, the builder's tools' `republish.go`).
|
||||
3. **Fates.** Each stays and gains what its line names; no line removes a part here. New parts and their lines: the pace
|
||||
settings `kept-call-pace-first`, `kept-call-pace-max` (§775), the state `taken` (§775, §820), the kind `away` (§776),
|
||||
the cursor `next` and `seen-again` (§779), the settings reader in a bundle (§781), `state_prune_now`, `state_keep`
|
||||
(§812), the catalog's `check-needs` (§800; DMC-6), `MESH_TOOL_ENV`'s settings (§781).
|
||||
|
||||
## Rows
|
||||
|
||||
| line | files and functions | subtask | acceptance (cites) | test |
|
||||
|---|---|---|---|---|
|
||||
| §775 | `busretry/busretry.go` (pace from settings, jitter 20 %, the caller's bound), `process/call.go` (ask id carried), journal line per seat at first fault then at most once a minute | S1 kept call paced | no responders twice then answered returns the answer and logs one line; past its bound returns every try; a refusal returns at once (§775) | unit |
|
||||
| §775, §820 | a helper keeping the ids an owner took, state `taken`, key `<seat>.<ask>`, TTL the ask's bound | S2 take once | a holder given the same ask id twice acts once (§775) | unit |
|
||||
| §776 | the seat error answer kind `away` with `part`, `words` (waits DMC-2) | S3 `away` | callers read `away` as a transport fault (§776) | unit |
|
||||
| §779 | `state.go` `KeptState.Page`, `stdio.go` (`next` opaque, `seen-again`) | S4 page by cursor (with mesh-tools T1) | §779 whole (tool runner) | whole |
|
||||
| §781 | a settings reader for a process and a bundle (waits DMC-13) | S6 settings in a bundle | a tools bundle reads a setting the manifest sets (§781) | unit |
|
||||
| §782 | the wrappers around one bus handle (waits DQ-3) | S7 safe for concurrent use | concurrent gets, puts and watches through one wrapper under the race detector (§782) | unit, `-race` |
|
||||
| §783 | `views/writer.go` (the writer's `requires`: events template, 8 MiB, `findings-max-age`) | S8 findings history drops its oldest (waits DQ-5) | §783 whole (runner) | whole |
|
||||
| §800 | `testbus` and the test helpers: setup bound half of `MESH_TEST_LEVEL_BOUND`; `catalogue` field `check-needs` | S9 setup bound; S10 `check-needs` (waits DMC-6) | a starved setup runs again (§800) | unit |
|
||||
| §812 | a prune helper judging the fill from the write's answer at `prune-mark` to `prune-target`, the generic tools `state_prune_now`, `state_keep` written in the hand-act log (waits DMC-14) | S11 prune helper and tools | a write past 70 % prunes to 50 %; a kept key survives (§812) | unit, whole (bridge) |
|
||||
| §814 | `catalogue`: what the manifest validator needs to refuse an uncapped delivery store | S12 caps in the catalog | §814 unit (validator) | unit |
|
||||
| §796 | `seatlist/bootstrap/git.json`, `seatlist/seatlisttest/seats/git.json` | S13 bootstrap copy of `git` (uses `mesh-delivery` D5) | the copy equals the contract | unit |
|
||||
| §802 | "mesh-sdk's one fingerprint function": none here (DMC-5) | none until answered | | |
|
||||
|
||||
## Order and writers
|
||||
|
||||
- S1, S2, S3 first (the kept call and its errors); S4 with mesh-tools T1 in one pair; S6, S8, S11 before every module's
|
||||
use. S13 after `mesh-delivery` D5. One agent writes this repository; the mesh-tools T1 agent reads S4's commit.
|
||||
- Every module builds against the latest published mesh-sdk (ADR 0573 §2): the order between repositories is the
|
||||
package edges; S1 to S13 are published once before their users' check.
|
||||
|
||||
## Local facts
|
||||
|
||||
- Placement: as the `mesh-delivery` map says. Unit suite `go test ./...` in `go/`; the TypeScript half (`src/`) with
|
||||
`npm test`, untouched by these rows except S3 if its answer puts `away` in the TypeScript seat helpers (DQ-15).
|
||||
|
||||
## Test budget (§819)
|
||||
|
||||
`go/` holds 331 unit and 38 integration top-level tests by `go test -list` (22:30 CET).
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
layer: to-be
|
||||
status: in-progress
|
||||
design: 47
|
||||
milestone: H2
|
||||
updated: 2026-11-21
|
||||
---
|
||||
# 47 H2 build map: `mesh-tools` (the tool runner and the mesh MCP server)
|
||||
|
||||
Read at `origin/main` `02675a43eaf8` (2026-11-21 18:13 UTC), from an archive of that commit. Design: hq `35ddd45e`.
|
||||
DMC-n and DQ-n are the entries at the end of [H2-the-delivery-systems-owed-work](../H2-the-delivery-systems-owed-work.md).
|
||||
|
||||
## What exists today
|
||||
|
||||
Searches as run, from `mesh-tools/node-tools/`: `grep -n "StatePage" internal/bus/state.go`; `grep -rn "mesh/state.page"
|
||||
--include='*.go' .`; `grep -rln "mesh_wait" --include='*.go' .`; `grep -rn "UseSeats\|seatlist\." --include='*.go' .`;
|
||||
`grep -rn "SIGTERM\|Shutdown\|drain" --include='*.go' cmd internal`; `grep -rn "NakWithDelay" --include='*.go' internal`.
|
||||
|
||||
1. **What exists today.**
|
||||
- `mesh/state.page` (`internal/launch/launch.go:493`) is `Conn.StatePage` (`internal/bus/state.go:231-300`): the
|
||||
values in key order after `after`, each page reading every current value of the bucket again (`currentOf`), with
|
||||
`Next` the last key given.
|
||||
- `mesh_wait` (`internal/console/wait.go:60-140`) resolves `<seat>.<event>` against the seat list the tool runner reads
|
||||
live (`cmd/node-tools/seatlist.go:49-65`, `catalogue.UseSeats`) and a module's manifest events
|
||||
(`wait.go:195-262`); an undeclared event of a known seat is waited on and said undeclared at the time-out.
|
||||
- A stop: `signal.NotifyContext` on SIGTERM (`cmd/node-tools/main.go:58`); bundles get SIGTERM with the group
|
||||
(`internal/launch/launch.go:173-181`, `:728-735`); no drain of calls in flight, no `drain-bound`.
|
||||
- A seat ask a bundle did not take is offered again after `WorkBackoff` (5 s doubling to 10 minutes,
|
||||
`internal/bus/seat.go:71-79`, `:315`); a bundle's own delay is `seat_pull.go:193` `NakWithDelay(delay)`.
|
||||
2. **What relies on each.** `StatePage`: every bundle's `KeptState.Page` (the mesh-sdk map lists its users).
|
||||
`WorkBackoff`: every seat work queue a bundle pulls.
|
||||
3. **Fates.** `StatePage`'s key order and per-page replay go (§779). New parts: `drain-bound` (§813 (12)).
|
||||
|
||||
## Rows
|
||||
|
||||
| line | files and functions | subtask | acceptance (cites) | test |
|
||||
|---|---|---|---|---|
|
||||
| §779 | `internal/bus/state.go` `StatePage` (an ordered consumer after the cursor's sequence, 768 KB, `next`, `seen-again`), `internal/launch/launch.go:493` | T1 page by cursor (with mesh-sdk S4) | 10,000 keys read in pages deliver each kept message once; a key written again mid-read is marked `seen-again` (§779) | whole (tool runner) |
|
||||
| §813 (12) | `cmd/node-tools/main.go:58`, `internal/launch`, `internal/console`: take no new call after the stop, finish in flight within `drain-bound`, cut and say past it | T2 drain at stop | a stop during a 20 s call finishes it and refuses a call after the stop; a 40 s call is cut at 30 s and said (§813 (12)) | whole (tool runner) |
|
||||
| §799 | `internal/bus/seat_pull.go:193`, `seat.go:315`: the delay a run ended `again` is settled with (waits DMC-7) | T3 again-delays | §799 (kit) | unit |
|
||||
| §821 | `internal/console/wait.go`: nothing to build while the seat list carries each event (§821 is built in the contracts and holders) | none | a wait by seat and event name is answered (§821) | whole (each holder) |
|
||||
|
||||
## Order and writers
|
||||
|
||||
T1 with mesh-sdk S4 (one pair, the contract of the call first); T2 and T3 independent. One agent.
|
||||
|
||||
## Test budget (§819)
|
||||
|
||||
`node-tools` holds 160 unit and 9 integration top-level tests by `go test -list` (22:30 CET).
|
||||
@@ -0,0 +1,190 @@
|
||||
---
|
||||
layer: to-be
|
||||
status: in-progress
|
||||
design: 47
|
||||
milestone: H2
|
||||
updated: 2026-11-21
|
||||
decisions:
|
||||
- "ADR 0683"
|
||||
- "ADR 0682"
|
||||
- "ADR 0668"
|
||||
- "ADR 0664"
|
||||
- "ADR 0619"
|
||||
- "ADR 0596"
|
||||
- "ADR 0595"
|
||||
- "ADR 0571"
|
||||
- "ADR 0304"
|
||||
- "ADR 0282"
|
||||
- "ADR 0259"
|
||||
---
|
||||
# 47, milestone H2: the forge bridge, the gate, the parts beyond the chain, the stores and the tools
|
||||
|
||||
The second file of milestone H2's part of [design 47](../47-delivery-from-commit-to-delivered.md); the part opens at
|
||||
[H2-the-delivery-systems-owed-work](H2-the-delivery-systems-owed-work.md), whose introduction holds for this file too,
|
||||
and both are read whole. Lines are cited as "design 47 H2 §n" whichever file holds them.
|
||||
|
||||
### The forge bridge, the gate and the forge module
|
||||
|
||||
- §807 **An owed act failing on a part away stays owed.** (H-A-300 (1), (4), H-A-338 (5); row 177) The forge bridge
|
||||
performs an owed act of the gate's stream `owed` as a kept call (§775) through transport faults and `away` until
|
||||
`owed-away-bound` (a setting of the bridge, default 60 minutes), and only then says `owed.ended` with
|
||||
`could-not-be-performed`, naming its tries. `bridge_owed_again` gains `record` (a delivery record's source revision)
|
||||
to perform again every act of that record that ended could-not-be-performed; it is written in the hand-act log, and
|
||||
each act performed again checks its preconditions again (the pull request still open, the note not yet written)
|
||||
before it acts. Built in H2 in the bridge. How it is checked: whole (bridge): with the forge away for 60 s, a note act
|
||||
owed in that minute is performed after it, with no hand act; an act whose pull request closed meanwhile is ended,
|
||||
not performed.
|
||||
- §808 **One process mints the forge token at a time, and the token is a secret.** (ADR 0596; H-A-300 (3), H-A-338
|
||||
(1), H-A-339 (8), H-A-340 (4), H-A-344 (2), (10); row 177) The forge module's processes share one admin token, kept
|
||||
where the module keeps its secrets, its own in the vault, written and read through the seat `mesh-vault`'s verb
|
||||
`own` and never into another module's store or plain in a state, with the TTL `token-ttl` (a setting, default
|
||||
24 hours). A process the forge refuses first reads the vault's token; it takes the lease and mints only when the
|
||||
refused token is the vault's current one, else it uses the vault's newer token, so a refusal of a stale token mints
|
||||
nothing. A process that mints creates the lease key `mint` in the module's state `token-lease` (§820; create only, TTL
|
||||
`mint-lease`, a setting, default 60 s), mints, writes the token to its vault place, deletes at the forge the token
|
||||
it replaces, and deletes `mint`. A process that finds the lease taken waits for the token to change, at most the
|
||||
lease; past it, the lease has expired and the waiter creates the lease itself. `forge_token_lease` reads the lease's
|
||||
holder and since when and the token's age, never the token, which every read tool masks. Fate: each process's own
|
||||
mint goes. Built in H2 in the forge module. How it is checked: unit (forge module): two processes, one
|
||||
holding the old token, both refused, mint one token in all; whole: the forge holds one token for the account after; a minter killed while holding the lease is replaced after
|
||||
`mint-lease`.
|
||||
- §809 **The gate's ledger keeps one entry per module and revision.** (ADR 0595 §3; H-A-299 (1), H-A-338 (10), H-A-340
|
||||
(3), H-A-341 (3); row 176) The gate's ledger `records` (§820) writes one head entry per delivery record,
|
||||
`<branch>.<source>` (its outcome, the count of its movers and the times of §810), and one entry per mover,
|
||||
`<branch>.<source>.<module>` (its pipeline, version, machines and their `running` times); no entry names two modules.
|
||||
The gate refuses an entry over 64 KiB with the finding `record-too-large` (scope delivery), cleared when that entry is
|
||||
next written within 64 KiB or at the record's end. The ledger is never pruned; as a kept ledger it refuses when full
|
||||
(ADR 0595 §3), and the bus module's fill condition speaks for it. `gate_record` and `gate_records` join the entries.
|
||||
Fate: the whole-revision entry goes; the two records refused on 2026-11-21 are not written again. Built in H2 in the
|
||||
gate (mesh-catalog). How it is checked: whole (gate): a record of 126 movers writes 127 entries, none over 64 KiB,
|
||||
its head counting 126; an entry made too large raises `record-too-large`, and the record's end clears it.
|
||||
- §810 **A delivery record keeps its delivery time; the self-check judges it against its budget.** (ADR 0282 §1, §6,
|
||||
§7; ADR 0304; H-A-341 (1); row 111) At its end the gate writes on the head entry `delivery-time` (from `merge-called`
|
||||
to the last `running` of its movers on every present placing machine), `class` (`core` when it moves a core module of
|
||||
ADR 0282 §1, else `leaf`) and the phases of §785. `gate_times` answers each class's budget, the last seven days'
|
||||
median and worst, and every delivery over its budget with its longest phase (ADR 0282 §6's `times`), the budgets
|
||||
being the gate's settings `budget-core` (default 10 minutes, ADR 0282) and `budget-leaf` (default 3 minutes, ADR
|
||||
0304). As ADR 0282 §7 has it, the self-check's probe (the seat `mesh-self-check`) reads the gate's times and raises
|
||||
`over-budget` with the class as its id, naming the source revision and its longest phase; the next delivery of that
|
||||
class within its budget clears it; the gate raises nothing. Built in H2 in the gate and the self-check's probe. How it
|
||||
is checked: whole (gate and probe): a core record ended 11 minutes after its `merge-called` raises `over-budget` for
|
||||
the class `core`; the next core record within ten minutes clears it.
|
||||
- §811 **Every read filters before it sizes.** (H-A-299 (3); row 176) Every read verb and read tool of a delivery
|
||||
module applies its filters while it reads and answers at most 768 KB with `capped`, `total` and the cursor of §779,
|
||||
never "too big": among them the gate's `deliveries` (filters `repository`, `module`, `outcome`, `since`) and the
|
||||
bridge's `bridge_owed` by pull request (reading only that pull request's keys, in the bridge's process). How it is
|
||||
checked: the tools table of each pull request (principle 4); unit (gate): `deliveries` by repository over 4 MB of
|
||||
records answers under 768 KB.
|
||||
- §812 **Every kept store has a cap its owner prunes toward, judged at its own writes.** (ADR 0595 §3, §5, §6; H-A-227,
|
||||
H-A-299 (2), H-A-338 (10), H-A-339 (2), (8), H-A-340 (3), H-A-341 (2); rows 103, 176) Every state, log and objects
|
||||
entry a delivery module asks for names its cap. At each write it makes to such an entry, its owner judges the entry's
|
||||
fill from the figures the write's own answer gives (H-A-227, H-A-344 (7)), with no extra read, no poll and no timer, and when the fill passes `prune-mark` (a
|
||||
setting, default 70 %, below the bus module's raise mark of 75 %) prunes it, oldest first, down to `prune-target`
|
||||
(default 50 %), one journal line per prune. Ledgers, the hand-act log, `taken`, `unfinished`, `token-lease` and every state whose
|
||||
deleter §820 names other than the prune are never pruned; such a store refuses when full, said in its owner's
|
||||
journal (H-A-344 (1)). mesh-sdk's generic state
|
||||
tools gain `state_prune_now` (entry, why: prunes to the target now) and `state_keep` (entry, key, until, why: a key
|
||||
never pruned before its until), both written in the hand-act log; the fill is read and the limits applied through
|
||||
the seat `mesh-broker`'s `list`, `show` and `apply`. First the bridge's state `performed` (full on 2026-11-21), which
|
||||
also drops entries older than `performed-keep` (default 3 days). A forge tool, `forge_merged` (repository, from, to),
|
||||
lists merged pull requests by number with merge commit, time and whether a merge call made it (row 103). Built in H2
|
||||
in mesh-sdk (the prune helper and the tools), every delivery module and the forge module. How it is checked: the
|
||||
manifest check of §814; whole (bridge): a write that takes `performed` past 70 % prunes it to 50 %; a key under
|
||||
`state_keep` survives the prune.
|
||||
|
||||
### The assigner, the node-engine, the tool runner, the bus module, the registry and the teller
|
||||
|
||||
- §813 **The parts this milestone touches beyond the chain.** (each clause names its source)
|
||||
1. *One writer per composition key, and the engine applies only a newer write* (H-A-302 (1) to (3), H-A-303,
|
||||
H-A-306, H-A-338 (8); row 179): a composition write carries `run`, the composition run's pipeline sequence, and
|
||||
the holder of `mesh-wants` writes by compare-and-set refusing a lower `run`; a run whose pipeline ended writes
|
||||
nothing more; the node-engine applies a composition again only when a part it could read differs and its `run` is
|
||||
newer than the one it applied, naming the run in its journal. The order is an edge of the module graph the delivery
|
||||
derives (the composition value's form): the node-engine that reads `run` tolerantly (§780) runs before the
|
||||
assigner writes it. Built in the assigner and the node-engine. Checked: unit (each).
|
||||
2. *A failed keeping runs again* (row 137): a keeping of the assignment graph revisions that fails marks itself
|
||||
wanted and runs again after `keeping-retry` (a setting, default 30 s, the holder's own deadline, ADR 0682 §11),
|
||||
raising `keeping-failed` (scope module) at the third failure in a row, cleared at the next that succeeds;
|
||||
`assigner_keep_now` (why) runs the keeping at once, written in the hand-act log (H-A-344 (4)). Checked: unit.
|
||||
3. *Composed values read by resource* (H-A-306 (4); row 181): the node-engine's tool `engine_composition_diff`
|
||||
(module, a revision or digest) answers, per resource, the entries that differ between the running composition
|
||||
and the other, environment entries by name with secret values masked. Checked: unit.
|
||||
4. *The render marks a derived rule's scope* (ADR 0683; H-A-319; row 188): the node-engine writes on each derived
|
||||
accept rule of the packet filter the comment `derived <module> <listen> scope <any|private-network|local-network>`,
|
||||
and the holder of `node-packet-filter` reads a port's scope from `rules`, not from the rule's shape. Checked: unit
|
||||
(node-engine render); whole (packet filter): `allow` without a source is refused for a `private-network` port.
|
||||
5. *The bus module's tools read flow* (row 124): `nats_consumers` sorts by `delivered-rate` (messages a second
|
||||
measured over `rate-window`, an argument, default 10 s, within the one call) and by creation time;
|
||||
`nats_connections` answers a connection's busiest subscriptions by messages. Checked: unit.
|
||||
6. *The keeper withdraws a refused request's ask* (row 123): a drop or rebuild request the keeper refuses at once
|
||||
cancels its ask on the seat `operator-channel` in the same pass (ADR 0259 §3's cancel). Checked: unit.
|
||||
7. *The registry's list is paged, and it takes the sweep's removals* (ADR 0571 §2; ADR 0682 §10; H-A-250 (3); row
|
||||
125): the artifact registry seat's `list` takes `module` and the cursor of §779 and answers at most 768 KB; the
|
||||
artifact store's sweep reads it page by page once per pass; the registry takes a removal from the seat
|
||||
`artifact-store`'s holder, and its refusal "not the sweep's" goes (every account may call every verb). Checked:
|
||||
whole (sweep): a pass over 20,000 artifacts removes what it judges.
|
||||
8. *The registry drops a deleted chunk's leftovers* (H-A-227): when it deletes chunks it purges their subjects from
|
||||
the object store, so a store's kept descriptions equal its live objects. Checked: whole (registry): after 1,000
|
||||
chunks are deleted, the store's messages equal its live objects.
|
||||
9. *The usage view judges a build module by its running asks* (row 138): the status view reads a build module's
|
||||
work from its seat's `current` (§801), not from the node-engine's held phase. Checked: unit (view).
|
||||
10. *The teller's ask-again for want of room goes* (ADR 0682 §14; H-A-295): with A-424, the teller's ask-again for an
|
||||
ask refused for room and its test are removed. Checked: the teller's suite holds no such test.
|
||||
11. *The destroy-level answer's channel waits for its research* (ADR 0259; H-A-237, H-A-334 (2); row 114): the
|
||||
bus module's keeper asks its drop and rebuild warrants at the approve level, as H-A-237 bends it, until a research
|
||||
effort designs the channel that carries the destroy proof; H2 builds no such channel, and the bend's line in the
|
||||
keeper's code names that research as its end. Checked: unit (keeper): a drop asks at the approve level.
|
||||
12. *The tool runner drains at a stop* (H-A-342 (2); row 179): once told to stop, the tool runner takes no new call,
|
||||
finishes the calls in flight within `drain-bound` (a setting, default 30 s), then exits; a call that outlives the
|
||||
bound is cut, with a journal line naming the bundle, the verb and the call's age, and its caller sees a transport
|
||||
fault. The node-engine, replacing the tool runner, waits the drain bound for the old one to exit before it starts
|
||||
the new one. Built in the tool runner (mesh-tools) and the node-engine. Checked: whole (tool runner): a stop during a
|
||||
20-second call finishes it and refuses a call made after the stop; a 40-second call is cut at 30 s and said; unit
|
||||
(node-engine): the new tool runner starts only after the old one exits or the bound passes.
|
||||
|
||||
### The new stores
|
||||
|
||||
- §820 **Every store this part adds names its form, cap, key life and deleter.** (ADR 0595 §2, §3; H-A-338 (6),
|
||||
H-A-339 (7), H-A-341 (7)) Each is asked for in its owner's `requires` by its template; a foundation part (ADR 0619 §1, ADR 0666 §4) declares
|
||||
each of its stores (`unfinished`, `publishes`, `taken`, `dry-runs`, the findings stream) in its old section with the
|
||||
same cap and life (H-A-229, H-A-344 (3)). A put refused because a store
|
||||
or queue is full is said in the owner's journal and asked again at the kept-call pace (§775).
|
||||
|
||||
| store | owner | template | cap | life of a key | deleted by |
|
||||
|---|---|---|---|---|---|
|
||||
| `taken` | every holder of a kept call (§775) | state | 8 MiB | the ask's bound (TTL) | the TTL |
|
||||
| asks of `mesh-builds` and `mesh-wants` | the broker, from the seats (§777) | work queue | 10,000 messages | 1 day | the holder's acknowledgement |
|
||||
| `unfinished` | pipeline runner (§786) | state | 8 MiB | none | the runner, or `runner_unfinished_drop` |
|
||||
| `outputs`, install archives included | each build module, their owner (§791, §800) | objects | 1 GiB | 7 days (the store's max-age) | the bus, at the max-age; no sweep |
|
||||
| the findings stream | every module (§783) | events | 8 MiB | 7 days | the bus, oldest first |
|
||||
| `publishes` | builder (§793) | work queue | 64 MiB | 7 days | the builder's acknowledgement or termination |
|
||||
| `token-lease` | forge module (§808) | state | 1 MiB | `mint-lease` (TTL) | the minter, or the TTL |
|
||||
| `dry-runs` | indexer (§804) | state | 16 MiB | 1 hour (TTL) | the indexer at the answer and at its start |
|
||||
| `records` | gate (§809) | ledger | 1 GiB | none | never |
|
||||
|
||||
How it is checked: the manifest check of §814 refuses each without its cap; each owner's whole test fills its store
|
||||
to the mark and reads the prune or the refusal said.
|
||||
|
||||
### The tools this part adds
|
||||
|
||||
| tool | module | reads or steers | line |
|
||||
|---|---|---|---|
|
||||
| `builder_asks`, `builder_ask_drop`; `assigner_asks`, `assigner_ask_drop` | builder; assigner | what waits on and is taken from the seats' queues; one ask ended | §777 |
|
||||
| `assigner_keep_now` | assigner | the keeping of the graph's revisions, now | §813 (2) |
|
||||
| `runner_unfinished`, `runner_unfinished_drop`, `runner_unfinished_place` | pipeline runner | the movers put in a pipeline again; one placed now | §786 |
|
||||
| `runner_health` (`registrations-read`) | pipeline runner | whether the registrations view is read | §788 |
|
||||
| `runner_movers`, `runner_show` (filters) | pipeline runner | one pipeline in parts | §789 |
|
||||
| `runner_step_output` and the build seats' `output` | pipeline runner, build modules | a step's output | §791 |
|
||||
| `builder_publish_queue`, `builder_publish_drop`, `builder_publish_first` | builder | the publish queue | §793 |
|
||||
| `builder_unbuildable` | builder | the plans no seat builds | §795 |
|
||||
| `build_current` and the build seats' `current` | builder, build modules | what each holder takes and runs | §801 |
|
||||
| `indexer_dry_runs` | indexer | the dry runs' scratch state | §804 |
|
||||
| `indexer_registrations` | indexer | the registrations | §806 |
|
||||
| `bridge_owed_again` (`record`) | forge bridge | every owed act of a record again | §807 |
|
||||
| `forge_token_lease` | forge module | the token lease and the token's age | §808 |
|
||||
| `gate_times` | gate | delivery times against their budgets | §810 |
|
||||
| `state_prune_now`, `state_keep` | mesh-sdk, every module | prune now; keep a key from the prune | §812 |
|
||||
| `forge_merged` | forge module | merged pull requests by number | §812 |
|
||||
| `engine_composition_diff` | node-engine | composed values by resource | §813 (3) |
|
||||
| `nats_consumers`, `nats_connections` (sorts) | bus module | flow per consumer and connection | §813 (5) |
|
||||
| `seat-list`, `indexer_validate_before` | indexer (seat `mesh-catalog`) | the seat list as one object; the problems validate did not count | §814 |
|
||||
@@ -0,0 +1,606 @@
|
||||
---
|
||||
layer: to-be
|
||||
status: in-progress
|
||||
design: 47
|
||||
milestone: H2
|
||||
updated: 2026-11-21
|
||||
decisions:
|
||||
- "ADR 0683"
|
||||
- "ADR 0682"
|
||||
- "ADR 0668"
|
||||
- "ADR 0666"
|
||||
- "ADR 0664"
|
||||
- "ADR 0619"
|
||||
- "ADR 0596"
|
||||
- "ADR 0595"
|
||||
- "ADR 0573"
|
||||
- "ADR 0571"
|
||||
- "ADR 0548"
|
||||
- "ADR 0527"
|
||||
- "ADR 0525"
|
||||
- "ADR 0499"
|
||||
- "ADR 0436"
|
||||
- "ADR 0304"
|
||||
- "ADR 0282"
|
||||
- "ADR 0267"
|
||||
---
|
||||
# 47, milestone H2: the delivery system's owed work, as design lines
|
||||
|
||||
Milestone H2's part of [design 47](../47-delivery-from-commit-to-delivered.md), read whole by its builders with its
|
||||
second file, [H2-stores-and-tools](H2-stores-and-tools.md) (the forge bridge, the gate and the forge module, the parts
|
||||
beyond the chain, the new stores and the tools). Milestone H1 (the clean state and the one chain,
|
||||
[H-deliver-the-delivery-system](H-deliver-the-delivery-system.md)) ended at 19:31 on 2026-11-21 with both its proofs
|
||||
shown; what its live run met and did not build is owed here: every item the lead's answers H-A-227 to H-A-331
|
||||
([H-lead-answers](H-lead-answers.md)) name as owed to H2, every *Owed* of rows 103 to 199 of the plan's section 10,
|
||||
and the answers to the four reviews by architectural domain (H-A-338 to H-A-341). The lines are numbered after
|
||||
milestone H's §774 and cited as "design 47 H2 §n". Where an H2 line and an H line or a lead's answer differ, the H2
|
||||
line holds. Every module named builds against the latest published mesh packages (ADR 0573 §2), so the order between
|
||||
repositories is the module graph's (the package edges), not this part's. The records each line follows are named in
|
||||
it; a choice within them that no record or answer made is this part's own, given with its reason. A line that changes
|
||||
a shared form (a seat's definition, mesh-sdk's catalog) rebuilds every module that imports it, once, in H2's one
|
||||
pipeline of every module (§818).
|
||||
|
||||
H2 is one release of playbook 07: prepared by `mesh-preparer`, built, reviewed once, checked once, and delivered by
|
||||
its own pipelines, with no hand pack (section 7 of the plan). Its two proofs (§816, §817) close it.
|
||||
|
||||
### The asks between the delivery parts
|
||||
|
||||
- §775 **Every ask of a delivery part to a seat is a kept call, paced.** (ADR 0668 §1 to §3, §7; ADR 0664 §1; H-A-296,
|
||||
H-A-300 (1), H-A-338 (6), H-A-339 (4), H-A-340 (2); rows 170, 177) The pipeline runner's asks (build, lint, unit,
|
||||
integration, validate, composition, install and the seat `mesh-builds`' `published`), the holder of the seat
|
||||
`mesh-wants`' `compose-candidate` asks to each node-engine, the forge bridge's owed acts on the seat `git` and the
|
||||
builder's publish asks to the registry seats are made through mesh-sdk's kept-call form, marked safe to repeat: each
|
||||
carries its ask id, and every holder takes an ask once by its id (ADR 0668 §2), keeping the ids it took in its own
|
||||
state `taken`, key `<seat>.<ask>`, TTL the ask's bound (§820): the builder, the holder of `mesh-wants`, every
|
||||
node-engine for `compose-candidate`, the forge module for the seat `git`'s verbs and each registry for its publish.
|
||||
On a transport fault (ADR 0664 §1's classes, a call's own deadline, and the kind `away` of §776) the form calls
|
||||
again after `kept-call-pace-first` (default 1 s), doubling to at most `kept-call-pace-max` (default 30 s), each wait
|
||||
drawn within 20 % of its value so many callers do not call in step: settings every module using the form declares
|
||||
with these defaults (principle 11), chosen so a holder between two lives (a restart takes 20 to 50 s, row 179) is
|
||||
met within one minute without a call a second. It writes one journal line per seat at the first fault and then at
|
||||
most once a minute, naming the seat, the verb, the asks waiting and the count of calls; it stops at the caller's
|
||||
bound: the runner's `ask-unanswered-bound` (H-A-238, default 10 minutes), the holder's `compose-ask-bound` (a
|
||||
setting, default 10 s), the bridge's `owed-away-bound` (§807). Past the bound the step ends could-not-run, or the act
|
||||
could-not-be-performed, naming every call's time and words; `call-unanswered` is written at five minutes as ADR 0668
|
||||
§3 has it. A refusal of what was asked ends at once, as today. Fate: the runner's and the holder's one-shot asks,
|
||||
which ended a step at the first "no responders", go. Built in H2 in mesh-sdk (the pace, the `taken` state), the
|
||||
pipeline runner, the assigner, the forge bridge and the builder (mesh-delivery), the node-engine, the forge module
|
||||
and the registries. How it is checked: unit (mesh-sdk): a call met by no responders twice and then answered returns
|
||||
the answer and logs one line; a call past its bound returns every try; a refusal returns at once; a holder given the
|
||||
same ask id twice acts once. Whole (runner): a composition ask whose holder is away for 40 s passes its step with no
|
||||
hand act.
|
||||
- §776 **A holder says `away` when a part it depends on is away.** (ADR 0668 §1 and ADR 0664 §1 (insights of
|
||||
2026-11-21, accepted); H-A-300 (2), H-A-301, H-A-334 (3), H-A-339 (5); rows 177, 178) mesh-sdk's seat error answer
|
||||
gains the kind `away`, with `part` (what did not answer) and `words`. The forge module, holder of the seat `git`,
|
||||
answers `away` when the forge answers 401, 502 or 503 or a connection fault and the forge's own unauthenticated
|
||||
version read fails or names its store unavailable; it answers `refused`, "the forge refuses the mesh's admin
|
||||
account", only when that read succeeds and a freshly minted token (§808) is refused too, and it never words a refusal
|
||||
as an account to create. Every caller reads `away` as a transport fault (§775). This adds one class, a holder's own
|
||||
word that what it depends on is away, to the classes ADR 0664 §1 and ADR 0668 §1 list; the line rests on those two
|
||||
insights, accepted on 2026-11-21. Built in H2 in mesh-sdk (the error kinds) and the forge module
|
||||
(mesh-catalog). How it is checked: unit (forge module): a 401 with the version read failing answers `away`; a 401
|
||||
with the read passing and the fresh token refused answers `refused`. Whole (forge module): with the store stopped for
|
||||
30 s, a merge call in that window answers `away` and lands when called again.
|
||||
- §777 **The seats `mesh-builds` and `mesh-wants` take their asks from a work queue and say `ask-taken`.** (ADR 0525
|
||||
§1, §2, §6; ADR 0436 §6; ADR 0664 §2; H-A-241, H-A-243 (1), (2), H-A-320 (2), H-A-338 (4), (7), H-A-339 (7), (8),
|
||||
H-A-340 (1), H-A-341 (4); rows 118, 130, 189) Each seat's definition (the delivery repository's contracts module)
|
||||
declares its accepted kinds as work-queue streams the broker derives, as ADR 0525 §2 has it for the build seats:
|
||||
`build` on `mesh-builds`, `validate` and `compose` on `mesh-wants`; each `max-age` 1 day and `max-msgs` 10,000, one
|
||||
shared worker consumer its holder pulls, with ack wait 60 s, in-progress every 20 s, max ack pending 1,000, max
|
||||
deliveries 5 (above ADR 0664 §2's three) and a duplicates window of 2 minutes (ADR 0436 §6). The holder pulls every
|
||||
ask waiting at once, never one at a time, acknowledges an ask when it says the ask's end, sends in-progress while it
|
||||
works (ADR 0525 §6), and says `ask-taken` on the seat's family at the pull, subject `<seat>.ask-taken.<ask>`,
|
||||
carrying `ask`, `node` and `at`; the definition declares `ask-taken`, so only the seat's holder publishes it. The
|
||||
runner consumes both seats' `ask-taken`. An ask put while its holder is down waits on the stream. The runner puts an
|
||||
ask again only when its put met a transport fault; a put refused by a full stream is said in the journal and asked
|
||||
again at the kept-call pace (§775). `builder_asks` and `assigner_asks` read what waits and what is taken on their
|
||||
seat's stream; `builder_ask_drop` and `assigner_ask_drop` (ask, why) end one ask, written in the hand-act log. Fate:
|
||||
the holders' plain subscriptions go; the runner's putting again of every open ask on the holder's `running`
|
||||
(H-A-243 (1)) goes; `ask-silent-bound` and its bound key (H-A-243 (2)) go; the mesh-builds stream that no consumer
|
||||
took (1,524 asks on 2026-11-21) is rebuilt empty through the bus module's tool `nats_recreate`, on the operator's
|
||||
warrant (ADR 0595 §5), before the new builder and the new assigner start, so the rebuilt stream carries no message.
|
||||
Built in H2 in mesh-delivery (the contracts module, the builder, the assigner, the runner). How it is checked: whole
|
||||
(builder): a build ask put while the builder is stopped is taken and ended after its start; whole (assigner): the
|
||||
same for a validate ask; after a pipeline's end the streams' consumers hold 0 pending; unit (runner): a put refused
|
||||
for a full stream is said and asked again.
|
||||
- §778 **The unanswered bound counts from the pull.** (H-A-238 (5), H-A-320 (4), H-A-340 (1), H-A-341 (4); ADR 0664
|
||||
§4; row 189) The runner keeps on each step of its record `asked-at` (when the ask is put) and `taken-at` (from the
|
||||
seat's `ask-taken`), RFC 3339. The bound key `ask.<seat>.<ask>` is armed at `ask-taken` with the bound less the time
|
||||
since `taken-at`, and again at every start for every open ask, so a restart never grants a fresh bound; an ask whose
|
||||
time is spent at a start ends could-not-run at once. A step ended by its bound drops its ask through the seat's
|
||||
`drop` (as ADR 0664 §4 has it for the build seats), so no holder works on it after. An ask not taken counts no bound:
|
||||
the runner's health names a step whose ask is untaken past `stalled-bound` (§790), and an ask still untaken
|
||||
`ask-unanswered-bound` after its `asked-at` ends the step could-not-run "its ask was not taken: <seat>'s holder takes
|
||||
none", so no slot is held without end (H-A-344 (6)). Built in H2 in the runner. How it is checked: unit (runner): an
|
||||
ask taken 9 minutes before a restart, with a 10-minute bound, ends one minute after the start and is dropped; an ask
|
||||
untaken for `stalled-bound` is named by the health; an ask untaken for the whole bound ends could-not-run naming the
|
||||
holder as not taking.
|
||||
|
||||
### mesh-sdk: the shared forms
|
||||
|
||||
- §779 **A page read continues from an opaque cursor in sequence order.** (H-A-254, H-A-255 (2), H-A-292, H-A-293;
|
||||
row 129) The state page read that the tool runner serves (`mesh/state.page`) reads a state's keys in sequence order
|
||||
from an ordered consumer starting after the cursor's sequence, never a replay of the bucket per page. The cursor is
|
||||
an opaque string the caller hands back (`next`, empty at the end); a page holds at most 768 KB, and a key written
|
||||
again between two pages comes again in a later page with `seen-again` set, so a reader knows it. Every reader of a
|
||||
large state may page; H-A-292's and H-A-293's one-page exception ends. Built in H2 in mesh-sdk (the call's contract
|
||||
and client) and the tool runner (mesh-tools), and its callers in the same group. How it is checked: whole (tool
|
||||
runner): a state of 10,000 keys read in pages delivers each kept message once across all pages; a key written again
|
||||
mid-read is marked `seen-again`.
|
||||
- §780 **A reader of another part's value decodes it tolerantly and says its form.** (H-A-309, H-A-338 (8), H-A-341
|
||||
(6); row 183) Every seat value, event body and verb answer gains `form`, an integer the seat's definition raises at
|
||||
every field added or removed; `form` is left out while it is 1, and an absent `form` reads as 1. mesh-sdk's
|
||||
generated decoders for reading another part's value, event or answer keep unknown fields, never refuse them, and
|
||||
return `form`; a tool whose record's `form` differs from the one it was built with says "form N, this reader knows M"
|
||||
in its answer. A writer still validates its own value strictly before it writes. Fate: the runner's dropping of
|
||||
`kept-revisions` before the seat's decode (row 190) goes. Built in H2 in mesh-sdk (the seat generator and its
|
||||
decoders) and every seat definition (a regeneration). How it is checked: unit (mesh-sdk): a value, an event and an
|
||||
answer with an unknown field decode and return their form; an absent `form` reads as 1; the seat generator's check
|
||||
fails a definition whose fields changed with `form` unchanged.
|
||||
- §781 **A tools program reads its module's settings.** (H-A-322, H-A-330; rows 190, 199) The node-engine composes a
|
||||
module's settings into the module's slice of the tool runner's `MESH_TOOL_ENV` in the same files it composes for the
|
||||
module's process, and mesh-sdk's settings reader reads them in a tools bundle as in a process. A bound one module
|
||||
keeps on another's verb is that verb's `timeout` in its seat definition (built in H1), read by the caller from the
|
||||
seat list: the packet filter's holder asks the node-engine seat's `converged` within that verb's `timeout`, and its
|
||||
named 10 s goes. Built in H2 in the node-engine (`mesh-host`), mesh-sdk and the packet filter module. How it is
|
||||
checked: unit (mesh-sdk): a tools bundle reads a setting the manifest sets; whole (runner): §790.
|
||||
- §782 **The bus wrappers are safe for concurrent use.** (row 137, met twice) mesh-sdk's wrappers around one bus
|
||||
handle guard each call the client does not allow at once with a lock inside the wrapper, so no module needs a
|
||||
handle per goroutine (one place, principle 7). Built in H2 in mesh-sdk. How it is checked: unit under the race
|
||||
detector: concurrent gets, puts and watches through one wrapper.
|
||||
- §783 **A module's findings history drops its oldest.** (ADR 0595 §2, §3; H-A-227, H-A-344 (3), (5); row 104) The
|
||||
stream a module's findings writer appends to (three stood full on 2026-11-21: the runner's, the builder's, the
|
||||
node-engine's) is asked for by the events template, which drops the oldest when full, with `max-bytes` 8 MiB and
|
||||
`findings-max-age` (default 7 days); a foundation part (ADR 0619 §1, ADR 0666 §4) declares it in its old section
|
||||
with the same cap and life (H-A-229). Its fill is read through the seat `mesh-broker`'s `show`. The findings state itself is unchanged. Built in H2 in mesh-sdk (the
|
||||
writer's requires) and every delivery module's manifest. How it is checked: whole (runner): 10,000 findings written
|
||||
past the cap refuse none.
|
||||
|
||||
### The pipeline runner (seat `mesh-pipeline-runner`; mesh-delivery-pipeline)
|
||||
|
||||
- §784 **An ask placed and a step's end are journal lines.** (H-A-320 (1), H-A-333, H-A-341 (5); row 189) The runner
|
||||
writes one line when it places an ask, "`<pipeline>` `<mover>` `<step>` asked on `<seat>`", and one when a step ends,
|
||||
"step ended `<pipeline>` `<mover>` `<step>` `<outcome>` in `<duration>`", the latter in the one place that says
|
||||
`step-ended`, so every end writes it: the unanswered bound's, the end at placing, a supersede, a re-pin, the
|
||||
approval's end, the start pass and the verbs that end a step. Beside these two lines per step only the per-mover wait
|
||||
lines (H-A-326 (3), §787) and §775's fault lines are written. Built in H2. How it is checked: unit: each way a step
|
||||
ends writes exactly that line once.
|
||||
- §785 **`pipeline-ended` carries the pipeline's phases.** (ADR 0282 §1, §6; row 111) `pipeline-ended` gains
|
||||
`phases`: `taken` (the take-in), `placed`, `ended`, and for each step kind (build, lint, unit, integration, validate,
|
||||
composition) the earliest start and the latest end across its movers, RFC 3339. Each mover's own step times stay in
|
||||
the step log, read with `runner_show` (§789). Built in H2 in the runner and the seat's definition. How it is checked:
|
||||
unit: a pipeline of two movers ends with each step kind's span; the gate reads it (§810).
|
||||
- §786 **A mover left unfinished by another's failure is put in a pipeline again.** (ADR 0682 §6; H-A-339 (7), (8);
|
||||
rows 133, 147, 162, 167) When a pipeline ends `failed`, `cancelled` or `could-not-run`, each mover whose own required
|
||||
steps all passed or never ran, and whose fingerprint no newer revision moved, is kept in the runner's state
|
||||
`unfinished` (§820), key `<branch>.<module>`, value `fingerprint`, `revision`, `pipeline` and `outcome`, and named in
|
||||
`pipeline-ended`'s new field `unfinished`. At the branch's next kept catalog revision of any `call-kind`, the runner
|
||||
adds each such mover whose fingerprint is still its entry's there to that revision's pipeline, or starts one for them
|
||||
alone when the revision moves nothing, with one journal line per mover added again. The key is deleted by the runner
|
||||
when the mover's pipeline ends passed or a newer fingerprint moves it, or by `runner_unfinished_drop` (one key, with
|
||||
`why`); `runner_unfinished_place` (one key, with `why`) puts the mover in a pipeline of its own at once; both are
|
||||
written in the hand-act log, and `runner_unfinished` reads the state. A mover whose own required step failed waits
|
||||
for its fingerprint to move, as today. Fate: the lead's probe merges of row 167 end. Built in H2. How it is checked:
|
||||
whole (runner): of a pipeline of two movers one fails its unit step; `pipeline-ended` names the other in
|
||||
`unfinished`, the next take-in's pipeline carries it, and it is wanted.
|
||||
- §787 **A kept mover waiting on its revision says so.** (H-A-171, H-A-284, H-A-287) A kept mover whose kept revision
|
||||
the runner's view does not hold yet carries `unplaced` `kept-revision-unread` with `revision`, said once in the
|
||||
journal ("waits for its kept revision N to be read") and read with `runner_show`. Built in H2. How it is checked:
|
||||
unit.
|
||||
- §788 **The registration check waits for its view.** (H-A-262, H-A-265 (4), H-A-339 (8); row 141) The runner judges
|
||||
`registration-missing` only once its registrations view's first read is in; before that it says "registrations not
|
||||
yet read" once and places no step whose registration it has not read. `runner_health` answers
|
||||
`registrations-read` (true or false, and since when). Built in H2. How it is checked: unit: a start with the view
|
||||
unread raises no `registration-missing`, answers `registrations-read` false, and places the movers once it is read.
|
||||
- §789 **A pipeline is read in parts.** (H-A-299 (3); rows 136, 142) The verb `show` and the tool `runner_show` take
|
||||
`mover`, `step` and `state` filters applied while reading, and answer at most 768 KB with `capped`, `total` and the
|
||||
cursor of §779; `runner_movers` (a pipeline's key) answers each mover with one word per step (`passed`, `failed`,
|
||||
`running`, `waiting`, `not-run`). Built in H2. How it is checked: unit: one mover's steps of a record of 129 movers
|
||||
answer under 64 KB; `runner_movers` of 1,000 movers answers under 768 KB.
|
||||
- §790 **The stalled bound is a setting.** (H-A-311 (3), H-A-313, H-A-322; row 190) The five minutes after which the
|
||||
runner's health names a running pipeline with nothing open, or a step whose ask is untaken (§778), become the
|
||||
runner's setting `stalled-bound` (default 5 minutes, the rule nothing-moved-in-five-minutes), read by its process
|
||||
and its tools program (§781). Built in H2. How it is checked: whole: with `stalled-bound` at one minute, the health
|
||||
names such a pipeline after one minute, and no longer names it once a step is placed in it.
|
||||
- §791 **A step's output is read where it is kept.** (H-A-294, H-A-341 (7); rows 144, 165, 168) A build module keeps a
|
||||
run's output in its `outputs` objects (§820), named on its step key `<node>.<ask id>` (ADR 0525 §6); the build seats
|
||||
`node-build-go`, `node-build-node` and `node-build-image` gain the read verb `output` (input `ask`; answer the
|
||||
output's last 64 KB, its size, and the failing tests' names with their words, or "no longer kept" past the objects'
|
||||
max-age), and the runner's tool `runner_step_output` (pipeline, mover, step) asks it of the holder on the node the
|
||||
step key names. Fate: the runner's objects `step-outputs`, which hold 0 bytes, go, dropped through the bus module.
|
||||
Built in H2 in the build seats' definitions, the three build modules (mesh-catalog) and the runner. How it is
|
||||
checked: whole (Go build module): a failing unit test's words are read through `runner_step_output`; an output past
|
||||
its max-age answers "no longer kept".
|
||||
- §821 **Every event of the delivery parts is waited on by its seat and name.** (H-A-338 (4), H-A-343) Every event
|
||||
the runner says (`pipeline-started`, `step-ended`, `pipeline-ended`, `wait-held`, `wait-ended` and the re-pin's), the
|
||||
builder's `ask-taken` and `version-reserved` and the holder of `mesh-wants`' `ask-taken` are declared in their
|
||||
seat's definition under the seat's events family, so a wait by seat and event name (`mesh_wait` with
|
||||
`mesh-pipeline-runner.pipeline-ended`) is answered and no session reads a journal on a timer. Built in H2 in the
|
||||
delivery repository's contracts module (the seat definitions) and the three holders. How it is checked: the seat list
|
||||
carries each family and name; each holder's whole-module test waits on each of its events by name and is answered.
|
||||
|
||||
### The builder (seat `mesh-builds`; mesh-delivery-builder)
|
||||
|
||||
- §792 **An answered ask is a journal line.** (H-A-320 (1), H-A-333; row 189) The builder writes one line per build
|
||||
ask it answers, "answered `<ask>` `<pipeline>` `<movers>` `<step>` `<outcome>`", in the one place an ask is answered
|
||||
(its build step's finish), beside the line per entry saying an existing build or one built now; the holder of
|
||||
`mesh-wants` one per validate or compose ask answered. Built in H2 (builder, assigner). How it is checked: unit.
|
||||
- §793 **The publish queue is a work-queue stream.** (H-A-290, H-A-291, H-A-338 (5); row 158) The builder's publish
|
||||
items travel on its work queue `publishes` (§820), subject `publish.<holder>.<class>.<module>.<version>` with class
|
||||
`live` (a build a pipeline's step waits on) or `again` (asked again at a start), one consumer per holder and class
|
||||
that the builder pulls, `live` first, at most four sends in flight per holder (H-A-290 (3)); an item is acknowledged
|
||||
when its publish is heard or confirmed (H-A-274), terminated when its build is withdrawn or superseded (H-A-290 (2),
|
||||
H-A-291 (1)). `builder_publish_queue` reads the stream's counts per holder and class, the oldest and newest, and a
|
||||
capped list; `builder_publish_drop` (module, version, why) terminates one item; `builder_publish_first` (module,
|
||||
version, why) puts one item again as `live` and terminates the old; both are written in the hand-act log. Fate: the
|
||||
state bucket of publish items, its listing and its relisting go; its items are put on the stream once at the
|
||||
builder's first start of this release, each with the message id `<holder>.<module>.<version>`, so a move started
|
||||
twice puts each item once within the duplicates window; then the bucket is dropped through the bus module. Built in
|
||||
H2. How it is checked: whole (builder): a live publish enqueued behind 100 `again` items is sent first; a dropped
|
||||
item is never sent; a move run twice puts each item once.
|
||||
- §794 **The builder's handling of an event costs one read and one write.** (H-A-269, H-A-271, H-A-280, H-A-340 (7);
|
||||
row 152) A heard `published` or `package-published` costs one read of the index by digest (or by version on a miss,
|
||||
H-A-271) and one write; the builder logs any event whose handling passed 100 ms, with its duration and why, and its
|
||||
health names an events backlog whose oldest message is older than five minutes. Built in H2. How it is checked: unit
|
||||
(builder): handling 1,000 published events over 2,000 reservations makes exactly one index read and one write each;
|
||||
whole: a backlog held six minutes makes the health name it.
|
||||
- §795 **A plan no seat can build is said once.** (H-A-226's owed; rows 101, 166) A module whose artifact no seat
|
||||
builds is kept in the builder's memory with its language and kind, worked out again at every start and every change
|
||||
of the seat list, and said in one summary line each time, "N modules have an artifact no seat builds:" with each
|
||||
language and kind and its count; `builder_unbuildable` lists them. Fate: the line per module and definition goes.
|
||||
Built in H2. How it is checked: unit: 6,500 unbuildable plans write one line.
|
||||
- §796 **A tag names its commit; the builder reads it before it reserves.** (H-A-234 (2), H-A-245, H-A-246, H-A-341
|
||||
(3); rows 73, 121) The seat `git`'s `tags` answer gains `commit` per tag, and its listing's description says a
|
||||
missing directory answers `not-found` (H-A-232): one contract change, its holder the forge module and mesh-sdk's
|
||||
bootstrap copies in one group. The builder reads a module's tags once per catalog revision it reserves under, and
|
||||
skips a number whose tag stands at another commit, with the finding `version-tagged-elsewhere` (scope module),
|
||||
cleared at the module's next `version-released`; a read that meets a transport fault or `away` (§776) lets the
|
||||
reservation go on, said in the journal. A tag is never moved. The tag the builder writes for a Go package is
|
||||
`<directory>/v<version>`, which the Go toolchain's direct fallback reads (row 73); the `go/v<version>` tags go from
|
||||
new versions. Built in H2 in the seat `git`'s definition, the forge module, mesh-sdk's copies and the builder. How it
|
||||
is checked: whole (builder): a tag standing at another commit makes the builder reserve the next number and raise
|
||||
the finding, which clears at the next release.
|
||||
- §797 **The build record carries its end.** (H-A-257) The builder's record of a build carries `ended` and `outcome`
|
||||
when it ends, so a reader of the builds (the artifact store's sweep) reads no key history. Built in H2. How it is
|
||||
checked: unit.
|
||||
- §798 **A publish keeps its time.** (H-A-328, H-A-331; row 197) A reservation's published mark keeps `at` (when the
|
||||
builder heard or confirmed the publish) and a kept release keeps the published `digest`; the verb `published` answers
|
||||
both where kept and leaves them out for marks written before. Where H1's tail already built this, H2's prepare reads
|
||||
it on main and builds only the rest. How it is checked: unit (builder): a publish heard now answers its time.
|
||||
|
||||
### The build modules (seats `node-build-go`, `node-build-node`, `node-build-image`)
|
||||
|
||||
- §799 **A fetch or a publish that meets its holder away is a transport fault.** (ADR 0668 §1 and ADR 0664 §1 (insights of 2026-11-21,
|
||||
accepted); ADR 0664 §2; H-A-301, H-A-341 (8), H-A-342 (1); row 178) A build or check step whose fetch of its source meets a connection fault or a 401 or 5xx
|
||||
answer of the forge, or whose publish to a registry seat meets no responders or a bundle that exited, ends its run
|
||||
`again`, never the step (ADR 0664 §1), with no seat call to learn why; the tool runner settles the ask with a
|
||||
delay of 15 s after the first run and 60 s after the second (`again-delays`, a setting of each build module, default
|
||||
"15s,60s", so three runs span the one-minute absence met on 2026-11-21), and a third run's fault ends the step failed
|
||||
with the why `fetch: <words>` or `publish: <words>`, whichever met the fault (ADR 0664 §2), which the builder and the runner say apart from a build's failure. Built
|
||||
in H2 in the build seats' conformance kit (ADR 0664 §6) and the three build modules. How it is checked: the
|
||||
conformance kit holds a fetch met by a 401 and a publish met by no responders to `again`, and three such runs to the step failed
|
||||
with `fetch:` and with `publish:` respectively.
|
||||
- §800 **A test that cannot run says NOT RUN; a starved setup runs again; a needed npm tree is installed.** (H-A-294,
|
||||
H-A-327, H-A-338 (3), H-A-339 (6), H-A-340 (6), H-A-341 (7); rows 168, 170, 194) A step's summary counts `not-run`
|
||||
apart from passed and failed, with each test's name and reason; a level whose tests passed or did not run passes,
|
||||
its not-run listed; a test lacking tooling its step does not give says NOT RUN (H-A-294). A Go artifact may declare
|
||||
`check-needs` with the value `node-modules` in its manifest: the runner then asks the seat `node-build-node` a step of
|
||||
the new accepted kind `install` (input: the module's package lock at the commit) before the integration level; the
|
||||
Node build module installs from the npm registry seat with an integrity-checked install (`npm ci`) and no install
|
||||
scripts, keeps the tree as an archive in its `outputs` under the lock's digest (§820), and the step's end carries the
|
||||
archive object's name (ADR 0666 §16), which the integration ask names and the Go build module unpacks into the
|
||||
workspace. Each level gets its bound in the environment as `MESH_TEST_LEVEL_BOUND`, and mesh-sdk's test helpers take a
|
||||
setup bound of half of it, never a value in the test; a whole-module test whose setup wait on the bus passes that
|
||||
bound ends its run `again` by §799's delays, and a third such run ends the step could-not-run "the bus did not answer
|
||||
in setup within <bound> under load", never failed. An assertion that fails is never `again` and never NOT RUN. Fate:
|
||||
the Node build module's and the recovery module's setup bounds in code go. Built in H2 in mesh-sdk (the helpers, the
|
||||
catalog's `check-needs`), the build seats' definitions, the three build modules and those two modules' tests. How it
|
||||
is checked: whole (Go build module): the forge module's whole-seat test runs with its npm tree; a test whose setup
|
||||
is starved runs again and ends could-not-run at the third run; unit (Node build module): an install runs no script.
|
||||
- §801 **Every build seat says what it takes and what runs.** (ADR 0525 §4, §10; H-A-302 (4), H-A-320 (3); rows 99,
|
||||
179, 189) Each build seat's verb `current` answers, per holder, whether it takes check asks and why not (`paused`,
|
||||
`capacity 0`, `unhealthy`, with since when), and every ask it runs, whoever asked it (the builder's delivery asks
|
||||
included); the build modules' steps read tools answer the steps state they keep, never empty while steps run;
|
||||
`build_current` (the builder's tool) asks every holder and answers them together. Built in H2 in the three build
|
||||
modules and the builder. How it is checked: whole (Go build module): an ask the builder put is listed by `current`
|
||||
while it runs; a paused holder answers `paused`.
|
||||
|
||||
### The indexer (seat `mesh-catalog`'s holder; mesh-delivery-indexer)
|
||||
|
||||
- §802 **A module moves only when its own build source changes.** (ADR 0267 §1, §2; ADR 0499 §2; H-A-202, H-A-298 (1),
|
||||
H-A-338 (9); row 175) A module's fingerprint tree input is ADR 0499 §2's: the hash over its manifest and its named
|
||||
paths where every artifact names `paths`, else its directory's tree object at the commit, with the directories of
|
||||
its same-repository requirements taken in as H-A-202 has it; never the repository's commit. A commit outside them
|
||||
moves nothing. The indexer and the builder take the new fingerprint function in one release. Fate: the fingerprint
|
||||
over the repository's commit goes; every module's fingerprint changes once, at H2's delivery (§818). Built in H2 in
|
||||
the indexer, the builder and mesh-sdk's one fingerprint function (ADR 0499 §2). How it is checked: whole (indexer): a
|
||||
commit touching two test files of two modules in a repository of 36 moves those two and their importers alone.
|
||||
- §803 **A take-in says what it waits on.** (H-A-298 (2); row 175) A take-in waiting longer than a minute on another
|
||||
part (the seat `git`'s listing, a package's versions, a registry) writes one journal line naming the part, the verb
|
||||
and since when, and keeps it on its value in `takeins` as `waiting-on` (`part`, `verb`, `since`), read with
|
||||
`indexer_pending`; past five minutes it raises the finding `take-in-waiting` (scope merge, id the source revision),
|
||||
cleared when the wait ends. Built in H2. How it is checked: unit: a listing answered after 70 s writes one line and
|
||||
`waiting-on`; one answered after six minutes raises `take-in-waiting`, which clears at the answer.
|
||||
- §804 **A dry run keeps to its own scratch state.** (H-A-297, H-A-339 (7), (8); row 174) A dry run of a branch's
|
||||
take-in writes only to the indexer's state `dry-runs` (§820), keys `<branch>.<call>.<kind>.<name>`, deleted by the
|
||||
indexer when the dry run answers and every one at the indexer's start, and leaves the trunk's packages state
|
||||
untouched; `indexer_dry_runs` reads the state. Built in H2. How it is checked: whole (indexer): a branch dry run
|
||||
leaves the trunk's packages state byte for byte as before, and a start finds `dry-runs` empty.
|
||||
- §805 **A release re-pins once, at its reservation.** (H-A-204, H-A-283's owed, H-A-338 (4); row 153) The builder says
|
||||
`version-reserved` on the seat `mesh-builds`' family (`module`, `artifact`, `path`, `version`, `fingerprint`,
|
||||
`revision`) when it reserves a package's number; the seat's definition declares the event, so only its holder
|
||||
publishes it, and the indexer consumes it. The indexer re-pins every importer once at that event, and a
|
||||
`package-published` of the pinned version keeps no revision; a withdrawn reservation re-pins to the series' newest
|
||||
released version. Test steps still wait for the publish (H-A-206). Fate: the re-pin per publish goes. Built in H2 in
|
||||
mesh-delivery (contracts, the builder, the indexer). How it is checked: whole (indexer): a release of a module
|
||||
importing twenty packages of its own pipeline keeps one re-pin revision.
|
||||
- §806 **The registrations are read in one call.** (row 140) `indexer_registrations` answers the registrations state
|
||||
with `module` and `repository` filters applied while reading, at most 768 KB, with `capped` and the cursor of §779.
|
||||
Built in H2. How it is checked: unit.
|
||||
|
||||
### The catalog's checks
|
||||
|
||||
- §814 **The validator reads the mesh's seat list, counts only new problems, and refuses an uncapped store.**
|
||||
(H-A-299 (2), H-A-329, H-A-338 (10), H-A-339 (1), (8); rows 196, 198) The seat `mesh-catalog` gains the read verb
|
||||
`seat-list` answering the seat list the mesh holds as one object in the indexer's objects, by digest (`digest`,
|
||||
`size`, `object`), which the manifest validator program takes by address, so a run by hand reads what the live
|
||||
validate reads. The step `validate` counts, for a module it touches, only the problems new against its before case
|
||||
(`causedProblems`); `indexer_validate_before` (pipeline, module) answers the before case's problems it did not count.
|
||||
The validator refuses a delivery module's state, log or objects entry with no cap (§812); a delivery module is one
|
||||
whose manifest claims a seat of the delivery system, which the validator reads from the claims; a foundation part's
|
||||
old-section entry declares its cap in that section (H-A-229, ADR 0595 §10) and is never refused for lacking the new
|
||||
form. Built in H2 in the indexer, the manifest validator and mesh-sdk's catalog. How it is checked: whole (indexer): a
|
||||
run by hand against `seat-list` gives the live validate's verdicts for the builder's and the runner's manifests; unit
|
||||
(validator): a problem the before case holds is not counted; an uncapped entry of a delivery module is refused, a
|
||||
foundation part's capped old-section entry is not.
|
||||
- §819 **Every module H2 touches ends with fewer tests than it starts with.** (ADR 0548; the test budget, 50
|
||||
integration and 500 unit per module; H-A-340 (8); rows 115 and the row of 18:40 on the budget) Each module a pull
|
||||
request of H2 changes carries fewer tests at H2's end than at its start, counted as the build node counts them
|
||||
(subtests included) and reported by each pull request's check. The starting counts: by the build node at H1's end,
|
||||
the indexer 538 integration, the assigner 64 integration, the node-engine 1,716 unit, the NFS server module 51
|
||||
integration and the package manager module 121 integration; by top-level test functions on the trunks of
|
||||
2026-11-21 (subtests not counted), the indexer 6 integration and 170 unit, the assigner 9 and 87, the runner 4 and
|
||||
105, the builder 18 and 167, the node-engine 11 and 1,716. The NFS server and package manager modules shrink to 50
|
||||
integration tests in H2. How it is checked: the check's counts per module in each pull request, read by its review
|
||||
against the starting count.
|
||||
|
||||
### hq, a watched source with no module
|
||||
|
||||
- §815 **A repository with no module registers as a source alone, and merges like any other.** (ADR 0527 §1; ADR 0666
|
||||
§11, §18; ADR 0682 §1, §3; H-A-332, H-A-334 (1), H-A-338 (2), H-A-339 (3); the operator, 2026-11-21 21:48: no merge
|
||||
is put to them; rows 176, 177) A registration of the seat `mesh-catalog` takes a source-only form: `repository`, its
|
||||
watched `branch`, `policy`, and `check`, which names a build seat and a step kind (for hq: `node-build-go`, `unit`,
|
||||
at the repository's root), never a free command; it names no module. The indexer keeps it with the registrations,
|
||||
takes a move of that branch in as a take-in with no movers, and refuses a source-only registration whose repository
|
||||
holds a manifest. The pipeline runner's run on request of a pull request's head (ADR 0666 §18) runs that one step on
|
||||
the named seat, in its sandbox, as a pipeline step; `merge-pull` judges the head by the registration's `policy` from
|
||||
the runner's step events, as it judges a module's (ADR 0666 §11), and merges it. The forge bridge says `head-moved`
|
||||
for the branch and the gate watches it as any watched branch (`head-untaken`, ADR 0682 §3); the gate's record of
|
||||
such a merge ends `nothing to deliver`. This closes a gap: ADR 0527 §1 has hq's checks run by the Go build module as
|
||||
any repository's tests, but with the checker gone (design 47 G) nothing asked that run, and hq's pull requests were
|
||||
merged by the operator at the forge with no mesh run. Fate: those merges at the forge end at H2's delivery; hq is
|
||||
registered so once through the seat `mesh-catalog`'s verb `register`, the operator's channel saying it as a
|
||||
registration change. Built in H2 in the indexer (the registration's source-only form and the seat's definition), the
|
||||
runner, the forge module's `merge-pull` and the gate. How it is checked: whole (indexer, runner and gate): a
|
||||
source-only registration's pull request is run on request, merged by one merge call, raises no `head-untaken` and
|
||||
ends its record `nothing to deliver`; an hq pull request whose Go checks fail is refused by `merge-pull`, naming the
|
||||
failed step.
|
||||
|
||||
### How H2 is proven
|
||||
|
||||
- §818 **H2's own delivery moves every module once, before the proofs.** (ADR 0499 §2; ADR 0682 §6; H-A-338 (9),
|
||||
H-A-340 (5)) H2's merges are delivered by their pipelines; once the indexer and the builder of §802 run, the
|
||||
indexer's recompute at its start (`call-kind` recompute, H-A-217) keeps one catalog revision in which every module's
|
||||
fingerprint moved, and one pipeline carries every module as a mover: about 193 movers (the module graph at trunk
|
||||
revision 512). A build whose content is unchanged is reused, not built again, and a node-engine restarts nothing
|
||||
whose composition is unchanged. Its time is read from its `pipeline-ended` phases and quoted in the milestone's
|
||||
report; a guess, said as one, is about 45 minutes, scaled from row 182's 126 movers in 29 minutes. It is held to no
|
||||
delivery budget (it is not a change's delivery), only to `stalled-bound`. The proofs run after it ends passed. How it
|
||||
is checked: the lead reads the pipeline's movers (`runner_movers`) and the node-engines' restarts during it.
|
||||
- §816 **Proof 1: a one-line change to a delivery part runs everywhere within ten minutes, by its pipeline alone.**
|
||||
(ADR 0282 §1; ADR 0682 §1, §6, §8; plan section 5, step 7; H-A-340 (10)) A one-line change (a comment) in one module
|
||||
of the delivery system with lint, unit and composition steps, merged through one merge call (`merge-pull`), runs at
|
||||
its new version on every present placing machine, reported healthy, within ten minutes of its `merge-called` (a core
|
||||
module's budget). It is read from the gate's ended record (`gate_record`): `class` core, `delivery-time` under ten
|
||||
minutes, no `over-budget` raised for it, quoted with its phases (§785); and from the hand-act log, empty for every
|
||||
delivery part from `merge-called` to the last `running`; no other pipeline held the slot meanwhile. No hand act
|
||||
touches the delivery system during it: no hand pack, no held put, no `runner_cancel`, `runner_end_again`, rerun,
|
||||
`builder_build_again` or `builder_publish_again`, and no start, stop or restart through the seat
|
||||
`node-service-manager`; the only restart is the moved module's own, by its node-engine.
|
||||
- §817 **Proof 2: a package and its importer in two repositories, one merge call, within ten minutes.** (ADR 0282 §1;
|
||||
ADR 0682 §1, §2, §4; ADR 0573 §2; H-A-340 (10)) One merge call names two pull requests: a one-line change to a
|
||||
package of the delivery repository whose importers are at most three, one of them the gate in the catalog repository
|
||||
(read with the indexer's `indexer_package_users`), and a one-line change to the gate. The gate names one source
|
||||
revision for both, one pipeline publishes the package and builds the gate against it, and every mover runs at its
|
||||
new version on every present placing machine within ten minutes of `merge-called`, read and bound as §816, with no
|
||||
hand act and no restart as §816 says. How it is checked for both: the lead reads each with the tools named and
|
||||
quotes the times in the milestone's report; a proof over its ten minutes or with a hand act is not shown, and its
|
||||
cause is fixed in its repository and delivered before it is run again.
|
||||
|
||||
## Design questions
|
||||
|
||||
Found by H2's prepare (`mesh-preparer`, 2026-11-21 22:40 CET), for the lead's answers (playbook 07, step 0b). The code was
|
||||
read at `origin/main`: `mesh-delivery` `7e597a623eb2`, `mesh-catalog` `553bfb0ccf7c`, `mesh-host` `637cfb1fd044`,
|
||||
`mesh-sdk` `bdc5cff0d63d`, `mesh-contracts` `87eab81be134`, `mesh-tools` `02675a43eaf8`, `mesh-networking`
|
||||
`19a04dfc602a` (a sibling for the build). The build maps are in [H2-build-maps](H2-build-maps/). Each recommendation is
|
||||
the preparer's, said as one.
|
||||
|
||||
- **DQ-1** (§777) The line names the accepted kinds `build` on `mesh-builds` and `validate` and `compose` on `mesh-wants`;
|
||||
both seats accept one kind, `step`, today (`mesh-delivery` `seats/mesh-builds/seat.json`, `seats/mesh-wants/seat.json`
|
||||
`accepts`; the runner puts every step on `accept.step`, `cmd/mesh-delivery-pipeline/asks.go:27`). Left to the builder:
|
||||
whether the kinds are renamed and split. Recommendation: keep the one kind `step` on each seat and read the line's
|
||||
kinds as the step the ask names, so no subject and no reader changes.
|
||||
answered: H-A-349 DQ-1.
|
||||
- **DQ-2** (§777) The line rebuilds the `mesh-builds` stream empty through `nats_recreate`; the `mesh-wants` stream
|
||||
`SEAT_MESH_WANTS` holds 1,598 messages and 0 consumers as well (live, `nats.nats_streams`, 22:25 CET), and `mesh-builds`'
|
||||
1,558 now. Left: the fate of `SEAT_MESH_WANTS`' messages. Recommendation: rebuild both empty on the same warrant, before
|
||||
the new builder and the new assigner start.
|
||||
answered: H-A-349 DQ-2.
|
||||
- **DQ-3** (§782) The line names "mesh-sdk's wrappers around one bus handle" without naming them; mesh-sdk holds several
|
||||
(`process.Conn`'s state and stream calls, `stdio`'s `BusState` through the runtime, `views`). Recommendation: name the
|
||||
wrapper row 137 met twice, by package and type, in the line.
|
||||
answered: H-A-349 DQ-3.
|
||||
- **DQ-4** (§777, §778) The runner's second put under `AgainID` with its bound key `ask2.` serves the build seats today
|
||||
(`internal/pipeline/asks.go:27-60`, `:134-160`); the line says the runner puts again only on a transport fault but gives
|
||||
`AgainID` and `ask2.` no fate. Recommendation: both go for every seat, by §777's rule.
|
||||
answered: H-A-349 DQ-4.
|
||||
- **DQ-5** (§783, §820) Which delivery modules are foundation parts (ADR 0619 §1, ADR 0666 §4) that declare their stores
|
||||
in the old section, and which ask in `requires` by template, is not said; today the runner, the builder, the indexer and
|
||||
the assigner use the old sections (`mesh-delivery-pipeline/module.json:205-240`, `mesh-delivery-builder/module.json:120-140`)
|
||||
and the bridge uses `requires` (`mesh-delivery-forge-bridge/module.json:40-45`). Recommendation: the line lists the
|
||||
foundation parts by module.
|
||||
answered: H-A-349 DQ-5.
|
||||
- **DQ-6** (§793) The work queue `publishes` (§820: work queue, 64 MiB, 7 days) names its subject and consumers per
|
||||
holder and class, but not whether the consumers are declared in the builder's `requires` or derived by the broker, and
|
||||
the move's message id `<holder>.<module>.<version>` names no class while `builder_publish_first` puts an item again as
|
||||
`live` within the duplicates window. Recommendation: the builder declares the stream and its consumers in `requires`,
|
||||
and `builder_publish_first` puts under an id carrying the class.
|
||||
answered: H-A-349 DQ-6.
|
||||
- **DQ-7** (§808, H-A-345) The vault's seat serves no write of a module's own secret, and its read `own` answers only the
|
||||
node-engine of a machine, sealed to the machine's key, so a forge module process can neither write nor read its token
|
||||
through `own` (`mesh-contracts` `identity-and-access/seats/mesh-vault/seat.json`, verbs `own`, `get`, `licence-put`;
|
||||
live `mesh-vault.own`'s description, 22:27 CET). The write verb is a gap of this milestone (H-A-345); the read is a gap
|
||||
too. Recommendation: add to the vault's seat a two-step sealed write of a module's own secret modelled on `licence-put`
|
||||
(the module named by the caller's account, its newest generation kept), and read the token through `get`, sealed to the
|
||||
process's key; built in `mesh-catalog` `modules/mesh-vault` and `mesh-contracts`, before the forge module's §808 work.
|
||||
answered: H-A-349 DQ-7.
|
||||
- **DQ-8** (§802) A mesh Go package that no module the indexer holds has published enters the fingerprint by the commit the
|
||||
gate's source names for its repository (`mesh-delivery` `internal/index/form.go:113-125`, design 47 G A-365), and the
|
||||
import form's versions are a holding module's published commit (`form.go:30-33`); the line does not say what such a
|
||||
package enters by under ADR 0499 §2. Recommendation: a package of the module's own repository enters by its directory's
|
||||
tree, as a directory replace does already (`form.go:39-41`); another repository's unpublished package leaves the module
|
||||
without a fingerprint until it is published, said as today's `NoPackageVersion`.
|
||||
answered: H-A-349 DQ-8.
|
||||
- **DQ-9** (§815) The source-only registration has no module, while the state `registrations` is keyed `<module>` and a
|
||||
registration requires `module`, `origin`, `path` and `branches` (`seats/mesh-catalog/seat.json` `defs.Registration`); the
|
||||
line names `repository` and one `branch`. Left: its key, its field names against `origin` and `branches`, and its history
|
||||
key. Recommendation: key `source.<owner>.<name>` in the same states, fields `origin`, `branches` (one), `policy`,
|
||||
`check`, so readers of registrations read one form.
|
||||
answered: H-A-349 DQ-9.
|
||||
- **DQ-10** (§814, §820) The seat list as one object "in the indexer's objects, by digest" is a store §820's table does not
|
||||
hold: its objects entry, cap, key life and deleter. Recommendation: the indexer's objects `seat-lists`, 64 MiB, one object
|
||||
per digest, the indexer deleting every object but the newest two at each new list.
|
||||
answered: H-A-349 DQ-10.
|
||||
- **DQ-11** (§813 (4)) The node-engine marks each rule it writes `mesh-host <id> <digest>` and recognises its own rules and
|
||||
stale ones by that mark (`mesh-host` `internal/firewall/firewall.go:415-427`, `:782`); the line's comment
|
||||
`derived <module> <listen> scope <…>` gives the mark no fate. Recommendation: the scope words follow the mark in the one
|
||||
comment, so the reconciling keeps reading the mark.
|
||||
answered: H-A-349 DQ-11.
|
||||
- **DQ-12** (§813 (1)) "A composition key" is not named: the state and key the holder of `mesh-wants` writes by
|
||||
compare-and-set (its `wants` `want.<node>.<module>`, `compositions` `<group>.<heads>`, or the node-engine's composed
|
||||
bucket), and `run`'s form: the node-engine contract already carries `run` as a string (`mesh-contracts`
|
||||
`go/seats/nodeengine/contract.go:1764`) while the line says a pipeline sequence. Recommendation: name the state and key,
|
||||
and keep the existing field `run` holding the sequence as a decimal string, so no form is raised.
|
||||
answered: H-A-349 DQ-12.
|
||||
- **DQ-12b** (§813 (3)) `engine_composition_diff` is "the node-engine's tool", but the node-engine serves only the seat
|
||||
`node-engine`'s verbs and has no tools bundle (`mesh-host`: no `engine_` tool name in any file; live `ace/node-engine.*`
|
||||
are seat verbs). Recommendation: a read verb `composition-diff` on the seat `node-engine`, beside `composition`.
|
||||
answered: H-A-349 DQ-12b.
|
||||
- **DQ-13** (§821) "The re-pin's" event is not named, and the runner's seat declares none for a re-pin today
|
||||
(`seats/mesh-pipeline-runner/seat.json` events). Recommendation: the line names it (`re-pinned`, carrying the pipeline,
|
||||
the mover and the revision).
|
||||
answered: H-A-349 DQ-13.
|
||||
- **DQ-14** (§819) The starting counts by `go test -list` without and with `-tags integration` (top-level functions, 22:30
|
||||
CET) differ from the line's: the indexer 167 unit and 6 integration (line: 170 and 6), the assigner 86 and 9 (87 and 9),
|
||||
the node-engine 1,715 and 11 (1,716 and 11); the runner 105 and 4 and the builder 167 and 18 agree. By the tag the NFS
|
||||
server module holds 0 integration and 51 unit, the package manager module 3 and 118, where the line's 51 and 121 are the
|
||||
build node's counts, which take untagged tests in. Recommendation: each pull request's check gives the starting count
|
||||
at its base, and the line keeps its figures as a guess said as one.
|
||||
answered: H-A-349 DQ-14.
|
||||
- **DQ-15** (§776) The forge module is TypeScript; the line places `away` in mesh-sdk's seat error answer without saying
|
||||
whether mesh-sdk's TypeScript seat helpers carry it. Recommendation: they do, in the same commit.
|
||||
answered: H-A-349 DQ-15.
|
||||
- **DQ-16** (§810) `class` is `core` "when it moves a core module of ADR 0282 §1"; the gate holds no list or field naming a
|
||||
module's class (`grep -rn -i "core\|class" --include='*.go' mesh-catalog/modules/mesh-delivery-gate/cmd` finds none).
|
||||
Left: where the gate reads it. Recommendation: the gate reads it from a setting `core-modules` (a list, default the
|
||||
delivery system's modules and the node-engine), so the self-check's probe and the gate read one list.
|
||||
answered: H-A-349 DQ-16.
|
||||
|
||||
## Design meets code
|
||||
|
||||
Each entry: the design line, the code (at the commits named above), which of the three it is, and the preparer's
|
||||
recommendation, said as one.
|
||||
|
||||
- **DMC-1** (§777) *A form the code cannot take.* The seat definition's `accepts` carries no `max-age`, `max-msgs`, ack wait,
|
||||
in-progress, max ack pending, max deliveries or duplicates window; the streams and the shared worker are derived by the
|
||||
grants part with their own values (ack wait 60 s, max deliver 5, retain 7 days; `mesh-delivery`
|
||||
`modules/mesh-grants/internal/buscompose/derived.go:86-110`, `:343-358`), and mesh-sdk keeps a second `buscompose`
|
||||
(`mesh-sdk` `go/buscompose/nats.go:96-98`). Live max age is 168 hours. Recommendation: the seat definition's accepts gain
|
||||
these settings, read by the one derivation in mesh-sdk's `buscompose`, which the grants part takes.
|
||||
answered: H-A-350 DMC-1.
|
||||
- **DMC-2** (§776) *A part the line assumes built that is not.* mesh-sdk has no seat error answer: error kinds are each
|
||||
seat's own (`git`'s `ErrorKind`: `refused`, `not-found`, `failed`, `seats/git/seat.json`; `mesh-catalog`
|
||||
`modules/gitea/seat.ts:71`). Recommendation: add `away` to the error kinds of every seat the delivery parts call
|
||||
(`git` first), and mesh-sdk's kept call reads `away` as a transport fault by the answer's `error-kind`.
|
||||
answered: H-A-350 DMC-2.
|
||||
- **DMC-3** (§796) *A form the code cannot take.* The `tags` answer is a list of strings (`seats/git/seat.json` `tags`);
|
||||
`commit` per tag makes each item an object, a form raised (§780) for every reader (`mesh-delivery-builder`
|
||||
`internal/versions/claim.go:213`, `mesh-sdk` `seatlist/bootstrap/git.json`). Recommendation: items become `{tag, commit}`
|
||||
with the seat's `form` 2, read tolerantly by §780.
|
||||
answered: H-A-350 DMC-3.
|
||||
- **DMC-4** (§780) *A part placed where it is not.* The seat generator is `mesh-delivery`'s
|
||||
`modules/mesh-delivery-sdk/seatgen`, not mesh-sdk's; mesh-sdk's `seatdef` reads definitions only. Recommendation: build the
|
||||
tolerant decoders and the `form` check in `seatgen`, and regenerate every seat in `mesh-delivery` and `mesh-contracts`.
|
||||
answered: H-A-350 DMC-4.
|
||||
- **DMC-5** (§802) *A part placed where it is not, and a form already built.* The one fingerprint function is the
|
||||
indexer's (`mesh-delivery-indexer/internal/fingerprint/fingerprint.go:1-5`: "the indexer's own, and nobody else's"; the
|
||||
builder reads what the indexer writes), not mesh-sdk's; and its tree input is already the directory's tree or the named
|
||||
paths (`internal/index/inputs.go:97-118`); the commit enters through DQ-8's packages. Recommendation: build §802 in the
|
||||
indexer's `fingerprint` and `form.go`, the builder taking nothing new but the release in one group.
|
||||
answered: H-A-350 DMC-5.
|
||||
- **DMC-6** (§800) *A rule in code the line breaks.* `check-needs` is a marker file in a package's directory, kept "not a
|
||||
manifest field" on purpose (`mesh-catalog` `modules/mesh-build-go/cmd/mesh-build-go/digest.go:59-66`), read by
|
||||
`mesh-delivery-sdk` `steprun.AskNeeds`; the line makes it a manifest field of a Go artifact. Recommendation: the line
|
||||
holds: the manifest field replaces the marker file, whose fate (it goes, its readers moved) the line states.
|
||||
answered: H-A-350 DMC-6.
|
||||
- **DMC-7** (§799) *A part placed where it is not.* The delay before a run ended `again` is offered again is the tool
|
||||
runner's `WorkBackoff` (5 s doubling to 10 minutes, `mesh-tools` `internal/bus/seat.go:71-79`, `:315`) or a bundle's own
|
||||
`NakWithDelay` (`seat_pull.go:193`); the line says "the tool runner settles the ask with a delay of 15 s ... 60 s", a
|
||||
build module's setting, built in the kit and the build modules. Recommendation: the build module passes its
|
||||
`again-delays` with its `again` (the bundle's delay), so the tool runner changes nothing; mesh-tools' T3 then drops.
|
||||
answered: H-A-350 DMC-7.
|
||||
- **DMC-8** (§786, §789, §816) *Parts assumed built that are not.* The runner has no tools `runner_show`, `runner_cancel`
|
||||
or `runner_movers` (`mesh-delivery-pipeline/module.json`, 14 tools; the verbs `show` and `cancel` exist on the seat).
|
||||
Recommendation: `runner_show` and `runner_movers` are built in R8 as the tools table says; §816's `runner_cancel` reads as
|
||||
the seat verb `cancel`.
|
||||
answered: H-A-350 DMC-8.
|
||||
- **DMC-9** (§814) *A part placed where it is not.* The validate step and `causedProblems` are the assigner's
|
||||
(`mesh-delivery-assigner/cmd/mesh-delivery-assigner/validatestep.go:124`, `:203-230`), which counts every problem of a
|
||||
touched module and only new ones of the rest; the line builds the counting in the indexer and names
|
||||
`indexer_validate_before`. Recommendation: change `causedProblems` in the assigner and name the tool
|
||||
`assigner_validate_before`.
|
||||
answered: H-A-350 DMC-9.
|
||||
- **DMC-10** (§813 (7)) *A part named that is not.* No seat `artifact-store`: the sweep holds `mesh-artifact-sweep`
|
||||
(`artifact-store-tools`), the registry `mesh-artifact-store` and `oci-artifact-registry` (`distribution`); the registry's
|
||||
`list` takes `name`, not `module` (`seats/oci-artifact-registry/seat.json`). Recommendation: read "the seat
|
||||
`mesh-artifact-sweep`'s holder", and `list` takes `module` beside `name`.
|
||||
answered: H-A-350 DMC-10.
|
||||
- **DMC-11** (§813 (5)) *A part assumed built that is not.* No tool `nats_consumers`: the bus module has `nats_consumer` (one)
|
||||
and `nats_backlog` (`mesh-catalog` `modules/nats/module.json`). Recommendation: `nats_consumers` is a new tool listing
|
||||
consumers with the two sorts.
|
||||
answered: H-A-350 DMC-11.
|
||||
- **DMC-12** (§781, §813 (4)) *Parts assumed built that are not.* The node-engine seat has no `converged` and no verb with
|
||||
`timeout` ("built in H1" in the line; `mesh-contracts` `seats/node-engine/seat.json`); the packet filter's holder
|
||||
(`nftables`, TypeScript) serves `rules`, `reload`, `remove` and has no `allow`, asks no `converged` and holds no named
|
||||
10 s (`mesh-catalog` `modules/nftables/client.ts`, `tools/index.ts`). Recommendation: the line says whether H2 builds
|
||||
`converged` with its `timeout` and `allow`, or the clauses about them leave H2.
|
||||
answered: H-A-350 DMC-12.
|
||||
- **DMC-13** (§781) *A part assumed built that is not.* mesh-sdk has no settings reader: each module reads its
|
||||
`${config:<key>}` files by names of its own (`mesh-delivery-pipeline/cmd/mesh-delivery-pipeline/askbounds.go:20-35`).
|
||||
Recommendation: a reader in mesh-sdk takes a setting by its key from the words the node-engine composes, in a process
|
||||
and in a bundle alike, and the runner's own readers move to it.
|
||||
answered: H-A-350 DMC-13.
|
||||
- **DMC-14** (§812) *A part assumed built that is not.* A state write answers its revision only (`mesh-sdk` `go/state.go:177`,
|
||||
`:190`; `mesh-tools` `internal/bus/state.go:425`), and a publish's acknowledgement carries the stream and sequence, no
|
||||
fill. Recommendation: the runtime's write answer carries the entry's `Fill` (`buscalls.Fill` exists), which the prune
|
||||
helper judges.
|
||||
answered: H-A-350 DMC-14.
|
||||
- **DMC-15** (§778) *A part assumed built that is not.* "Drops its ask through the seat's `drop`": `mesh-builds` (verbs
|
||||
`reserved`, `published`) and `mesh-wants` declare no `drop`; only the build-step part has one. Recommendation: D1 adds a
|
||||
`drop` act to both seats, its holder ending the ask as the build seats' `drop` does.
|
||||
answered: H-A-350 DMC-15.
|
||||
- **DMC-16** (§791, §801) *A form the code cannot take as written.* The build-step part already has `output` (the whole
|
||||
answer in chunks by `ask` and `call`) and `current` (the steps, capacity, paused) in other forms
|
||||
(`mesh-delivery-contracts/parts/build-step.json`). Recommendation: the line's forms replace them with the part's `form`
|
||||
raised, the runner's tool their one reader.
|
||||
answered: H-A-350 DMC-16.
|
||||
Reference in New Issue
Block a user