test: add e2e tests for prompts functionality #306
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 227 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.325
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #306"
general
weight: 0.35
inFocus7
Description
Add comprehensive e2e tests for the prompts functionality, covering the full prompt lifecycle and edge cases.
Closes #233
New test cases added:
TestPromptMultipleVersions- publish v1 and v2, verify both via API, check latest resolution, list all versions, delete v1 and confirm v2 survivesTestPromptContentIntegrity- round-trip publish/retrieve verifying exact content and description matchTestPromptShowNonExistent- show a prompt that doesn't existTestPromptDeleteNonExistent- delete a prompt that doesn't exist (expects failure)TestPromptAPINotFound- direct API 404 checks for nonexistent prompts and nonexistent versions of existing promptsTestPromptPublishYAMLWithFlagOverrides- verify CLI flags (--name, --description) override YAML valuesTestPromptDryRunDoesNotCreate- verify --dry-run does not persist the prompt (API returns 404 after)TestPromptListOutputJSON- verify --output json produces valid JSONTestPromptDeleteThenShowReturnsNotFound- publish, delete, then verify 404 via APITestPromptPublishValidation/directory_instead_of_file- pass a directory path instead of fileExisting tests preserved unchanged:
TestPromptPublishListShowDelete(full lifecycle)TestPromptPublishYAMLTestPromptPublishDryRunTestPromptPublishValidation(missing_name, missing_version, nonexistent_file)TestPromptDeleteValidation(missing_version_flag)Change Type
/kind feature
Changelog
``
release-note
`Add comprehensive e2e tests for prompts: multi-version workflows, API verification, content integrity, error cases, and edge cases.
Additional Notes
All new tests follow existing e2e patterns (build tag, helper functions, unique names, cleanup). Verified compilation with go vet -tags e2e ./e2e/...`.