[HR-160] Add ground_truth_subvalues_by_timestamp to annotation create/update#52
Conversation
…/update The response model already supported subvalues (HR-148), but the create and update request models did not include the field. This adds --ground-truth-subvalues flag (JSON string) to both commands and wires it through to the API.
📝 WalkthroughWalkthroughThe changes extend review annotation request models with a new optional field for ground truth subvalues by timestamp, and update CLI commands to accept and parse this data as JSON input. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/commands/review_annotations.rs`:
- Around line 118-121: The JSON parsing for the CLI flag
--ground-truth-subvalues is duplicated and lacks flag-specific context on
failure; centralize the parse by replacing both occurrences with a single parse
helper (or a single mapped call) that takes args.ground_truth_subvalues and
returns the deserialized value, and when calling serde_json::from_str add
map_err or context that includes the flag name (e.g.,
"--ground-truth-subvalues") so errors identify the flag; update references to
use the new helper/result and remove the duplicated serde_json::from_str calls
(symbols to change: args.ground_truth_subvalues, subvalues, and the duplicated
parse site around lines with the second serde_json::from_str).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fbea5018-eebe-46a1-95e5-2f3d0be6c802
📒 Files selected for processing (2)
src/client/models/review_annotation.rssrc/commands/review_annotations.rs
The response model already supported subvalues (#45 ), but the create and update request models did not include the field. This adds
--ground-truth-subvaluesflag (JSON string) to both commands and wires it through to the API.Summary by CodeRabbit