Skip to content

test: regression coverage for DBOPS, diagnose single-step guard, CCM filters - #698

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-08dc
Closed

test: regression coverage for DBOPS, diagnose single-step guard, CCM filters#698
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-08dc

Conversation

@cursor

@cursor cursor Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Description

Adds targeted regression tests for recently merged production paths that lacked validation or guard coverage.

Triggered by inspection of recent merges (#679 DBOPS changeset existence, #691 diagnose single-step mode, #617 CCM recommendation filters). PR #696 (schema auto-sync) is data-only; schema contract tests are deferred until that lands.

Risky behavior now covered

  1. database_changeset_existence bodyBuilder ([feat]: [DBOPS-2684]: DBOPS changeset existence check API addition #679) — rejects missing/empty changeset_ids, >100 ids, non-string/blank entries; accepts changeSetIds camelCase alias and trims whitespace.
  2. harness_diagnose single-step guard (feat: unify pipeline_summarizer into failure+success analyzer with RCA #691) — when step_id is present, include_all_step_logs is suppressed so callers stay in single-step mode.
  3. CCM recommendation count/stats paired-filter guard (Add new tool for ccm recommendations filters #617) — costCategoryDTOs omitted when only cost_category is provided without cost_buckets.

Test files updated

  • tests/registry/dbops.test.ts — 7 new cases
  • tests/tools/diagnose/pipeline.test.ts — 1 new case
  • tests/registry/registry.test.ts — 2 new cases

Why these reduce regression risk

  • DBOPS: Input validation is the only gate before batch uniqueness checks; regressions send bad payloads or accept invalid ids.
  • Diagnose: Single-step guard prevents wasted log fetches and mode confusion for agents summarizing one step from a URL with ?step=.
  • CCM: Partial category filters caused API errors; count/stats share the list body-builder pattern but were untested.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other — test coverage

Checklist

  • pnpm test passes (targeted: 235 tests in 3 files)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes
  • pnpm docs:check passes (N/A — no registry changes)
Open in Web View Automation 

…CM filters

- database_changeset_existence: reject missing/empty ids, >100 limit,
  non-string/blank entries; accept changeSetIds alias and trim whitespace
- harness_diagnose pipeline: suppress all_step_logs when step_id is set
  (single-step mode guard from #691)
- cost_recommendation_count/stats: omit costCategoryDTOs when only
  cost_category is provided without cost_buckets

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.

@thisrohangupta

Copy link
Copy Markdown
Collaborator

Closing after draft cleanup: the still-useful regression coverage is consolidated in retained #716 and the relevant focused drafts/fixes, so this branch no longer has a unique improvement worth keeping open.

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