Skip to content

test: cover GitOps delete paramsSchema, CCM paired filters, and harness_delete mapping#672

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-c636
Draft

test: cover GitOps delete paramsSchema, CCM paired filters, and harness_delete mapping#672
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-c636

Conversation

@cursor

@cursor cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

Daily test-coverage automation run. Adds regression tests for high-risk paths from recent merges (#617, #642, #614) that were not yet covered on main.

Risky behavior now covered

  • GitOps agent delete paramsSchemaagent_id is required (not resource_id); account-scoped deletes omit orgIdentifier/projectIdentifier query params
  • GitOps application delete validation routing — cascade/propagation errors come from bodyBuilder, not paramsSchema, preventing mis-routed validation messages
  • CCM paired-filter guardcost_recommendation_count and cost_recommendation_stats do not send costCategoryDTOs when only cost_category is provided without cost_buckets (matches existing cost_recommendation list guard)
  • CCM count API shape drift — dispatch surfaces _error when count API returns non-number data instead of silently returning { count: 0 }
  • harness_delete identifier mappingresource_id is mapped to agent_id for gitops_agent delete at the tool-handler layer

Test files added/updated

  • tests/registry/gitops.test.ts — 3 new tests
  • tests/registry/registry.test.ts — 3 new tests
  • tests/tools/tool-handlers.test.ts — 1 new test

Why these tests materially reduce regression risk

These paths guard destructive GitOps deletes, CCM filter body construction, and the consolidated delete tool's identifier resolution — all areas where a silent regression would cause wrong API calls or misleading counts without an obvious runtime failure.

Type of Change

  • Other — test coverage

Checklist

  • pnpm test passes (385 tests in touched files)
Open in Web View Automation 

…ss_delete mapping

Add regression tests for high-risk paths from recent merges (#617, #642, #614):

- gitops_agent delete: paramsSchema requires agent_id (not resource_id),
  account resource_scope omits org/project query params
- gitops_application delete: cascade validation comes from bodyBuilder,
  not paramsSchema (prevents mis-routing validation errors)
- cost_recommendation_count/stats: paired-filter guard when only
  cost_category is provided without cost_buckets
- cost_recommendation_count: dispatch surfaces _error on non-number API data
- harness_delete: maps resource_id to agent_id for gitops_agent delete

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 sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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