E4b: keep the run a module was applied from in its have

The engine kept the applied run in its memory only, so a restarted engine
applied an older run's want again. The have, the record of what the engine
applied, carries the run (the node-engine seat's form 2): the engine reads
it from the have before it applies a want that carries one, a write that
names none keeps the last have's, and every have is written at the seat's
form.

Builds: design 47 H2 §813 (1); H-A-355, H-A-384 (2), H-A-388 (1)
This commit is contained in:
2026-11-22 00:19:47 +01:00
parent fea6836f9e
commit f4f5615bfb
6 changed files with 67 additions and 22 deletions
+2 -2
View File
@@ -109,7 +109,7 @@ func (h sessionHaves) ReadErr(ctx context.Context, module string) (agent.Have, b
return agent.Have{}, false, err
}
return agent.Have{Module: module, FP: got.Fp, Composed: got.Composed, Phase: string(got.Phase), Detail: got.Detail,
Sealed: got.SealedAt, Wait: got.Wait}, true, nil
Sealed: got.SealedAt, Wait: got.Wait, Run: got.Run}, true, nil
}
func (h sessionHaves) Write(ctx context.Context, x agent.Have) {
@@ -126,7 +126,7 @@ func (h sessionHaves) Write(ctx context.Context, x agent.Have) {
}
h.session.NoteModule(ctx, link.ModuleFact{Module: x.Module, FP: x.FP, Composed: x.Composed, Phase: phase,
Failed: phase == string(nodeengineclient.PhaseFailed), Detail: shorten(x.Detail), Judgement: x.Judgement, Waits: x.Waits,
BuildAlone: x.BuildAlone, Kept: x.Kept, Sealed: x.Sealed, PullWait: x.PullWait, Wait: x.Wait})
BuildAlone: x.BuildAlone, Kept: x.Kept, Sealed: x.Sealed, PullWait: x.PullWait, Wait: x.Wait, Run: x.Run})
}
func (h sessionHaves) Removed(ctx context.Context, module string) {