Skip to content

fix: handle cycles when reducing variables - #899

Merged
chrispcampbell merged 1 commit into
mainfrom
chris/897-reduce-cycle
Aug 27, 2026
Merged

fix: handle cycles when reducing variables#899
chrispcampbell merged 1 commit into
mainfrom
chris/897-reduce-cycle

Conversation

@chrispcampbell

Copy link
Copy Markdown
Contributor

Fixes #897

See issue for details. The fix is simple; just return early instead of throwing, which skips any optimization. This case was only likely to come up in practice when using the non-public / opt-in "aggressive" mode, so it should have no impact on existing models with default compilation.

AI disclosure: I guided Claude Code (Opus 5) to plan and implement the changes, and then I reviewed and refined the changes.

@ToddFincannonEI ToddFincannonEI left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like simple cleanup to me and is well covered by the tests, so let's go ahead with it.

@chrispcampbell
chrispcampbell merged commit fcb45ba into main Aug 27, 2026
6 checks passed
@chrispcampbell
chrispcampbell deleted the chris/897-reduce-cycle branch August 27, 2026 19:04
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.

Aggressive variable reduction fails on any model with a feedback loop

2 participants