selfcompose: the running statement's manifest is the second source of the one place; a composition answers only whether the build keeps data (A-484a)

Builds: design 47 G A-484a, A-484
This commit is contained in:
2026-11-18 00:49:53 +01:00
parent 7b6468e2bb
commit 91dc064f92
4 changed files with 41 additions and 17 deletions
+23 -6
View File
@@ -15,12 +15,14 @@ import (
// A-461d). Every step that needs it reads it here and nowhere else: what the module provides (a held module keeps providing
// what it runs, frombus.Scope.RunningManifest), what it keeps on the bus and whether that changes form (FormChanges), the
// artifact store's holder (layModules, A-461d), and the picture of the catalog the composer resolves from. It answers in this
// order: the entry of the running build; else the composition this node runs of that build; else the module's trunk manifest
// through the seat mesh-catalog's verb `module`.
// order: the entry of the running build; else the manifest its running statement names, when held (A-484a); else the module's trunk manifest
// through the seat mesh-catalog's verb `module`. The composition answers no manifest, only whether the build keeps data (A-483).
// The three sources of the one place, in the words it says them in.
const (
SourceEntry = "the entry of the running build"
SourceEntry = "the entry of the running build"
SourceStatement = "the manifest its running statement names"
// SourceComposition answers no manifest: only the build and whether it keeps data on the bus (A-484a).
SourceComposition = "the composition this node runs of it"
SourceTrunk = "the module's trunk manifest in the catalog"
)
@@ -100,9 +102,20 @@ func (c *Composer) runningLocked(running []engcomp.Composed, node, module, hint
}
}
}
// 2. The manifest its running statement (the running event) names, when this node holds it (A-484a).
statementWhy := "its running event names no manifest"
if r, ok := c.heard[node][module]; ok && !r.stopped && a.Source == "" && r.manifest != "" {
if raw, held := c.manifests[r.manifest]; held {
if man, err := catalogue.Decode(raw); err == nil {
a = runningAnswer{Source: SourceStatement, FP: r.fingerprint, Known: true, Manifest: man, Raw: raw, Digest: r.manifest}
}
} else {
statementWhy = "this node holds no manifest " + r.manifest
}
}
if a.Source == "" {
entryWhy = fmt.Sprintf("no entry of the build %s is held", orNone(fp))
// 2. The composition this node runs of that build, whatever the want's build.
// The composition this node runs of that build, whatever the want's build: it answers whether the build keeps data (A-483, A-484a).
if node == c.env.Node {
for _, r := range running {
if r.Module != module || r.FP == "" {
@@ -141,8 +154,12 @@ func (c *Composer) runningLocked(running []engcomp.Composed, node, module, hint
}
if a.Source == "" || (!a.Known && a.Source == SourceComposition) {
a.Why = fmt.Sprintf("the manifest of the build %s runs here is read from none of: %s (%s); %s (%s); %s (%s)", module,
SourceEntry, orWords(entryWhy, "its entry is held without a manifest"), SourceComposition,
orWords(compWhy, "it names the build "+a.FP+" and no entry of that build is held"), SourceTrunk, trunkWhy)
SourceEntry, orWords(entryWhy, "its entry is held without a manifest"), SourceStatement, statementWhy, SourceTrunk, trunkWhy)
if a.Source == SourceComposition {
a.Why += fmt.Sprintf("; its composition names the build %s and says whether it keeps data: %v", a.FP, a.Data)
} else if compWhy != "" {
a.Why += "; " + compWhy
}
}
if a.Source != "" {
line := fmt.Sprintf("%s runs a build whose manifest is read from %s", module, a.Source)