diff --git a/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-5.md b/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-5.md index 3b407c29..63ff098f 100644 --- a/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-5.md +++ b/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-5.md @@ -6,7 +6,6 @@ milestone: H updated: 2026-11-25 decisions: - "ADR 0690" - - "ADR 0573" - "ADR 0597" - "ADR 0595" - "ADR 0686" @@ -505,52 +504,6 @@ bb11615, the node-engine d27af83, mesh-contracts 52e5224) and of mesh-tools 3934 ## The prepare's design questions no principle settles: DQ-43 to DQ-46 (2026-11-25 from 14:50 CET) -The preparer's rows DQ-43 to DQ-46 (hq `.work/47-H2-corrections/milestone.md`) name four questions of scope item 13 and -issue 1984's notes that no principle settles; each is answered as a design line of the milestone, a choice within -what the records it names decide (playbook 02, *Answering a design question*, item 1), read at mesh-delivery 3b1f03ce, -mesh-sdk bb11615, mesh-tools 393449e, the node-engine d27af83 and mesh-catalog 17e1bfb6. H-A-707 is below; H-A-708 to -H-A-710 continue in [H2-lead-answers-6.md](H2-lead-answers-6.md), since this file reaches its 60 KB bound with it. - -- **H-A-707 (DQ-43: a key's build holds one entry and its origin; a blank pin is the publisher's build in that - revision, or the pin a newer entry of the key names, 25 Nov)** Where met (issue 1984 note 30, read at mesh-delivery - 7b1756e5): six builds of main.511 failed after 10 minutes, " publishes no version of it at source revision - 155 of main within 10m0s". mesh-config's fingerprint was the same at revisions 510 and 511, its contracts pins blank - at 510 and filled (v0.1.109) at 511; `Reconsider` (`internal/build/run.go`) started the key's build from its copy of - `known`, revision 510's entry, while `take` moved `origin[key]` to source 155, and `awaitPublished` - (`revisionwait.go`) filled the blank pin through `Reserver.VersionAt` (`internal/versions/reserve.go`), which matches - the publisher's reservation or release at that exact branch and source: every publisher had published at source - 154, none at 155. The next build, from revision 511's entry, built at once. ADR 0573 §2 has a module built against - the latest published version of each package it uses and ADR 0666 §15 has it wait for its dependency's publish; - which entry a build reads and how a blank pin is matched are the design's (H-A-521, H-A-547 (3), H-A-551 and - H-A-165 placed them; this line amends them). - (1) **A build holds one entry and its origin.** The builder keeps, per build key, the newest entry heard and the - origin it came with (branch, source and catalog revision) as one value, written together at each `take` in place of - `origin` by key. A build the builder starts by itself (at a `take`, `Reconsider`, `NodesChanged` or a package's - publish) reads its key's newest value when it starts, whatever value woke it; a build a step asks (`buildEntry`, - `step.go`) holds the step's entry with the step's branch, source and revision. Its reservation, its pins and its - revision wait read the value it holds, never `origin` as it stands at that moment; `originOf` goes. - (2) **A newer entry's pin ends the wait.** While a build waits for a blank pin's version, each wake (a `take`, a - registry seat's `package-published`) reads its key's newest entry: when that entry, of the same fingerprint, names a - version for the package, that version is the pin and the wait ends, said once in the journal (" at - : takes , the pin of the entry of revision , heard while the build from revision - waited"). The build keeps its own origin, since its reservation names it (H-A-218), and is neither ended nor - started again: a key claimed is not left to undo, and the same fingerprint builds the same source. - (3) **Else a blank pin is the version of the publisher's build that the build's revision names.** The builder finds - the module that publishes the package (`Members`) and its fingerprint in the catalog revision the build holds (in its - picture of that branch while the picture holds that revision, else in the revision read by number through the seat - `mesh-catalog`'s `revision`, kept once read, as the revision wait reads it, H-A-205), and fills the pin with the - version `Reserver.PublishedOf` answers for that module, artifact and fingerprint: the rule of the seat - `mesh-builds`' `published` (H-A-328), by which the assigner fills a blank pin (H-A-628 (2)), so the two parts keep - one rule. While neither (2) nor (3) gives a version the build waits, within `package-wait-minutes` (H-A-165), and past - it fails the key: "package has no published version: at (revision ) is not - published within ". Fate: `Reserver.VersionAt` and `versionAtOrigin` go, this fill being their one caller; - H-A-547 (3)'s and H-A-551's "the reservation of the module that publishes it at the source revision of the key's own - origin" reads "the publisher's build that the build's revision names"; the released record's source stays. - How it is checked: rows of the builder's unit tests (`internal/build`): a build woken by revision 510's value after a - `take` of revision 511 with the same fingerprint builds from revision 511's entry and origin; a build waiting on a - blank pin takes the version a newer entry of its key names, says the line once and writes no failure; a blank pin - whose publisher's fingerprint was published at another source is filled at once with that version; one never - published fails past the bound naming the publisher and its fingerprint. A case of the builder's whole test - (`cmd/mesh-delivery-builder/integration_test.go`): an entry taken in again at a later revision with the same - fingerprint while the earlier build waits builds once, with no key written failed. Live, after H2's delivery: no - build fails "publishes no version of it at source revision". ADR 0573 §2; ADR 0666 §15; principles 3 and 7. +H-A-707 to H-A-710 answer the preparer's rows DQ-43 to DQ-46 (hq `.work/47-H2-corrections/milestone.md`) in +[H2-lead-answers-6.md](H2-lead-answers-6.md)'s section of the same name: H-A-707, first written here, moved there whole +with the fixes of its review by architectural domain, since this file is near its 60 KB bound. diff --git a/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-6.md b/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-6.md index 42a3e9a8..177f8879 100644 --- a/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-6.md +++ b/03-DESIGN/01-to-be/47-milestones/H2-lead-answers-6.md @@ -5,6 +5,9 @@ design: 47 milestone: H updated: 2026-11-25 decisions: + - "ADR 0573" + - "ADR 0666" + - "ADR 0603" - "ADR 0664" - "ADR 0668" - "ADR 0615" @@ -14,101 +17,225 @@ decisions: - "ADR 0656" - "ADR 0539" - "ADR 0377" + - "ADR 0564" + - "ADR 0259" - "ADR 0429" --- # Design 47, milestone H2: lead answers, continued a fifth time -This file continues [H2-lead-answers-5.md](H2-lead-answers-5.md) from H-A-708 on, since that file reached its 60 KB -bound with H-A-707: every later answer is written here. Each line names the record, the operator's answer or the +This file continues [H2-lead-answers-5.md](H2-lead-answers-5.md) from H-A-707 on, since that file is near its 60 KB +bound: every later answer is written here. Each line names the record, the operator's answer or the principle that settles it. -## The prepare's design questions no principle settles: DQ-43 to DQ-46, continued +## The prepare's design questions no principle settles: DQ-43 to DQ-46 -H-A-708 to H-A-710 answer DQ-44 to DQ-46 as [H2-lead-answers-5.md](H2-lead-answers-5.md)'s section of the same name -says (H-A-707 answers DQ-43 there), read at the same mains. +The preparer's rows DQ-43 to DQ-46 (hq `.work/47-H2-corrections/milestone.md`) name four questions of scope item 13 and +issue 1984's notes that no principle settles; each is answered as a design line of the milestone, a choice within what +the records it names decide (playbook 02, *Answering a design question*, item 1), read at mesh-delivery 3b1f03ce, +mesh-sdk bb11615, mesh-tools 393449e, the node-engine d27af83 and mesh-catalog 17e1bfb6. The review by architectural +domain of hq c5e9d2b2..a935ab99 (one round, 2026-11-25 about 15:20 CET; its reports in hq +`.work/47-H2-corrections/reads/review-707-*.md`) found 16 musts and 13 notes; each must and the notes taken are written +into the lines below, which read as amended. H-A-707 moved here whole from [H2-lead-answers-5.md](H2-lead-answers-5.md) +with them. -- **H-A-708 (DQ-44: a starting holder answers what it holds and says `away` for a view it waits on; a composition's - reads wait within `reads-bound`, 25 Nov)** Where met (issue 1984 note 28): main.509's compositions of four movers - ended could-not-run at 23:42 on 2026-11-23, "the definition of the seat git is not read: mesh-catalog.seat-definitions - unanswered within its bound of 30s ... unanswered after 3m0.001s", asked at 23:39 while the indexer, holder of the - seat `mesh-catalog`, restarted at 23:35:31 and ran its start (its build log, its findings, its re-pins, a take-in, its - packages' publish at start) until the seat answered again at about 23:45; that the start held the answers is the - lead's reading, not proven. The composition run's reads (`cmd/mesh-delivery-assigner/compositionreads.go`, - `callRetry`) call again only while the fault's words match a list (`transient`), for a constant three minutes - (`readsBound`). Note 11's kind D (a build step's publish met by a tool runner's restart) is §799's, with H-A-603's +- **H-A-707 (DQ-43: a build holds one entry and its origin; a blank pin is the pin a newer entry of its branch names, or + the publisher's build in the build's revision; the publish reaches every pipeline sharing the build, 25 Nov)** Where + met (issue 1984 note 30, read at mesh-delivery 7b1756e5): six builds of main.511 failed after 10 minutes, " + publishes no version of it at source revision 155 of main within 10m0s". mesh-config's fingerprint was the same at + revisions 510 and 511, its contracts pins blank at 510 and filled (v0.1.109) at 511; `Reconsider` + (`internal/build/run.go`) started the key's build from its copy of `known`, revision 510's entry, while `take` moved + `origin[key]` to source 155, and `awaitPublished` (`revisionwait.go`) filled the blank pin through + `Reserver.VersionAt` (`internal/versions/reserve.go`), which matches the publisher's reservation or release at that + exact branch and source: every publisher had published at source 154, none at 155. The next build, from revision 511's + entry, built at once. `take` also writes `origin[key]` from an entry of an older revision (`run.go`, the key's write + beside `trunkFP`), and the runner writes a `package-published` only into the pipeline of the revision it names + (`internal/pipeline/start.go`, `heardPublished`). ADR 0573 §2 has a module built against the latest published version + of each package it uses and ADR 0666 §15 has it wait for its dependency's publish; which entry a build reads, how a + blank pin is matched, where the wait is read and which pipeline hears the publish are the design's (H-A-521, + H-A-547 (3), H-A-551 and H-A-165 placed them; this line amends them). + (1) **A build holds one entry and its origin.** At its start a build takes, under one lock, the entry and the origin + (branch, source and catalog revision) it builds from, and its reservation, its pins and its revision wait read those, + never `origin` as it stands later; `originOf` goes. A build the builder starts by itself (at a `take`, `Reconsider`, + `NodesChanged` or a package's publish) takes the entry its picture holds for the module on the branch of the key's + origin (`heard`, with `heardAt` as its origin) when that entry is of the key's fingerprint, else the entry that woke + it with the key's origin; a build a step asks (`buildEntry`, `step.go`) takes the step's entry with the step's branch, + source and revision. No entry is kept per key: `heard` holds one per module and branch, and an entry of an older + revision never replaces it (H-A-557). + (2) **The key's origin is never moved back, and its writers and readers stay.** `take` writes `origin[key]` only from + an entry not older than the origin it holds (`newerRevision`, H-A-557), where today it writes it from any entry; + `keptRevisionHolds` writes it for a key that holds none and `askedRevision` sets its revision where its branch and + source are the ask's, as today; `supersededBy`, `holdsRevision` and `supersedingRevision` read it as today, since they + judge the key, not one build. It keeps one origin per fingerprint taken in for the builder process's life, as today, + and nothing else deletes it: `supersededBy` reads a missing origin as none superseded. + (3) **A newer entry's pin ends the wait.** While a build waits for a blank pin's version, each wake (a `take`, a + registry seat's `package-published`) reads the entry its picture holds for the module on the branch of the origin the + build holds: when that entry is of the key's fingerprint and names a version for the package, that version is the pin + and the wait ends, said once in the journal (" at : takes , the pin of the + entry of revision , heard while the build from revision waited"). An entry of another branch is never read for + it. The build keeps its own origin, since its reservation names it (H-A-218), and is neither ended nor started again: + its key is claimed, and the same fingerprint builds the same source. + (4) **Else a blank pin is the version of the publisher's build in the build's revision.** The builder finds the module + that publishes the package (`Members`) and its fingerprint in the catalog revision the build holds (in its picture of + that branch while the picture holds that revision, else in the revision read by number through the seat + `mesh-catalog`'s `revision`, kept once read, as the revision wait reads it, H-A-205), and fills the pin with the + version `Reserver.PublishedOf` answers for that module, artifact and fingerprint: the rule of the seat `mesh-builds`' + `published` (H-A-328), by which the assigner fills a blank pin (H-A-628 (2)), so the two parts keep one rule. While + neither (3) nor (4) gives a version the build waits, within `package-wait-minutes` (H-A-165), and past it fails the + key: "package has no published version: at (revision ) is not published within + ", or, where no module of that revision publishes the package, "package has no published version: no + module of revision publishes it within ". Fate: `Reserver.VersionAt` and `versionAtOrigin` go, this fill + being their one caller; H-A-547 (3)'s and H-A-551's "the reservation of the module that publishes it at the source + revision of the key's own origin" reads "the publisher's build that the build's revision names"; the released record's + source stays. + (5) **The wait is held where the tools read it.** The wait is kept in the builder's state `waits` in the one wait form + (`ToolchainWait`, key `.`, said `wait-held`), as a key queued behind a package is (ADR 0603 §8): + `package` its path, `since`, and three fields the form gains, `publisher` (`@`), `revision` (the + catalog revision the build holds) and `until` (its start plus `package-wait-minutes`). It ends (`End`, said + `wait-ended`) with `how` `published` once (3) or (4) gives the version, and `failed` past the bound, its key then + failed. `builder_waits` answers it, and `builder_stuck`'s row of a key building with no ask gains `waits`, that wait + read from the state `waits`, so a key waiting for a pin is told apart from one stuck. + (6) **The publish reaches every pipeline sharing the build.** The seat `mesh-builds`' `package-published` gains + `fingerprint`, the reservation's, and the seat's form rises by one (§780); the runner writes a package-published into + the running pipeline of the revision it names, as `heardPublished` does, and then into every other running pipeline of + its branch that moves the publishing module at that fingerprint, so a later pipeline whose build step joined the build + places its importers. The builder, the assigner and the indexer, which also hear the event, read the field not and + decode it tolerantly. + How it is checked: rows of the builder's unit tests (`internal/build`): a build woken by revision 510's value after a + `take` of revision 511 with the same fingerprint builds from revision 511's entry and origin; a `take` of an older + revision's entry leaves `origin` as it was; a build waiting on a blank pin takes the version a newer entry of its + branch names, and never one of another branch; a blank pin whose publisher's fingerprint was published at another + source is filled at once; one never published fails past the bound naming the publisher and its fingerprint; the wait + stands in `waits` with its fields while it lasts and `builder_stuck` names it; a row of the runner's publish unit + tests: a package-published whose fingerprint two running pipelines move marks both. A case of the builder's whole test + (`cmd/mesh-delivery-builder/integration_test.go`): an entry taken in again at a later revision with the same + fingerprint while the earlier build waits builds once, no key is written failed, and the later pipeline's importer is + placed. Live, after H2's delivery: at the next take-in that keeps the fingerprint of a mover whose build waits, the + builder's journal says its "takes " line, `builder_stuck` shows the wait until it ends, and + `builder_builds_since` reads the key ended done once. ADR 0573 §2; ADR 0666 §15; ADR 0603 §8; principles 3, 4 and 7. +- **H-A-708 (DQ-44: a starting holder answers what it holds and says `away` for what it has not read; a run's reads + share one deadline within `reads-bound`; `call-unanswered` is the assigner's, 25 Nov)** Where met (issue 1984 note + 28): main.509's compositions of four movers ended could-not-run at 23:42 on 2026-11-23, "the definition of the seat + git is not read: mesh-catalog.seat-definitions unanswered within its bound of 30s ... unanswered after 3m0.001s", + asked at 23:39 while the indexer, holder of the seat `mesh-catalog`, restarted at 23:35:31 and ran its start (its + build log, its findings, its re-pins, a take-in, its packages' publish at start) until the seat answered again at + about 23:45; that the start held the answers is the lead's reading, not proven. Two reads can hold a call so: the + indexer's tools answer `seat-definitions` from mesh-sdk's `stdio.WatchedStates` (`go/watched.go`, `watched`), which + waits with no bound until the state's copy has its current values, and `revision` from the indexer's + `KeptTrunk.current` (`internal/index/catalog_revisions.go`), which waits behind the start's whole read of the trunk. + The composition run's reads (`cmd/mesh-delivery-assigner/compositionreads.go`, `callRetry`) call again only while the + fault's words match a list (`transient`), for a constant three minutes per call (`readsBound`), and the kept-call form + writes no finding. Note 11's kind D (a build step's publish met by a tool runner's restart) is §799's, with H-A-603's `again-delays`. The records settle the classes and the caller's duty: the transport faults are ADR 0664 §1's and ADR 0668 §1's, `away` among them since their insights of 2026-11-21; a kept call is called again through each until it is answered or its caller stops, and is the finding `call-unanswered` at five minutes (ADR 0668 §1, §3); an owner answers its first-view verbs from what it holds as soon as it is connected (ADR 0615 §4). A holder that is starting gets no class of its own, as one that is stopping got none (H-A-570): it is met as one of these. - (1) **A starting holder answers what it holds.** A verb or tool whose answer its holder reads from its own state + (1) **A starting holder answers what it holds.** A verb or tool whose answer its holder reads from what it has read answers from the moment its process or bundle is connected: a start pass (a sweep, a take-in, a publish at start, a log read whole) runs beside the answers and never holds one, as ADR 0615 §4 has it for the first-view verbs; the holder says its start's phases in its journal and in its runtime's first-view tool (G §200). - (2) **What it waits on it answers `away`, at once.** A verb or tool whose answer needs a first view of another part - that its holder has not had yet (G §200) answers at once with the error kind `away` (§776), `part` naming that view - and `words` "not read yet since