H-A-335: a held module's share of a holder's words is what runs

The reads runtime on ace restarted twice in two minutes because its
MESH_SECRET_PLACES changed: the holders of node-reads and node-files were
told the node's secret places and owned paths from held modules' stubs,
which differ pass by pass while a part is withheld. While a module is held,
the resolution now takes its share from each runtime process as it runs:
the secret places are those the modules not held compose merged with every
place that runs, and the owned paths keep each running entry a held module
owns. Two passes with the same held set compose every runtime process the
same; a module that answered and changed is still composed from its build.

Builds: design 47 H H-A-335, H-A-337, H-A-306 (2), (3)
This commit is contained in:
2026-11-21 22:10:50 +01:00
parent 637cfb1fd0
commit 94a2e6ede0
13 changed files with 299 additions and 32 deletions
+10 -4
View File
@@ -105,12 +105,18 @@ func (e *UnreadManifestError) Error() string { return e.said }
// Compose is Declaration with the owner of every resource said.
func Compose(r mcat.Resolution, with mcat.Rendering) (mcat.Composed, error) {
return ComposeHolding(r, with, Holding{})
}
// ComposeHolding is Compose for a node that holds modules this pass (Holding): a held module's share of a holder's words
// is what runs (design 47 H, H-A-335, H-A-337).
func ComposeHolding(r mcat.Resolution, with mcat.Rendering, h Holding) (mcat.Composed, error) {
owner := map[string]string{}
received := map[string]map[string][]mcat.Contribution{}
leftOut := map[string]string{}
var foreseen, unplaced, handedOnly []string
handed := &handedFiles{plans: map[string]mcat.Plan{}}
resources, err := resolutionCompose(r, with, owner, received, leftOut, &foreseen, &unplaced, &handedOnly, handed)
resources, err := resolutionCompose(r, with, h, owner, received, leftOut, &foreseen, &unplaced, &handedOnly, handed)
if err != nil {
return mcat.Composed{}, err
}
@@ -137,7 +143,7 @@ func Compose(r mcat.Resolution, with mcat.Rendering) (mcat.Composed, error) {
// BusMembershipPath is where the host reads it — the same constant on both sides.
func BusMembershipID() string { return "bus-membership" }
func resolutionCompose(r mcat.Resolution, with mcat.Rendering, owner map[string]string,
func resolutionCompose(r mcat.Resolution, with mcat.Rendering, h Holding, owner map[string]string,
received map[string]map[string][]mcat.Contribution, leftOut map[string]string,
foreseen, unplaced, handedOnly *[]string, handed *handedFiles) ([]map[string]any, error) {
// **A setting is judged where it is stored, and an impossible one costs a module, not a
@@ -1065,7 +1071,7 @@ func resolutionCompose(r mcat.Resolution, with mcat.Rendering, owner map[string]
// bundle delivered above and holding the credential sealed above, so both exist before it starts
// — the order written here is the order the machine applies.
if resolutionRuntimeHere(r) {
process, err := resolutionRuntimeProcess(r, with)
process, err := resolutionRuntimeProcess(r, with, h)
if err != nil {
return nil, err
}
@@ -1074,7 +1080,7 @@ func resolutionCompose(r mcat.Resolution, with mcat.Rendering, owner map[string]
out = append(out, process)
}
// And a runtime of its own for each module of its own account, after it (novox/hq ADR 0259 §8).
owns, err := resolutionOwnRuntimes(r, with)
owns, err := resolutionOwnRuntimes(r, with, h)
if err != nil {
return nil, err
}