Skip to content

test: cover DBOPS changeset validation, diagnose step guard, CCM filters#695

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

test: cover DBOPS changeset validation, diagnose step guard, CCM filters#695
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-d34a

Conversation

@cursor

@cursor cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Daily test-coverage automation run targeting recently merged production paths with weak or missing regression tests.

Risky behavior now covered

  1. database_changeset_existence bodyBuilder validation ([feat]: [DBOPS-2684]: DBOPS changeset existence check API addition #679) — rejects missing/empty changeset_ids, >100 ids, non-string/blank entries; accepts changeSetIds alias; trims whitespace before API call.
  2. harness_diagnose pipeline 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 single-step URLs do not leak whole-pipeline logs or confuse downstream summarizer mode detection.
  3. CCM recommendation count/stats paired-filter guard (Add new tool for ccm recommendations filters #617) — cost_category without cost_buckets does not emit costCategoryDTOs, matching existing list behavior.

Test files added/updated

  • tests/registry/dbops.test.ts — 7 new validation cases for changeset existence
  • tests/tools/diagnose/pipeline.test.ts — step_id + include_all_step_logs guard
  • tests/registry/registry.test.ts — count/stats paired-filter guard

Why these tests materially reduce regression risk

  • DBOPS: Invalid batch requests previously only failed at the API; client-side validation is now locked so agents get immediate, actionable errors and bad payloads never hit the wire.
  • Diagnose: The feat: unify pipeline_summarizer into failure+success analyzer with RCA #691 guard prevents a mode-detection bug where pipeline_summarizer could enter whole-pipeline mode on a single-step URL — wasteful log fetches and wrong analysis scope.
  • CCM: Count/stats could silently ignore a lone cost_category filter if the paired guard regressed; tests mirror the list contract.

Type of Change

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

Checklist

  • pnpm test passes (targeted: dbops, diagnose/pipeline, registry — 235 tests)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes
  • pnpm docs:check passes
Open in Web View Automation 

Add regression tests for recently merged production paths:

- database_changeset_existence: reject missing/empty/invalid ids, 100-id
  limit, changeSetIds alias, and whitespace trimming before API call
- harness_diagnose pipeline: suppress all_step_logs when step_id is set
  so single-step URLs stay in single-step mode (#691)
- cost_recommendation_count/stats: paired cost_category + cost_buckets
  guard matching list behavior (#617)

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