§610: the runner's seat definition drops every verb's named callers
Builds: design 47 G §610, A-75 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package pipeline_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"slices"
|
||||
"testing"
|
||||
@@ -83,6 +84,31 @@ func TestManifest(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// §610, A-75: no verb of the runner's definition names its callers, so the class's default holds for each.
|
||||
func TestNoVerbNamesItsCallers(t *testing.T) {
|
||||
raw, err := os.ReadFile("../../contracts/seats/mesh-pipeline-runner/seat.json")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var def struct {
|
||||
Verbs []struct {
|
||||
Name string `json:"name"`
|
||||
Callers []string `json:"callers"`
|
||||
} `json:"verbs"`
|
||||
}
|
||||
if err := json.Unmarshal(raw, &def); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(def.Verbs) == 0 {
|
||||
t.Fatal("the definition holds no verb")
|
||||
}
|
||||
for _, v := range def.Verbs {
|
||||
if len(v.Callers) != 0 {
|
||||
t.Errorf("the verb %s names callers %v; from G no verb does (§610)", v.Name, v.Callers)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func equalSets(a, b []string) bool {
|
||||
x, y := slices.Clone(a), slices.Clone(b)
|
||||
slices.Sort(x)
|
||||
|
||||
Reference in New Issue
Block a user