Repository navigation
test(google): isolate Vertex streams from ambient ADC - #129121
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 3:58 AM ET / 07:58 UTC. ClawSweeper reviewWhat this changesThis PR makes four Google Vertex streaming tests use the shared auth-library fixture so ambient Application Default Credentials cannot divert them from mocked authentication. Merge readinessKeep open for normal maintainer review: current main still allows the affected tests to select ambient Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherGoogle’s provider transport selects Vertex authentication before issuing a mocked streaming request. The test fixture controls credential-discovery environment variables so the tests exercise the intended mocked auth and stream-result paths. flowchart LR
A[Developer environment] --> B[Test credential fixture]
B --> C[Vertex ADC selection]
C --> D[Mocked Google auth]
D --> E[Vertex stream assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceTests -2. Total -2 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one shared credential-isolation fixture for mocked-auth Vertex cases, preserving explicit ADC-precedence coverage separately. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main’s ADC resolver accepts CLOUDSDK_CONFIG while the old fixture cleared only other credential locations; the PR reports the focused pre-fix failure with ambient ADC present. Is this the best way to solve the issue? Yes. Extending the shared fixture covers all three affected mocked-auth paths at their common setup boundary and avoids duplicating environment handling in individual tests. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7ba58abd93d6. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
Summary
Keep Google Vertex transport regressions independent of a developer's ambient Application Default Credentials. Four existing provider-owned streaming tests incorrectly discovered local credentials before reaching their mocked auth-library transport: two blocked-prompt cases, incomplete-stream handling, and canonical Vertex model paths.
Reuse the existing isolated auth-library fixture for each affected case and clear
CLOUDSDK_CONFIGin that shared fixture alongsideGOOGLE_APPLICATION_CREDENTIALS,HOME, andAPPDATA. Explicit credential-precedence tests remain unchanged. Production code is untouched, and the test-only diff removes two lines overall.Validation
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/private/tmp/openclaw-vitest-vertex-isolation OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs --configLoader runner extensions/google/transport-stream.test.tsgit diff --checkall passed.