Skip to content

[NA] [SDK] [GHA] test: stabilize Gemini + agentic-judge integration tests#7405

Merged
alexkuzmik merged 2 commits into
mainfrom
aliaksandrk/NA-stabilize-gemini-and-agentic-judge-tests
Jul 8, 2026
Merged

[NA] [SDK] [GHA] test: stabilize Gemini + agentic-judge integration tests#7405
alexkuzmik merged 2 commits into
mainfrom
aliaksandrk/NA-stabilize-gemini-and-agentic-judge-tests

Conversation

@alexkuzmik

Copy link
Copy Markdown
Collaborator

Details

Stops provider-driven flakiness in the real-model integration suites, in three related changes:

  • Agentic LLM-judge tests → Sonnet: run the Anthropic lanes against claude-sonnet-4-6 instead of claude-haiku-4-5. On the agentic path (tools are in the request, so response_format is best-effort) Haiku wrapped verdicts in prose / ```json fences and failed to parse; Sonnet follows the structured-output contract reliably (the one-shot judge suite already used Sonnet).
  • GenAI + ADK test matrices → endpoints only: run just the oldest and newest supported Python versions (3.10, 3.14) instead of the full 3.10–3.14 matrix. These suites make live Vertex AI calls against the shared opik-sdk-tests GCP project; the full matrix re-multiplied those calls into 429 RESOURCE_EXHAUSTED. Endpoints still catch version-specific breakage at a fraction of the request volume; the max-parallel cap is kept.
  • Remove the broken GenAI rate-limit retry helpers: _is_rate_limit_error checked exception.response.status_code, which raises AttributeError on google-genai's ClientError (no such attribute) — so the retry crashed instead of retrying. With the matrix trim as the 429 mitigation, the dead helper and its decorators are removed rather than repaired.

Change checklist

  • User facing
  • Documentation update

Issues

  • N/A — CI/test stability (Anthropic structured-output + Vertex AI 429 quota); no tracking ticket.

AI-WATERMARK

AI-WATERMARK: yes

  • Tools: Claude Code
  • Model(s): Claude Opus 4.8 (1M context)
  • Scope: full implementation
  • Human verification: reviewed diff; ruff + pytest collection locally; CI is the real validation

Testing

  • ruff check + ruff format --check on the changed genai test files → clean (no unused imports / undefined names left after removing the retry helpers).
  • pytest tests/library_integration/genai/ --collect-only → 20 tests collect (imports resolve; genai_errors still used by an unrelated pytest.raises).
  • Workflow YAML parses; python_version resolves to ['3.10', '3.14'] for both suites.

Not run locally: the genai/adk suites make live Vertex AI calls (require GCP creds) and the agentic-judge suite calls real Anthropic models (require ANTHROPIC_API_KEY); those are validated by CI.

Documentation

N/A — no user-facing or API changes.

…ests

Three related changes to stop provider-driven flakiness in the real-model
integration suites:

- Agentic LLM-judge tests: run the Anthropic lanes against claude-sonnet-4-6
  instead of claude-haiku-4-5. On the agentic path (tools in the request, so
  response_format is best-effort) Haiku wrapped verdicts in prose/```json
  fences; Sonnet follows the structured-output contract reliably (the one-shot
  suite already used Sonnet).
- GenAI + ADK test matrices: run only the oldest and newest supported Python
  versions (3.10, 3.14). These suites make live Vertex AI calls against the
  shared opik-sdk-tests GCP project; the full 3.10-3.14 matrix re-multiplied
  those calls into 429 RESOURCE_EXHAUSTED. Endpoints cover version-specific
  breakage at a fraction of the request volume; max-parallel cap kept.
- Remove the broken GenAI rate-limit retry helpers: _is_rate_limit_error
  checked exception.response.status_code, which raises AttributeError on
  google-genai's ClientError (no such attribute), so the retry crashed instead
  of retrying. With the matrix trim as the 429 mitigation, the dead helper and
  its decorators are removed rather than repaired.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added python Pull requests that update Python code Infrastructure tests Including test files, or tests related like configuration. Python SDK labels Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

⏱️ pre-commit per-hook timing

Hook Description Result Duration
⚙️ actionlint — github workflows Lint GitHub Actions workflows 0.73s
🐍 fix end of files — python sdk Ensure files end in a newline 0.03s
🐍 trim trailing whitespace — python sdk Strip trailing whitespace 0.02s
🐍 ruff-format — python sdk Format Python code (ruff) 0.01s
🐍 ruff — python sdk Lint + autofix Python (ruff) 0.01s
Total (5 ran) 0.80s
⏭️ 36 skipped (no matching files changed)
Hook Description Result
🐍 mypy — python sdk Static type check ⏭️
🤖 trim trailing whitespace — optimizer Strip trailing whitespace ⏭️
🤖 fix end of files — optimizer Ensure files end in a newline ⏭️
🤖 check yaml — optimizer Validate YAML syntax ⏭️
🤖 check json — optimizer Validate JSON syntax ⏭️
🤖 check toml — optimizer Validate TOML syntax ⏭️
🤖 check for added large files — optimizer Block large files (>1MB) ⏭️
🔐 detect private key — optimizer Block committed private keys ⏭️
🤖 check for merge conflicts — optimizer Block merge-conflict markers ⏭️
🤖 check for case conflicts — optimizer Block case-only name clashes ⏭️
🤖 pyupgrade — optimizer Modernize Python syntax ⏭️
🤖 ruff — optimizer Lint + autofix Python (ruff) ⏭️
🤖 ruff-format — optimizer Format Python code (ruff) ⏭️
🤖 mypy — optimizer Static type check ⏭️
📓 nbstripout — optimizer notebooks Strip notebook output ⏭️
📝 markdownlint — optimizer Lint Markdown ⏭️
🔤 codespell — optimizer Fix common misspellings ⏭️
📊 radon cc — optimizer Cyclomatic-complexity gate ⏭️
📊 radon raw — optimizer Raw size metrics gate ⏭️
📊 xenon — optimizer Fail on complexity thresholds ⏭️
📊 lizard — optimizer Cyclomatic-complexity gate ⏭️
🧹 vulture — optimizer Find dead code ⏭️
🛡️ trim trailing whitespace — guardrails Strip trailing whitespace ⏭️
🛡️ fix end of files — guardrails Ensure files end in a newline ⏭️
🛡️ ruff — guardrails Lint + autofix Python (ruff) ⏭️
🛡️ ruff-format — guardrails Format Python code (ruff) ⏭️
🛡️ mypy — guardrails Static type check ⏭️
⚓ helm-docs Regenerate Helm chart README ⏭️
block non-public FE plugins Block non-public FE plugins ⏭️
☕ spotless — java backend Format Java code ⏭️
🧪 pre-commit wrapper smoke tests Self-test the wrapper scripts ⏭️
🌐 eslint — frontend Lint + autofix JS/TS ⏭️
🌐 typecheck — frontend Whole-project tsc type check ⏭️
📘 eslint — typescript sdk Lint + autofix JS/TS ⏭️
📘 typecheck — typescript sdk Whole-project tsc type check ⏭️
🐳 hadolint — dockerfiles Lint Dockerfiles ⏭️

@alexkuzmik
alexkuzmik marked this pull request as ready for review July 8, 2026 18:39
@alexkuzmik
alexkuzmik requested review from a team as code owners July 8, 2026 18:39
@alexkuzmik
alexkuzmik merged commit 29dd96e into main Jul 8, 2026
140 checks passed
@alexkuzmik
alexkuzmik deleted the aliaksandrk/NA-stabilize-gemini-and-agentic-judge-tests branch July 8, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

baz: pending Infrastructure Python SDK python Pull requests that update Python code tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant