Skip to content

test(google): assert what Vertex sends, not that two settings agree - #1922

Merged
lidge-jun merged 1 commit into
devfrom
codex/wave5-vertex-assertions
Aug 17, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/wave5-vertex-assertions

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

The post-merge audit of #1739 caught a test that could not fail. It built the same
Vertex request twice — once with directGeminiWireRenames unset, once false — and
asserted the two matched. That stays true even if Vertex stopped preserving the
requested model id, because both sides would be wrong together.

These assert the content instead: Vertex puts the requested id on the wire under all
three setting values and never the -tiered spelling, and its system identity names
the requested model rather than a renamed one. The second covers a real defect #1739
fixed in passing, where Vertex sent the bare id while the identity line claimed
-tiered.

An ablation settles what the googleMode === "vertex" arm is actually worth:
deleting it leaves all 24 tests green, because Vertex builds its own aiplatform
URL from parsed.modelId and identityModelId only special-cases Cloud Code
Assist, so routedModelId never reaches Vertex either way. The arm is defensive
rather than load-bearing. It stays as a guard against a future refactor that routes
Vertex through the shared builder, and the test comment says plainly that no test
proves it fires today — claiming otherwise would be exactly the unfalsifiable
coverage this change removes.

Verification

  • bun test tests/google-adapter.test.ts — 24 pass, 0 fail.
  • bun test tests/google-adapter.test.ts tests/config.test.ts tests/gemini-37-flash-migration.test.ts — 210 pass, 0 fail, 879 expect() calls.
  • Ablation run recorded above: branch deleted → still 24 pass, which is the finding, not a failure to fix.

Checklist

  • Tests added or updated
  • Docs updated — n/a, test-only change
  • No credentials, request bodies, or account identifiers logged
  • Targets dev

Summary by CodeRabbit

  • Bug Fixes
    • Ensured Vertex model URLs retain the requested model ID without an unintended -tiered suffix.
    • Ensured Vertex identity text consistently displays the requested model ID.

The post-merge audit of #1739 caught a test that could not fail. It built the
same Vertex request twice, once with directGeminiWireRenames unset and once
false, and asserted the two matched - which stays true even if Vertex stopped
preserving the requested model id, because both sides would be wrong together.

These assert the content instead: Vertex puts the requested id on the wire
under all three settings and never the -tiered spelling, and its system
identity names the requested model rather than a renamed one. That second one
covers a real defect the #1739 merge fixed in passing, where Vertex sent the
bare id while the identity line claimed -tiered.

An ablation settles what the googleMode === vertex arm is worth: deleting it
leaves all 24 tests green, because Vertex builds its own aiplatform URL from
parsed.modelId and identityModelId only special-cases Cloud Code Assist, so
routedModelId never reaches Vertex either way. The arm is defensive rather
than load-bearing. It stays as a guard against a refactor that routes Vertex
through the shared builder, and the comment says plainly that no test proves
it fires today - claiming otherwise would be the unfalsifiable coverage this
change exists to remove.
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4d63364f-4812-4869-94e8-77ebef5f73c1

📥 Commits

Reviewing files that changed from the base of the PR and between 9dbc5fc and 2c34396.

📒 Files selected for processing (1)
  • tests/google-adapter.test.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Vertex-specific tests for URL generation and system identity text. The tests verify that requested model IDs remain unchanged and do not gain the -tiered suffix across rename settings.

Changes

Vertex model coverage

Layer / File(s) Summary
Vertex wire-model regression tests
tests/google-adapter.test.ts:386-424
Added coverage for Vertex URLs and system identity text. Tests cover both supported model IDs and unset, enabled, and disabled rename settings.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 2c343

This change strengthens localized Vertex request assertions without changing production behavior, and no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: chilung-cgu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: Google Vertex tests now assert request contents instead of comparing outputs from two settings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/wave5-vertex-assertions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lidge-jun
lidge-jun merged commit b5a6654 into dev Aug 17, 2026
24 checks passed
@lidge-jun
lidge-jun deleted the codex/wave5-vertex-assertions branch August 18, 2026 08:27
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
…ssertions

test(google): assert what Vertex sends, not that two settings agree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant