Repository navigation
test: cover profile refusal audit and stored selection - #1447
Conversation
|
Hi @sb123sb123, thank you for picking up #1431 and for a clean, focused PR. It was nice to see you check that the precedence and switching tests assert the audit trail and stored state as well as the refusal text. You also flagged the pre-existing CLI e2e failures up front instead of leaving them for us to find, which helps. You should know about some overlap, and I'm sorry about it. After you opened this PR, maintainer PR #1515 landed and closed #1431. It covered both parts of the issue:
As a result, the
The targeted tests pass with |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Fixes #1431 by adding the two missing refusal-path assertions from the accepted test-gap review:
token_scopeaudit reason.work-fullselection unchanged, using the shared refusal assertion helper while retaining the error-text and base-redaction checks.Validation:
go test ./internal/server -run '^(TestRefusalPrecedence_ProfileV3ExplainerOrder|TestSetProfileV3_ManagementAndSwitchingMatrix)$' -count=1— pass.-race— pass../scripts/test-api-e2e.sh— 67/70 checks pass. Three existing CLI upstream add/list/duplicate/remove checks fail: reproduction showedupstream add -d <data-dir>writes that directory'smcp_config.json, while later CLI invocations load the default config. The test run's tracked config was restored afterward.