fix: harden Vertex auth and regional endpoints - #118
Conversation
Code reviewVerdict: Address the major findings before merging. · 🔴 0 · 🟠 1 · 🟡 2 · ⚪ 0 · 0/3 resolved
🤖 Fix all 3 open findings with your agent📋 Out-of-diff findings (3)
Reviewed 2 files · 0 inline · view all 3 findings ↗ aictrl · AI code review for fast-moving teams · aictrl.dev |
Review response — PR #118Verified and fixed all three findings in the existing provider-hardening branch. Issues addressed (pushed to this PR)
Validation: 267 provider tests passed, including invalid config/environment locations, uppercase/whitespace normalization, and concurrent auth/client reuse. CLI and repository-wide typechecks (6 tasks), Prettier, and diff checks passed. Changes were pushed normally without verification bypass flags. Review claims verified false (no change needed)None. Not addressed hereNone. Verdict data-layer persistence is unavailable in this session: matched 0, written 0, verified 0, failed 0, unrecorded 3. The structured sidecar below records all three GitHub verdicts. |
ReviewThe core changes are correct and verified:
Issues1. [Medium] Hard throw during provider registry init has disproportionate blast radius
…gets 2. [Low] The loader at provider.ts:409-425 still reads 3. [Nit] Plain The codebase classifies failures via TestsGood coverage — normalization, rejection (including type confusion and length), env-var precedence, auth reuse, and scope application. Two notes: the empty-string env-var case from issue 1 is currently a throwing behavior, so if you adopt the "treat empty as unset" suggestion, add a test for it; and the scope test's Reviewed SHA: baf4368 |
Code reviewVerdict: Address the major findings before merging. · 🔴 0 · 🟠 2 · 🟡 3 · ⚪ 2 · 0/7 resolved
🤖 Fix all 7 open findings with your agent📋 Out-of-diff findings (7)
Reviewed 2 files · 0 inline · view all 7 findings ↗ aictrl · AI code review for fast-moving teams · aictrl.dev |
baf4368 to
cb1a24e
Compare
Review response — PR #118Verified all ten aictrl-dev findings from both review rounds against head Issues addressed (pushed to this PR)
Review claims verified false (no change needed)
Not addressed here
Verification
|
No linked issue.
Intent
The custom Vertex transport used by the CLI had incomplete auth-client setup and did not use regional REP endpoints for
usandeulocations.Expected Impact on Users
Vertex requests use the documented cloud-platform scope and regional endpoints, reducing authentication and routing failures for custom transports.
Expected Outcomes
usandeuVertex locations useaiplatform.<location>.rep.googleapis.com.Implementation
Scope Caveat
This covers the custom transport path. Native Vertex SDK authentication remains managed by the SDK, and live ADC connectivity was not exercised.
Test Plan
Verification
Risks and Rollout
The change is isolated to provider configuration and auth setup. Roll back the branch if deployment credentials require a different scope policy.