test: cover GitOps delete paramsSchema, CCM paired filters, and harness_delete mapping#672
Draft
cursor[bot] wants to merge 1 commit into
Draft
test: cover GitOps delete paramsSchema, CCM paired filters, and harness_delete mapping#672cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
…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>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
agent_idis required (notresource_id); account-scoped deletes omitorgIdentifier/projectIdentifierquery paramsbodyBuilder, notparamsSchema, preventing mis-routed validation messagescost_recommendation_countandcost_recommendation_statsdo not sendcostCategoryDTOswhen onlycost_categoryis provided withoutcost_buckets(matches existingcost_recommendationlist guard)_errorwhen count API returns non-numberdatainstead of silently returning{ count: 0 }resource_idis mapped toagent_idforgitops_agentdelete at the tool-handler layerTest files added/updated
tests/registry/gitops.test.ts— 3 new teststests/registry/registry.test.ts— 3 new teststests/tools/tool-handlers.test.ts— 1 new testWhy 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
Checklist
pnpm testpasses (385 tests in touched files)