Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #654 +/- ##
==========================================
+ Coverage 96.88% 96.90% +0.01%
==========================================
Files 269 271 +2
Lines 36036 36311 +275
==========================================
+ Hits 34915 35187 +272
- Misses 1121 1124 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Implementation SummaryChanges
Deviations from Plan
Open Questions
|
There was a problem hiding this comment.
Pull request overview
Adds a new graph satisfaction model, KthBestSpanningTree, integrating it into the registry/catalog, CLI instance creation, example DB fixtures, and paper/docs so it becomes a first-class “model” in the reductions ecosystem.
Changes:
- Introduces
KthBestSpanningTree<i32>model implementation with schema registration, variants, and example-db spec. - Wires the model into exports/re-exports, CLI
pred create, fixtures, and documentation (JSON + paper). - Adds unit tests for construction/evaluation/serialization/solver behavior.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/models/graph/kth_best_spanning_tree.rs | New model implementation, schema registration, example-db spec, and variant declaration. |
| src/models/graph/mod.rs | Registers the new graph model module + re-export + example-db spec aggregation. |
| src/models/mod.rs | Re-exports KthBestSpanningTree at the crate models level. |
| src/lib.rs | Exposes KthBestSpanningTree via the public prelude. |
| src/unit_tests/models/graph/kth_best_spanning_tree.rs | New unit tests covering the model behavior. |
| src/unit_tests/trait_consistency.rs | Adds trait-consistency smoke check for the new model. |
| problemreductions-cli/src/commands/create.rs | Adds pred create KthBestSpanningTree ... support and example string. |
| problemreductions-cli/src/cli.rs | Documents required flags for KthBestSpanningTree in CLI help text. |
| src/example_db/fixtures/examples.json | Adds a canonical example instance + witness for the new model. |
| src/unit_tests/example_db.rs | Minor refactor/formatting in fixture verification output/looping. |
| src/unit_tests/export.rs | Formatting tweak to keep rule JSON one-liner assertion compact. |
| docs/src/reductions/problem_schemas.json | Adds generated schema entry for KthBestSpanningTree. |
| docs/src/reductions/reduction_graph.json | Adds generated node entry for KthBestSpanningTree and updates graph indices. |
| docs/paper/references.bib | Adds Lawler (1972) and Eppstein (1992) references. |
| docs/paper/reductions.typ | Adds paper section describing and illustrating KthBestSpanningTree. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let all = solver.find_all_satisfying(&problem); | ||
| assert_eq!(all.len(), 4_896); | ||
| assert!(all.iter().any(|config| config == &witness)); | ||
| } |
| let (k, _variant) = | ||
| util::validate_k_param(&resolved_variant, args.k, None, "KthBestSpanningTree")?; | ||
| let bound = args.bound.ok_or_else(|| { | ||
| anyhow::anyhow!( | ||
| "KthBestSpanningTree requires --bound\n\n\ | ||
| Usage: pred create KthBestSpanningTree --graph 0-1,0-2,1-2 --edge-weights 2,3,1 --k 1 --bound 3" | ||
| ) | ||
| })? as i32; | ||
| ( | ||
| ser(problemreductions::models::graph::KthBestSpanningTree::new( | ||
| graph, | ||
| edge_weights, | ||
| k, | ||
| bound, | ||
| ))?, |
Review Pipeline Report
Also fixed CLI discoverability on this branch: Remaining issues for final review
Generated by review-pipeline |
Summary
KthBestSpanningTreeNotes
Fixes #249