test: cover CCM extractors, get-only params, schema cache scope, getCurrentUserId#412
Draft
cursor[bot] wants to merge 4 commits into
Draft
test: cover CCM extractors, get-only params, schema cache scope, getCurrentUserId#412cursor[bot] wants to merge 4 commits into
cursor[bot] wants to merge 4 commits into
Conversation
Update version across package.json, both manifest files, and the release-metadata test that keeps them in sync. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> AI-Session-Id: 1b46c8db-abe4-4e9f-a38b-750362ead8ac AI-Tool: claude-code AI-Model: unknown
Expand automated architecture guardrails to cover: - Global fetch() limited to documented exceptions (HarnessClient, log-resolver CDN blobs, audit webhooks) - HarnessClient instantiation only in src/index.ts - Zod v4 import convention in tool handlers and config - Explicit openWorldHint annotations on all tool handlers - No deprecated server.tool() usage - Runtime registry contract checks (scope, identifierFields, operationPolicy) Document fetch() exceptions in docs/coding-standards.md. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…Fields Add registry-metadata.test.ts to guard listFilterFields/list operation alignment, write-handler elicitation wiring, and Zod .describe() on tool inputs. Move get-only params from listFilterFields to get.paramsSchema on 15 resources so harness_list no longer advertises non-list filters. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…urrentUserId
Add behavioral regression tests for recently merged production paths:
- CCM GraphQL extractors: stable {items,total} and dual-mode summary projection
- PR #406 get-only migrations: params on get.paramsSchema, not global filter catalog
- Entity schema cache: account vs project scope do not share entries
- HarnessClient.getCurrentUserId: caching, inflight dedup, service-account error, retry
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.
Risky behavior now covered
ccmViewsExtract,ccmBreakdownExtract,ccmTimeseriesExtract,ccmSummaryExtract,ccmRecommendationsExtract) — stable{items, total}projection and dual-mode summary handling; prevents silent shape regressions in cost dashboards.listFilterFieldstoget.paramsSchema; ensures agents discover params viaharness_describeand that exclusive get-only params (metric,pod_name,reporting_timeframe,cloud_account_id,feature_type) do not pollute the globalharness_listfilter catalog.HarnessClient.getCurrentUserId()— caching, inflight deduplication, service-account error message, and retry-after-failure; protects STO exemption actor stamping.Test files added/updated
tests/registry/ccm-extractors.test.tstests/registry/get-only-params-discoverability.test.tstests/tools/harness-schema-tool.test.tstests/client/harness-client.test.tsgetCurrentUserIdtestsWhy these tests materially reduce regression risk
These paths sit on high-blast-radius surfaces: cost analytics response shaping, agent discovery metadata (wrong filters → failed API calls), schema cache contamination (wrong create payloads), and authenticated-user identity for write preflights. Static coding-standards checks from PR #406 enforce structure but do not prove runtime behavior — these tests close that gap.
Validation:
pnpm teston all 4 touched files — 115 tests passing.