Autonomous workflows now always hand a complete task to a scoped archie-agent container. Embedded NATS is the default and external NATS changes only broker placement; legacy agent and containers.enabled inputs decode for migration but cannot select an execution path. The daemon flushes task-event subscriptions before a worker can publish, and runtime updates snapshot and restore the configured worker image.
25 lines
697 B
Go
25 lines
697 B
Go
package main
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
}
|