Opt-in resolver fallback, small-system solving, and selection explanations (N3)#11
Merged
Merged
Conversation
…lanations New gpu_stack/core/resolver_advanced.py behind two opt-in flags: - --fallback-on-violated-validity: when a selected Approximation's validity check is numerically violated and an alternative defining relation exists, retry with the alternative and record an explicit trace entry naming the switch. Default behavior unchanged. - --solve-systems: when resolution stalls on a 2- or 3-variable cycle of mutually defined variables, solve the subsystem symbolically and accept only unique real solutions consistent with symbol assumptions. Larger systems stay missing as before. - Trace steps now carry selection reasons (sole identity, variant choice, fallback, system solve) and unresolved inputs can name not-selectable alternatives. Defaults are inert: existing invocations produce identical traces with no new fields populated, asserted by regression tests. 25 new tests in tests/test_resolver_advanced.py. Full pytest: 695 passed. https://claude.ai/code/session_01Eu2JVnPFgMQftwYTP3cGQZ
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.
N3 of 10: Resolver upgrade (opt-in, defaults inert)
New
gpu_stack/core/resolver_advanced.pybehind two opt-in flags:--fallback-on-violated-validity: when a selected Approximation's validity check is numerically violated and an alternative defining relation exists, retry with the alternative and record an explicit trace entry naming the switch. Default behavior unchanged: report the violation, do not switch.--solve-systems: when resolution stalls on a 2- or 3-variable cycle of mutually defined variables, solve the subsystem symbolically (sympy), accepting only unique real solutions consistent with symbol assumptions (positivity etc.). Larger systems stay missing as before.Guarantees
Verification
Note: agent was interrupted by a session limit after implementation+tests; coordinator validated, committed, and pushed. Known merge overlap with the N7 branch in
cli.pysubcommand wiring (resolved at integration).https://claude.ai/code/session_01Eu2JVnPFgMQftwYTP3cGQZ
Generated by Claude Code