Design 47 H2: the prepare's build maps, design questions and where design meets code
Six build maps (one per repository the lines land in), 17 design questions and 16 places where a line and main's code disagree, for the lead's answers before develop (playbook 07, steps 0 and 0b).
This commit is contained in:
@@ -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).
|
||||
@@ -416,3 +416,158 @@ its own pipelines, with no hand pack (section 7 of the plan). Its two proofs (§
|
||||
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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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`.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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`.
|
||||
- **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).
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
|
||||
## 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.
|
||||
- **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`.
|
||||
- **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.
|
||||
- **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`.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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`.
|
||||
- **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`.
|
||||
- **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`.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
|
||||
Reference in New Issue
Block a user