Repository navigation
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replace the hand-written Deserialize impl with the repo's serde try_from pattern; behavior is unchanged (runtime K requires num_colors, fixed K may omit it, explicit null and mismatched counts are rejected). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1248 +/- ##
==========================================
- Coverage 97.19% 96.94% -0.26%
==========================================
Files 1146 1146
Lines 151558 154062 +2504
==========================================
+ Hits 147308 149351 +2043
- Misses 4250 4711 +461 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Agentic Review ReportReviewed head Verdict: changes requested (one small Important fix). The behaviour change is correct and well-targeted. The one problem is that the new serde conversion uses a bare (a) Structural and semantic
This matches the PR description. Fixed-K behaviour is unchanged, and KN no longer invents
(b) Quality
(c) Feature testThe CLI was built in the review worktree and run from a scratch directory as
The default-variant FindingsCritical: none. Important
Minor
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed the Important finding: the |
Address needless_bool and needless_range_loop lints that the updated stable toolchain reports on existing code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
KColoring<KN, _>silently deserialized a missingnum_colorsas0. A JSON instance written with a typo ("k": 4instead of"num_colors": 4) therefore became a zero-colour problem: its ILP had no variables andpred solvereportedinfeasiblein 0 s — a wrong answer with no error.KN) JSON now requiresnum_colors; a missing field is a deserialization error.K2,K3) keep their behaviour:num_colorsmay be omitted (it equals K) and a mismatched ornullvalue is rejected.try_fromdata form, the same serde pattern other models use, instead of a field-level default.ktypo).Unknown fields are still ignored, as for every model except QUBO (
deny_unknown_fields); no repo-wide policy exists, so this PR does not introduce one. An audit of#[serde(default ...)]insrc/models/found no other defaults that invent values for required inputs.Test plan
cargo test --workspace: 7205 passed, 0 failedcargo clippy --all-targets: clean for the changed filesmissing field `num_colors`; the corrected input solves to[0, 1, 0]🤖 Generated with Claude Code