RN5: an empty approval status is no step and asks the operator nothing

Builds: design 47 G §553, §23, §26 (lead answer A-196)

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-12 05:53:07 +01:00
parent e5c864c246
commit 6676b42dab
3 changed files with 12 additions and 1 deletions
@@ -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"
@@ -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
}
@@ -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"}}},