The sandbox's composer marks a node it does not judge in the contract's field (Machine.NotJudged), neither composed nor refused, never by a prefix of its reason (ADR 0593 §9; the prepare's seams finding on "not judged")

This commit is contained in:
2026-11-03 13:29:21 +01:00
parent db7cd273f0
commit 6ea23b6731
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -222,7 +222,7 @@ func machine(in compose.Input, node, depth string, declarations bool) Machine {
// own composition: the sandbox cannot compose them as the node does, so it does not judge the node, and names
// it (ADR 0593 §9), never a failure of the change and never a silent pass.
if folded := foldedUnsaid(in, node); len(folded) > 0 && in.ComposedHow == nil {
return Machine{Composes: true, Reason: NotJudged + strings.Join(folded, ", ") +
return Machine{NotJudged: NotJudged + strings.Join(folded, ", ") +
" (its own composition carries them as they run, and the sandbox cannot): " + err.Error()}
}
return Machine{Reason: err.Error()}
@@ -237,8 +237,9 @@ func machine(in compose.Input, node, depth string, declarations bool) Machine {
return m
}
// NotJudged opens the reason of a machine the sandbox does not judge: its node-engine sent an input that does not say
// how it composes (compose.Input.ComposedHow), and the node runs modules folded in its own composition.
// NotJudged opens the words of a machine the sandbox does not judge (Machine.NotJudged, the contract's field, ADR 0593 §9):
// its node-engine sent an input that does not say how it composes (compose.Input.ComposedHow), and the node runs modules
// folded in its own composition. The machine is then neither composed nor refused; a reader decides by the field.
const NotJudged = "not judged: its node-engine sends no running state for "
// foldedUnsaid is each module node runs folded in its own composition (Node.InOwn) whose manifest names a build: what
+1 -1
View File
@@ -132,7 +132,7 @@ func TestARequestItCannotRunIsRefused(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if m := older.Cases[0].Machines["a"]; !m.Composes || !strings.HasPrefix(m.Reason, NotJudged+"bus") {
if m := older.Cases[0].Machines["a"]; m.Composes || !strings.HasPrefix(m.NotJudged, NotJudged+"bus") || m.Reason != "" {
t.Errorf("an older engine's input of a node with a folded module: %+v", m)
}
in.ComposedHow = &compose.ComposedHow{Node: "a", Builds: map[string]string{}}