Design 47 G: the lead's answers A-27 to A-35, each tested against the principles and the design's lines #555

Merged
mesh-tools merged 6 commits from design/47-G-lead-answers-3 into main 2026-11-11 21:06:03 +00:00
@@ -91,7 +91,7 @@ names the principle that settles it, and is cited as "design 47 G A-n".
module's own check interval; a field the contract's `Finding` lacks (`resolved`, and its words in every module, the watchman's included) is dropped, the keeper saying a clear in its own words; an id is escaped as a
name, and a `ref` goes into the id only where two findings of one kind share an id; old keys are cleared by the
writer's first statement. mesh-sdk keeps no old `views.Finding` or `FindingWriter` beside the generic writer.
- **A-23** (§81, §132; principle 7) The gate's `recovery` marks the delivery record through its ordinary update, with one
- **A-23** (§81, §132; principle 7) The gate's `recovery` marks the delivery record through its ordinary update (the record type's `trace` set-fields operation), with one
field `recovery` holding `by` (the proved caller), `why` and `commit`; no new operation. Then it says `recovery-merged`.
- **A-24** (§431, §172, §592, §158; principles 7 and 4) Once the merge states go, `deliveries`, `show` and `groups` answer
the delivery records as the gate keeps them (G-3 *The delivery record*), filtered by their arguments, with no line
@@ -103,3 +103,31 @@ names the principle that settles it, and is cited as "design 47 G A-n".
- **A-26** (§687, §689, A-22; principle 7) A part raises no follower's finding itself: every follower is adopted through
its reader (`Adopt`), and the reader raises and clears the follower's four findings through the module's writer, so
the pipeline runner, the indexer and the assigner build none of their own.
- **A-27** (A-26, A-16; principle 7) The tool runner's first views follow A-26 too: `firstview` builds a
`views.ProcessReader` over the runner's bus connection and adopts its followers, so the reader raises their findings;
the runner's `bus.Conn` gains one accessor for its JetStream, its one place (A-16).
- **A-28** (A-26, A-22, §687; principle 7) A part's own follower (mesh-config, mesh-vault) is followed through a
`views.Reader` holding the module's writer and adopted, as A-26. A single ask that is no follower (mesh-build-go's
manifest ask, the tool runner's ask) writes and clears its `first-view-unanswered` finding itself through
`Writer.Write` and `Writer.Clear` with the contract's `Finding`; mesh-sdk exports no helper for it.
- **A-29** (§686, A-3; principle 7, shared code lives in mesh-sdk) A part whose findings are raised as they happen, not
judged afresh, uses one mesh-sdk form of the writer that observes from its own state: it seeds what it holds from the
state's keys before it starts, keeps them under its own lock, and its `Observe` answers them, so no part writes that
adapter (the watchman's copy moves there; the assigner, builder and indexer use it).
- **A-30** (§383, §686; principle 3) Every module whose writer publishes declares the events it says
(`finding-written`, `finding-cleared`, `findings-stated`) in its manifest; none publishes an event it does not declare.
- **A-31** (A-14, A-22; principles 3 and 7) A module whose old finding keys end in no kind it owns (gitea's package
registry, distribution) deletes those old keys once at its start, in its own code, so no stale finding stays; the
writer's rule is unchanged.
- **A-32** (A-29; principle 7) A part that keeps its open findings in memory (artifact-store-tools, mesh-config,
distribution, gitea's package registry) uses the held writer of A-29, so a restart neither drops nor rewrites them.
- **A-33** (§151, §592, A-9; principle 7) The gate opens one record per `take-in.taken`: its key is the taken body's
`branch` and `source` (`<branch>.<source>`, each escaped as a name); its members are the taken body's `entries`
(`repository`, `pull`), a group's members in one record; its heads are the commits the take-in names for them.
- **A-34** (§291, §15, §592; principle 1) `source.<branch>` moves on `take-in.taken`: the gate writes the taken body's
`source` for its `branch`, then says `source-moved`; nothing else moves it.
- **A-35** (§167, §158, §168; principle 7) The record's changes make the same owed acts the delivery's transitions make
today (the delivery's view, a comment, the note's line), re-keyed on the record; each act said is kept in the record's
`acts` with when it was said, and ended there on `owed.ended`, so `stalled` reads the unanswered ones.
`approval-carried` and `approval-carried-open` are design lines (§542, §592), not left out: they are built, with the
`pull-merged` and `pull-closed` consumes that clear the finding.