Repository navigation
Conversation
The driver starts a resumed run without awaiting it (a run can outlast a tool call). The tests waited 30 ms for it; on a loaded CI runner the resumed run started later, in the next test, where the fake process counted it as that test's first run and so did not fail it: "no failed run to resume", or one spawn too many or too few. Seen on #127 and #129, never on main by luck. - The fake run fails a plain run and passes a resumed one, decided by its arguments, not by a count every test shares. - A test that expects the resumed run waits until it is spawned and has ended (`resumedRun`), however long that takes. With a 100 ms delay put in front of every resumed run, the old file fails 3 of 9 and this one passes 9 of 9. Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
The child's `close` is not the end of a run: the driver still refreshes the diagram, forgets the failed run and says "Workflow run finished." after it, and that tail could still land in the next test. A test that expects the resumed run now waits for that last word, under the default test timeout so a slow machine fails by name. The temporary directories each run makes are removed after each test, and the "not now" test drops a pause that waited for nothing (the resume returns before anything is spawned). With 100 ms added before every resumed run and 150 ms after every child's close (not committed), main's file fails 2 of 9 and this one passes 9 of 9. Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
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.
sidecar-toolkit/test/resume-failed-run.test.tsfailed in CI on #129 and on #127, with different symptoms each time: one spawn too few or too many, or "There is no failed run to resume". Main was green only by luck.Why
resumeFailedRunstarts the resumed run without awaiting it (cli-run-driver.ts: "a run can outlast a tool call"). The tests waited a fixed 30 ms. On a loaded runner the resumed run spawned later, during the next test, afterbeforeEachhad reset the spawn list. The fake process decided "fail" byspawns.length === 1, so the next test's own run became spawn #2 and did not fail. That test then found no failed run to resume.Fix (test only)
--resume-from. No count is shared across tests.closeis not the end. The wait usesvi.waitFor, under the default test timeout, so a slow machine fails by name.Checks
https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv