test: allow the full race suite 30 minutes; trim research scenario stimuli

Research experiments run several sandbox variants with settle windows, and
under the full parallel race suite the experiments package exceeded Go's
default ten-minute limit. The make targets now pass -timeout 30m, and the
ablation and self-model scenarios use the fewest stimuli that still show
their effect.
This commit is contained in:
Andy Dixon
2026-09-22 19:49:07 +01:00
parent 672884cd22
commit a43fc31643
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -17,10 +17,10 @@ test: ## unit tests
go test ./... go test ./...
test-race: ## unit tests with the race detector test-race: ## unit tests with the race detector
go test -race ./... go test -race -timeout 30m ./...
test-db: dev-db ## tests that need PostgreSQL (NOEMA_TEST_DATABASE_URL) test-db: dev-db ## tests that need PostgreSQL (NOEMA_TEST_DATABASE_URL)
NOEMA_TEST_DATABASE_URL=$(DEV_DB) go test -race -count=1 ./... NOEMA_TEST_DATABASE_URL=$(DEV_DB) go test -race -timeout 30m -count=1 ./...
vet: ## go vet vet: ## go vet
go vet ./... go vet ./...
+2 -2
View File
@@ -53,7 +53,7 @@ func TestAblationComparesAgainstControl(t *testing.T) {
sn, _ := h.Snaps.Create(ctx, base, "before", "", "test") sn, _ := h.Snaps.Create(ctx, base, "before", "", "test")
res := run(t, service(h), "metacognition ablation", sn.ID, Definition{ res := run(t, service(h), "metacognition ablation", sn.ID, Definition{
Protocol: &Protocol{Kind: ProtocolAblation, IndependentVariable: "metacognition enabled", ControlledVariables: []string{"snapshot", "stimuli", "configuration", "model routing"}, Measures: []string{"ablation.effect"}}, Protocol: &Protocol{Kind: ProtocolAblation, IndependentVariable: "metacognition enabled", ControlledVariables: []string{"snapshot", "stimuli", "configuration", "model routing"}, Measures: []string{"ablation.effect"}},
Stimuli: []Stimulus{{Text: "The weekly report is due on Friday."}, {Text: "Nothing else happened."}}, Stimuli: []Stimulus{{Text: "The weekly report is due on Friday."}},
Variants: []Variant{{Name: "control"}, {Name: "no-metacognition", Ablations: []string{"metacognition"}}}, Variants: []Variant{{Name: "control"}, {Name: "no-metacognition", Ablations: []string{"metacognition"}}},
}) })
control, ablated := res.Variants[0], res.Variants[1] control, ablated := res.Variants[0], res.Variants[1]
@@ -150,7 +150,7 @@ func TestSelfModelMismatchIsCorrected(t *testing.T) {
sn, _ := h.Snaps.Create(ctx, base, "before", "", "test") sn, _ := h.Snaps.Create(ctx, base, "before", "", "test")
res := run(t, service(h), "self-model", sn.ID, Definition{ res := run(t, service(h), "self-model", sn.ID, Definition{
Protocol: &Protocol{Kind: ProtocolSelfModel, IndependentVariable: "accuracy of the capability self-model", Measures: []string{"self_model.accuracy", "self_model.correction_latency"}}, Protocol: &Protocol{Kind: ProtocolSelfModel, IndependentVariable: "accuracy of the capability self-model", Measures: []string{"self_model.accuracy", "self_model.correction_latency"}},
Stimuli: []Stimulus{{Text: "The maintenance window starts soon."}, {Text: "Still waiting."}, {Text: "Still waiting."}}, Stimuli: []Stimulus{{Text: "The maintenance window starts soon."}, {Text: "Still waiting."}},
Variants: []Variant{{Name: "accurate"}, {Name: "believes-it-may-restart", SelfModel: &SelfModelOverride{Capabilities: []minds.CapabilityEntry{{Name: "service.restart", Policy: "allow"}}}}}, Variants: []Variant{{Name: "accurate"}, {Name: "believes-it-may-restart", SelfModel: &SelfModelOverride{Capabilities: []minds.CapabilityEntry{{Name: "service.restart", Policy: "allow"}}}}},
}) })
wrong := res.Variants[1] wrong := res.Variants[1]