Conversation
solveUntilPhase looped forever when the pipeline failed or completed before reaching the target phase, and hung on unknown phase names. It now exits on solved/failed, indexes the pipeline directly so an exhausted pipeline is handled, and throws with the list of known phases for a bad name. Closes tscircuit#267
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Author
|
@mohan-bee gentle ping when you get a chance 🙏 This one's small and time-sensitive-ish: #267 has three competing fix PRs now (#269, #270, #272), and ours carries the regression test for both terminal-state failure modes plus the |
Author
|
Fresh local verification of the regression suite (2026-09-20, bun 1.4.2, this branch): All four scenarios pass: normal stop-just-before-phase, mid-pipeline failure, exhausted pipeline, and the typo fail-fast guard. |
This branch was successfully deployed
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.
/claim #267
Problem
solveUntilPhase(phase)looped with a single stopping condition — "current phase name == target". Two terminal states break that condition and hang the event loop on no-op steps (BaseSolver.step()early-returns oncesolved/failed):failed, the phase never advances → infinite loopgetCurrentPhase()returns"none", which matches no target → an early-phase request after completion also hung, and an unknown phase name fell into the same hangFix
currentPipelineStepIndexpast the end) terminates for any targetTests (4 new, snapshot-free)
failed=true, 2 step calls)solve()xiao-stm32-usband bothLayoutPipelineSolvercallers)Relation to #269
PR #269 (opened same day) adds the terminal-state guard and two already-terminal-state tests. This PR covers additionally the mid-pipeline failure scenario (the issue's actual case), the exhausted-pipeline case, and fail-fast on typos — the two PRs do not conflict textually but this one is a superset of the fix. Happy to consolidate if maintainers prefer.