Skip to content

test: cover CCM anomaly v2, ai-evals drift, and schema sync regressions - #540

Closed
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-17f7
Closed

test: cover CCM anomaly v2, ai-evals drift, and schema sync regressions#540
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-17f7

Conversation

@cursor

@cursor cursor Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Description

Adds regression tests for recently merged production changes that lacked focused coverage:

Risky behavior now covered

  1. CCM cost anomaly v2 API (PR Anomaly tools - Drilldown and upgrade to v2 APIs #533)

    • anomalyListExtract maps v2 { data: [...] } array responses to { items, total } without envelope leakage
    • cost_anomaly list bodyBuilder defaults, explicit time range, ordering, and min_amount: 0 (!= null guard)
    • cost_anomaly_drilldown pathBuilder routes details vs time-series endpoints
    • Registry dispatch round-trips verify v2 paths and __skipCompact marker survival
  2. AI Evals control-plane alignment (PR fix(ai-evals): correct toolset drift against control-plane API #529)

    • eval_metric create requires dimension
    • eval_annotation create/update expose thumbs_up
    • online_eval evaluate uses metric_set_id + judge_llm_connector_ref (not deprecated metric_ids)
    • Dispatch proves metric_set_id reaches the API body
  3. DeployGoogleAgentRuntimeRevision schema sync (PR chore: auto-sync harness schemas #534) — already on branch

    • Bundle contract asserts step definitions in v0 pipeline/template
    • harness_schema resolves DeployGoogleAgentRuntimeRevisionStepNode

Test files added/updated

  • tests/registry/ccm-anomaly.test.ts (new)
  • tests/registry/ccm-extractors.test.ts
  • tests/registry/ai-evals.test.ts
  • tests/schemas/schema-bundle-contract.test.ts
  • tests/tools/harness-schema-tool.test.ts

Why these tests materially reduce regression risk

  • Anomaly v2 migration changes endpoint paths, request body shape, and response extraction — silent breakage would return empty lists or wrong drill-down URLs
  • AI Evals schema drift would cause validation failures or wrong API payloads if metric_ids/dimension contracts regress
  • Schema sync tests catch upstream step definition drops before agents generate invalid pipeline YAML

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (test coverage)

Checklist

  • pnpm test passes (targeted suites)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes
  • pnpm docs:check passes
Open in Web View Automation 

thisrohangupta and others added 2 commits July 2, 2026 18:11
Add regression tests for production changes merged alongside the
DeployGoogleAgentRuntimeRevision schema sync:

- anomalyListExtract projection for v2 array responses
- cost_anomaly v2 bodyBuilder (time filters, ordering, zero thresholds)
- cost_anomaly_drilldown pathBuilder and skipCompact dispatch
- ai-evals control-plane alignment (dimension, thumbs_up, metric_set_id)

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ thisrohangupta
❌ cursoragent
You have signed the CLA already but the status is still pending? Let us recheck it.

@thisrohangupta

Copy link
Copy Markdown
Collaborator

Closing: superseded by merged #533 (CCM anomaly v2), #530 (AI evals API fields), and #535 (schema sync) — all already on main.

Triaged as part of an open-PR cleanup pass. If this was mis-triaged, reopen and rebase onto current main.

@thisrohangupta
thisrohangupta deleted the cursor/missing-test-coverage-17f7 branch July 22, 2026 17:48
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.

3 participants