fix(#6204): use PER_REPO_WIF_REPOS=* for GCP public mint mode - #6377
Conversation
GCP public mint deploy was setting ALLOWED_ORGS=* to indicate public mode, contradicting ADR-0078 which defines public mode as PER_REPO_WIF_REPOS=*. The Cloudflare deploy path already used the correct semantics; only the GCP provisioner and CLI messaging were using the legacy ALLOWED_ORGS=* path. Changes: - provisioner.go: isTrafficMintPublic now checks PER_REPO_WIF_REPOS via new isPublicMintEnv helper instead of ALLOWED_ORGS - provisioner.go: ensureWIFPoolAndProvider uses PlaceholderOrg (not "*") for ALLOWED_ORGS in public mode; provisionSelfManaged adds PER_REPO_WIF_REPOS=* to deploy env vars when PublicMint is true - provisioner.go: all public-mode guards (EnsureOrgInMint, RegisterPerRepoWIF, RemoveOrgFromMint, validateMintDeployMode) updated to check PER_REPO_WIF_REPOS - mint.go: isPublicMintAllowedOrgs replaced with isPublicMintRepos checking PER_REPO_WIF_REPOS; all CLI messages updated - Tests updated to set PER_REPO_WIF_REPOS=* in public-mode fakes Closes #6204
|
🤖 Finished Review · ✅ Success · Started 10:34 AM UTC · Completed 10:54 AM UTC Commit: |
ReviewFindingsLow
Previous runReviewFindingsHigh
Medium
Low
Labels: PR modifies mint provisioner and CLI mint commands Next steps:
Previous run (2)ReviewFindingsHigh
Medium
Low
Next steps:
|
|
🤖 Finished Fix · ✅ Success · Started 10:55 AM UTC · Completed 11:02 AM UTC Commit: |
TestVerifyEnrollment_PublicMode only set ALLOWED_ORGS=* in its fake env vars but verifyEnrollment now checks PER_REPO_WIF_REPOS via isPublicMintRepos. Add PER_REPO_WIF_REPOS=* so the test correctly exercises the public-mode code path. Addresses review feedback on #6377
🔧 Fix agent — iteration 1 (bot-triggered)Fixed 1 high-severity finding: TestVerifyEnrollment_PublicMode was missing PER_REPO_WIF_REPOS=* in its fake env vars, causing the test to fail after the production code switched to checking PER_REPO_WIF_REPOS. Disagreed with 6 low-severity findings as either informational (no action needed) or out-of-scope refactoring suggestions. Fixed (1):
Disagreed (6):
Tests: passedNext steps:
|
|
🤖 Review · ❌ Terminated · Started 11:04 AM UTC · Ended 11:21 AM UTC Commit: |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
🤖 Finished Review · ✅ Success · Started 11:04 AM UTC · Completed 11:21 AM UTC Commit: |
|
🤖 Finished Fix · ✅ Success · Started 11:23 AM UTC · Completed 11:29 AM UTC Commit: |
Update all documentation references from ALLOWED_ORGS=* to PER_REPO_WIF_REPOS=* for GCP public mint mode, matching the code changes in this PR (ADR-0078). Affected files: - docs/cli/mint.md: public mode description and flag table - docs/guides/infrastructure/mint-administration.md: deployment section, flag table, public mode section, rollback guidance - docs/guides/infrastructure/infrastructure-reference.md: GCF STS section and multi-org support section Addresses review feedback on #6377
🔧 Fix agent — iteration 2 (bot-triggered)Updated 7 stale documentation references from ALLOWED_ORGS=* to PER_REPO_WIF_REPOS=* across docs/cli/mint.md, docs/guides/infrastructure/mint-administration.md, and docs/guides/infrastructure/infrastructure-reference.md. Disagreed with 2 low-severity findings (implementation-deviation and helper-function-pattern) as out of scope for this PR. Fixed (7):
Disagreed (2):
Tests: passedNext steps:
|
|
🤖 Review · ❌ Terminated · Started 11:31 AM UTC · Ended 11:45 AM UTC Commit: |
Site previewPreview: https://2a16dd66-site.fullsend-ai.workers.dev Commit: |
Superseded by updated review
|
🤖 Finished Review · ✅ Success · Started 11:31 AM UTC · Completed 11:45 AM UTC Commit: |
|
🤖 Finished Retro · ❌ Failure · Started 12:55 PM UTC · Completed 12:55 PM UTC Commit: |
Merge origin/main to incorporate recent changes including: - PER_REPO_WIF_REPOS=* for GCP public mint mode (PR #6377) - Base dispatch e2e tests (PR #6367) - CEL trigger jira-poll (PR #6340) - Other main-branch updates Resolved conflict in docs/cli/mint.md: adopted main's updated --public flag description (PER_REPO_WIF_REPOS=* replaces ALLOWED_ORGS=* for GCP) while preserving the new --status-auth, --status-github-group, and --status-github-client-id flags from this PR. Addresses review feedback on #6365
Summary
GCP
--publicmint deploy was settingALLOWED_ORGS=*to indicate public mode, contradicting ADR-0078 which defines public mode viaPER_REPO_WIF_REPOS=*. This caused deployed GCP mints to require manual env var correction. The Cloudflare deploy path already implemented the correct semantics.Changes
internal/dispatch/gcf/provisioner.go: Public-mode detection (isTrafficMintPublic) now checksPER_REPO_WIF_REPOSvia a newisPublicMintEnvhelper. Deploy env vars setPER_REPO_WIF_REPOS=*(and placeholderALLOWED_ORGS) for public mode. All public-mode guards (EnsureOrgInMint,RegisterPerRepoWIF,RemoveOrgFromMint,validateMintDeployMode) updated.internal/cli/mint.go: ReplacedisPublicMintAllowedOrgswithisPublicMintReposcheckingPER_REPO_WIF_REPOS. Updated all CLI messages, dry-run text, deploy summary, and flag help to referencePER_REPO_WIF_REPOS=*.PER_REPO_WIF_REPOS=*instead ofALLOWED_ORGS=*. First-deploy test now assertsPER_REPO_WIF_REPOS=*andALLOWED_ORGS=PlaceholderOrg.Testing
go test ./internal/dispatch/gcf/...— all passgo test ./internal/cli/...— mint tests pass (2 pre-existing failures in unrelatedrun_test.go)isPublicMintEnv100%,isPublicMintRepos100%,provisionSelfManaged80.3%Closes #6204
Post-script verification
agent/6204-gcp-public-per-repo-wif)a7ef381e50b0eb77d3fbedecc9ce88b510642dd0..HEAD)