selfcompose: the manifest of the build a module runs here is answered in one place; every step reads it there (A-484)

Entry of the running build, else the composition this node runs of it, else the module's trunk manifest through the seat mesh-catalog's verb module;
said once per module and source; words naming the three where none answers. Read there: a held module's offer (frombus Scope.RunningManifest),
FormChanges (A-483), the store holder and the stand of a running module without an entry (A-461d, A-480a), and the tool composition.

Builds: design 47 G A-484, A-480, A-480a, A-483, A-461d, A-482
This commit is contained in:
2026-11-18 00:46:49 +01:00
parent 0cc1728a04
commit 7b6468e2bb
15 changed files with 510 additions and 175 deletions
+24 -2
View File
@@ -37,6 +37,9 @@ type CompositionView struct {
Revisions []RevisionView `json:"revisions,omitempty"`
// Runs is what runs of the module, and where that is known from; nil when nothing of it runs.
Runs *RunsView `json:"runs,omitempty"`
// RunsManifest is the manifest of the build that runs of the module, as the one place reads it (design 47 G A-484): which
// source answered, or the words naming the three it tried. Said also where the want's build has no composition.
RunsManifest *RunsManifestView `json:"runs-manifest,omitempty"`
// Judged is the move from what runs to the composition read, as the agent judges it before an apply.
Judged JudgedView `json:"judged"`
// Diff is every resource that differs from what runs, when asked.
@@ -136,6 +139,14 @@ type RunsView struct {
Resources int `json:"resources"`
}
// RunsManifestView is what the one place answers of the build a module runs here.
type RunsManifestView struct {
// Source is the source that answered; empty when none did.
Source string `json:"source,omitempty"`
FP string `json:"fp,omitempty"`
Words string `json:"words"`
}
// JudgedView is a move's judgement.
type JudgedView struct {
Judgement string `json:"judgement"`
@@ -178,6 +189,10 @@ func (a *Agent) Composition(ctx context.Context, module, digest string, diff boo
Held: att.Held, AnsweredRevision: att.AnsweredRev, Transient: att.Transient}
}
view.Started = a.checked[module]
if a.env.RunningManifest != nil && module != NodeModule {
src, rfp, words := a.env.RunningManifest(module)
view.RunsManifest = &RunsManifestView{Source: src, FP: rfp, Words: words}
}
latest, haveLatest := a.compositionFor(module, fp)
r, ran := a.running[module]
from, known := a.runningComposition(module)
@@ -220,12 +235,19 @@ func (a *Agent) Composition(ctx context.Context, module, digest string, diff boo
case digest != "" && read == nil:
return view, fmt.Errorf("no revision of %s the bucket keeps has the digest %s; revisions lists those it keeps", key, digest)
case read == nil && !haveLatest:
// What runs of the module is still said, through the one place (A-484): the composition read is the want's build, and a
// module held at another build has none of it.
words := fmt.Sprintf("the bucket holds no composition of %s at %s", module, fp)
if a.env.SelfComposed && a.env.WhyUnmade != nil && module != NodeModule {
if why := a.env.WhyUnmade(module); why != "" {
return view, fmt.Errorf("the bucket holds no composition of %s at %s; the agent waits for the composer: %s", module, fp, why)
words = fmt.Sprintf("the bucket holds no composition of %s at %s; the agent waits for the composer: %s", module, fp, why)
}
}
return view, fmt.Errorf("the bucket holds no composition of %s at %s", module, fp)
if view.RunsManifest == nil {
return view, errors.New(words)
}
view.Composition = RevisionView{Key: key, Refused: words}
return view, nil
case read == nil:
read = &latest
}