test: cover GitOps delete, CCM paired filters, and shrinkwrap validation#683
Draft
cursor[bot] wants to merge 1 commit into
Draft
test: cover GitOps delete, CCM paired filters, and shrinkwrap validation#683cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
- GitOps: paramsSchema requires agent_id on delete; account scope omits org/project; application delete cascade errors come from bodyBuilder - harness_delete: maps resource_id to agent_id for gitops_agent - CCM: cost_recommendation_count/stats skip costCategoryDTOs without buckets; count dispatch surfaces _error on non-number API responses - adm-zip: extract validateNpmShrinkwrapMetadata for CI check coverage 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 regression-test coverage run targeting recently merged high-risk paths on
main(3.2.13).Risky behavior now covered
gitops_agent.deleterequiresagent_id(notresource_id); account-scoped deletes omit org/project query params;gitops_application.deletecascade validation comes frombodyBuilder, not paramsSchemaresource_idis forwarded toagent_idforgitops_agentdeletes (tool-handler layer, not just registry dispatch)cost_recommendation_countandcost_recommendation_statsomitcostCategoryDTOswhen onlycost_categoryis provided withoutcost_buckets(prevents silent partial filtering)_errorwhen API returns non-numberdatainstead of silently returning{ count: 0 }validateNpmShrinkwrapMetadatawith tests for version drift, dependency mismatch, and insecure/missing hoistedadm-zipTest files added/updated
tests/registry/gitops.test.tstests/registry/registry.test.tstests/tools/tool-handlers.test.tstests/scripts/adm-zip-security-lib.test.tsWhy these tests materially reduce regression risk
These paths sit on destructive operations (GitOps agent delete), financial data scoping (CCM cost category filters), and a CVE security gate (adm-zip shrinkwrap validation). A regression in any of them would either delete the wrong resource, return misleading cost counts, or ship a vulnerable npm consumer install — all without obvious runtime errors.
Type of Change
Checklist
pnpm testpasses (398 tests in touched files)pnpm typecheckpassespnpm buildpassespnpm standards:checkpassespnpm docs:checkpasses