Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #682 +/- ##
==========================================
+ Coverage 97.13% 97.15% +0.01%
==========================================
Files 298 300 +2
Lines 39563 39753 +190
==========================================
+ Hits 38430 38621 +191
+ Misses 1133 1132 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
Implementation SummaryChanges
Deviations from Plan
Open Questions
|
There was a problem hiding this comment.
Pull request overview
Adds a new StaffScheduling satisfaction model to the problem registry, including CLI instance creation support, curated examples, and paper documentation updates.
Changes:
- Introduces
StaffSchedulingmodel (schema registration, evaluation, variants, canonical example). - Adds unit tests and example-db fixture/example lookup coverage for
StaffScheduling. - Extends CLI
pred createto parse/validate StaffScheduling inputs and updates paper docs/references accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/models/misc/staff_scheduling.rs |
New StaffScheduling model implementation + schema + canonical example + variants. |
src/models/misc/mod.rs |
Registers the new misc model module/export and adds it to canonical example specs. |
src/models/mod.rs |
Re-exports StaffScheduling from the models top-level. |
src/lib.rs |
Exposes StaffScheduling via the crate prelude. |
src/unit_tests/models/misc/staff_scheduling.rs |
Adds unit tests for creation, evaluation, solver behavior, and serialization. |
src/unit_tests/example_db.rs |
Adds a model-example lookup test for StaffScheduling. |
src/example_db/fixtures/examples.json |
Adds StaffScheduling canonical fixture and updates some existing fixture solutions. |
problemreductions-cli/src/cli.rs |
Adds --schedules, --requirements, --num-workers flags and documents StaffScheduling flags. |
problemreductions-cli/src/commands/create.rs |
Implements pred create StaffScheduling parsing/validation + help/format hints + tests. |
docs/paper/references.bib |
Adds citation for Bartholdi/Orlin/Ratliff (1980). |
docs/paper/reductions.typ |
Adds StaffScheduling to the paper’s problem definitions and catalog mapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2106
to
2117
| fn parse_bool_rows(rows_str: &str) -> Result<Vec<Vec<bool>>> { | ||
| rows_str | ||
| .split(';') | ||
| .map(|row| { | ||
| row.trim() | ||
| .split(',') | ||
| .map(|s| match s.trim() { | ||
| .map(|entry| match entry.trim() { | ||
| "1" | "true" => Ok(true), | ||
| "0" | "false" => Ok(false), | ||
| other => Err(anyhow::anyhow!( | ||
| "Invalid boolean value '{}': expected 0/1 or true/false", | ||
| other | ||
| "Invalid schedule entry '{other}': expected 0/1 or true/false" | ||
| )), |
Comment on lines
+42
to
+52
| /// Create a new Staff Scheduling instance. | ||
| pub fn new( | ||
| shifts_per_schedule: usize, | ||
| schedules: Vec<Vec<bool>>, | ||
| requirements: Vec<u64>, | ||
| num_workers: u64, | ||
| ) -> Self { | ||
| assert!( | ||
| num_workers < usize::MAX as u64, | ||
| "num_workers must fit in usize so dims() can encode 0..=num_workers" | ||
| ); |
docs/paper/references.bib
Outdated
| } | ||
|
|
||
| @article{bartholdi1980, | ||
| author = {John J. Bartholdi, James B. Orlin and H. Donald Ratliff}, |
…nd concurrent additions) Merge conflicts arose from concurrent model additions (MultiprocessorScheduling, BiconnectivityAugmentation, BalancedCompleteBipartiteSubgraph, StrongConnectivityAugmentation) landing on main while this branch adds StaffScheduling. Resolved by keeping both sides in all six conflicted files. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The merge-with-main commit accidentally corrupted test_create_biconnectivity_augmentation_json and deleted three other tests (biconnectivity_isolated, balanced_complete_bipartite, and balanced_complete_bipartite_rejects). Restore them from origin/main. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Replace bar(R) with overline(R) for proper rendering of the requirement vector notation. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
isPANN
approved these changes
Mar 18, 2026
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 #512