From 9c70fa65996cc74bfc46700098be1dec0cf17bdf Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 01:02:09 +0100 Subject: [PATCH] Fix 9.5: the seat node-build-image's build acting rule acts on kind:image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 47 G §324, §397 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- .../go/seats/nodebuildimage/acts_test.go | 24 +++++++++++++++++++ contracts/seats/node-build-image/seat.json | 7 ++++++ 2 files changed, 31 insertions(+) create mode 100644 contracts/go/seats/nodebuildimage/acts_test.go diff --git a/contracts/go/seats/nodebuildimage/acts_test.go b/contracts/go/seats/nodebuildimage/acts_test.go new file mode 100644 index 00000000..7fc457f0 --- /dev/null +++ b/contracts/go/seats/nodebuildimage/acts_test.go @@ -0,0 +1,24 @@ +package nodebuildimage + +import ( + "encoding/json" + "os" + "testing" +) + +// The seat's `build` acting rule matches an artifact by its kind, an image having no language (design 47 G §324, §397). +func TestTheSeatsBuildRuleActsOnTheKindImage(t *testing.T) { + raw, err := os.ReadFile("../../../seats/node-build-image/seat.json") + if err != nil { + t.Fatal(err) + } + var def struct { + Acts []struct{ Step, On, Bound string } `json:"acts"` + } + if err := json.Unmarshal(raw, &def); err != nil { + t.Fatal(err) + } + if len(def.Acts) != 1 || def.Acts[0].Step != "build" || def.Acts[0].On != "kind:image" { + t.Errorf("acts = %+v; wanted the one rule {build, kind:image}", def.Acts) + } +} diff --git a/contracts/seats/node-build-image/seat.json b/contracts/seats/node-build-image/seat.json index 5528da1f..57b1f438 100644 --- a/contracts/seats/node-build-image/seat.json +++ b/contracts/seats/node-build-image/seat.json @@ -7,6 +7,13 @@ "decision": "novox/hq ADR 0525, ADR 0536, ADR 0553", "pulled-by-kind": true, "yields": true, + "acts": [ + { + "step": "build", + "on": "kind:image", + "bound": "60m" + } + ], "accepts": [ { "name": "delivery",