Repository navigation
Conversation
On Windows the command crashed after its first TLC run, and a rule that broke read as a TLC failure. killGroup and the cleanup watcher spawned /bin/sh, which Node resolves to C:\bin\sh, so the spawn failed with ENOENT and left the detached worker and its folders behind. On Windows, killGroup runs taskkill /T /F, and the watcher is janitor.ts on the worker's runtime: when the command's pipe closes, it kills the worker's tree and removes the stage and temporary folders. The command kills the worker's tree only while the worker runs, since Windows can give a finished worker's PID to another process. POSIX keeps the /bin/sh commands. Java on Windows ends lines with CRLF. outputLines, fileLines, and linesOf split on \n only, so each line kept a \r, and the message and verdict regexes, which end in $, matched nothing. TLC's exit 12 read as "its output names no rule that broke", and marks went missing from the chart. The three splitters now drop the \r before each \n. The worker also gets TEMP and TMP, which os.tmpdir() reads on Windows, so TLC's folder sits inside the folder that the command removes. The java and mise spawns pass windowsHide, so the detached worker's java runs open no console window. cli.test.ts replays three corpus cases with their TLC output in CRLF. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
On Windows the statechart command crashed after its first TLC run. Run as the worker alone, a rule that broke read as a TLC failure.
killGroup(run.ts) and the cleanup watcher (statechart.ts) spawned/bin/sh. Node resolves that toC:\bin\sh, so the spawn failed withENOENT, and the detached worker and its folders outlived the command. On Windows,killGrouprunstaskkill /T /F /PID. The watcher isjanitor.ts, run on the worker's runtime: when the command's pipe closes, it kills the worker's tree and removes the stage and temporary folders. The command kills the tree only while the worker runs, since Windows can give a finished worker's PID to another process. POSIX keeps the same/bin/shcommands.outputLines,fileLines(run.ts), andlinesOf(frontends/dot.ts) split on\nonly, so each line kept a\r. The message and verdict regexes, which end in$, then matched nothing: TLC's exit 12 read as "its output names no rule that broke", and marks went missing from the chart. The splitters now drop the\rbefore each\n.TEMPandTMPbesideTMPDIR, sinceos.tmpdir()readsTEMPon Windows. TLC's folder now sits inside the folder the command removes.windowsHide, which Node ignores elsewhere.cli.test.ts replays DieHard, MediaPlayer, and MediaPlayerProps with their TLC output and dump in CRLF, and checks the chart and report. It runs on every platform. Without the CRLF fix it fails with the Windows error.
harness/pstack/claude-codegets the same files, byte for byte.Tested on Windows 11, Git Bash, Node 24.13, Temurin 25.0.5, tla2tools 1.7.4:
scripts/statechartlauncher.TLA2TOOLSset, all 33 corpus specs give the committed chart and report against real TLC, and the differential, plain-TLC, and chart-budget tests pass.execFileSync("npm")cannot startnpm.cmd.These test-harness limits on Windows are unchanged by this PR:
test/java.tsasJAVA, which Windows cannot execute. In a scratch copy that starts a.tsJAVA through Node, all 33 replays, the dump-order test, and the new CRLF test pass.fs.cpSyncnamesspec-éasspec-é. The CLI itself checks a spec in aspec-éfolder.ConfigOracle.java.Not run: the suite on Linux or macOS, because no POSIX machine was at hand. The POSIX branches run the same commands, and
split(/\r?\n/)equalssplit("\n")on LF text. CI covers it.🤖 Generated with Claude Code