Design 47 H2: lead answers H-A-639 to H-A-681, the prepare's questions of H2's corrections

This commit is contained in:
2026-11-25 13:02:58 +01:00
parent 999e6525ee
commit 6b8373ce51
@@ -281,3 +281,143 @@ principle that settles it.
accepted 2026-11-25, decides the cap H-A-636 gave, so the withdrawal and the revert are dropped, as that record's
Consequences say: nothing of H-A-638 is built, the row H-A-636 added to the keeper's plan tests stays, and the gate's
state and index buckets stay at their `max-mib` of 1 GiB. ADR 0690 §1.
## The prepare's questions of the code milestone "design 47 H2's corrections" (2026-11-25 from 13:01 CET)
The milestone file (hq `.work/47-H2-corrections/milestone.md`) lists 36 design questions (DQ) and 12 places where a
line and the code disagree (DMC). Five research-readers read each at today's mains (mesh-delivery 3b1f03ce,
mesh-catalog 17e1bfb6, mesh-sdk bb11615, `mesh-host` d27af83, mesh-contracts 52e5224); each answer below rests on that
reading and names the principle that settles it. Scope questions DQ-5, DQ-10, DQ-12, DQ-23, DQ-30 (and DMC-6, which
follows DQ-12) wait for the operator; DMC-2, DQ-25 and DQ-27 go to hq-design-writer as design lines, since no
principle settles them.
- **H-A-639 (DQ-1: which manifest reads leave mesh-sdk)** `ManifestNeeds` and `ModuleNeeds` move whole into the
indexer's manifest validator (their only callers); `MissingManifestReads`, `StatedManifestReads`, `BaselineManifestReads` and
`manifest_reads_baseline.txt` are deleted, since no reader is left once `graph.MissingReads` (called by its test
alone) goes; the node-engine's (`mesh-host`) `packaging/operator_keys_test.go` row that reads them goes too (it guards a word hold H §750
ended); `ManifestReads` and its three prefixes stay with the manifest model the node-engine states from.
Principles 7 and 9.
- **H-A-640 (DQ-2: the new value of the node-engine seat)** `directory-contents-owner` joins `ManifestReadWord`'s enum
with no form raise (no message names the type; §780 raises a form only for a field added or removed); its description
names both values. Principle 7.
- **H-A-641 (DQ-3: the units stopped for the owner pass)** When a declared directory exists with a found owner other
than its declared one, the node-engine stops the module's units with `StopModule`, widened to its processes, before
the first pass; the normal apply starts them again; the tool runner is never stopped; the pass back follows the same
rule. Principles 2 and 7.
- **H-A-642 (DQ-4: the token files that go, and when)** The four token files (`token`, `packages-token` and their
`.scopes`), and any `.tmp` beside them, go pair by pair inside `doMint`'s first-mint drop: each pair matched to its
token by its last eight characters and its scopes, revoked at the forge, then deleted; a pair with no match is kept
and said. This is H-A-602's order. Principles 12 and 3.
- **H-A-643 (DQ-6: one delivering pipeline per head revision)** `start` with `modules` follows `module`'s rule per
module (H-A-571, H-A-594 (3), H-A-607 (3)): it joins the head's pipeline while that waits or runs, else a pipeline
keyed `<branch>.<rev>`; a module whose own step failed reopens its pipeline as `rerun` does; `startAgain` and the
`.unfinished` start go; both old key forms stay readable, marked as kept from before, until the last such key ages out
(the ager: 7 days failed, 90 passed). Principles 7 and 3.
- **H-A-644 (DQ-7: `place-unfinished` with `all`)** The verb gains a boolean `all`; exactly one of `key` or `all`; one
hand act per call; the seat's form rises 12 to 13 once, together with `mover-added`. Principles 4 and 9.
- **H-A-645 (DQ-8: `mover-added`'s subject and form)** `mover-added.<branch>.<revision>` from the runner's
`subjectRevision`, the pipeline's key in the body; exactly one of `from`, `caller` or `take-in`, a reader refusing
none or two; the gate consumes `mover-added.*.*`. Principles 7 and 3.
- **H-A-646 (DQ-9: the edge that ties a carried mover)** A mover is tied to a failed one when it has an `awaited` edge
from it (kind 1, the package published; kind 3, the build step passed), directly or through others; the tied group
is closed under the tier kinds. The runner's own `awaited` is reused (principle 7); kind 3 is in because a dependent
carried without its failed build module or image base would be built by another version than its pipeline waited
for (principle 3). Principles 7 and 3.
- **H-A-647 (DQ-31: the keys main.454 to main.493 left)** `runner_unfinished` answers none today; H-A-607 (4)'s acts
read it before and after and act on what it holds; H-A-619's live check reads as H-A-625 (4) says: each main.457 mover
whose own steps passed is wanted at its fingerprint or newer, read through `mesh-wants` before main.457 ages out
(about 2026-11-30), otherwise on the next failed pipeline's keys. Principle 3.
- **H-A-648 (DMC-4: the gate's held commit)** The milestone takes fa345c83 (branch hold/gate-h-a-585) onto its branch,
resolves its one test conflict, then makes `RanAfterEnd` follow H-A-597 and H-A-617 (the first `running` per machine
present at the end; a machine back moves nothing; `record-ended` again with `ends` plus one) and adds `mover-added`
(H-A-609 (2)). Principles 7 and 3.
- **H-A-649 (DMC-5: "could-not-run" as a pipeline's end)** No pipeline outcome is added: "could-not-run" in §786,
H-A-581, H-A-594 (2), H-A-595 and H-A-607 (2) reads as a pipeline ended failed by a step that could not run, that
mover counted failed; the outcomes stay passed, failed and cancelled. Principle 7.
- **H-A-650 (DMC-10: `step-ended`'s `revision`)** No new field: `revision` (omitempty) is described "present exactly
when superseded", the seat's form rising to 4; P1 turns the zero path into H-A-601's could-not-run; and where the
builder heard no superseding revision for the module, it ends the step could-not-run itself, naming that, never
with a zero. Principle 3.
- **H-A-651 (DQ-11: subjects the indexer no longer consumes)** I9 is built here as H-A-578 (2) says, in the indexer's
first change after the narrowing, which needs the bus module's narrowing tool (G5) delivered first; until then the
hub's `event-unhandled` finding says each message it acknowledges. Principle 3.
- **H-A-652 (DQ-13: one `again` in flight per holder, four `live`)** Per holder two durables on the work queue
`publishes`: `.live.>` with four in flight and `.again.>` with one; the one durable `publishes-<holder>` is deleted
first, since its filter overlaps both. This amends H-A-483's addendum, whose split was withdrawn only for an order of
live before again that H-A-620 (2) no longer asks. Builder only. Principles 1 and 3.
- **H-A-653 (DQ-14: an item past its deliveries)** The limit stays 10 (the work queue's declared `max-deliveries`, ADR
0436 §6); at the delivery where an item reaches it the builder terminates the item and raises `version-unreleased`
"given up after 10 deliveries", never leaving it dead on the queue (H-A-620 (1) needs this too). Principle 3.
- **H-A-654 (DQ-15: the publish loop after a pull error)** Only the publishes' dispatch changes, to the step queue's
shape: `Consume`, bound again on the consumer's created and deleted advisories, so an error never ends it. Principles
3 and 7.
- **H-A-655 (DQ-16: many dead items)** No new form: H-A-653 stops new dead items; today's items are dropped with
`builder_publish_drop` or age out under the stream's seven days. Principle 7.
- **H-A-656 (DQ-17: a reservation with no upstream)** At the republisher's read of the entry at the reservation's
fingerprint, the builder fills the reservation's `upstream` once by compare-and-set, so every reader agrees; this
amends H-A-486's addendum. Builder only. Principles 3 and 7.
- **H-A-657 (DMC-9: the module of a durable)** The bus module's tool asks the seat `mesh-catalog`'s `modules` for the
module's trunk fingerprint, then `entry` with it; both join the nats module's invokes. Principles 7 and 1.
- **H-A-658 (DMC-11: `sdkstep.Passing`)** It reads as `buildstep.IsPassing`; `errorKindStopping` and `stopping` go; the
type `Passing` stays. The code settles the reading.
- **H-A-659 (DQ-18: a blank carried into a later revision)** It is built: a view read back from a revision fills a
package with no version from the series' pin, so a mover's blank at one revision is never carried into an entry of
the next that is no mover there. Checked by a row of the take-in's tests with two take-ins of one branch (the row in
`TestMoversOf` cannot fail). Principles 3 and 7.
- **H-A-660 (DQ-19: pins follow the newest released version)** A pin names the newest version of the series the indexer
itself released (its versions state), never the newest heard published; this amends H-A-495's addendum; indexer
only. Principles 3 and 7.
- **H-A-661 (DQ-20: a reserve for a released fingerprint)** `builder_reserve_done` refuses a fingerprint the record of
releases holds, "its version is released". Principles 3 and 7.
- **H-A-662 (DQ-32: who builds again a done key a holder refused)** At `MarkUnstored`'s first true for a done trunk key,
the builder starts `BuildAgain` itself, as it does for a key moved elsewhere, once per reservation (held by the kept
`unstored`); `builder_build_again` stays the person's tool. Principles 3, 4 and 7.
- **H-A-663 (DQ-33: a kept `published` counts as held)** Yes: a kept `published` at V whose digest the registry's
`versions` still answers at V counts as held for F. Principles 2 and 7.
- **H-A-664 (DQ-34: what a missing artifact clears)** In the same compare-and-set as H-A-588 (4)'s marking, each missing
artifact's recorded digest and the reservation's `built-at` are cleared; `unstored` is kept (it is true, and
clearing it would start H-A-662 again in a loop). Principles 3 and 7.
- **H-A-665 (DQ-35: tagging a held build's bytes with a new number)** `builder_reserve_done`'s tagging path retires; the
build step's failure words name `builder_build_again`. Principles 3 and 7.
- **H-A-666 (DQ-36: "the builder's start pass")** It reads as a key's first look after the builder starts; H-A-588
(4)'s read sits in `try` between the reserve and the build. Principle 7.
- **H-A-667 (DMC-7: the registries' `fingerprint` field)** No definition change and no form raise: the field exists in
all four seats; the holders fill it (G3). Principle 7.
- **H-A-668 (DMC-8: the merge order of a partly published version)** B3 to B5 and G3 merge in one call (H-A-618 (1)),
in the order the module graph gives (H-A-589 (6)). Principles 3 and 9.
- **H-A-669 (DMC-1: moving `ManifestNeeds`)** No new mesh-sdk export: the manifest validator reads the manifest's JSON field by field through
`catalogue.Manifest` and takes a key only where `ManifestReads()` names its path; a unit test holds that reading equal to
`ManifestReads`' words, so a difference fails. Principles 7, 9 and 3.
- **H-A-670 (DMC-3: the own-put rule's one place)** The commit e76cc064 (mesh-catalog's `checks/ownaccount`, which reads
only mesh-catalog's own manifests) is left out; I2 builds the rule in the manifest validator, beside its runs-as rules. Principles
7 and 10.
- **H-A-671 (DMC-12: the widened mesh-sdk test)** S1 adds `ManifestNeeds`, `ModuleNeeds` and H-A-639's deleted reads
to `TestMeshSDKHoldsOnlyWhatEveryModuleShares`' refused functions, and a refusal of the constant
`ReadDirectoryContentsOwner`; the judge-free shape test and mesh-catalog's `checks/sdkjudge` stay. Principle 7.
- **H-A-672 (DQ-21: an importer of a changed package is no mover)** Fixed here, indexer only: the import form takes no
accepted-series override and reads each package's digest from its publisher's entry (H-A-580); the whole test's
third merge asserts the importer is a mover (H-A-521, H-A-530). Principles 3 and 7.
- **H-A-673 (DQ-22: a want that names no version)** Fixed here: the node-engine says "the want names no version" (not
"no digest"), and the assigner rewrites a want that differs from §750's target, raising a finding where the target
refuses (G-22's A-462 is not built on main). Principles 2 and 3.
- **H-A-674 (DQ-24: the builder silent 19:55 to 20:00)** Its cause is read: one slow `manifest-reads-changed` handler
held the one worker every node-engine event shares; it is DQ-25's kind, met twice in an hour, and is built with
DQ-25's line. Principles 1 and 3.
- **H-A-675 (DQ-26: the keeper's conditions read)** Nothing built: the assigner's words are on ace; they are read once
ace answers, and a cause found then is answered then. Principle 3.
- **H-A-676 (DQ-28: the README's checks)** mesh-delivery's README says what checks a change, read from the checker
(merge-check.sh went with issue 1295). Principle 3.
- **H-A-677 (DQ-29: `composition-diff` not found)** Its description gains "difference" and "compare". Principle 4 and
one-question-one-tool; the node-engine seat package's digest moves, so its importers rebuild.
- **H-A-678 (ADR 0690's state entries at 64 MiB)** ADR 0690 §1 keeps a state entry's bucket at 64 MiB, which G-22's
A-277 (a state's `max-mib` 1 to 8192) contradicts; the record holds over a lead answer: the manifest validator refuses
a state's `max-mib` above 64; a held state entry that asks more (mesh-build-go's `steps`, 128 MiB) is set to 64 in
its manifest when its fill is under 64 MiB, and the operator is asked first when it is above. ADR 0595 §3, ADR 0690
§1; principles 3 and 7.
- **H-A-679 (H-A-634: writes before the lifetimes are allowed)** Between H2's delivery and H-A-634 (10)'s `recreate`,
the tool runner writes the gate's state and snapshots with no lifetime and says so once in its journal; (10)'s
rebuild sets them. Principles 3 and 7.
- **H-A-680 (H-A-634: the gate's history cap)** The gate's records ask `max-mib` 2048, since 90 days of history at the
measured rate need about 1.9 GiB (H-A-634 (8)). Principle 11.
- **H-A-681 (H-A-634: the ledger account's purge grant)** The ledger account's grant to purge a history goes, since no
caller is left after H2; the snapshot purge stays. Principle 7.