Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions pkgs/mcpx/internal/e2e/effect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ var implementedEffectProbes = map[string]string{
"protoTasks.maxPerRequestor": "TestProtoTasksMaxPerRequestorCapsUnfinishedTasksFromTheEnvironment",
"protoTasks.perMinute": "TestProtoTasksPerMinuteWindowsTaskReadsFromTheEnvironment",
"events.history": "TestEventsHistoryBoundsTheReplay",
"upstream.probeTimeout": "TestUpstreamProbeTimeoutBoundsTheDiscoverWaitFromTheEnvironment",
"upstream.eraCache": "TestTheEraIsProbedOnceAndRememberedAcrossDaemonRestarts",
"upstream.protocol": "TestTheEraIsProbedOnceAndRememberedAcrossDaemonRestarts",
"prompt.autonomy": "TestPromptAutonomyRunsTheMatchedRecipeFromTheEnvironment",
"hooks.autonomy": "TestHooksAutonomySkipsAConfiguredHookFromTheEnvironment",
"repair.autonomy": "TestRepairAutonomyOffDropsTheDiagnosticsFromTheEnvironment",
Expand Down Expand Up @@ -262,6 +265,8 @@ var effectProbeFuncs = map[string]func(*testing.T){
"TestProtoTasksMaxPerRequestorCapsUnfinishedTasksFromTheEnvironment": TestProtoTasksMaxPerRequestorCapsUnfinishedTasksFromTheEnvironment,
"TestProtoTasksPerMinuteWindowsTaskReadsFromTheEnvironment": TestProtoTasksPerMinuteWindowsTaskReadsFromTheEnvironment,
"TestEventsHistoryBoundsTheReplay": TestEventsHistoryBoundsTheReplay,
"TestUpstreamProbeTimeoutBoundsTheDiscoverWaitFromTheEnvironment": TestUpstreamProbeTimeoutBoundsTheDiscoverWaitFromTheEnvironment,
"TestTheEraIsProbedOnceAndRememberedAcrossDaemonRestarts": TestTheEraIsProbedOnceAndRememberedAcrossDaemonRestarts,
"TestPromptAutonomyRunsTheMatchedRecipeFromTheEnvironment": TestPromptAutonomyRunsTheMatchedRecipeFromTheEnvironment,
"TestHooksAutonomySkipsAConfiguredHookFromTheEnvironment": TestHooksAutonomySkipsAConfiguredHookFromTheEnvironment,
"TestRepairAutonomyOffDropsTheDiagnosticsFromTheEnvironment": TestRepairAutonomyOffDropsTheDiagnosticsFromTheEnvironment,
Expand Down Expand Up @@ -3190,6 +3195,26 @@ func TestRepairAutonomyOffDropsTheDiagnosticsFromTheEnvironment(t *testing.T) {
}
}

// TestUpstreamProbeTimeoutBoundsTheDiscoverWaitFromTheEnvironment is the
// effect probe for upstream.probeTimeout. The era server in legacy-silent
// mode never answers server/discover, so a start waits out the probe
// bound before falling back to initialize. With a 300ms bound the call
// is answered inside a 2s start bound; with a one-hour bound the probe
// is still waiting when the start bound expires, and the call fails.
func TestUpstreamProbeTimeoutBoundsTheDiscoverWaitFromTheEnvironment(t *testing.T) {
call := func(probe string) (string, error) {
e, _ := eraEnv(t, "legacy-silent", "",
"MCPX_POOL_START_TIMEOUT=2s", "MCPX_UPSTREAM_PROBE_TIMEOUT="+probe)
return e.try("call", "era.hello", "{}")
}
if out, err := call("300ms"); err != nil || !strings.Contains(out, "hello from legacy-silent") {
t.Fatalf("oracle: a 300ms probe bound should fall back to initialize in time (err %v):\n%s", err, out)
}
if out, err := call("1h"); err == nil {
t.Fatalf("with upstream.probeTimeout=1h the start should run out before the probe gives up; got:\n%s", out)
}
}

// TestDaemonAddressIsReachableFromTheEnvironment is the effect probe
// for daemon.address (#8468 chain 1). The exemption it replaced said
// a bind address is a network identity the harness cannot vary
Expand Down
3 changes: 0 additions & 3 deletions pkgs/mcpx/internal/e2e/feature_coverage_exemptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,3 @@ setting retention.stickyWindow no integration-test exercise yet; burn-down #8470
setting sampling.answerLocally no integration-test exercise yet; burn-down #8470 (settings long-tail families); needs an EffectProbes entry + e2e test
setting search.semantic no integration-test exercise yet; burn-down #8470 (settings long-tail families); needs an EffectProbes entry + e2e test
setting session.releaseTimeout no integration-test exercise yet; burn-down #8470 (settings long-tail families); needs an EffectProbes entry + e2e test
setting upstream.eraCache no integration-test exercise yet; burn-down #8470 (settings long-tail families); needs an EffectProbes entry + e2e test
setting upstream.probeTimeout no integration-test exercise yet; burn-down #8470 (settings long-tail families); needs an EffectProbes entry + e2e test
setting upstream.protocol no integration-test exercise yet; burn-down #8470 (settings long-tail families); needs an EffectProbes entry + e2e test
Loading