fix(release): port logging, score parsing, and sf-config wiring#26
fix(release): port logging, score parsing, and sf-config wiring#26blackopsrepl merged 5 commits intorelease/0.6.0from
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecdbdef1ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if line.contains(&format!("{}::", name)) { | ||
| continue; |
There was a problem hiding this comment.
Handle flat-shape tuples when removing constraints
In flat-shape constraint modules like templates/list/vehicle-routing/src/constraints/mod.rs, generate constraint appends foo::constraint() into the same tuple line as the existing constraints. This branch drops any line containing foo::, so destroy constraint foo deletes the entire tuple expression instead of just that element, leaving create_constraints() with no return value and breaking compilation for projects using that layout.
Useful? React with 👍 / 👎.
| .map(|s| { | ||
| let score = S::Score::parse(s).unwrap_or_else(|e| { | ||
| panic!("Invalid starting_temperature '{}': {}", s, e) | ||
| }); | ||
| score.to_scalar().abs() |
There was a problem hiding this comment.
Accept scalar SA temperatures in config-driven builders
This now parses starting_temperature with S::Score::parse, which rejects the scalar values that the acceptor already supports (SimulatedAnnealingAcceptor::new still takes an f64). A solver.toml that previously used 1.5 or 100.0 will now panic at startup unless the string happens to match the score type’s textual format, so existing simulated-annealing configs regress as soon as they use a numeric temperature or any fractional value for SoftScore/HardSoftScore.
Useful? React with 👍 / 👎.
| struct SfConfig { | ||
| title: String, | ||
| subtitle: String, | ||
| #[serde(default)] | ||
| constraints: Vec<String>, |
There was a problem hiding this comment.
Preserve unknown top-level keys in sf-config.json
SfConfig only models a fixed set of top-level fields, and save() serializes that struct back verbatim. Because Serde ignores unknown keys on input, any existing static/sf-config.json that contains additional UI settings will silently lose them the next time generate/destroy updates constraints, entities, or facts, even though those commands only intended to touch one list.
Useful? React with 👍 / 👎.
Summary
RUST_LOGis setstarting_temperatureviaParseableScoresf-config.jsonhelper wiring for CLI generate/destroy flowsTesting