fix(#2163): skip PEM prompt in github setup when using mint URL#2164
Conversation
When `github setup` runs against an org where apps are already installed, it calls `runAppSetup` with an empty `mintProject`. Without a project, no GCF provisioner is created and the fallback `secretExists` callback checks GitHub repo secrets — which don't exist in OIDC mint mode (PEMs live in Secret Manager). The check returns false, triggering `handleExistingApp` → `recoverPEM` → an interactive PEM prompt. Add a `mintURL` parameter to `runAppSetup`. When `mintURL` is non-empty but `mintProject` is empty (the github-setup flow), skip setting `secretExists` and `storeSecret` callbacks entirely. This lets `handleExistingApp` take the "no secretExists — assume reuse" path, silently reusing apps without prompting. Also skip `storeSecret` in the same condition since PEM storage is handled by the remote mint — the local CLI has no project to write to. Note: go test and pre-commit could not run due to sandbox Go module cache permission errors (infrastructure issue, not code). `go vet ./internal/cli/...` and `go vet ./internal/appsetup/...` both pass cleanly. Closes #2163
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
Site previewPreview: https://0fb2ad4b-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 10:37 AM UTC · Completed 10:47 AM UTC |
ReviewFindingsMedium
Low
Info
|
|
🤖 Finished Retro · ✅ Success · Started 6:39 AM UTC · Completed 6:51 AM UTC |
Retro: PR #2164 — Skip PEM prompt in github setup when using mint URLTimeline
AssessmentThis workflow went well overall. Issue-to-PR in ~18 minutes, single iteration, no rework. The triage agent produced an accurate root cause analysis that guided the code agent effectively. The code agent made a reasonable engineering decision to diverge from the triage recommendation (skipping callbacks vs passing mintProject through), producing a simpler solution. The review agent caught a legitimate medium-severity edge case: PEM loss when Gaps identified — all already trackedAll improvement opportunities I identified are covered by existing open issues:
No new proposals filed — existing issues adequately cover the improvement opportunities. |
When
github setupruns against an org where apps are already installed, it callsrunAppSetupwith an emptymintProject. Without a project, no GCF provisioner is created and the fallbacksecretExistscallback checks GitHub repo secrets — which don't exist in OIDC mint mode (PEMs live in Secret Manager). The check returns false, triggeringhandleExistingApp→recoverPEM→ an interactive PEM prompt.Add a
mintURLparameter torunAppSetup. WhenmintURLis non-empty butmintProjectis empty (the github-setup flow), skip settingsecretExistsandstoreSecretcallbacks entirely. This letshandleExistingApptake the "no secretExists — assume reuse" path, silently reusing apps without prompting.Also skip
storeSecretin the same condition since PEM storage is handled by the remote mint — the local CLI has no project to write to.Note: go test and pre-commit could not run due to sandbox Go module cache permission errors (infrastructure issue, not code).
go vet ./internal/cli/...andgo vet ./internal/appsetup/...both pass cleanly.Closes #2163
Post-script verification
agent/2163-github-setup-skip-pem-prompt)a80d472194cc922471bcd1c2fba27ce5ddf9141b..HEAD)