node-engine: a held tool runner's kept program is not replaced by the tools bundles it serves, so novox's new indexer is run by it (ADR 0259 §8)
This commit is contained in:
@@ -161,7 +161,7 @@ func compositions(in Input, node string, fps map[string]string, mode Mode, appli
|
||||
}
|
||||
kept := make(map[string]catalogue.Manifest, len(n.Kept))
|
||||
for m, man := range n.Kept {
|
||||
if man.Stubbed && man.RunsAs == "" {
|
||||
if man.Stubbed && man.RunsAs == "" && !keepsProgram(man) {
|
||||
man.Bundles = runningBundles(n.RunsTools[m], reading.Catalogue[m])
|
||||
}
|
||||
kept[m] = man
|
||||
@@ -498,6 +498,13 @@ func Carried(m catalogue.Manifest, module string, runs *engcomp.Composed) catalo
|
||||
return stub
|
||||
}
|
||||
|
||||
// keepsProgram says a held tool runner carries the program it runs (Carried, runningProgram): its one bundle is that
|
||||
// program, which the tools bundles it serves never replace, or the modules of their own account it runs are held for
|
||||
// want of it (lead-47 2026-11-16: 40ed063 kept novox's, and the loop over what the runtime serves dropped it again).
|
||||
func keepsProgram(m catalogue.Manifest) bool {
|
||||
return catalogue.IsToolRunner(m) && len(m.Bundles) == 1 && m.Bundles[0].Binary != ""
|
||||
}
|
||||
|
||||
// runningProgram is the program bundle of the tool runner as it runs on the node: its process's source, digest and binary.
|
||||
// A held tool runner keeps it, so a module of its own account is run by the same program the node runs (novox/hq ADR 0259
|
||||
// §8) and is not held for want of a runtime that runs (lead-47 2026-11-16: novox's tool runner was held for a build the
|
||||
|
||||
Reference in New Issue
Block a user