Repository navigation
fix: assertions enter the model identifier (#1581 follow-up) - #1586
Merged
Merged
Conversation
Identifier skipped underscore attributes, so _assertions never hashed and a model with an ordering assertion targeted the same output directory as the unordered one: search.fit loaded the completed unordered result instead of running the ordered search. Assertions are now hashed (marker + class + operands) when present; models without assertions keep byte-identical identifiers. Found by an independent review of PyAutoGalaxy#611 (mge_model_from order_bases). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015RALRY9yekWDTtbVfok64a
Merged
2 of 3 tasks
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
Identifierskips underscore-prefixed attributes, so a model's_assertionsnever entered the identifier:mge_model_from(order_bases=True)(PyAutoLabs/PyAutoGalaxy#611) and the unordered model hashed identically, and an ordered fit would load the completed unordered result from the same output directory instead of running. Found by an independent Codex review of #611 and verified empirically.Assertions are now hashed (a marker, the assertion class and its operands in order) whenever a model carries any; models without assertions keep byte-identical identifiers, so nothing on disk is orphaned by this change.
API Changes
None — internal change to
autofit.mapper.identifier.Identifier; identifiers change only for models that carry assertions (previously indistinguishable from their assertion-free twins).See full details below.
Test Plan
mainvaluepytest test_autofit -qgreenFull API Changes (for automation & release notes)
Changed Behaviour
Identifiernow includes a model's assertions in the hash when present.Migration
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_015RALRY9yekWDTtbVfok64a