feat(support): verify the manual assessment request after a C3 refusal

This commit is contained in:
shira committed 2026-10-08 21:26:00 +03:00
1 parent 6bfd7098c3
commit 68286af8b7
20 files changed
+680 -74

No files matched your search

+4
View File
@@ -64,6 +64,10 @@ Creation requires an explicit support section in the effective product policy. `
The account-wide rolling request limit is checked under a database lock before idempotent replay. Valid retries consume that request budget and return the original creation response during the 24-hour window. A 429 response includes `Retry-After`. GET and list show the current status, public history, and current overdue flag. Migration `00025_create_support_cases.sql` stores immutable events and replay results; rollback removes these records and is destructive.
The manual assessment rules live in `internal/usecase/supportcase/manual_assessment.go`: the request neither reads nor changes consent, creates no attempt, and writes no grade or category, and a prior attempt is optional and may have failed.
`TestManualAssessmentRequestAfterC3Refusal` goes through the real router: granting and revoking C3, a request before the first test with a pinned rubric, a request without a published rubric (`rubric_version` is `null`), and requests after a failed and after a confirmed attempt. The test compares the consent ledger and events, attempts, and immutable results before and after the request, and checks that a repeat with a new key leaves one open case.
`TestSupportCasesOverHTTP` covers real sessions, owner isolation, typed-reference checks, replay, manual assessment without C3, and request limits. `TestSupportCaseRequestBudgetSerializesTimestampWithOwnerLock` checks concurrent requests and clock ordering. Expert processing and references to not-yet-implemented invitations or anti-cheat reviews remain unavailable.
## Candidate questionnaire