acts stays as the declaration the graph's edges and tiers are built from; the bound of the build seats' rule goes with the acting part's hold. The generated contracts do not change. Builds: design 47 H §750, §764 (the acting part's hold); lead answers H-A-57, H-A-70 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
26 lines
802 B
Go
26 lines
802 B
Go
package buildstep
|
|
|
|
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),
|
|
// and names no bound: the acting part's hold ends (H-A-57, H-A-70).
|
|
func TestTheSeatsBuildRuleActsOnTheKindImage(t *testing.T) {
|
|
raw, err := os.ReadFile("../../mesh-delivery-contracts/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" || def.Acts[0].Bound != "" {
|
|
t.Errorf("acts = %+v; wanted the one rule {build, kind:image} with no bound", def.Acts)
|
|
}
|
|
}
|