Skip to content

Opt-in resolver fallback, small-system solving, and selection explanations (N3)#11

Merged
Cuuper22 merged 1 commit into
mainfrom
claude/eager-cerf-kvmqta-n3
Jun 11, 2026
Merged

Opt-in resolver fallback, small-system solving, and selection explanations (N3)#11
Cuuper22 merged 1 commit into
mainfrom
claude/eager-cerf-kvmqta-n3

Conversation

@Cuuper22

Copy link
Copy Markdown
Owner

N3 of 10: Resolver upgrade (opt-in, defaults inert)

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: 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.
  • Selection explanations: trace steps now carry why each relation was selected (sole identity, variant choice, fallback, system solve); unresolved inputs can name not-selectable alternatives.

Guarantees

  • Defaults are inert: existing invocations produce identical traces with no new fields populated — asserted by regression tests (existing 670 tests pass unmodified).
  • 25 new tests: fallback fixtures, 2-variable and 3-variable solvable cycles, unsolvable cycle stays missing, assumption-filtered multi-root solutions.

Verification

  • Full pytest: 695 passed

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.py subcommand wiring (resolved at integration).

https://claude.ai/code/session_01Eu2JVnPFgMQftwYTP3cGQZ


Generated by Claude Code

…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
@Cuuper22 Cuuper22 merged commit 9835466 into main Jun 11, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants