[COVI-10] Expose conversation metric outputs in the CLI#93
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughConversation listing now supports an optional metric ID that requests full metric outputs. The client adds the required query parameters, and the conversation model deserializes optional metric output data. The CLI conditionally uses the new client method while preserving standard listing behavior. A CLI test verifies pagination, query parameters, and nested metric output fields. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
Greptile SummaryThis PR exposes conversation metric outputs through the conversations list command. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Reviews (2): Last reviewed commit: "Expose conversation metric outputs in CL..." | Re-trigger Greptile |
| pub total_scored_conversations: u64, | ||
| pub structured_result_conversations: u64, | ||
| pub critical_failure_conversations: u64, | ||
| pub non_critical_failure_conversations: u64, |
There was a problem hiding this comment.
Scope Counts Reject Sparse Responses
When the API returns an otherwise valid empty or partial scope with any count omitted or set to null, these required u64 fields make deserialization fail before the CLI can print the breakdown. Existing progress-style count models in this client default missing counters, so this new response shape is brittle for sparse aggregate results.
There was a problem hiding this comment.
Resolved by the architecture pivot: the specialized failure-breakdown response and all of its aggregate scope/example models were removed. The CLI now deserializes the existing Conversation plus optional full SimpleMetricOutput rows.
| pub failure: String, | ||
| pub expected_bot_response: Option<String>, | ||
| pub message_index: Option<i64>, | ||
| pub occurred_at: DateTime<Utc>, |
There was a problem hiding this comment.
Examples Require Captured Timestamps
When a returned example has failure text and expected response data but no captured occurrence timestamp, this required occurred_at field rejects the whole API response. That makes the command fail for a bounded examples payload where only one example is missing timing metadata.
There was a problem hiding this comment.
Resolved by removing the specialized aggregate response model. The generic conversation list expansion no longer introduces a required example timestamp field.
Summary
--include-metric-outputs <METRIC_ID>tocoval conversations listinclude=metric_outputs&metric_id=...API contract while preserving list filters, ordering, and page sizeresult.raw_values, into the conversation JSON responsefailure-breakdowncommand and response models so aggregation semantics stay in consumers such as CoviExample
Use normal list filters and pagination to retrieve additional pages.
Validation
cargo test: 97 CLI tests + 2 unit tests passedcargo clippy --all-targets --all-features -- -D warningspassedcargo fmt --checkpassedDependency