Test TestPluginEngineRuleIsCanonicalAndSharedByAgentInstructions was missing entirely, letting CLAUDE.md drift out of sync with ARCHITECTURE.md#plugin-engine-rule-strict. Added the test and the missing reference.
25 lines
700 B
Go
25 lines
700 B
Go
package archied
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// Autonomous execution has one production composition: managed task
|
|
// containers over embedded or external NATS. These old switches must not
|
|
// quietly restore a host or no-broker path in the composition root.
|
|
func TestCompositionContainsNoAutonomousExecutionOptOut(t *testing.T) {
|
|
for _, file := range []string{"bootstrap.go", "main.go"} {
|
|
source, err := os.ReadFile(file)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
for _, forbidden := range []string{"NATSModeOff", "Containers.Enabled"} {
|
|
if strings.Contains(string(source), forbidden) {
|
|
t.Errorf("%s contains removed autonomous execution switch %q", file, forbidden)
|
|
}
|
|
}
|
|
}
|
|
}
|