Skip to content

test: cover CCM perspective preflight, STO dispatch gaps, bodyWrapperKey, and dbops authoring#416

Closed
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/missing-test-coverage-d6e5
Closed

test: cover CCM perspective preflight, STO dispatch gaps, bodyWrapperKey, and dbops authoring#416
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/missing-test-coverage-d6e5

Conversation

@cursor

@cursor cursor Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Risky behavior now covered

  • CCM cost_perspective.create preflight — settings fetch from /ng/api/settings, viewPreferences deep-merge (agent overrides win), viewState/viewType/viewVersion defaults, and graceful degradation when settings API fails
  • STO exemption workflowsreject dispatchExecute (path + approverId injection), create dispatch (camelCase body mapping + requesterId), list preflight stripping resource_scope/org_id/project_id scope keywords, and pipeline_security_step extractor projection
  • bodyWrapperKey nested injectionorganization, project, and connector create paths verify scope/fields land inside the wrapper object, not at the top level
  • DBOPS Accept & Commit chaindatabase_default_authoring_instance and database_llm_authoring_pipeline dispatch (path + query param construction)

Test files added/updated

File Change
tests/registry/ccm-perspective-preflight.test.ts New — 3 tests
tests/registry/sto-exemption-actions.test.ts +2 tests (reject dispatch, create dispatch)
tests/registry/sto-exemptions.test.ts +2 tests (list scope-keyword stripping)
tests/registry/sto-security-issue.test.ts +3 tests (pipeline_security_step projection + dispatch)
tests/registry/registry.test.ts +3 tests (bodyWrapperKey for org/project/connector)
tests/registry/dbops.test.ts +2 tests (authoring instance + LLM pipeline get)

Why these tests materially reduce regression risk

These paths sit on high-blast-radius agent workflows: CCM perspective creation silently wrong-filters every cost view; STO exemption list scope stripping prevents agents from abandoning account-level approvals; reject/create dispatch gaps would let approval-body regressions ship undetected; bodyWrapperKey mis-injection causes 400s on core platform creates; and the dbops authoring endpoints are on the critical Accept & Commit skill chain.

Validation

pnpm test  # 2194 passed
Open in Web View Automation 

cursoragent and others added 3 commits June 24, 2026 17:40
…ctors

Add regression tests for high-risk gaps in recent merges:
- resolveLogDownloadUrl hostname rewrite for self-managed CDN URLs (PR #358)
- HarnessClient.getCurrentUserId caching, dedup, and error paths (STO exemptions)
- CCM GraphQL response extractors (views, breakdown, timeseries, summary, recommendations)
- STO security_issue hint injection and pipeline_security_issue partition flattening

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

- Add sto-exemption-actions.test.ts for create preflight, scope routing
  (/approve vs /promote), elevation input mutation, and approver injection
- Extend registry.test.ts to lock accountIdentifier injection inside
  body.resourceGroup for access_control resource_group create

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…Key, and dbops authoring

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

Copy link
Copy Markdown
Collaborator

Closing as stale: merge conflicts with main and work superseded by merged PRs (#447, #446, #449, #469, #440, #398, etc.) or duplicate agent-generated attempts. Reopen from a fresh branch if still needed.

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