Designs 25, 51: retry a swapped pull on settled; owners' read tools get names of their own

Neither condition-cleared nor delivered comes during the store holder's own
delivery, so the node-engine retries on the status view's settled for that
holder, heard through the grants part's list, and at its own start. The
status view keeps its tools and answers them through the owners' new read
tools, so no name moves between modules.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
2026-11-04 02:04:51 +01:00
parent 0e8a698025
commit 74b69857a1
2 changed files with 47 additions and 38 deletions
+19 -17
View File
@@ -815,18 +815,20 @@ vault as an own secret: JetStream create and update under modules' names only (s
part and the tool runner their first views while the bus module still waits on it. The order of owner before reader is kept by the module graph's served-verb edge for the 19 readers (ADR 0614 §2), and,
for the four, whose verb edges lie on cycles the graph leaves out (ADR 0614 §3), by the owner's answer at once and
the reader's wait (ADR 0615 §2).
- **The other 19 readers ask the owners' tools, one per bucket they read** (ADR 0615 §1, §2): beside the five above,
each owner serves a first-view tool for every other bucket of its state a reader reads, named for its owner and
the bucket and marked as a read, in the owner's own runtime like the five (ADR 0621 §1). The indexer's seven:
`indexer_predefined` (its bucket `predefined`), `indexer_config_candidates` (`config-candidates`),
`indexer_candidates` (`candidates`), `indexer_packages` (`packages`), `indexer_graph` (`graph`), `indexer_heard`
(`heard`) and `indexer_taken` (`taken`). The assigner's three: `assigner_findings` (`findings`), `assigner_asks`
(`asks`) and `assigner_differences` (`differences`). So the nine buckets of the indexer and the six of the
assigner that the 23 readers read (§ 12.6) each have their owner's tool. Six of these names are today tools of the
status view, which serves them by reading the owner's bucket and is one of the 19 readers: `indexer_predefined`,
`indexer_config_candidates`, `indexer_candidates`, `indexer_packages`, `indexer_heard` and `assigner_differences`.
**The owners' tools take the six names, and the status view drops its six tools of those names as it moves**,
since without its reads it can no longer answer them; one name is then one tool, the owner's.
- **The other 19 readers ask the owners' read tools, one per bucket they read** (ADR 0615 §1, §2). Beside the five
first-view tools above, each owner serves a read tool for every bucket of its state one of the 19 reads today,
named `indexer_read_<bucket>` or `assigner_read_<bucket>` and marked as a read. The indexer's nine:
`indexer_read_manifests`, `indexer_read_modules`, `indexer_read_predefined`, `indexer_read_config_candidates`,
`indexer_read_candidates`, `indexer_read_packages`, `indexer_read_graph`, `indexer_read_heard` and
`indexer_read_taken`. The assigner's six: `assigner_read_placement`, `assigner_read_seat_holders`,
`assigner_read_wants`, `assigner_read_findings`, `assigner_read_asks` and `assigner_read_differences`. These are
the nine buckets of the indexer and the six of the assigner the readers read (§ 12.6), `modules`, `wants` and
`placement` among them for the status view. **They are ordinary module tools**: granted, as any tool is, to every
reader that declares it in `invokes`, and callable by a session; ADR 0621 §2's `callers` list covers only the five
first-view tools and stays as it is. **The status view keeps all its tools**, their names, arguments and answers
unchanged, its `indexer_*` and `assigner_*` tools included: as a reader it answers them by asking the owners' read
tools instead of reading their buckets. Checked live after the delivery: a session's call of each status view tool
answers, and `mesh_search` finds each owner's read tool by its bucket's words.
- **Only the owner reaches it** (ADR 0596 §2). The membership grants the owner's account its own entries and no
other module's: the new form has no readers. What another module needs of that data it asks through the owner's
tools or seat verbs, and what the owner lets others hear is its declared events, subscribed to through
@@ -983,11 +985,11 @@ this milestone go on their old sections too (§ 12.2; design 51 *The move*; desi
bus state (counted 2026-11-03 02:00). **A correction of fact**: the indexer's and the assigner's state, counted again
from every manifest on main later that day, is read by 23 modules, 9 buckets of the indexer and 6 of the assigner,
not by the 19 the first plan counted; and 151 state entries were counted, not 158 (the template table of § 12.1 keeps
the first count, which chose the templates). The owners first gain their events and first-view tools: the indexer
one per bucket its readers read, the assigner the same (§ 12.2 lists them). Then all 23 readers move in the milestone of ADR 0612, the
the first count, which chose the templates). The owners first gain their events, first-view tools and read tools: the
indexer a read tool per bucket its readers read, the assigner the same (§ 12.2 lists them). Then all 23 readers move in the milestone of ADR 0612, the
four foundation readers included, by the first view of § 12.2 (ADR 0615 §1); their order is the module graph's, not
a review reading an owner delivered (ADR 0615 §2). The status view's move drops its six tools named for the owners'
buckets, which the owners' tools of § 12.2 take over under the same names. The judge still refuses a moved module's subscription to an event
a review reading an owner delivered (ADR 0615 §2). The status view's move keeps every tool it serves, each answered by
asking the owners' read tools of § 12.2. The judge still refuses a moved module's subscription to an event
its owner does not declare. Every other reader moves when its module is next touched. These moves are tracked by
issue 1966.
@@ -1002,7 +1004,7 @@ issue 1966.
| A foundation part's first view | unit tests of each owner and reader (ADR 0615's How it is checked), as table cases, and these cases of the whole-module integration tests that exist today (mesh-delivery is over its integration budget, so no new test function): the indexer's (`modules/mesh-delivery-indexer`, its one whole-module test, which the milestone's packages test merges into), the assigner's (`modules/mesh-delivery-assigner`) and the grants part's (`modules/mesh-grants`), and the tool runner's in mesh-tools: the owner answers its verb at once from what it holds, with its revision, before its own first view; the reader asks once at start, then only on a gap in revisions; a reader whose owner is down raises its condition only past the bound and never reads the owner's state, and the owner's answer clears it; an empty answer at revision 0 drops no login; an owner's event carries the changed value whole, and a reader applies a put and a delete from the events alone and never asks the verb; a revision lower than the one held makes the reader ask its first view again; an existing waiter on `manifest-accepted` or on the assigner's `put` does not wake on the new families; the read tool shows the revision each reader holds, and the re-read tool asks once and records the hand act; in the
| The owners' first views are their own tools, in a runtime of their own (ADR 0621) | cases of the indexer's and the assigner's whole-module integration tests: each first-view tool, called from a reader's account while the node's tool runner is stopped, answers (§1); each answers its granted readers and refuses every other account, the owner's own included (§2); the two runtimes started at the same moment, each asking the other's first view at start, both answer within the first-view bound with their revisions (§3); and the milestone's group passes its merge check with no change to the judge's known fields for these verbs (§4) |
assigner's whole-module test, the assigner starts before any new-form bus state exists, with no binding of the bus
module, and the indexer, the grants part and the tool runner each get their first view of it. Live, after the delivery: the indexer's `indexer_old_sections`, which the milestone extends to count the `reads` entries on each owner's state, reads 0 for the indexer's state and 0 for the assigner's; and each owner's tool of § 12.2 for the other 19 readers answers what its bucket holds |
module, and the indexer, the grants part and the tool runner each get their first view of it. Live, after the delivery: the indexer's `indexer_old_sections`, which the milestone extends to count the `reads` entries on each owner's state, reads 0 for the indexer's state and 0 for the assigner's; and each owner's read tool of § 12.2 answers what its bucket holds, each status view tool answers a session's call as before the move, and `mesh_search` finds each owner's read tool |
| A foundation part's first view comes within its bound | live, after the delivery: each reader's read tool (`grants_first_views`, the mesh MCP server's `mesh_first_views`, `indexer_first_views`, `assigner_first_views`) shows, for the indexer's and the assigner's verbs, the time from its ask to the owner's answer under the two-minute bound, and no first-view condition raised by the delivery |
| The bus module's first view | cases in the nats module's one integration test: a replayed verdict older than the first view is not applied; an `indexer_bus_state` that does not answer turns the health unhealthy naming it and is asked again on the backoff; a set-aside manifest missing from the first view keeps its `asked` key, an empty `manifest-accepted` removes it; a deleted module's entry, after its empty `manifest-accepted`, is listed by `orphans` and raises `orphaned`, and a set-aside module's entry is neither; `nats_first_view_again` asks at once and records the hand act |
| `manifest-accepted` is never lost silently | unit tests of the indexer: a failed publish is published again, and one still failing writes the finding; `indexer_say_accepted` says it again for one module from the verdict held, and refuses a module with no accepted verdict |
@@ -9,7 +9,8 @@ code:
- mesh-delivery modules/mesh-delivery-builder (versions, tag asks), the forge bridge, the indexer, the checker, the assigner
- mesh-sdk (the bus helper for sending in parts)
- mesh-catalog modules/docker (image pruning)
- mesh-host internal/apply (every new image of a module pulled before any of its containers is replaced; a failed pull applied again when the condition keeper clears the store's holder's condition or the status view says `distribution` delivered)
- mesh-host internal/apply (every new image of a module pulled before any of its containers is replaced; a failed pull applied again on the status view's `settled` for the store's holder, and at the node-engine's start)
- mesh-delivery modules/mesh-grants (what a node-engine hears: the status view's `settled`)
updated: 2026-11-04
decisions:
- "ADR 0605"
@@ -195,18 +196,22 @@ the verb.
declared resource missing or down; only a failure of the bus itself is tried again on a clock (a bounded backoff,
at most four times before the have says failed). So another module's apply whose pull falls in that window stays
failed, its running containers kept, until one of those: its have says failed naming the image.
**So a pull that falls in the swap is tried again on the store's holder's health, never on a timer**: the
node-engine hears the seat `mesh-conditions`'s `condition-cleared` (ADR 0564 §3) through its manifest's `consumes`,
and when the condition it clears names the store's holder (`distribution`, the holder of the image seats) as not
healthy or its seat as not answering, it applies once more each module whose have says failed naming an image of
that store, one apply per clear, said in its journal. **It also tries them again when `distribution`'s own delivery
ends**: the node-engine hears the status view's `delivered` (the event design 47 derives, once for each source
revision whose wants and haves all agree) through its `consumes` as well, and on a `delivered` for a source revision
that moved `distribution` it applies once more each module whose have says failed naming an image of the store. A
finding of the holder held during its own delivery (ADR 0564 §13) raises no condition and so no clear; without this
a pull failed in the swap would wait for `compose`. A clear of any other condition and a `delivered` that did not
move `distribution` start nothing, and no clock starts an apply. `compose` naming the module stays, but only as the hand recovery of a pull still failed after
that, recorded as a hand act; it is no step of the delivery.
**So a pull that falls in the swap is tried again when the store's holder has settled, never on a timer.** Neither
the condition keeper's `condition-cleared` (ADR 0564 §3) nor the status view's `delivered` comes in the swap: a
finding of the holder held during its own delivery raises no condition and so no clear (ADR 0564 §13 (c)), and
`delivered` waits for every have to equal its want, which the failed have itself blocks (design 47). The status
view's `settled`, said once for a module on a node at one composition when its have reaches its want running and
healthy (design 47), is blocked by nothing else. So the node-engine hears `settled` for the store's holder on the
node it runs on, and then applies once more each module on its own node whose have says failed naming an image of
that store, said in its journal. It finds the holder by the seat the failed image came through, read from its
declaration, never by a module's name. **The seam that changes is the grants part's list of what a node-engine
hears** (`NodeAgentHears`; the node-engine declares no `consumes` of its own): it gains one entry, the status
view's `settled` family, which the node-engine filters for the holder of the seat its failed image names. **At its
own start** the node-engine also applies once more every have that failed naming an image of a store, so a restart
or an absence across the swap misses nothing. A module already being applied is not applied a second time; a retry
whose pull fails again says failed again and starts no further apply. A `settled` of any other module starts
nothing, and no clock starts an apply. `compose` naming the module stays, but only as the hand recovery of a pull
still failed after that, recorded as a hand act; it is no step of the delivery.
- **The package seats' read sides need no credential** for the mesh's own packages: the forge serves the mesh owner's
packages to anonymous reads, so the provisions `npm-package-registry` and `go-package-registry` carry no
credential (form none), and mesh-build-node, which held a pair for both writing and installing, requires none (the
@@ -474,12 +479,14 @@ test).
- **Node-engine, unit** (a case of its apply test, with the runner it already fakes): a module of two containers
whose second new image cannot be pulled replaces neither container, says the image, and keeps both running; with
both images pullable, both are pulled before the first container is set aside.
- **Node-engine, unit** (a case of its apply test, with the runner and the bus it already fakes): a module whose pull
failed, its have failed naming an image of the store, is applied once more on a `condition-cleared` of the store's
holder's condition, and its new image pulled; a `condition-cleared` of another module's condition applies nothing;
with no clear heard, nothing applies it again, however long the test waits; the same module is applied once more on
a `delivered` for a source revision that moved `distribution`, and a `delivered` that moved only another module
applies nothing.
- **Node-engine, unit** (cases of its apply test, with the runner, the bus and the clock it already fakes): a
module whose pull failed, its have failed naming an image of a store, is not applied again with the clock moved
past the bus backoff's four tries and no event heard; it is applied once more, and its new image pulled, on a
`settled` for the holder of the seat its image came through; a `settled` of another module applies nothing; at the
node-engine's start it is applied once more with no event; a module being applied when `settled` arrives is not
applied twice; a retry whose pull fails again says failed again and starts no further apply.
- **The grants part, unit** (a case of its composition test): a node-engine's subscriptions hold the status view's
`settled` family beside the backup holder's word, and nothing more.
- **Checker.** A changed build module invoking a verb no running holder serves is not run, and the verdict names the
modules composed from their manifests instead, and the verb.
- **Vault.** Reverting the milestone's merge mints the build modules' credentials again; the bootstrap's one-off
@@ -492,8 +499,8 @@ test).
milestone wakes and applies the new node-engine; the node-engine's apply journal for `distribution` on each node
shows every new image pulled before its first container was replaced, and no node's pull of any module failed
during the delivery (each node's haves, none failed naming an image), or, where one fell in the swap, its have
turned healthy after the condition keeper cleared the store's holder's condition or after `distribution`'s
`delivered`, the node-engine's journal naming which, and no `compose` was called for it; mesh-build-node installs from a lock file
turned healthy after the status view's `settled` for the store's holder, the node-engine's journal naming that
`settled`, and no `compose` was called for it; mesh-build-node installs from a lock file
naming the registry's public root with no credential. Go's `direct`: its removal is named on the milestone's issue,
and the change that removes it adds to the Go build module's recipe test a case that refuses `direct` in the fetch.