Fix #289: Add ShortestWeightConstrainedPath model#632
Open
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #632 +/- ##
==========================================
+ Coverage 96.88% 96.90% +0.01%
==========================================
Files 269 271 +2
Lines 36036 36357 +321
==========================================
+ Hits 34915 35232 +317
- Misses 1121 1125 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…89-shortest-weight-constrained-path
Contributor
Implementation SummaryChanges
Deviations from Plan
Open Questions
|
There was a problem hiding this comment.
Pull request overview
Adds a new graph satisfaction model, ShortestWeightConstrainedPath, to the problemreductions catalog, integrating it into the CLI and documentation pipeline alongside tests and canonical examples.
Changes:
- Introduces
ShortestWeightConstrainedPathmodel with schema registration, variants, evaluation logic, and canonical example-db spec. - Wires the model into public exports (
models,prelude), CLIpred createflag parsing, and CLI test coverage. - Updates example-db fixtures and generated docs JSON (problem schemas + reduction graph) plus paper documentation/references.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/suites/integration.rs | Adds integration coverage ensuring the brute-force solver can find a satisfying config. |
| src/unit_tests/trait_consistency.rs | Extends trait-consistency checks to include the new model. |
| src/unit_tests/models/graph/shortest_weight_constrained_path.rs | Adds unit tests for construction, accessors, evaluation, brute-force enumeration, and serde roundtrip. |
| src/unit_tests/export.rs | Minor formatting adjustment in export-related test. |
| src/unit_tests/example_db.rs | Refactors formatting/labeling in fixture verification assertions. |
| src/models/mod.rs | Re-exports the new graph model at the models module level. |
| src/models/graph/shortest_weight_constrained_path.rs | Implements the model + schema entry + canonical example + variant declaration. |
| src/models/graph/mod.rs | Registers module, re-export, and canonical example spec aggregation. |
| src/lib.rs | Exposes the new model via the prelude. |
| src/example_db/fixtures/examples.json | Adds canonical example fixture entry for the new model. |
| problemreductions-cli/tests/cli_tests.rs | Adds CLI tests for pred create ShortestWeightConstrainedPath and error cases. |
| problemreductions-cli/src/commands/create.rs | Implements pred create construction path and edge-length parsing helper. |
| problemreductions-cli/src/cli.rs | Adds new CLI flags (--edge-lengths, bounds, source/target) and help text. |
| docs/src/reductions/reduction_graph.json | Updates generated reduction graph catalog to include the new node/variant. |
| docs/src/reductions/problem_schemas.json | Updates generated schema catalog to include the new problem’s fields. |
| docs/paper/references.bib | Adds citations relevant to constrained shortest path. |
| docs/paper/reductions.typ | Adds paper section/example/figure for the new model. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+32
to
+33
| FieldInfo { name: "length_bound", type_name: "N::Sum", description: "Upper bound K on total path length" }, | ||
| FieldInfo { name: "weight_bound", type_name: "N::Sum", description: "Upper bound W on total path weight" }, |
Comment on lines
+29
to
+33
| FieldInfo { name: "edge_weights", type_name: "Vec<N>", description: "Edge weights w: E -> ZZ_(> 0)" }, | ||
| FieldInfo { name: "source_vertex", type_name: "usize", description: "Source vertex s" }, | ||
| FieldInfo { name: "target_vertex", type_name: "usize", description: "Target vertex t" }, | ||
| FieldInfo { name: "length_bound", type_name: "N::Sum", description: "Upper bound K on total path length" }, | ||
| FieldInfo { name: "weight_bound", type_name: "N::Sum", description: "Upper bound W on total path weight" }, |
…89-shortest-weight-constrained-path
Contributor
Review Pipeline Report
Remaining issues for final review
🤖 Generated by review-pipeline |
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
Fixes #289