fix(#6257): remove credential mode model, make inference secrets unconditional - #6258
fix(#6257): remove credential mode model, make inference secrets unconditional#6258fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
|
🤖 Finished Review · ✅ Success · Started 12:57 PM UTC · Completed 1:13 PM UTC Commit: |
Site previewPreview: https://792f110d-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsHigh
Medium
Low
Labels: PR modifies repos install/manifest subsystem and scaffold templates with mint mode changes Next steps:
Previous runReviewFindingsMedium
Low
Previous run (2)ReviewFindingsLow
Previous run (3)ReviewFindingsLow
Labels: PR modifies repos install/manifest subsystem, updates documentation, and fixes a bug in inference secret provisioning Previous run (4)ReviewFindingsCritical
Medium
Low
Next steps:
|
|
All review findings have been addressed in the squashed commit: Critical
Medium
Low
|
af21633 to
a666a40
Compare
|
🤖 Review · ❌ Terminated · Started 2:38 PM UTC · Ended 2:57 PM UTC Commit: |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Superseded by updated review
|
🤖 Finished Review · ✅ Success · Started 2:38 PM UTC · Completed 2:57 PM UTC Commit: |
a666a40 to
cc5c97d
Compare
|
🤖 Finished Review · ✅ Success · Started 3:06 PM UTC · Completed 3:21 PM UTC Commit: |
cc5c97d to
1a687ab
Compare
|
🤖 Finished Review · ✅ Success · Started 8:29 PM UTC · Completed 8:50 PM UTC Commit: |
Response to review findings on 1a687abContext: no breaking changesThe Medium findings
Low findings
|
1a687ab to
842d15e
Compare
|
🤖 Finished Review · ✅ Success · Started 10:26 PM UTC · Completed 10:45 PM UTC Commit: |
There was a problem hiding this comment.
See the review comment for full details.
Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:
internal/repos/manifest.go:41: [high] logic-error
DefaultPublicMintURL is set to "https://mint.fullsend.sh" while DefaultPerRepoMintURL (in internal/config/defaults.go) and DefaultMintURL (in internal/cli/admin.go) are set to the Cloud Run URL "https://fullsend-mint-gljhbkcloq-uc.a.run.app". These three constants represent the default hosted mint URL but now diverge. repos install via manifest in public mode will write FULLSEND_MINT_URL=https://mint.fullsend.sh, while github setup and admin install will write FULLSEND_MINT_URL=https://fullsend-mint-gljhbkcloq-uc.a.run.app. This causes repos status to report FULLSEND_MINT_URL drift between repos installed by different commands.
Suggested fix: Unify all three constants to the same value. Either keep them all at "https://mint.fullsend.sh" or change them all to the Cloud Run URL.
internal/cli/admin.go(file-level): Line 629 · [low] naming-consistency
DefaultMintURL constant changed to Cloud Run URL but comment still refers to hosted public mint without clarifying the URL type.
internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/fullsend-agent.yml:41: [low] security-posture-degradation
Removing WIF-mode bot token retrieval eliminates defense-in-depth against CI_DEBUG_TRACE PAT exposure. Script-level guard is now the sole defense. ADR-0067 updated to acknowledge tradeoff.
Review findings evaluation — 842d15eNot actionable (repos is UNRELEASED — no breaking changes, no deployed installs):
Fixed:
|
Remove the dead credential_mode/WIF bot-token code path from repos management (Part A of #6257) and add MintMode (public/private) to the manifest model (Part B). Part A — credential_mode removal: - Remove CredentialMode from GitHubForgeInfra, GitLabForgeInfra, RepoEntry, ResolvedConfig, and InstallConfig structs - Remove credential_mode YAML parsing, validation, and CLI flags - Remove WIF bot-token Secret Manager code from repos_gitlab.go - Remove FULLSEND_CREDENTIAL_MODE from uninstall variable lists - Update GitLab scaffold templates to use FULLSEND_FORGE_TOKEN only - Update ADR-0067 to reflect simplified credential model Part B — mint_mode model: - Add MintModePublic/MintModePrivate constants and DefaultPublicMintURL - Add MintMode field to GitHubForgeInfra (forge default) and RepoEntry (per-repo override) with NullableString 3-level fallback - Add cross-field validation: private requires explicit mint_url, public rejects null mint_url, invalid values rejected - Restrict mint_mode/mint_url to GitHub repos only - Default migrate.go inference region to config.DefaultPerRepoInferenceRegion ("global") when not discovered Signed-off-by: Greg Allen <greg@fullsend.ai> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
842d15e to
df491ae
Compare
All findings evaluated — not actionable. repos is unreleased (no backward compatibility concerns, no deployed installs, no token-mode GitLab repos). DefaultPublicMintURL vs DefaultPerRepoMintURL divergence is intentional architecture. See evaluation: #6258 (comment)
|
🤖 Review · Started 10:54 PM UTC Commit: |
Summary
Removes the credential mode model (wif/oidc/token) introduced in PR #6224 and makes inference WIF secrets unconditional. The core bug:
needsWIFwas gated oncredMode == CredModeWIF, so GitHub repos using the default OIDC mode silently skipped writingFULLSEND_GCP_PROJECT_IDandFULLSEND_GCP_WIF_PROVIDERsecrets — breaking Vertex AI inference for default-mode repos.Changes
CredModeWIF/CredModeOIDC/CredModeTokenconstants,CredentialModefields fromGitHubForgeInfra,GitLabForgeInfra,RepoEntry, andResolvedConfig; remove validation functions (IsValidCredentialMode,ValidCredentialModesFor)resolveCredentialMode(), make inference secrets unconditional (written whenInferenceProjectis set), removeFULLSEND_CREDENTIAL_MODEvariable from installs, simplifyrequiredSecretsForForge()to always return secrets--inference-project"global"when not discovered (instead of warning with no value)fullsend-agent.ymlandfullsend-poll.yml; bot PAT always fromFULLSEND_FORGE_TOKENCI/CD variable; inference WIF setup unconditional whenFULLSEND_GCP_WIF_PROVIDERis setsetupGitLabBotTokento always store as CI/CD variable (remove Secret Manager path)Testing
internal/repos/tests pass (169 tests)internal/scaffold/tests passgo build ./...)TestPostScriptEnv_NoSchemaAppendedWhenNoValidationLoop— missingopenshellbinary in sandbox)Closes #6257
Post-script verification
agent/6257-remove-credential-mode)53456d472dcba81bcea79f8d715e9d6159cefa5c..HEAD)