Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24 +/- ##
==========================================
+ Coverage 91.08% 91.20% +0.11%
==========================================
Files 12 12
Lines 2031 2057 +26
==========================================
+ Hits 1850 1876 +26
Misses 181 181 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
cubic analysis
1 issue found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/utils.rs">
<violation number="1" location="src/utils.rs:101">
P2: Trim leading whitespace before detecting JSON arrays; otherwise valid JSON-array input can be misparsed as CSV.
According to linked Linear issue DEV-109, JSON-array input should remain accepted while adding comma-separated support.</violation>
</file>
Linked issue analysis
Linked issue: DEV-109: Accept comma-separated strings for --fields and --metrics
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Accept comma-separated strings for --metrics (also accept JSON arrays) | Replaced serde_json::from_str with parse_string_list(metrics) |
| ✅ | Accept comma-separated strings for --fields (also accept JSON arrays) | Used parse_string_list for fields in request_logs.rs |
| ✅ | Accept comma-separated strings for --group-by (also accept JSON arrays) | group_by set via parse_string_list in src/metrics.rs |
| ✅ | Add parse_string_list utility that parses either a JSON array or a CSV string | Added parse_string_list implementation in utils.rs |
| ✅ | Add unit tests covering parse_string_list for JSON, CSV, trimming, and errors | Added test_parse_string_list with multiple assertions |
| ✅ | Update CLI/help text to mention comma-separated lists for metrics/fields/group-by | Help comments in main.rs updated to mention comma-separated lists |
| Apply change to any argument that currently accepts a JSON array of strings (global requirement) | Only metrics, group_by, and fields updated; other args not inspected | |
| ✅ | Preserve error handling for invalid JSON with input_err messages | map_err still wraps errors with input_err and original message |
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@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.
Summary by cubic
Accept comma-separated strings for
--metrics,--group-by, and--fieldsin the CLI in addition to JSON arrays. Addresses DEV-109 to make these flags easier to type while keeping JSON support.parse_string_listto accept JSON arrays or comma-separated strings, trimming whitespace and ignoring empty entries; validates and errors on invalid bracketed input.--metricsand--group-byin metrics, and--fieldsin request logs; updated help text.Written for commit 70ec6d2. Summary will update on new commits.