feat(mint): add add-role and remove-role CLI commands - #2370
Conversation
Let operators register or remove individual mint roles after deploy, supporting PEM upload, existing Secret Manager secrets, or browser app creation, and document the workflow in mint-administration. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Site previewPreview: https://27c88a24-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 6:45 AM UTC · Completed 7:00 AM UTC |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Info
Previous runReviewFindingsLow
Info
Previous run (2)ReviewFindingsLow
Info
Previous run (3)ReviewFindingsMedium
Low
Info
Previous run (4)ReviewFindingsHigh
Medium
Low
Info
Previous run (5)ReviewFindingsMedium
Low
Previous run (6)ReviewFindingsMedium
Low
Previous run (7)ReviewFindingsHigh
Medium
Low
Info
|
Guard browser dry-run from creating apps, read ROLE_APP_IDS from the traffic-serving revision for role checks, and update related docs/tests. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review · |
Exercise success paths for PEM upload, existing-secret registration, role removal, and traffic env-var parsing edge cases. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review · |
Raise patch coverage for provisioner role ops and CLI validation edge cases required by codecov. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 8:53 AM UTC · Completed 9:08 AM UTC |
Add test hooks for browser-based add-role flow and expand unit tests for error paths, force overwrite, and provisioner revision failures. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 9:12 AM UTC · Completed 9:24 AM UTC |
Delete PEM secrets before updating mint env vars so a failed deletion does not leave an orphaned secret. Revert protected-path skill edit and document add-role/remove-role in infrastructure-reference. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 10:38 AM UTC · Completed 10:51 AM UTC |
waynesun09
left a comment
There was a problem hiding this comment.
Review Squad — 9 agents (3x Claude, 2x Gemini, 2x Codex, 2x Claude-researcher)
4 new inline findings (all MEDIUM) after deduplication against existing review comments. The 5 findings already posted by fullsend-ai-review[bot] and ralphbean are not duplicated here.
Existing comments already cover: TOCTOU/data-consistency (line 472), non-atomic remove-role (line 418), race condition (provisioner.go:271), mintTrafficRoleAppIDs fallback (lines 471, 493), browser dry-run (line 486), slug validation (line 327).
Overall: well-structured feature with thorough tests (~780 new lines) and documentation. No blocking correctness or security issues on the happy path.
Improve error messages, add app slug validation, PEM orphan remediation on AddRoleToMint failure, existing-secret PEM verification warning, and secretmanager.viewer IAM docs for --use-existing-pem-secret. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 3:53 PM UTC · Completed 4:07 PM UTC |
waynesun09
left a comment
There was a problem hiding this comment.
All review findings resolved — dry-run guards, traffic env var consistency, slug validation, PEM verification warnings, IAM docs, and failure remediation messages all addressed. CI green, tests comprehensive. LGTM.
|
🤖 Finished Retro · ✅ Success · Started 12:06 AM UTC · Completed 12:15 AM UTC |
Retro: PR #2370 —
|
Summary
fullsend mint add-rolewith three input modes:--slug+--pem,--slug+--use-existing-pem-secret, or--org(browser manifest flow)fullsend mint remove-roleto pruneROLE_APP_IDS/ALLOWED_ROLESand delete PEM secrets by default (--keep-pemto retain)AddRoleToMint,RemoveRoleFromMint, andDeleteAgentPEMdocs/guides/infrastructure/mint-administration.mdTest plan
go test ./internal/dispatch/gcf/... ./internal/cli/...fullsend mint add-role coder --project=... --slug=... --pem=... --dry-runfullsend mint remove-role <role> --project=... --dry-runMade with Cursor