From 6676b42dab682419000cfe122175c351bb7dd3b8 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 05:53:07 +0100 Subject: [PATCH] RN5: an empty approval status is no step and asks the operator nothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 47 G §553, §23, §26 (lead answer A-196) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- modules/mesh-delivery-pipeline/internal/pipeline/place.go | 3 +++ .../internal/pipeline/registrations.go | 5 ++++- .../internal/pipeline/registrations_test.go | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/place.go b/modules/mesh-delivery-pipeline/internal/pipeline/place.go index 5da0acae..946ac980 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/place.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/place.go @@ -102,6 +102,9 @@ func Place(p seat.Pipeline, reg catalog.Registration, entries map[string]catalog } for _, step := range moduleSteps { status := Status(reg, "", step) + if status == "" { + continue + } s := seat.StepResult{Step: step, Status: status, Outcome: seat.StepResultOutcomeWaiting} if status == seat.StepResultStatusBypass { s.Outcome, s.Why = seat.StepResultOutcomeBypassed, "bypassed by the module's policy" diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/registrations.go b/modules/mesh-delivery-pipeline/internal/pipeline/registrations.go index 118e09d4..91073caf 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/registrations.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/registrations.go @@ -12,7 +12,7 @@ import ( // Status is a step's status for one artifact of a module, read from the module's registration and never from a // manifest (design 47 G §21, §23): the artifact's own status where its policy names one, else the module's. A step -// whose status neither names is `optional` (§553): it runs and a failure holds nothing. +// whose status neither names is `optional` (§553): it runs and a failure holds nothing; an empty approval is no step (A-196). func Status(reg catalog.Registration, artifact, step string) string { if a, ok := reg.Policy.Artifacts[artifact]; ok { if s := statusOf(a, step); s != "" { @@ -22,6 +22,9 @@ func Status(reg catalog.Registration, artifact, step string) string { if s := statusOf(reg.Policy.Steps, step); s != "" { return s } + if step == seat.StepResultStepApproval { + return "" + } return seat.StepResultStatusOptional } diff --git a/modules/mesh-delivery-pipeline/internal/pipeline/registrations_test.go b/modules/mesh-delivery-pipeline/internal/pipeline/registrations_test.go index 64aca5bf..8cc0b8cf 100644 --- a/modules/mesh-delivery-pipeline/internal/pipeline/registrations_test.go +++ b/modules/mesh-delivery-pipeline/internal/pipeline/registrations_test.go @@ -29,6 +29,11 @@ func TestPolicyAndBuildSeat(t *testing.T) { } } + // An empty approval status asks the operator nothing (A-196): no step. + if got := Status(catalog.Registration{}, "", "approval"); got != "" { + t.Errorf("an empty approval status = %q, want none", got) + } + entries := map[string]catalog.CatalogEntry{ "mesh-build-go": {Module: "mesh-build-go", Acts: []catalog.ActingRule{{Seat: "node-build-go", Step: "build", On: "go"}}}, "mesh-build-node": {Module: "mesh-build-node", Acts: []catalog.ActingRule{{Seat: "node-build-node", Step: "build", On: "typescript"}, {Seat: "node-build-node", Step: "check", On: "go"}}},