Revoke and restore install codes from the operator page #158
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 280 lines diff across 3 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.337
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #158"
general
weight: 0.35
ethanteng
Adds Revoke and Restore buttons for install codes on the operator page (backup.uncloud.life/admin, Install codes tab). Follows #157.
What changed
- Migration
007_install_code_revokedaddsrevoked_at.-
PATCH /api/operator/install-codes {id, revoked}revokes or restores a code (operator only). Revoking a code twice keeps the first revocation date.- The ledger's
usedendpoint now answers{recorded, revoked}. A revoked code isn't counted as a use./api/install-codereads that answer and returns{valid: false}for a revoked code.Behaviour to know
Testing
node --test "api/*.test.js": 72 pass. Adds: revoked →valid: false; missing, odd or failed ledger answers →valid: true.services/backuptests: 70 pass. Adds: revoke/restore, uses not counted while revoked, purchase codes revocable, input validation, 404 for an unknown id, operator-onlyPATCH, and an end-to-end case where the website's realhandle()turns a revoked code down and accepts it again once restored.scripts/check.sh: passes in full (including the 536 .NET tests).PATCHbody, re-rendered rows, summary).---
_Generated by Claude Code_