diff --git a/03-DESIGN/01-to-be/47-milestones/H-deliver-the-delivery-system.md b/03-DESIGN/01-to-be/47-milestones/H-deliver-the-delivery-system.md index ff791f0d..e838a5a1 100644 --- a/03-DESIGN/01-to-be/47-milestones/H-deliver-the-delivery-system.md +++ b/03-DESIGN/01-to-be/47-milestones/H-deliver-the-delivery-system.md @@ -29,8 +29,8 @@ before any code is written. ## 1. Where the system stands (read 2026-11-20 00:05 to 00:30 CET) **What works.** One pipeline delivered one module end to end with no hand act on 2026-11-19 at 22:48 (the image -registry, main.1039). The shape of the design is in the code: of about 620 design lines held against main, about -70 per cent are built by their contract (per part: runner 87 of 100 judged, gate and bridge 71 of 93, indexer 70 of +registry, main.1039). The shape of the design is in the code: of 619 table rows of design lines held against main, 413 are built by their contract: 78 +per cent of the 527 rows judged (the rest belong to another part's code) (per part: runner 87 of 100 judged, gate and bridge 71 of 93, indexer 70 of 89, assigner and node-engine 56 of 76). No part needs to be written again whole. **What does not work.** The system cannot deliver itself today: @@ -38,14 +38,14 @@ registry, main.1039). The shape of the design is in the code: of about 620 desig | symptom (live) | count | cause (from the gap tables) | |---|---|---| | wants held or failed on the four machines | 205 held, 66 failed | the catalog half holds no entry for their fingerprints; the node-engines compose nothing new | -| compositions fail on shanks | since 2026-11-18 03:09 | an entry ask that failed in transport is never asked again; the node-engine's shadow waits on it without bound | +| compositions fail on shanks | entries `asked` since 2026-11-18 03:09, unready answers seen from 2026-11-19 11:56 | an entry ask that failed in transport is never asked again; the node-engine's shadow waits on it without bound (the surveyor's reading); other compositions failed on the removed revision trunk.510 and on a call-token refusal | | delivery records open, none ended | 833 open, 0 ended since 2026-11-14 | the gate hears only `take-in.taken`; nothing writes a record's trace, so its difference is never known | -| pipelines about to start at the next take-in | about 63 | the runner's sweep starts a pipeline for every module whose fingerprint has none (b9c50ef0, 2026-11-16); no design line allows it | -| source revision moved twice | both paths on main | A-464 (per merged message) wins live over A-34 (on the take-in): a group's members become separate revisions, a pushed commit is ignored | +| pipelines about to start at the next take-in | about 60 (reasoned from the sweep's rule; no tool reads the runner's waiting starts) | the runner's sweep starts a pipeline for every module whose fingerprint has none (b9c50ef0, 2026-11-16); no design line allows it | +| source revision moved twice | both paths on main | A-464 (per merged message) wins live over A-34 (on the take-in): a group's members become separate revisions; a pushed commit reaches the source only through the take-in or the gate's comparison at its next start | | catalog revision removed while pipelines name it | trunk.510 at 22:51 | pins are judged at restart against a key written once; only the take-in pins pipelines | | stale bus state | 753 merges, 6,951 owed, 898 asks, 1,256 pulls keys; 5 pipelines running since midday; 31 stale pin records | buckets of the pre-G model never dropped; no tool reads their contents | | bus load | 98 slow consumers, 117 consumers behind; the watchman 39,037 events behind | mesh-config passes every 5 minutes and polls every minute on main (fixed on the held pull requests); the forge module polls every minute | -| hand-placed programs | every delivery module but the indexer, the image registry and the tool runner (on ace and g14) | G's live start of 2026-11-16 and after; 19 drop-in files under `/run/systemd/system` on the four machines, lost at a reboot | +| hand-placed programs | every delivery module but the indexer, the image registry and the tool runner (on ace and g14) | G's live start of 2026-11-16 and after; 16 drop-in files under `/run/systemd/system` on the four machines (4 of them `.pre-g` copies), lost at a reboot | **The root of it, in one sentence.** The design settled on one model (a change is a commit on a watched branch of a registered module; the forge bridge says it, the indexer takes it in per branch, the runner starts exactly the movers, @@ -68,7 +68,8 @@ written on the earlier one. Every list above is a consequence. as a failure mode. 2. **Fix in place, every module; write one part again.** Each gap table judged its modules by the share of lines built and by whether their events, verbs and kept data are the design's. All say fix in place, mostly by deletion, - but one: the indexer's take-in part (about 3,400 of its 34,000 lines: pending, source numbering, behind, the + but two parts: the assigner's want rule (about 2,600 lines of `wants.go` and the want half of its pass, written again + to A-478) and the indexer's take-in part (about 3,400 of its 34,000 lines: pending, source numbering, behind, the branch take-in, the pull-request candidates and previews) is written again as one take-in per watched branch fed by the forge stream alone; its storage, entries, pins, versions and verbs stay. 3. **The design first, then code.** Where the operator's words and the lead's live answers departed from the @@ -91,7 +92,8 @@ the plan. Built 71, built otherwise 5, contradicts 10, missing 7, not judged 15 (of 108). No gap is large alone. - **No delivery record ever ends.** The gate consumes only `take-in.taken`. It must consume the runner's - `pipeline-ended` and the node-engines' `running` to write a record's trace and end it (G-3 "The delivery record"). + `pipeline-ended`, the node-engines' `running`, the `wait-held` and `wait-ended` events and the assigner's families + (G §5, §146) to write a record's trace and end it (G-3 "The delivery record"). - **Two paths move the source revision**; the per-merge one (A-464, about 330 lines) acts live and the design's (A-34, about 75 lines) is left without effect. A-464 goes. - **The per-pull-request model** is about 1,300 of the gate's 5,475 lines and about 1,050 of the bridge's 4,281. @@ -135,8 +137,10 @@ Built 87, built otherwise 5, contradicts 2, missing 6, not judged 19 (of 119). N request mesh-delivery #262 adds a third start path (`StartHeld`); it is closed, not merged. - **The refused step ends naming an empty pipeline** are the assigner's composition runs on the Go build seat: the runner reads the pipeline field before the asker field. Skip an end whose asker is not the runner (small). -- **Missing:** `toolchain-agreed` starts no kind-3 rebuild (G §376); nothing consumes `approval-carried` (G §542). - Both medium. +- **Missing, medium each:** `toolchain-agreed` starts no kind-3 rebuild (G §376); nothing consumes `approval-carried` + (G §542); each repository's own checks are not a step (G-2); the start-time `outdated` and `runner_catch_up` (G §375) + do not exist, and by decision 1 they are not built: a kind-1 dependent is started by `package-published`, which the + durable consumer delivers also after a stop (section 4, item 7 says it as a line). - **A bound on pipelines at once** has no design line; principle 11 makes it a setting (`pipelines-at-once`). A start over the bound is written with no steps and placed when the runner's own `pipeline-ended` comes, no timer (medium). What a waiting pipeline reports against G §12's `pipeline-stands` is a design line (section 4). @@ -158,8 +162,9 @@ built; no large gap, five medium. - **The builder is not entered only through the runner's `build` step** (G §473, A-97): it builds every catalog entry it hears and still follows the gate's `source`. Medium; it goes. - **`build.ended` carries no version** (A-430b), and builds of other branches reserve nothing. -- **The build modules** pull their three queues in turns, not deliveries first (ADR 0525; a code comment cites an - operator's yes of 2026-11-15 that no record holds), and when idle re-pull every 5 seconds, a poll. The artifact +- **The build modules** pull their three queues in turns, not deliveries first (ADR 0525 §4, G §86; a code comment + cites an operator's yes of 2026-11-15; the surveyor did not search the knowledge base for it, so H2's prepare does: if + the yes was recorded, the record and the lines are out of date, not the code), and when idle re-pull every 5 seconds, a poll. The artifact store is read by raw HTTP in group runs; the registries are reached through bus verbs. Two copies of the client that asks `reserved` differ (the forge's and the image registry's). - **The publish again** runs in one shape, A-457's retried items with A-473's ask at build end as their first try; @@ -172,7 +177,8 @@ built; no large gap, five medium. - **Decision:** fix in place, all three. Builder: remove the numbering, the gate-source follow, the builds without a step ask and the other pre-G mechanisms the table lists; fix the reserver's floor and the version on `build.ended`. Build modules: deliveries first and no idle poll in the shared step runner; the store read over the bus. Registries: - one `reserved` client in mesh-sdk. + one `reserved` client, the forge's form moved into `mesh-delivery-contracts` as the surveyor recommends. The delivery + budget (G-2) is checked by nothing; medium, H2. ### 3.5 The assigner, the node-engine and the tool runner (mesh-delivery: the assigner; `mesh-host`: the node-engine; `mesh-tools`: the tool runner) @@ -185,7 +191,7 @@ Built 56, built otherwise 8, contradicts 9, missing 3, not judged 7 (of 83). Ass check (about 250), the rest about 300. All of it goes; the backup, the yes on a failed backup or a held revert, and A-478b's order waits on one machine stay (the order waits reshaped to order one machine's apply, not hold wants). - **The assigner reads every have** whole and with history (§520 says it goes); the node-engine reads every node's - record key (§459 forbids it). Medium. + record key (§459 forbids it); wants are not written from the kept assignment graph revision. Medium each, H1. - **The shanks shadow fault**: the entries client leaves an entry `asked` after a transport failure and never asks again; about 110 entries on shanks have stood `asked` since 2026-11-18 03:09. Ask again on failure, with a bound (small). The surveyor's reading, to be confirmed by `entry-again` on one entry during the clean state. @@ -200,7 +206,8 @@ Built 56, built otherwise 11, contradicts 5, missing 11, not judged 9 (of 92). - **The status view, the watchman and the grants part read other modules' buckets directly**, against ADR 0596: the view watches twelve such buckets, retries each every 5 seconds, and still follows the teller's answers and the gate's - source, which §512 retires. Large; it is the one large gap of the survey. + source, which §512 retires. Large, with the want rule, the take-in and the SDK's generic state tools (the fill against + a cap in every module's tools, the grants part's `filling` and `room`) the large gaps of the survey. - **The kind of fault behind issue 1982 is in more modules than mesh-config.** The grants part recomposes everything and reads its own states key by key on every change; the indexer re-reads every module, every graph key and every manifest after each verdict, import or source move (its modules state stands at revision 1,789,962); the view @@ -211,8 +218,8 @@ Built 56, built otherwise 11, contradicts 5, missing 11, not judged 9 (of 92). 52.5 seconds and 53 values took 44.5 seconds. Each call starts a tool process that lists every key of `builds` and of every build seat's `steps`, then reads one value per request. The builder keeps its own index of what is building and answers from it. Medium. -- **The runner's live seat serves five read verbs and no act**; main has them all (commit 8fa1b8ae). A hand-placed - build from before it; the clean state ends it. +- **The runner's live seat serves five read verbs and no act**; main has them all (commit 8fa1b8ae). The surveyors' + guess is a hand-placed build from before it, or an older tools bundle; the clean state ends either. - **Who may call what** stands in two forms: §610's class defaults and A-434's stand-in that every account may do everything. **The lead's answer: principle 6 settles it** (inside the mesh every module is trusted, who may do what is not a question): A-434 stands, the callers lists go from every seat contract, and tests 40, 51 and 85 are not @@ -221,7 +228,7 @@ Built 56, built otherwise 11, contradicts 5, missing 11, not judged 9 (of 92). the bus's module (principle 4), named in section 4 so the design says it. - **Decision:** fix in place, every module. View: replace the bucket watches with events (the large gap, H4). Watchman (16 of 23 built) and condition keeper (14 of 18): fix in place; their live builds predate milestone G. Grants - part: the re-read through the SDK shape now, its move from reads to events in H4. Bus module and tool runner: the + part: the re-read through the SDK shape in H4, its move from reads to events a release of its own (H4b). Bus module and tool runner: the rate read and the SDK's generic state tools. - **The wake-up rule is a class fix:** one shared shape in mesh-sdk (watched copies of a module's own states, a pass only on a changed input, one deadline timer for its real deadlines, no poll), every delivery module moved onto it in @@ -318,7 +325,8 @@ own pipeline), in this order, the next starting when the previous one's delivery | 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 | | 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, the view and the watchman without reads of another part's state, the missing tools per module, rates on the bus | mesh-sdk, mesh-delivery, mesh-catalog | the bus's slow consumers and behind counts at 0 for an hour; every module's tools pass the principle-4 table | +| 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 | | H5 | tests to budget and one integration test per module that starts it whole (ADR 0548); the catalog check that refuses a module whose state has no read tool | every delivery repository, mesh-catalog's check | the check reports each module's counts within budget | Milestone H1 is large for one release (six repositories); it is not cut (how-work-is-done), its subtasks are split