From 94c352dbd69d9eadf009749465a629e33d1050d9 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Sun, 18 Oct 2026 13:29:13 +0000 Subject: [PATCH] Test smoke forwarding without private PromptKit assumptions --- docs/roadmap/remediation.md | 13 +++++++++++-- integrations/ckprompt/adapters_test.go | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/roadmap/remediation.md b/docs/roadmap/remediation.md index 85bfe98..907668b 100644 --- a/docs/roadmap/remediation.md +++ b/docs/roadmap/remediation.md @@ -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. diff --git a/integrations/ckprompt/adapters_test.go b/integrations/ckprompt/adapters_test.go index a1a4795..988707f 100644 --- a/integrations/ckprompt/adapters_test.go +++ b/integrations/ckprompt/adapters_test.go @@ -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{}{})