Repository navigation
fix(bench): handle Compaction variant in routing_allocation_bench - #1331
Conversation
PR #1302 added `ResponseInputOutputItem::Compaction` per I3 but did not extend the exhaustive match in the routing-allocation bench, breaking `cargo clippy --all-targets --all-features -- -D warnings` on main: error[E0004]: non-exhaustive patterns: `ResponseInputOutputItem::Compaction { .. }` not covered --> model_gateway/benches/routing_allocation_bench.rs:17:38 Compaction carries encrypted_content only (no routable text), so the forced-cascade arm returns None, matching the neutral shape of the sibling McpApprovalRequest / ImageGenerationCall arms. Signed-off-by: Simo Lin <linsimo.mark@gmail.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe legacy routing text extraction function in the benchmark now explicitly filters out Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
PR #1302 (I3 compaction) added the
ResponseInputOutputItem::Compactionvariant but did not extend the exhaustive match inrouting_allocation_bench.rs, breakingcargo clippy --all-targets --all-features -- -D warningson main. This is the forced-cascade arm that should have shipped with #1302.Error on main
All downstream PRs that run clippy are red because of this — e.g., PR #1330
unit-testslane: https://github.com/lightseekorg/smg/actions/runs/24800464547/job/72581561317Change
Add a single arm returning
None— Compaction carries onlyencrypted_content, no routable text to extract. Matches the neutral shape of the siblingMcpApprovalRequest/ImageGenerationCallarms.ResponseInputOutputItem::ImageGenerationCall { .. } => None, + ResponseInputOutputItem::Compaction { .. } => None, })Test plan
cargo clippy --all-targets --all-features -- -D warningscompletes clean (Finished dev profile ... target(s) in 4m 56s).Nonefor all non-text-bearing variants; this adds the arm for the new Compaction variant following the same pattern.Follow-up
None required — this is a one-line forced-cascade fix.
Summary by CodeRabbit