Update internal execution fixtures for identified resources

This commit is contained in:
2026-11-02 12:51:26 +00:00
parent 6b8eefd18b
commit 3e67743fbf
4 changed files with 33 additions and 21 deletions

View File

@@ -727,6 +727,10 @@ internal observation fixtures affected by resource lists or removed labels.
Validation: run the affected internal packages with final values and synthetic Validation: run the affected internal packages with final values and synthetic
sources. Resolve remaining label-related compilation errors in these packages. sources. Resolve remaining label-related compilation errors in these packages.
Completion: internal smoke-selection and execution fixtures now use identified
resource lists, preserving their configured routing and diagnostic behavior.
The use-case, prompt, domain, and observation package suites passed on Go 1.27.0.
## Stage 17: Migrate Public Preparation And Execution Contracts ## Stage 17: Migrate Public Preparation And Execution Contracts
Scope: root ordinary/prepared execution, concrete-request validation, Scope: root ordinary/prepared execution, concrete-request validation,

View File

@@ -76,10 +76,10 @@ func TestSmokeTesterRunsPrivateInferenceCasesThroughInjectedCoordinator(t *testi
func TestSmokeTesterConcludesMissingRequiredCredentialWithoutDispatch(t *testing.T) { func TestSmokeTesterConcludesMissingRequiredCredentialWithoutDispatch(t *testing.T) {
values := smokeSelectionConfig() values := smokeSelectionConfig()
profiles := values["profiles"].(map[string]any) profiles := values["profiles"].([]any)
profiles["required-profile"] = map[string]any{ values["profiles"] = append(profiles, map[string]any{"id": "required-profile",
"backend": "alpha", "model": "required-model", "api_key_required": true, "backend": "alpha", "model": "required-model", "api_key_required": true,
} })
runner := smokeTesterRunner(t, values) runner := smokeTesterRunner(t, values)
admitter := &smokeAdmissionSpy{} admitter := &smokeAdmissionSpy{}
runner.admitter = admitter runner.admitter = admitter

View File

@@ -318,8 +318,8 @@ func newSmokeSelectionRunner(t *testing.T) (*Runner, *selectionTestCollaborators
func smokeSelectionConfig() map[string]any { func smokeSelectionConfig() map[string]any {
return map[string]any{ return map[string]any{
"backends": map[string]any{ "backends": []any{
"alpha": map[string]any{ map[string]any{"id": "alpha",
"endpoint": "https://alpha.example/v1", "endpoint": "https://alpha.example/v1",
"smoke_tests": map[string]any{ "smoke_tests": map[string]any{
"default_profile": "cross-backend-profile", "default_profile": "cross-backend-profile",
@@ -327,29 +327,28 @@ func smokeSelectionConfig() map[string]any {
"authentication": map[string]any{"kind": "openrouter_key"}, "authentication": map[string]any{"kind": "openrouter_key"},
}, },
}, },
"beta": map[string]any{ map[string]any{"id": "beta",
"endpoint": "https://beta.example/v1", "endpoint": "https://beta.example/v1",
"smoke_tests": map[string]any{"authentication": map[string]any{"kind": "openrouter_key"}}, "smoke_tests": map[string]any{"authentication": map[string]any{"kind": "openrouter_key"}},
}, },
"delta": map[string]any{ map[string]any{"id": "delta",
"endpoint": "https://delta.example/v1", "endpoint": "https://delta.example/v1",
"smoke_tests": map[string]any{"default_profile": "not-yet-defined"}, "smoke_tests": map[string]any{"default_profile": "not-yet-defined"},
}, },
"epsilon": map[string]any{ map[string]any{"id": "epsilon",
"endpoint": "https://epsilon.example/v1", "endpoint": "https://epsilon.example/v1",
"smoke_tests": map[string]any{"default_profile": "endpoint-profile"}, "smoke_tests": map[string]any{"default_profile": "endpoint-profile"},
}, },
}, },
"profiles": map[string]any{ "profiles": []any{
"alpha-profile": map[string]any{"backend": "alpha", "model": "alpha-model"}, map[string]any{"id": "alpha-profile", "backend": "alpha", "model": "alpha-model"},
"prompt-profile": map[string]any{"backend": "beta", "model": "prompt-model"}, map[string]any{"id": "prompt-profile", "backend": "beta", "model": "prompt-model"},
"cross-backend-profile": map[string]any{"backend": "beta", "model": "cross-model"}, map[string]any{"id": "cross-backend-profile", "backend": "beta", "model": "cross-model"},
"endpoint-profile": map[string]any{"endpoint": "https://endpoint-only.example/v1", "model": "endpoint-model"}, map[string]any{"id": "endpoint-profile", "endpoint": "https://endpoint-only.example/v1", "model": "endpoint-model"},
"incomplete-profile": map[string]any{"backend": "alpha"}, map[string]any{"id": "incomplete-profile", "backend": "alpha"},
}, },
"prompts": map[string]any{ "prompts": []any{
"selection.prompt": map[string]any{ map[string]any{"id": "selection.prompt",
"version": "v1",
"default_profile": "prompt-profile", "default_profile": "prompt-profile",
"inputs": []any{map[string]any{"name": "required_input", "required": true}}, "inputs": []any{map[string]any{"name": "required_input", "required": true}},
"messages": []any{map[string]any{"role": "user", "content": "Hello {{.required_input}}"}}, "messages": []any{map[string]any{"role": "user", "content": "Hello {{.required_input}}"}},
@@ -358,8 +357,7 @@ func smokeSelectionConfig() map[string]any {
"format": "json", "validation_mode": "json_schema", "schema_path": "not-read.json", "format": "json", "validation_mode": "json_schema", "schema_path": "not-read.json",
}, },
}, },
"backend.prompt": map[string]any{ map[string]any{"id": "backend.prompt",
"version": "v1",
"messages": []any{map[string]any{"role": "user", "content": "Hello"}}, "messages": []any{map[string]any{"role": "user", "content": "Hello"}},
"output": map[string]any{ "output": map[string]any{
"format": "json", "validation_mode": "json_schema", "schema_path": "not-read.json", "format": "json", "validation_mode": "json_schema", "schema_path": "not-read.json",
@@ -368,3 +366,13 @@ func smokeSelectionConfig() map[string]any {
}, },
} }
} }
func smokeSelectionBackend(values map[string]any, id string) map[string]any {
for _, item := range values["backends"].([]any) {
backend := item.(map[string]any)
if backend["id"] == id {
return backend
}
}
return nil
}

View File

@@ -19,7 +19,7 @@ import (
func TestSmokeTesterAssemblesReachabilityReportWithoutGenerationAdmission(t *testing.T) { func TestSmokeTesterAssemblesReachabilityReportWithoutGenerationAdmission(t *testing.T) {
values := smokeSelectionConfig() values := smokeSelectionConfig()
alpha := values["backends"].(map[string]any)["alpha"].(map[string]any) alpha := smokeSelectionBackend(values, "alpha")
alphaSmoke := alpha["smoke_tests"].(map[string]any) alphaSmoke := alpha["smoke_tests"].(map[string]any)
alphaReachability := alphaSmoke["reachability"].(map[string]any) alphaReachability := alphaSmoke["reachability"].(map[string]any)
alphaReachability["endpoint"] = "https://operator:private@example.invalid/health?check=1" alphaReachability["endpoint"] = "https://operator:private@example.invalid/health?check=1"
@@ -166,7 +166,7 @@ func TestSmokeTesterReportsUnsupportedAndInapplicableAuthentication(t *testing.T
t.Run(tc.name, func(t *testing.T) { t.Run(tc.name, func(t *testing.T) {
values := smokeSelectionConfig() values := smokeSelectionConfig()
if tc.configureNone { if tc.configureNone {
backend := values["backends"].(map[string]any)[tc.backend].(map[string]any) backend := smokeSelectionBackend(values, tc.backend)
backend["smoke_tests"].(map[string]any)["authentication"] = map[string]any{"kind": "none"} backend["smoke_tests"].(map[string]any)["authentication"] = map[string]any{"kind": "none"}
} }
runner := smokeTesterRunner(t, values) runner := smokeTesterRunner(t, values)