Test smoke forwarding without private PromptKit assumptions
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Dependency upgrade and PromptKit smoke review remediation
|
||||
|
||||
Status: in progress; R-1 complete; R-2 through R-4 remain open.
|
||||
Status: in progress; R-1 and R-2 complete; R-3 and R-4 remain open.
|
||||
|
||||
## Review scope and evidence
|
||||
|
||||
@@ -80,7 +80,7 @@ Go 1.26.8 and offline dependency resolution.
|
||||
|
||||
## R-2: Remove assertions about PromptKit's private smoke-test execution
|
||||
|
||||
Status: open. Priority: P3. Category: upstream testing ownership.
|
||||
Status: complete. Priority: P3. Category: upstream testing ownership.
|
||||
|
||||
**Location:** [adapters_test.go](../../integrations/ckprompt/adapters_test.go),
|
||||
`TestWithSmokeTestingForwardsAuthoritativeNativeRequestAndRetainsReport`,
|
||||
@@ -116,6 +116,15 @@ Assertions still detect request remerging, wrong forwarding, or dropped results,
|
||||
without inspecting the native private diagnostic message inventory or fixing
|
||||
the generation sequence. No production-code change is required.
|
||||
|
||||
**Completed:** 2026-10-18. Removed the private diagnostic message-count
|
||||
assertion and changed native generation-count checks to require only that the
|
||||
configured client was used. Request/model/credential forwarding, authoritative
|
||||
builder output, report/error handling, context/input/state checks, and the
|
||||
builder-failure guard against loading remain covered. Focused
|
||||
`TestWithSmokeTesting` tests and the complete ckprompt suite, including the
|
||||
composed consumer, passed with Go 1.26.8 and offline dependency resolution.
|
||||
Production code is unchanged.
|
||||
|
||||
## R-3: Remove incidental loader-count and pointer-identity contracts
|
||||
|
||||
Status: open. Priority: P3. Category: unnecessary implementation constraints.
|
||||
|
||||
@@ -164,7 +164,7 @@ func TestWithSmokeTestingForwardsAuthoritativeNativeRequestAndRetainsReport(t *t
|
||||
if err != nil || acquired.Value == nil || len(acquired.Diagnostics) != 0 || loaderCalls != 1 || builderCalls != 1 {
|
||||
t.Fatalf("smoke acquisition = (%#v, %v), loaders/builders=%d/%d", acquired, err, loaderCalls, builderCalls)
|
||||
}
|
||||
if acquired.Value.Kind != promptkit.SmokeTestTextInference || client.calls != 1 || client.request.Target.Model != "builder-model" || client.request.APIKey != "builder credential" {
|
||||
if acquired.Value.Kind != promptkit.SmokeTestTextInference || client.calls == 0 || client.request.Target.Model != "builder-model" || client.request.APIKey != "builder credential" {
|
||||
t.Fatalf("native smoke request/report = request %#v report %#v calls=%d", client.request, acquired.Value, client.calls)
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ func TestWithSmokeTestingNilBuilderForwardsSeedAndBuilderFailureSkipsLoader(t *t
|
||||
return engine, nil
|
||||
}, nil)
|
||||
acquired, err := suite.SmokeTest(context.Background(), SmokeRequest{Request: seed}, struct{}{}, struct{}{})
|
||||
if err != nil || acquired.Value == nil || client.calls != 1 || client.request.APIKey != "seed credential" || len(client.request.Prompt.Messages) != 1 {
|
||||
if err != nil || acquired.Value == nil || client.calls == 0 || client.request.APIKey != "seed credential" {
|
||||
t.Fatalf("nil-builder smoke request = (%#v, %v), client=%#v", acquired, err, client)
|
||||
}
|
||||
acquired, err = suite.SmokeTest(context.Background(), SmokeRequest{Request: promptkit.SmokeTestRequest{Kind: promptkit.SmokeTestKind("unknown")}}, struct{}{}, struct{}{})
|
||||
|
||||
Reference in New Issue
Block a user