Skip to content

Preserve explicit failures at the iteration limit - #30

Open
ugin-man wants to merge 1 commit into
tscircuit:mainfrom
ugin-man:codex/preserve-explicit-solver-failure
Open

ugin-man wants to merge 1 commit into
tscircuit:mainfrom
ugin-man:codex/preserve-explicit-solver-failure

Conversation

@ugin-man

@ugin-man ugin-man commented Sep 7, 2026

Copy link
Copy Markdown

When _step() reports a failure on the last allowed iteration, BaseSolver.step() still invokes tryFinalAcceptance() and can overwrite the specific error with an iteration-limit message. An accepting hook can even leave the solver both solved and failed. An explicit rejection inside tryFinalAcceptance() also loses its error.

Run final acceptance and the exhaustion fallback only while the solver is neither solved nor failed. Normal iteration exhaustion and successful final acceptance continue to work.

Validation: three new regression tests fail before the change; all 26 tests (102 assertions) pass after it, including the existing exhaustion test and a new successful-acceptance check. tsc --noEmit and bun run build pass.

Prepared with Codex (Astra) assistance and verified locally.

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

@ugin-man is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

1 participant