From ec646f55eece580fd19ebc5464ca4c0499571ded Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 18:06:06 +0100 Subject: [PATCH] J26 item 2: the run-ask test expects a program's exit 7 to end its key failed Since A-290 a run whose program exited other than 0 ends its key failed, the reason saying the exit, its answer kept (steprun.finish); the test still wanted passed. It now wants failed with "the program exited 7" and reads the kept answer as before. Builds: design 47 G A-290 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- .../cmd/mesh-build-go/run_integration_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/run_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/run_integration_test.go index 74f32c80f..771d5d540 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/run_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/run_integration_test.go @@ -27,7 +27,7 @@ import ( // answered on its step key .: the program, run shut off over its heads and its input (asked by digest of the // seat verb the ask names, which a fake checker answers on the bus as the checker's verb input does), answers its last // line and exit; a program cannot write under its heads, and one -// that dials the machine's network is shut off, and the answer says it failed. +// that dials the machine's network is shut off, and its key ends failed, the answer kept (design 47 G A-290). func TestARunAskIsAnsweredOnTheBusAndItsProgramIsShutOff(t *testing.T) { needTools(t, "the shut-off run", "bash", "bwrap") nc, err := nats.Connect(testbus.URL(t)) @@ -122,8 +122,9 @@ func TestARunAskIsAnsweredOnTheBusAndItsProgramIsShutOff(t *testing.T) { break } } - if step.State != sdkstep.StepPassed { - t.Fatalf("the run ask ended %q: %s", step.State, step.Reason) + // A run whose program exited other than 0 ends its key failed, saying the exit, its answer kept (design 47 G A-290). + if step.State != sdkstep.StepFailed || !strings.HasPrefix(step.Reason, "the program exited 7") { + t.Fatalf("the run ask ended %q: %s; want failed, the program exited 7", step.State, step.Reason) } var ans sdkstep.RunAnswer if err := json.Unmarshal(step.Result, &ans); err != nil {