feat: add CDM v10dev support and aggregation override - #645
Conversation
PR Review: crucible#645 — feat: add CDM v10dev support and aggregation overrideSummary: Adds a v10dev OpenSearch instance as the new index-to target, bash completions for Issues
Style
File Coverage
Limitations
VerdictApprove with comments — The PR is functional and safe to merge. The missing |
f35200b to
ddb5317
Compare
Review responseBoth findings addressed:
Both fixes squashed into their respective original commits. |
k-rister
left a comment
There was a problem hiding this comment.
PR Review: crucible#645 — feat: add CDM v10dev support and aggregation override
Summary: Adds a v10dev OpenSearch instance as the default index target, adds --aggregation bash completions for get metric, and documents v10dev / default-aggregation in the CDM guide.
Changed files: 4
Review dimensions: Correctness, API & Contracts, Build & Deploy, Documentation, Style
Documentation
-
[bin/_help:29-39]
--aggregationnot listed inget metricoptional arguments. The help text forget metricdocuments optional flags like--breakoutand--filter, but does not mention the new--aggregationflag. Per the codebase convention ("update all three locations:bin/_help,bin/_crucible_completions, and the relevant command's own help text"), this should be added alongside the existing optional argument documentation. The completions and CDM-side help are already updated — only_helpis missing. -
[docs/how-services-work.md:223-233] Services guide example still shows v9dev as the sole instance. The
how-services-work.mdopensearch config example shows onlylocal-v9with"index-to": "local-v9". Now that v10dev is the default index target in the shippedservices.json, the example is no longer representative of what a fresh install looks like. Minor — the example illustrates structure, not policy — but it could mislead someone comparing their config to the docs. -
[schema/services.json:213] Schema description says
'v8dev', 'v9dev'— doesn't mention v10dev. Very minor, but the description string"(e.g., 'v8dev', 'v9dev')"could includev10devfor completeness.
File Coverage
- CLAUDE.md — No issues found
- bin/_crucible_completions — No issues found (completions correctly wired:
--aggregationvalue completion withsum avg max min, flag added to_crucible_filter_used_flags,v10devadded to bothaddandupdatecdmver lists) - config/services.json — No issues found (valid structure, matches schema, index-to/query-from correctly configured)
- docs/how-cdm-works.md — No issues found (accurate documentation of default-aggregation, latency class, v10dev versioning, and --aggregation override; version table v9dev description corrected from "additional document types" to "metric_def document type")
Limitations
- Cannot verify runtime behavior of v10dev indexing or
--aggregationquery-time override (requires running OpenSearch + CDM server) - Cannot verify that the
latencyclass value is accepted by CDM's metric_desc validation (implemented in CDM PR#202, not in this diff)
Verdict
Approve with comments — All code changes are correct and well-structured. The only findings are documentation gaps: bin/_help should mention --aggregation for consistency with how other optional get metric flags are documented, and two minor doc references could be updated. None are blocking.
CDM v10dev adds per-metric aggregation control via the default-aggregation field on metric_desc documents. Add a local-v10 instance definition for v10dev, set it as the index-to target, and include it in query-from so new results use v10dev while older versions remain queryable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add tab completion for the new --aggregation flag, which overrides a metric's default-aggregation at query time. Completes with the four valid values: sum, avg, max, min. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update the CDM guide to cover per-metric aggregation control introduced in v10dev. Adds the default-aggregation field to the metric_desc table, documents the four aggregation types (sum/avg/max/min) with use cases, adds v10dev to the version history, and shows the --aggregation query-time override in the commands section. Also adds class=latency as a metric category. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ddb5317 to
aee54c5
Compare
Review responseAll three documentation findings addressed:
Each fix squashed into its respective original commit. |
atheurer
left a comment
There was a problem hiding this comment.
Excellent, fully backwards-compatible schema migration. Appreciate adding the co-changes (help text, JSON schema, and guide docs) in subsequent commits. Approve!
Summary
local-v10OpenSearch instance for CDM v10dev, set as defaultindex-totarget while keeping v8dev and v9dev inquery-from--aggregation <sum|avg|max|min>flag oncrucible get metric, which overrides a metric'sdefault-aggregationat query timedefault-aggregationfield, the four aggregation types (sum/avg/max/min), and the--aggregationquery-time override indocs/how-cdm-works.mdpr-reviewto the crucible-dev-tools skills list in CLAUDE.mdRelated PRs:
Test plan
crucible get metric --aggregation <TAB>completes withsum avg max mincrucible get metric --<TAB>includes--aggregationin the flag list--aggregationoverride and confirm different aggregation behavior🤖 Generated with Claude Code