Skip to content

test(google): isolate Vertex streams from ambient ADC - #129121

Merged
steipete merged 1 commit into
mainfrom
codex/google-vertex-adc-test-isolation
Aug 25, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/google-vertex-adc-test-isolation

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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_CONFIG in that shared fixture alongside GOOGLE_APPLICATION_CREDENTIALS, HOME, and APPDATA. Explicit credential-precedence tests remain unchanged. Production code is untouched, and the test-only diff removes two lines overall.

Validation

  • Exact current-main reproduction with locally present application-default credentials: all four selected Vertex cases failed before the fix.
  • Full Google transport owner suite after the fix: 135 passed, 0 failed.
  • 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.ts
  • Focused formatter, focused extension lint, and git diff --check all passed.
  • Independent maintainer review and structured autoreview found no actionable issues.
  • Hosted CI can already be green without developer ADC: the earlier QA baseline completed successfully in https://github.com/openclaw/openclaw/actions/runs/32810944276 while the identical commit failed locally.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 3:58 AM ET / 07:58 UTC.

ClawSweeper review

What this changes

This 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 readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open for normal maintainer review: current main still allows the affected tests to select ambient CLOUDSDK_CONFIG credentials, and the patch centrally isolates that path without changing production behavior.

Priority: P3
Reviewed head: 8400e3fb6d7ccce7542127b089aa54ba0a9be5fb

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, coherent test-boundary repair with source-confirmed cause and no actionable review findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only PR is exempt from the external contributor proof gate; its reported focused suite result remains supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only PR is exempt from the external contributor proof gate; its reported focused suite result remains supplemental validation.
Evidence reviewed 5 items Ambient source exists on current main: The OpenClaw-owned ADC resolver checks CLOUDSDK_CONFIG before HOME and APPDATA, so the prior fixture could still select a developer-local ADC file.
Runtime owner boundary: Vertex credential-marker requests resolve headers through the ADC owner before transport headers are merged.
Canonical fixture repair: The PR clears CLOUDSDK_CONFIG in the existing shared auth-library fixture and routes the three affected test paths through it.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs --configLoader runner extensions/google/transport-stream.test.ts

Result: PASS (completed)

node scripts/run-vitest.mjs --configLoader runner extensions/google/transport-stream.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129121-PBTmad/target$ node scripts/run-vitest.mjs --configLoader runner extensions/google/transport-stream.test
.ts
node scripts/run-vitest.mjs --configLoader runner extensions/google/transport-stream.test.ts
[test] starting test/vitest/vitest.extension-providers.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129121-PBTmad/target

 ✓  extension-providers  extensions/google/transport-stream.test.ts (135 tests) 6093ms
     ✓ resolves qualified AI Studio video after payload hooks and preserves part order  387ms

 Test Files  1 passed (1)
      Tests  135 passed (135)
   Start at  07:59:44
   Duration  15.89s (transform 8.51s, setup 1.05s, import 8.59s, tests 6.09s, environment 0ms)




































Assertions:

  • PASS expect_output: passed

How this fits together

Google’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]
Loading

Before merge

  • Complete next step (P2) - This protected maintainer-authored PR has no mechanical repair lane; await normal exact-head maintainer review.
Agent review details

Security

None.

PR surface

Tests -2. Total -2 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 4 6 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 6 -2

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests +4/-6 (net -2) The change consolidates test setup only and leaves the provider runtime unchanged.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This is a contained test-reliability repair with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only PR is exempt from the external contributor proof gate; its reported focused suite result remains supplemental validation.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main blame and history attribute the ADC resolver, Vertex header path, and existing fixture to this contributor; they also authored the focused follow-up. (role: recent Google transport contributor; confidence: high; commits: 6335d9777138, 8400e3fb6d7c; files: extensions/google/vertex-adc.ts, extensions/google/transport-stream.ts, extensions/google/transport-stream.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-25T07:39:02.917Z sha 8400e3f :: needs maintainer review before merge. :: none

@steipete
steipete merged commit 7d9cb48 into main Aug 25, 2026
117 checks passed
@steipete
steipete deleted the codex/google-vertex-adc-test-isolation branch August 25, 2026 08:16
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: google maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant