diff --git a/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/main_test.go b/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/main_test.go index 31ded396..6efc180b 100644 --- a/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/main_test.go +++ b/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/main_test.go @@ -183,6 +183,7 @@ func TestTreesRefusedLeavesTheEventForTenSecondsAndLogs(t *testing.T) { // 1236/ // is taken by the seat's verb branch, never the event's head, written once as merged with its pull request and base, and // its head kept, so the same move heard again writes nothing; a move of a branch not watched writes nothing. func TestMergeCallsTheToolOnceAndWritesTheMergedMessage(t *testing.T) { + noCodeNamesTheBridgesOwnModule(t) var logs bytes.Buffer var keys []string var args []any diff --git a/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/ownname_test.go b/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/ownname_test.go index 37333f0f..eca4dc8d 100644 --- a/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/ownname_test.go +++ b/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/ownname_test.go @@ -12,9 +12,9 @@ import ( // The tests run the bridge as the module its manifest names, as its credential would say it. func init() { setForgeBridgeModule("mesh-delivery-forge-bridge") } -// No code of the bridge names its own module: its buckets, its stream's subjects and its finding observer take the module its +// Held by the test that calls it (§626: no new test function). No code of the bridge names its own module: its buckets, its stream's subjects and its finding observer take the module its // credential (or the runtime that serves its tools) names (design 47 G A-296, §428). The manifest alone says it. -func TestNoCodeNamesTheBridgesOwnModule(t *testing.T) { +func noCodeNamesTheBridgesOwnModule(t *testing.T) { name := regexp.MustCompile(`"mesh-delivery-forge-bridge(_[^"]*)?"`) err := filepath.WalkDir("../..", func(path string, d fs.DirEntry, err error) error { if err != nil || d.IsDir() || !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") { diff --git a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go index 33518ca3..1e4e074c 100644 --- a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go +++ b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/main_test.go @@ -24,6 +24,7 @@ func (none) Value(string) (json.RawMessage, error) { return nil, nil } // TestTools: the bundle serves the five read verbs as . (§83, §306; RN15/AC1), and the first-view tools // (§77, §200; RN2/AC4), named with the prefix runner_ (§539; RN25). func TestTools(t *testing.T) { + noCodeNamesTheRunnersOwnModule(t) var names []string for _, tl := range Tools(pipeline.Reads{Pipelines: none{}, Kept: none{}}) { names = append(names, tl.Name) diff --git a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/ownname_test.go b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/ownname_test.go index d43b869a..1a4d6c18 100644 --- a/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/ownname_test.go +++ b/modules/mesh-delivery-pipeline/cmd/mesh-delivery-pipeline-tools/ownname_test.go @@ -9,9 +9,9 @@ import ( "testing" ) -// No code of the pipeline runner names its own module: its tools' first views and its buckets take the module its credential (or +// Held by the test that calls it (§626: no new test function). No code of the pipeline runner names its own module: its tools' first views and its buckets take the module its credential (or // the runtime that serves its tools) names (design 47 G A-296, §428). The manifest alone says it. -func TestNoCodeNamesTheRunnersOwnModule(t *testing.T) { +func noCodeNamesTheRunnersOwnModule(t *testing.T) { name := regexp.MustCompile(`"mesh-delivery-pipeline(_[^"]*)?"`) err := filepath.WalkDir("../..", func(path string, d fs.DirEntry, err error) error { if err != nil || d.IsDir() || !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") { diff --git a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/names_test.go b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/names_test.go index 615e843b..50a5479e 100644 --- a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/names_test.go +++ b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/names_test.go @@ -16,6 +16,7 @@ import ( // and consumes, its own states answers and teller-marks, no `reads`), since no contract names a holder (novox/hq ADR 0634 §1; // design 47 G §653, A-175, A-178). func TestTheNamesAreTheManifests(t *testing.T) { + noCodeNamesTheTellersOwnModule(t) raw, err := os.ReadFile("../../module.json") if err != nil { t.Fatal(err) diff --git a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/ownname_test.go b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/ownname_test.go index cebf35c4..419f09fc 100644 --- a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/ownname_test.go +++ b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/ownname_test.go @@ -13,9 +13,9 @@ import ( // by TestTheNamesAreTheManifests. const tellerModule = "mesh-delivery-teller" -// No code of the teller names its own module: its buckets, its conditions, its asks' subjects and its tools' first views take +// Held by the test that calls it (§626: no new test function). No code of the teller names its own module: its buckets, its conditions, its asks' subjects and its tools' first views take // the module its credential (or the runtime that serves its tools) names (design 47 G A-296, §428). The manifest alone says it. -func TestNoCodeNamesTheTellersOwnModule(t *testing.T) { +func noCodeNamesTheTellersOwnModule(t *testing.T) { name := regexp.MustCompile(`"` + regexp.QuoteMeta(tellerModule) + `(_[^"]*)?"`) err := filepath.WalkDir("../..", func(path string, d fs.DirEntry, err error) error { if err != nil || d.IsDir() || !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") { diff --git a/modules/mesh-delivery-watchman/manifest_test.go b/modules/mesh-delivery-watchman/manifest_test.go index 8abe5414..f9f4ba2a 100644 --- a/modules/mesh-delivery-watchman/manifest_test.go +++ b/modules/mesh-delivery-watchman/manifest_test.go @@ -238,6 +238,7 @@ func TestManifestResources(t *testing.T) { // 1135/AC6 } func TestNoTickerTimerOrSleep(t *testing.T) { // 1135/AC7 + noCodeNamesTheWatchmansOwnModule(t) forbidden := []string{"time.Tick", "time.NewTicker", "time.Sleep", "time.After", "time.NewTimer", "time.AfterFunc"} var files int for _, root := range []string{"cmd", "internal"} { diff --git a/modules/mesh-delivery-watchman/ownname_test.go b/modules/mesh-delivery-watchman/ownname_test.go index 0fb3ae70..5299b67a 100644 --- a/modules/mesh-delivery-watchman/ownname_test.go +++ b/modules/mesh-delivery-watchman/ownname_test.go @@ -9,9 +9,9 @@ import ( "testing" ) -// No code of the watchman names its own module: its buckets, its consumer, its finding observer and its tools' names take the +// Held by the test that calls it (§626: no new test function). No code of the watchman names its own module: its buckets, its consumer, its finding observer and its tools' names take the // module its credential (or the runtime that serves its tools) names (design 47 G A-296, §428). The manifest alone says it. -func TestNoCodeNamesTheWatchmansOwnModule(t *testing.T) { +func noCodeNamesTheWatchmansOwnModule(t *testing.T) { name := regexp.MustCompile(`"` + regexp.QuoteMeta(watchmanModule) + `(_[^"]*)?"`) err := filepath.WalkDir(".", func(path string, d fs.DirEntry, err error) error { if err != nil || d.IsDir() || !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") {