From b7467c59faf881d58f0623119737542ec04470e4 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Sun, 22 Nov 2026 21:07:34 +0000 Subject: [PATCH] Verify native vLLM authentication findings --- docs/roadmap/implementation.md | 4 ++- integrations/ckprompt/vllm_evidence_test.go | 40 +++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 integrations/ckprompt/vllm_evidence_test.go diff --git a/docs/roadmap/implementation.md b/docs/roadmap/implementation.md index f94fdda..8212d9b 100644 --- a/docs/roadmap/implementation.md +++ b/docs/roadmap/implementation.md @@ -265,7 +265,9 @@ part of this work. ## Stage 5: Adopt PromptKit v0.25.0 and preserve existing report evidence **Complete.** Selected the published module and checked its license notice; -ckprompt forwards provider and explicit false zero-cost inspection data. Smoke +ckprompt forwards provider and explicit false zero-cost inspection data. An +offline native vLLM authentication fixture confirms supported, applicable, and +accepted-credential findings reach the command report. Smoke projection/render tests cover reasoning, absent and zero ratios, percentages, and retained single/aggregate evidence in text, YAML, and JSON. The affected Go 1.27.4 workspace suite passes. diff --git a/integrations/ckprompt/vllm_evidence_test.go b/integrations/ckprompt/vllm_evidence_test.go new file mode 100644 index 0000000..756ae61 --- /dev/null +++ b/integrations/ckprompt/vllm_evidence_test.go @@ -0,0 +1,40 @@ +package ckprompt + +import ( + "bytes" + "context" + "io" + "net/http" + "strings" + "testing" + + "go.maximumdirect.net/ckconfig" + commandkit "go.maximumdirect.net/commandkit" + "go.maximumdirect.net/configkit" + promptkit "go.maximumdirect.net/promptkit" +) + +type smokeTransport func(*http.Request) (*http.Response, error) + +func (f smokeTransport) RoundTrip(r *http.Request) (*http.Response, error) { return f(r) } + +func TestVLLMAuthenticationEvidenceFlowsThroughCommand(t *testing.T) { + source := configkit.Input{Destination: configkit.Keys("promptkit"), Source: configkit.Mapping("fixture", map[string]any{"backends": []any{map[string]any{"id": "local", "provider": "vllm", "endpoint": "https://example.invalid/v1", "zero_cost": false}}})} + client := &http.Client{Transport: smokeTransport(func(r *http.Request) (*http.Response, error) { + return &http.Response{StatusCode: 200, Header: make(http.Header), Body: io.NopCloser(strings.NewReader(`{"object":"list","data":[]}`)), Request: r}, nil + })} + engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Main: &source}, HTTPClient: client}, promptkit.WithBundledOpenRouter(false)) + if err != nil { + t.Fatal(err) + } + loader := func(context.Context, ckconfig.Selection, struct{}, struct{}) (*promptkit.Engine, error) { + return engine, nil + } + suite := WithSmokeTesting(FromEngine(loader), loader, nil) + app := newPromptTestApp(t, Command(suite)) + var out bytes.Buffer + result := app.Execute(context.Background(), []string{"promptkit", "test", "authentication", "--llm-backend=local", "--format=json"}, commandkit.Streams{Out: &out}) + if result.Status != 0 || !strings.Contains(out.String(), `"supported": true`) || !strings.Contains(out.String(), `"applicable": true`) || !strings.Contains(out.String(), `"credentials_accepted": true`) { + t.Fatalf("outcome=%#v report=%s", result, out.String()) + } +}