Skip to content

ci: add harness integration CI for the four agent CLIs - #596

Open
omkargaikwad23 wants to merge 23 commits into
mainfrom
feat/ci-harness-smoke
Open

omkargaikwad23 wants to merge 23 commits into
mainfrom
feat/ci-harness-smoke

Conversation

@omkargaikwad23

@omkargaikwad23 omkargaikwad23 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds .ci/ — a Cloud Build pipeline running integration smoke tests for all four agent CLIs (agy, Claude Code, Codex, Gemini) against the real Cloud SQL Admin MCP endpoint. Existing coverage relies on unit tests with mocked subprocesses, which cannot catch CLI flag changes, self-updates, or output format shifts.

Key Design Choices

  • Shared Evalset & Run Config: Standardizes on a single evalset canonicalized to <server>__<tool> via tool_naming.py, and a parameterized run config keyed by CI_HARNESS so results remain comparable across harnesses.
  • Two Read-Only Scenarios: A list-then-get query, and a get query against a non-existent instance (zero provisioning and no leaked test infrastructure on failure).
  • Parallel Execution: Harness build steps execute concurrently with allowFailure so failures in one CLI do not cancel the others.
  • Authentication: agy uses a service-account key fetched from Secret Manager to carry quota_project_id; the other three CLIs authenticate via build credentials.
  • Unpinned CLI Versions: The three npm-installed CLIs track @latest and agy self-updates, so the build surfaces version drift as it ships rather than when a pin is bumped.
  • Scope: Real MCP servers only (skill/plugin installation smoke tests will follow in a separate PR).

Verification Gate (verify_harness.py)

Because evalbench.eval() exits 0 on run completion, verify_harness.py enforces a two-tier evaluation gate:

Tier Scorers Rule
Non-zero 7 telemetry scorers + trajectory_matcher > 0
Liveness 3 LLM judges row exists, no error, numeric
  • Why non-zero for telemetry/trajectory? Telemetry scorers swallow parse errors and return 0.0 inside comparison_logs instead of raising an error. Gating trajectory_matcher > 0 verifies that expected MCP tools were actually invoked rather than falling back to shell execution.
  • Why liveness only for judges? Judges are checked for execution health only; non-deterministic judge verdicts are never hard-gated to avoid pipeline flakiness.

Test Plan

  • Tested verify_harness.py against synthetic results (healthy passes, Tier 1 at 0 fails, judges at 0 pass).
  • Verified evalset placeholder expansion (unset variables raise errors; no literal ${...} reaches agent).
  • Verified shared run config resolution across all four harnesses (correct model config, generator, and output paths).
  • Triggered real Cloud Build run (verify-harnesses) and confirmed execution across all harnesses.

@omkargaikwad23

Copy link
Copy Markdown
Collaborator Author

/gcbrun

@omkargaikwad23
omkargaikwad23 marked this pull request as ready for review September 11, 2026 14:08
@omkargaikwad23

Copy link
Copy Markdown
Collaborator Author

/gcbrun

1 similar comment
@omkargaikwad23

Copy link
Copy Markdown
Collaborator Author

/gcbrun

…rameterized YAML file using environment variables
@omkargaikwad23

Copy link
Copy Markdown
Collaborator Author

/gcbrun

@prernakakkar-google

Copy link
Copy Markdown
Collaborator

/gcbrun

@omkargaikwad23 omkargaikwad23 changed the title feat: add harness integration CI for the four agent CLIs ci: add harness integration CI for the four agent CLIs Sep 14, 2026
@prernakakkar-google

Copy link
Copy Markdown
Collaborator

Lets write a design document on this first.
We should use different GCP Project as its a security risk since data is visble publically

@@ -0,0 +1,23 @@
claude_code_version: "@anthropic-ai/claude-code@2.1.85"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check against latest

Comment thread .ci/model_configs/claude_code_model.yaml Outdated
Comment thread .ci/model_configs/gemini_cli_model.yaml Outdated
Comment thread .ci/harness_smoke.evalset.json Outdated
GOOGLE_CLOUD_LOCATION: "us-central1"

setup:
mcp_servers:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should test for skills as well

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be covered in followup CL (I have already added a note in PR description)

@omkargaikwad23

Copy link
Copy Markdown
Collaborator Author

Lets write a design document on this first. We should use different GCP Project as its a security risk since data is visble publically

Thanks for reviewing the changes!
External contributors won't be able to view the build logs or access or run the trigger. Same GCP project is used for current test trigger and for crema evals as well. To keep triggers in same gcp project, I decided to use the same project. Will share the doc soon.

@omkargaikwad23

Copy link
Copy Markdown
Collaborator Author

/gcbrun

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants