Skip to content

Fix restraint config comparison#139

Merged
lohedges merged 2 commits intodevelfrom
fix_config_comparison
Apr 9, 2026
Merged

Fix restraint config comparison#139
lohedges merged 2 commits intodevelfrom
fix_config_comparison

Conversation

@lohedges
Copy link
Copy Markdown
Contributor

@lohedges lohedges commented Apr 9, 2026

This PR fixes the comparison of restraints loaded from a YAML config file. The code had missed a continue statement that would jump to the top of the loop after a successful restraint comparison, so it fell through to the catch-all by-value comparison, which fails for hex strings since they include metadata (e.g. a timestamp) from the time the object was serialised. The same fix is applied to the lambda_schedule comparison. The restraints comparison is also improved to explicitly check that the number of restraints is the same between configs, and to correctly handle different orderings by matching each restraint against the pool of unmatched restraints from the other config.

@lohedges lohedges added bug Something isn't working cresset Related to work with Cresset labels Apr 9, 2026
@lohedges lohedges merged commit 5ede7ea into devel Apr 9, 2026
4 checks passed
@lohedges lohedges deleted the fix_config_comparison branch April 9, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cresset Related to work with Cresset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant