feat(#6269): derive inference project number in repos install - #6271
Conversation
repos install now only requires --inference-project. The project number is auto-derived via the GCP Resource Manager API (matching admin install behavior), and --inference-region defaults to "global". --inference-project-number remains available as an optional override for environments where the API lookup is not possible. Changes: - internal/cli/repos.go: default region to "global" when project is set, derive project number via GetProjectNumber() when not explicit - internal/repos/batch_install.go: update validation comment to reflect CLI-level defaults - internal/cli/repos_test.go: add tests for derivation, defaulting, explicit override, and lookup error handling Closes #6269
|
🤖 Finished Review · ✅ Success · Started 12:37 AM UTC · Completed 12:53 AM UTC Commit: |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Previous runReviewFindingsMedium
Low
Previous run (2)ReviewFindingsHigh
Low
Labels: PR modifies the repos install CLI command (internal/cli/repos.go) and batch install logic Next steps:
|
|
/fs-fix - Rebase and fix the review issues. |
|
🤖 Finished Fix · ✅ Success · Started 12:59 AM UTC · Completed 1:08 AM UTC Commit: |
- Update docs/cli/repos.md inference flag descriptions to reflect auto-derivation behavior: --inference-project no longer implies mutual dependency, --inference-project-number documents auto-derivation, --inference-region documents global default. - Strengthen TestRunReposInstall_DerivesProjectNumber and TestRunReposInstall_DefaultsInferenceRegion with direct assertions on opts fields to verify derived values reach the BatchInstall layer without relying on all-or-nothing validation as an indirect check. Addresses review feedback on #6271
🔧 Fix agent — iteration 1 (human-triggered)Addressed both review findings: updated stale CLI reference docs for inference flags and strengthened derivation tests with direct assertions on opts fields. Fixed (2):
Tests: passedNext steps:
|
|
🤖 Review · ❌ Terminated · Started 1:09 AM UTC · Ended 1:23 AM UTC Commit: |
Site previewPreview: https://9180567e-site.fullsend-ai.workers.dev Commit: |
Superseded by updated review
|
🤖 Finished Review · ✅ Success · Started 1:09 AM UTC · Completed 1:23 AM UTC Commit: |
|
/fs-fix - Rebase and fix the review issues. |
|
🤖 Finished Fix · ✅ Success · Started 1:35 AM UTC · Completed 1:43 AM UTC Commit: |
- Remove --inference-project-number from GitLab install example in operations.md since it is now auto-derived - Add "(auto-derived)" to --inference-project-number description in cli-internals.md - Clarify test comment explaining why opts-level assertion is sufficient for verifying project number derivation Addresses review feedback on #6271
🔧 Fix agent — iteration 2 (human-triggered)Addressed all 3 review findings: updated 2 stale docs (operations.md example, cli-internals.md description) and clarified the test assertion comment in repos_test.go. Fixed (3):
Tests: passedNext steps:
|
|
🤖 Finished Review · ✅ Success · Started 1:44 AM UTC · Completed 1:58 AM UTC Commit: |
|
🤖 Finished Retro · ✅ Success · Started 2:50 AM UTC · Completed 3:05 AM UTC Commit: |
Retro: PR #6271 —
|
Summary
repos installnow matchesadmin installbehavior for inference configuration: only--inference-projectis required. The project number is auto-derived via the GCP Resource Manager API, and the region defaults to"global".This reduces the install command from three required flags to one:
Changes
internal/cli/repos.go: Default--inference-regionto"global"when--inference-projectis set; derive--inference-project-numberfrom project ID viaGetProjectNumber()when not explicitly provided; update flag help textinternal/repos/batch_install.go: Update validation comment to reflect CLI-level defaults (validation logic unchanged — acts as safety net)internal/cli/repos_test.go: Add 4 tests covering auto-derivation, region defaulting, explicit override skip, and lookup error handlingTesting
go vetcleangolangci-lintclean (no new issues)Closes #6269
Post-script verification
agent/6269-derive-inference-project-number)563c5d4bcc93bd0640e32f80f8d17b243be6e382..HEAD)