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
+4 -4
View File
@@ -73,7 +73,7 @@ func interpreterFor(module, language string) (string, error) {
// runtime runs as the operator's account when the machine has one, which is what lets a tool that
// needs root escalate as the operator would (ADR 0175 §4); on a machine with no account it runs as
// root, and the two operator words are not set.
func resolutionRuntimeProcess(r mcat.Resolution, with mcat.Rendering) (map[string]any, error) {
func resolutionRuntimeProcess(r mcat.Resolution, with mcat.Rendering, h Holding) (map[string]any, error) {
var runtime *mcat.Manifest
for i := range r.Modules {
if mcat.IsToolRunner(r.Modules[i]) {
@@ -137,7 +137,7 @@ func resolutionRuntimeProcess(r mcat.Resolution, with mcat.Rendering) (map[strin
return nil, err
}
// The holder of node-files is told the same, and the paths modules own here (novox/hq ADR 0394 §4).
if words, err = resolutionFilesWords(r, m, words, with); err != nil {
if words, err = resolutionFilesWords(r, m, words, with, h, runtime.Module+"."+RuntimeProcessID()); err != nil {
return nil, err
}
if len(words) > 0 {
@@ -209,7 +209,7 @@ func (e *NoRuntimeToRunError) Error() string { return e.said }
// the machine's runtime program — the same build, run from the same source — serving that one module alone,
// as the module's own account, on the module's own bus credential. Never the machine's runtime, which runs
// as the operator's account and carries every module on the machine.
func resolutionOwnRuntimes(r mcat.Resolution, with mcat.Rendering) ([]map[string]any, error) {
func resolutionOwnRuntimes(r mcat.Resolution, with mcat.Rendering, h Holding) ([]map[string]any, error) {
var own []mcat.Manifest
for _, m := range r.Modules {
// A held module's stand-in (Stubbed) has no runtime of its own composed, and so none of this function's rules
@@ -275,7 +275,7 @@ func resolutionOwnRuntimes(r mcat.Resolution, with mcat.Rendering) ([]map[string
return nil, err
}
// The holder of node-reads is told where this node keeps its secrets (novox/hq ADR 0310 §5).
if words, err = resolutionReadsWords(r, m, words, with); err != nil {
if words, err = resolutionReadsWords(r, m, words, with, h, m.Module+"."+mcat.OwnRuntimeID()); err != nil {
return nil, err
}
// A build seat's holder gives way on its node, and its steps are told their part of the node's share