Design 47 H2: lead answers H-A-814 to H-A-821, the four reviews of ADR 0694's lines

Objects are named by their write, so no delete or drop meets a value's
only copy; the read tool says what it measures; the live check counts what
the journal says; a read is bounded by its caller; past values are read
through an optional interface so no build of today breaks. H-A-821 (who
removes the object of a key its owner deletes) waits for the operator.
This commit is contained in:
2026-11-27 01:56:55 +01:00
parent 79f700acf9
commit d76f2f989a
@@ -0,0 +1,92 @@
---
layer: to-be
status: in-progress
design: 47
milestone: H
updated: 2026-11-27
decisions:
- "ADR 0694"
- "ADR 0666"
- "ADR 0595"
- "ADR 0573"
---
# Design 47, milestone H2: lead answers, continued a sixth time
This file continues [H2-lead-answers-6.md](H2-lead-answers-6.md) from H-A-814 on, since that file is past its 60 KB
bound: every later answer of H2b, H2c and H2d is written here. Each line names the record, the operator's answer or
the principle that settles it.
## The review of ADR 0694's lines: H-A-814 to H-A-821
The four reviewers by architectural domain read hq 6efff968..79f700ac (ADR 0694's lines in G §57, §60, §62, G's
table of kept data, §138, G-7 §330, acceptance test 90 and H2c §850 1.; one round, 2026-11-27 about 01:47 to 01:54
CET; their reports in hq `.work/47-H2-corrections/reads/adr0694-review-*.md`). None approved: 21 musts and 15 notes,
many the same finding seen from two domains. Each must and the notes taken are answered below, read at mesh-sdk
c42ada4 (`go/stateobjects/values.go`). The one must no principle settles (security and upgrade 1, health 1: ADR 0694
§3 against A-465 and A-465a) is the operator's, asked on Telegram at 01:54 CET; its answer is H-A-821.
- **H-A-814 (an object is named by its write, and reused only when the key's current value names it, 01:55)** 27 Nov,
running and testing 1, security 2, health 2, seams and tools 2: the writer names every object it makes
`<key>.<sha256>.<write id>`, the write id unique to that write (16 hex digits from a random source), and reuses an
object only when the key's value its first read found names one of the same digest (`Put`'s `oldRef` today), so
writing the same value again keeps that object as ADR 0694 §1's check has it. `keyOf` reads both forms, the old
`<key>.<sha256>` and the new. No delete or drop can then meet an object a later write put again: (b)'s second read
before the delete goes, and after a failed compare-and-set (d) deletes the object it made itself, always. A delete
that finds its object already gone counts as done, with no journal line (seams and tools note (c)). Principle 3 (a
put that answered written never loses its value's only copy) and principle 7 (no second read).
- **H-A-815 (the read tool says what it measures: whether the key holds a value now, 01:55)** 27 Nov, seams and tools 1,
security 3, health 3, running and testing 2: the field `key-deleted` becomes `key-holds-value` (true when the key has
a value now), and (g) names every case an object no kept value names is listed for while its key holds a value: a
delete that failed (said in the journal), a process stopped between its compare-and-set and its delete, a value
written before the key's last delete (the key written again since; the bus keeps no delete marker with one past
value), a past value aged out by the state's or the key's lifetime, and an object a build before H2c's replaced. An
object whose key holds no value is a deleted key's object (ADR 0694 §3, its lifetime included). Principle 8 (a field
says what it is) and principle 3 (the tool never says a cause it did not read).
- **H-A-816 (the live check counts what the journal and the key's history say, not the field, 01:55)** 27 Nov, running
and testing 2, security 3 and 5, health 4: H2c's live row counts only objects written after the module's H2c build
started, and accepts each listed with `key-holds-value` true only where the journal said its failed delete, or the
module's start lines show a stop between that object's write and its key's next write, or its key's history shows a
delete since its value; anything else fails the row. The objects of a build before H2c are counted by H2c's prepare
and dropped by a person at H2c's delivery, through the drop tool. No journal line at each start is added (principle
7: the live row reads what exists). ADR 0694's How it is checked, live bullet, is corrected by a progressive insight
in these words, with the writer's first design question (a stopped process counts as a failed delete). Principle 3.
- **H-A-817 (a read is bounded by its caller's context, 01:55)** 27 Nov, seams and tools 4, running and testing 3,
health note 6: mesh-sdk's `Values` gains `GetContext(ctx, key, into)`, which follows the key while the context
lasts; `Get` keeps its signature and calls it with the bound each bus call has today (30 s). Only an object's "not
found" starts the follow, an object gone in the middle of a chunked read (G §518) included; any other error, a size
or digest that differs from the reference among them, fails at once with its cause. At its bound the read fails
naming the state, the key, the last revision and the last object it read. A unit row proves the bound. Principle 3
and principle 11 (the bound is the caller's).
- **H-A-818 (a key's kept values are read through an optional interface, so no build of today breaks, 01:55)** 27 Nov,
security and upgrade 4, seams and tools note (b), running and testing note: `stateobjects.KV` gains no method; a KV
that keeps past values answers an optional `History(key) ([]Entry, error)` (mesh-sdk's bundle KV through the
runtime's `mesh/state.history`, its process KV through the bucket's own history), which the writer asks only after a
successful compare-and-set, to find the object no kept value names any more. A KV without it, the indexer's `storeKV`
(mesh-delivery `modules/mesh-delivery-indexer/internal/index/run_inputs.go`) and the assigner's test `kvMem` among
them, builds as today, and its writer deletes nothing: the replaced object stays listed for the drop tool, as today,
since without the read the writer cannot know which objects its state's kept values name. mesh-sdk's fake state keeps past
values and delete markers. H2c's module list names the indexer and the assigner for §850 only if H-A-821 changes
their removals. ADR 0573 §4 (a module builds against the latest published mesh-sdk); principle 3.
- **H-A-819 (the rows that prove ADR 0694's lines, 01:55)** 27 Nov, seams and tools 3, running and testing 4 and 5,
health note 7: H2c §850's rows gain, at the unit level over the fake state: a state keeping three values per key,
whose read tool lists both past values' objects as named and whose drop leaves them; a key deleted and written again,
whose earlier objects are listed and deleted by no later write; the raced read and the one-past-value replace (unit
level, as test 90 and G §62 then say); a read at its bound. The whole test gains a row: a foundation part's old
`objects` section holding a state's large values (G §619's path), replaced five times, holds one object, and the drop
tool removes none of the objects past values name. Principle 3 and the test budget (unit rows first).
- **H-A-820 (the writer acts on an old `objects` section only where it holds one state's large values alone; the drop
spares an object in flight, 01:55)** 27 Nov, the writer's choice 1 with seams and tools, health and running and testing
notes: the writer and the drop tool treat a foundation part's old `objects` section as `<state>-objects` only where
that section holds the large values of that one state and nothing else; H2c's prepare reads which parts share such a
section, and one that holds anything else is a design question of that prepare. The drop tool takes the names of the
objects to drop (none named: every object listed whose key holds no value), and spares an object modified within the
call's bound (a write whose compare-and-set has not yet answered). G-7 §330 says that ADR 0694 does not reach G-24
§725's `test-runs-objects`, which a field of its value names and the runner removes with its key, unless H-A-821 says
otherwise. An old build's reader, during a module's delivery, has no follow and fails loudly on a replace a new build
made; the design says so as a known limit of that delivery. Principles 12, 4 and 3.
- **H-A-821 (who removes the object of a key its owner deletes)** The operator's, asked on Telegram at 01:54 CET (ask
q-feb3f7ec94abe8d2): A-465 and A-465a (the indexer and the assigner remove the object of an input key they end, and
every object whose key is gone, at each keep and at start) contradict ADR 0694 §3 (a key deleted by its owner leaves
its object for a person's drop). Lead's recommendation: a new record, an owner's own delete removes its object at
once, and a delete by a person or by a key's lifetime still waits for a person's drop. Unanswered as this is written.
- **Not answered here:** the main file's size (270 KB against 80 KB) is H-A-807's: reshaped after H2b's delivery.