diff --git a/03-DESIGN/01-to-be/47-delivery-from-commit-to-delivered.md b/03-DESIGN/01-to-be/47-delivery-from-commit-to-delivered.md index 13d7010a..583ec4ba 100644 --- a/03-DESIGN/01-to-be/47-delivery-from-commit-to-delivered.md +++ b/03-DESIGN/01-to-be/47-delivery-from-commit-to-delivered.md @@ -4,6 +4,7 @@ status: in-progress code: [mesh-controller, mesh-catalog modules/mesh-delivery-gate, mesh-catalog modules/gitea, mesh-delivery, mesh-host, mesh-sdk, mesh-vault, mesh-contracts, mesh-tools, mesh-networking, hq 00-META/checks] updated: 2026-11-27 decisions: + - "ADR 0694" - "ADR 0693" - "ADR 0692" - "ADR 0691" @@ -1930,8 +1931,11 @@ The failure paths: 89. **An older revision ending after a newer one** writes no want, and a revision of one watched branch ending after a newer one of another writes its own want and refuses neither; a newer commit supersedes a module's pipeline only when it changed that module's build-input fingerprint (whole, assigner and runner). -90. **A replaced oversized value** leaves its old object, and a deleted key its object, each listed `key gone` until - `_state_objects_drop` removes it on a person's word; a sent object expires after its 7 days (whole, mesh-sdk). +90. **A replaced oversized value** leaves one object for its key, the write deleting the one no value its state keeps + names any more, and in a state keeping three past values the objects they name stay; a read raced by a replace + answers the newer value; a deleted key leaves its object listed `key gone` until `_state_objects_drop` + removes it on a person's word; a sent object expires after its 7 days (whole, mesh-sdk; ADR 0694 §1 to §3; design + 47 H §850 1.). 91. **A session's merge** through `merge-pull` at its head merges with no run yet and with a passed run, and asks no Approve; with the runner stopped it still merges, judged on the `step-ended` it kept; a head at whose fingerprint any run failed a `required` step, a head that moved, and a branch whose protection was removed since its last @@ -2514,4 +2518,4 @@ parts are again the manifest validator's list, the runner added (ADR 0666 §4), runner again starts a group's pipeline on the indexer's `take-in.taken` and consumes `package-published` (ADR 0666 §13, §15), a second start for the same source revision and module writing nothing by the pipeline key's compare-and-set (test 101); and a replaced object stays, like one whose key is gone, until the drop tool on a person's word (ADR 0595 -§4). Its review by architectural domain is still to come. +§4), which ADR 0694 has since changed: the write deletes the object it left no kept value naming (G §57). Its review by architectural domain is still to come. diff --git a/03-DESIGN/01-to-be/47-milestones/G-2-pipelines-sizes-checks-and-tools.md b/03-DESIGN/01-to-be/47-milestones/G-2-pipelines-sizes-checks-and-tools.md index 8d701d2f..a910de38 100644 --- a/03-DESIGN/01-to-be/47-milestones/G-2-pipelines-sizes-checks-and-tools.md +++ b/03-DESIGN/01-to-be/47-milestones/G-2-pipelines-sizes-checks-and-tools.md @@ -3,8 +3,10 @@ layer: to-be status: in-progress design: 47 milestone: G -updated: 2026-11-17 +updated: 2026-11-27 decisions: + - "ADR 0694" + - "ADR 0692" - "ADR 0667" - "ADR 0666" - "ADR 0664" @@ -38,9 +40,16 @@ One file of milestone G's part of [design 47](../47-delivery-from-commit-to-deli - §57 **A value over the limit is an object.** mesh-sdk's own small object store package (ADR 0595 §9) puts a value over the bus's per-value limit in the object store beside its state and keeps the object's name in the key; a verb's reply or an event over the per-message limit carries the object's name (ADR 0666 §16). A replace writes the new object and sets the key by - compare-and-set; the object it replaced stays, as one whose key was deleted does, listed as `key gone` since no key - names it, and only the drop tool removes either, on a person's word: the mesh removes kept data only through `drop` - and `recreate`, each on a person's word (ADR 0595 §4; ADR 0666 §16). + compare-and-set; once it succeeds, the write deletes the object that no value its state keeps names any more: with + the state's one past value (the default), the object it replaced; with more past values (ADR 0595 §3), the object + of the value it pushed out. An object a kept value still names is never deleted, and a delete that fails is said in + the module's journal and leaves the object listed `key gone` (ADR 0694 §1). A read that finds gone the object of a + value it read follows the key to a newer value, so a replace never fails a read (ADR 0694 §2). A key deleted, by its + owner, by its lifetime or by a person, leaves its object listed `key gone`, removed only by the drop tool on a + person's word, since a deletion may be a mistake and the object is then the value's only copy (ADR 0694 §3). So the + mesh removes kept data only through `drop` and `recreate`, `drop` and a `recreate` that would empty something on a + person's word (ADR 0595 §4 as ADR 0692 §4 reads it), and through this delete of the owner's own write, which asks no + person's word and takes no stream snapshot (ADR 0694 §4). Built in H2c (design 47 H §850 1.). - §58 **One object store per state, granted to its owner.** (§513, §549) Each state asked by the template `state` gets its object store beside it, `-objects`, a template form of ADR 0595 that the bus module provides and the grants part grants to the state's owner alone (ADR 0666 §16); a foundation part's large values go in an old `objects` section of its own. @@ -61,18 +70,21 @@ One file of milestone G's part of [design 47](../47-delivery-from-commit-to-deli never per object. A consumer's reader of the form is delivered before its producer writes it, an edge of kind 4. - §60 **Its tools come with the package.** The package serves each module that imports it `_state_objects` (the - objects of each state, with their size, the key that names each or `key gone`, and the fill against its cap), - `_state_objects_drop` (drop the objects whose key is gone, on a person's word as ADR 0595 §4 removes kept - data), `_sent_objects` (each sent object, its size, when it was sent and to which verb or event, its age - against the store's and the fill against its cap) and `_sent_objects_drop` (drop sent objects older than an - age a person names); each drop names who asked and is recorded in the hand-act log. + objects of each state, with their size, the key whose kept value names each or `key gone`, and the fill against its + cap), `_state_objects_drop` (drop the objects listed `key gone`, those of deleted keys and those whose delete + by the writer failed, on a person's word as ADR 0595 §4 removes kept data; ADR 0694 §4), `_sent_objects` + (each sent object, its size, when it was sent and to which verb or event, its age against the store's and the fill + against its cap) and `_sent_objects_drop` (drop sent objects older than an age a person names); each drop + names who asked and is recorded in the hand-act log. - §61 **Its cost.** Only the modules that import the package are built with it, so no other module is rebuilt for it: a package published before its users build (ADR 0573 §2, ADR 0667 §3). - §62 **How it is checked.** Whole (mesh-sdk, against the real bus): values of one, ten and a hundred times the per-value limit stored, sent as a reply and as an event, and read back whole by a caller and a consumer the manifests declare, - and refused to a module that declares neither; a replaced large value leaves its old object listed `key gone` beside - the new one, and a key deleted leaves its object listed `key gone`, each removed by the drop tool and by nothing else; - a sent object is readable within its 7 + and refused to a module that declares neither; a replaced large value leaves one object for its key, the write + deleting the one no value its state keeps names any more, and in a state keeping three past values the objects they + name stay (ADR 0694 §1); a read raced by a replace answers the newer value (ADR 0694 §2); a key deleted leaves its + object listed `key gone`, removed by the drop tool and by nothing else (ADR 0694 §3); a sent object is readable + within its 7 days and expired after; each drop without who asked is refused. Tests 69 and 90. ### The pipeline makes the check, and the checker goes @@ -243,7 +255,7 @@ and an estimated 2 mesh-sdk publishes a day, each rebuilding about 120 artifacts | the indexer | catalog graph revisions, per watched branch | objects in the old form (ADR 0619 §2) | while a record pins it or it is its branch's current | 512 MiB, as *Two graphs, one source of truth*; a second watched branch on a few modules adds a few MiB | | the gate | `source`: one key per watched branch | its old `state` section, as today | 64 revisions of each key; a branch's key deleted when `registration-changed` says the last registration watching it unwatched it (`unwatch`) | a few KiB | | the forge module | `failed-steps`: failed `required` steps by module and fingerprint, with the commits each was seen at, and the `seen` keys of §487 | state | an entry deleted once none of its commits is a watched branch's head or the head an open pull request names, judged on each `branch-moved` and each pull request's close | the template's 64 MiB; an estimated 50 failed steps a day of about 0.5 KiB, most gone within days, is under 1 MiB; the `seen` keys under 3 MiB (§487) | -| every module that imports the object store package | `-objects` beside each state | objects | an object no key names, its key deleted or its value replaced, until `_state_objects_drop` on a person's word (ADR 0595 §4, ADR 0666 §16) | the template's; nothing reserved until written | +| every module that imports the object store package | `-objects` beside each state | objects | an object while a value its state keeps names it; one a replace leaves no kept value naming, deleted by that write (ADR 0694 §1); one of a deleted key, and one whose delete failed, listed `key gone` until `_state_objects_drop` on a person's word (ADR 0694 §3, §4; ADR 0666 §16) | the template's; nothing reserved until written; about one object per key over the limit, one per kept value in a state keeping more past values | | every sender of the new form, and a foundation part by its old `objects` section | `_sent-objects` (`sent-objects`) | objects, planned by the bus module with no manifest field | 7 days, transport (*Any size*) | the objects template's cap; full is the bus module's `full` | | the grants part, for each seat event a definition keeps | `SEAT__`, among them `SEAT_mesh-pipeline-runner_*`, `SEAT__step-ended`, `SEAT_git_branch-moved`, `SEAT_mesh-builds_package-published` and `SEAT_mesh-catalog_registration-changed` | a stream the grants part makes with its durable consumers | the seat definition's age (`keep`), 90 days unless the definition names less | the seat definition's cap (`keep`) | @@ -358,6 +370,6 @@ step keys and the builder's build log, against the checker's last week (test 99) | §135 The forge module's `failed-steps` kept until no head it was seen at is a watched branch's head or an open pull request's | an entry judges only a head that can still be merged; once neither names it, nothing can be refused by it | | §136 The gate's `source.` deleted when the branch's last watch goes | a branch no registration watches makes no revision, so its key would name nothing | | §137 The sent store kept 7 days by age, with no person's word | an object sent carries one reply or event and is transport, not kept data (ADR 0595 §4); its readers fetch it within a call's bound or a consumer's lag | -| §138 A replaced object listed `key gone`, as a deleted key's is | no key names it, and one listing lets the drop tool take both on a person's word, as ADR 0595 §4 and ADR 0666 §16 have it | +| §138 A replaced object deleted by the write that left no kept value naming it; a deleted key's object listed `key gone` for the drop tool | decided since by ADR 0694 §1 and §3, which ends this choice's first form (a replaced object kept for a person's word): at a successful compare-and-set the writer alone knows its value replaced the one that named the object, and a value rewritten often would fill its store within hours; a deletion may be a mistake, and its object is then the value's only copy | | §139 The checker's removal after the first end-to-end pipeline, on one word, its buckets through `drop`, the snapshot kept 90 days | ADR 0667 §12 asks one word for all three; 90 days is the delivery records' retention, the longest a trace reads back | | §140 The pipeline steps on the `check` stream after `delivery` | a delivery's build is never held by a pipeline, as a check never held one (ADR 0525 §4) | diff --git a/03-DESIGN/01-to-be/47-milestones/G-7-answers.md b/03-DESIGN/01-to-be/47-milestones/G-7-answers.md index 6a3342b9..d8d73b70 100644 --- a/03-DESIGN/01-to-be/47-milestones/G-7-answers.md +++ b/03-DESIGN/01-to-be/47-milestones/G-7-answers.md @@ -3,7 +3,7 @@ layer: to-be status: in-progress design: 47 milestone: G -updated: 2026-11-11 +updated: 2026-11-27 decisions: - "ADR 0668" - "ADR 0667" @@ -93,9 +93,9 @@ record it follows from, and replaces the builder's own choice where one was made (`sent-objects`) is aged the same way by its owner at each send, from the sequence of its own sends, which mesh-sdk's sender keeps in the owner's old `state` section (§410). Nothing waits on a timer, and nothing but the owner deletes. Why: an old section cannot declare an age, and deleting one's own entries - is the owner's act, not the removal of a store ADR 0595 §4 holds to a person's word; §57's rule that only the drop - tool removes an object holds for a template's `-objects`, while the runner's `step-outputs` are its own old - section's objects. How it is checked: whole (runner), an output 7 days old is gone after the next step's end, a + is the owner's act, not the removal of a store ADR 0595 §4 holds to a person's word; §57's rule of what removes an + object holds for the objects of a state's values, while the runner's `step-outputs` are its own old section's + objects. How it is checked: whole (runner), an output 7 days old is gone after the next step's end, a passed pipeline stays to 90 days, and one step's end deletes at most 20 per sequence. - §331 **The kept event streams' caps, and when one is full.** On the seat `mesh-pipeline-runner`, each kept 90 days: `pipeline-started` 32 MiB, `pipeline-ended` 192 MiB, `group-ended` 64 MiB, `run-started` 16 MiB, `step-started` diff --git a/03-DESIGN/01-to-be/47-milestones/H2c-the-lines-h2-left.md b/03-DESIGN/01-to-be/47-milestones/H2c-the-lines-h2-left.md index 29e5b908..2443091d 100644 --- a/03-DESIGN/01-to-be/47-milestones/H2c-the-lines-h2-left.md +++ b/03-DESIGN/01-to-be/47-milestones/H2c-the-lines-h2-left.md @@ -5,6 +5,7 @@ design: 47 milestone: H2c updated: 2026-11-27 decisions: + - "ADR 0694" - "ADR 0693" - "ADR 0686" - "ADR 0684" @@ -59,6 +60,9 @@ The queue it carries: it. - **A record accepted on 2026-11-26:** ADR 0693 (a moved mover leaves its pipeline, running or waiting, §856 here, §860 in H2d, and H §746, §748). +- **A record accepted on 2026-11-27:** ADR 0694 (a state writer deletes the object its own write left no value naming; + an object left by a deleted key still waits for a person's drop), proposed on the operator's answer of 00:08 CET + (H-A-806): §850 1. here, and G §57, §60, §62, G's table of kept data and acceptance test 90. A queued item that needs no line is named in *What needs no line*, with the record or line that settles it, and an item whose shape no record settles is in *Questions this file leaves open*. @@ -261,16 +265,59 @@ counts stay within the test budget; each runs within ADR 0445 §3's sixty second The validator is `mesh-judge`, in the indexer's module (H-A-411 (4)). Built in H2c (the manifest validator). How it is checked: unit (the validator): each problem is refused, naming the path or the two series. - §850 **A value or an answer over the bus's limit is an object, never refused, as G §57 to §59 have it.** (row 65 ("A - pipeline record of 112 or 129 movers"); H-A-797; ADR 0666 §16; G §57, §58, §59; H §761; principles 3 and 7) ADR - 0666 §16 and G §57 to §59 already decide it; H2c builds them where its prepare finds them not built, in mesh-sdk's - state writer, tool harness and seat pass: + pipeline record of 112 or 129 movers"); H-A-797; ADR 0666 §16; ADR 0694 §1 to §4; G §57, §58, §59; H §761; + principles 3 and 7) ADR 0666 §16, ADR 0694 and G §57 to §59 decide it; H2c builds them where its prepare finds them + not built, in mesh-sdk's state writer, tool harness and seat pass: 1. **A kept value over the bus's per-value limit** is put in the object store beside its state, `-objects` - (G §58), with the object's name kept in the key (G §57). A replace writes the new object and sets the key by - compare-and-set. What becomes of the object a replace leaves waits on ADR 0694 (a state writer deletes the object - its own write left no value naming; proposed on the operator's answer of 2026-11-27 00:08 CET, H-A-806), which - changes ADR 0666 §16 and waits for the operator's Approve. No line is written for it until it is accepted; - meanwhile G §57 stands as written, the replaced object listed `key gone` until the drop tool removes it on a - person's word. + (G §58), with the object's name kept in the key (G §57). The object is named `.`, as + today, so the same value is the same object. A replace writes the new object and sets the key by + compare-and-set. What becomes of each object is ADR 0694's (accepted 2026-11-27), built in mesh-sdk's state + writer (`go/stateobjects`, ADR 0595 §9) for a template's `-objects` and for a foundation part's old + `objects` section that holds a state's large values (G §407) alike: the design's choice, since it is one writer + and either store fills the same way. + - (a) **The values a key keeps.** A key keeps as many values as its state's past values (ADR 0595 §3; 1 by + default, the current value alone), counted since its last delete. A value written before the key's last delete + names nothing any more, as clause 3 of ADR 0694 has the objects of a deleted key wait for a person. "Kept" and + "names" below mean so. + - (b) **A successful compare-and-set deletes what no kept value names** (ADR 0694 §1). Before its compare-and-set + the writer reads the key's kept values; once it succeeds it reads them again, and deletes each object that a + value of its first read named and no value of its second read names: with one past value, the object its own + write replaced; with more, the object of the value its write pushed out. An object a kept value still names, + the new value's when the same value is written again, is never deleted. The second read is the design's + choice: a writer that wrote an older value of the key again meanwhile names that object again. One that writes + it in the moment between that read and the delete leaves its key naming a gone object, which (e) refuses + loudly. + - (c) **A delete that fails is said, and the write stands** (ADR 0694 §1). The writer writes one journal line, + "object of not deleted after the replace of : ; listed key gone for the + drop tool", and answers the put as written: the value is kept, and a caller that asked again would write it + twice (the design's choice). A process stopped between its compare-and-set and the delete says nothing; its + object is listed as a failed delete's is (g), since the listing judges by the values, never by the journal. + - (d) **A compare-and-set that fails** reads the key again and deletes the new object it wrote unless a kept value + names it, so of two writers of one value the winner's object stands (ADR 0694 §1). + - (e) **A read follows the key** (ADR 0694 §2). The package's get reads the key, then its object. Finding the + object gone, it reads the key again: a newer value (a higher revision) is read the same way, a value held in + the key is answered, and a key with no value is answered as none. It follows the key so until one of these, + bounded by its caller's deadline alone (the design's choice: each round needs a newer write, and a count would + fail a read the record says never fails). A key that names, at the same revision, the object found gone fails + the read, naming the state, the key and the object. + - (f) **A deleted key's objects wait for a person** (ADR 0694 §3). A key deleted by its owner, by its lifetime or + by a person through a hand tool leaves its objects; the writer deletes none of them. + - (g) **The tools read and steer it** (G §60; ADR 0666 §25; ADR 0694 §4). `_state_objects` judges "names" + against every kept value of every key, past values included, and lists each object with its `key`, and `past` + true when only a past value names it; or with `key-gone` true, `key` the key it was written for, and + `key-deleted`: true when that key has no value now (deleted, or its lifetime ended), false when it has one + naming another object (a delete that failed or never ran). `key-deleted` is the design's choice: the person + whose word a drop asks sees which objects may be a deletion's mistake, and ADR 0694's live check reads it. + `_state_objects_drop` drops exactly the objects listed `key-gone`, of both kinds, on a person's word, + naming who asked, in the hand-act log (G §60); an object a past value names is never listed so, and never + dropped. The writer's own delete is no hand act: it asks no person's word, takes no stream snapshot and + writes nothing in the hand-act log (ADR 0694 §4). + + What exists today, and its fate (read on mesh-sdk main c42ada4): `Values.Put` keeps the object it replaced, "as + a past value may still name it", and after a failed compare-and-set deletes its new object unless the value it + first read named it, which removes the winner's object when both wrote the same value; `Values.Get` fails on a + gone object; `Values.Kept` judges against each key's current value alone, so in a state keeping more past values + it lists a past value's object `key-gone` and the drop tool would remove it. Each goes as (a) to (g) say. 2. **A tool's or a seat verb's answer, or an event, over the per-message limit** carries the name of an object in the sender's sent store, `_sent-objects`, which the bus module plans for every module that serves a verb or says an event, kept 7 days and then expired by the bus (G §59), read by the callers and consumers the grants @@ -279,15 +326,30 @@ counts stay within the test budget; each runs within ADR 0445 §3's sixty second No value is refused for its size, and no `value-max-kib` is added. The prepare lists each state's largest value today (`nats` tools' read of each state), and how often each value over the limit is replaced, so the review sees - which values become objects at H2c's rebuild and how many objects each leaves. The pipeline runner - (`mesh-delivery-pipeline`) also gains `runner_reconcile` (a pipeline, and a `why`), which compares a pipeline's + which values become objects at H2c's rebuild and how many objects each keeps (one per kept value, 1.). The + pipeline runner (`mesh-delivery-pipeline`) also gains `runner_reconcile` (a pipeline, and a `why`), which compares a pipeline's record with its mover keys (H-A-187). It names each mover whose key disagrees with the step log. With a `why`, it writes those keys again from the step log, recorded in the hand-act log. This is the lead's proposal of row 65, whose scope the operator's answer for H2b took in (H-A-776), H2c's since H-A-804. Built in H2c (mesh-sdk; the runner). How it is checked: - unit (mesh-sdk): a value over the limit is kept as an object and read back whole through its key; an answer over the limit arrives as an object's name and is read whole; a full sent store refuses, naming it; - - unit (runner): a mover key left behind is named and written again. + - unit rows (mesh-sdk's `stateobjects` values tests, over its fake state, which keeps a key's past values as the bus + does; ADR 0694's checks of clauses 1 to 3): a replace of a value held as an object leaves one object for its key; + writing the same value again keeps that object; in a state keeping three past values the objects they name stay + and the object of the value pushed out is deleted, unless a kept value names it; a compare-and-set that fails + leaves no object of its own, and the winning write's object stands; a delete that fails is said in the journal, + the put answers written, and the object is listed `key-gone` with `key-deleted` false; a read whose object is + deleted between its read of the key and of the object answers the new value; a read raced by two replaces in a + row answers the newest; a read whose key still names the same gone object fails, naming both; a key deleted by + its owner, one deleted by a person through a hand tool and one whose lifetime ended each leave their object listed + `key-gone` with `key-deleted` true, and only the drop tool removes it; + - a row of the package's whole test against the real bus (G §62): a state keeping three past values, its key + replaced five times by values over the limit, holds three objects, each listed with its key; + - unit (runner): a mover key left behind is named and written again; + - live (ADR 0694's): a day of deliveries after H2c's delivery, `_state_objects` of each module that imports + the package lists `key-gone` only objects with `key-deleted` true and objects whose failed delete its journal + said. - §851 **Two durable pull loops go through mesh-sdk's consume.** (row 75 ("With H-A-196 and H-A-197 built"); H-A-196, H-A-197) The watchman's dead-letter loop and the grants part's main loop bind their durables through mesh-sdk's consume function, which guards one pull loop per durable. Neither calls the bus client directly. Built in @@ -491,10 +553,6 @@ counts stay within the test budget; each runs within ADR 0445 §3's sixty second ## Questions this file leaves open -1. **ADR 0694 waits for the operator's Approve (§850 1.).** The record that a state writer deletes the object its own - write left no value naming, proposed on the operator's answer of 2026-11-27 00:08 CET (H-A-806), changes ADR 0666 - §16 and is not yet in force. Until it is accepted, §850 1. writes no line for the object a replace leaves, and G - §57 stands as written. Once it is, its clauses 1 to 4 become a line of §850 1. in the same release. - -The question of a reader on a machine that is away, this file's question 1 until now, is closed: the operator -answered it on 2026-11-27 at 00:39 CET (H-A-811), written as §858 5. +None. The question of a reader on a machine that is away is closed: the operator answered it on 2026-11-27 at 00:39 +CET (H-A-811), written as §858 5. The question of the object a replace leaves is closed: ADR 0694 was accepted on +2026-11-27, written as §850 1.