Repository navigation
Description
Problem
formal-verification:chart runs a copy of the upstream statechart scripts, adopted at ec56937961 (#15648). The copy diverges as ours, so upstream fixes reach it only through the docs/upstream/cursor-pstack.md drift re-audit. Two upstream fixes are missing from it:
- cursor/plugins#1292: TLC output with CRLF line ends is parsed as with LF, process cleanup no longer needs a POSIX shell, the spawned JVM opens no console window, and the test corpus is replayed with CRLF line ends.
- cursor/plugins#1236: the Mermaid renderer fix and its tests.
Our copy still splits TLC output on \n alone (plugins/formal-verification/skills/chart/scripts/frontends/dot.ts:38, scripts/run.ts:61, :64, :138), and kills the worker group and cleans up through /bin/sh (scripts/run.ts:74-80, scripts/statechart.ts:161-177). On native Windows a check can misread CRLF output and cannot clean up.
This is an adapt, not a straight copy: our scripts take the jar, Java and bounds as arguments, install nothing through mise, and build the child environment through childEnv (scripts/stage.ts:72-78), which keeps only PATH, LANG, LC_ALL, HOME and TMPDIR (asserted in scripts/test/guard.test.ts:152). Upstream instead adds TEMP and TMP inline in statechart.ts.
Proposed work
- Port
splitLinesfrom fix(pstack): run /statechart on native Windows and read TLC's \r\n line ends cursor/plugins#1292'sfrontends/dot.tsand use it at every line split infrontends/dot.tsandrun.tsthat reads TLC output. - Add
kill.ts(process-group kill,taskkill /t /fon Windows) andjanitor.ts(a Node janitor in place of the/bin/shone), and dropkillGroupfromrun.ts. - Pass
windowsHide: trueto both child spawns inrun.ts, and add-Dstdout.encoding=UTF-8and-Dstderr.encoding=UTF-8to the TLC JVM arguments. - Set
TEMPandTMPto the staging folder throughchildEnv, and updateguard.test.tsto match. - Port the CRLF replay tests from
test/cli.test.tsandtest/messages.test.ts. - Port the feat(pstack): new default models, one-file why and how, statechart fixes, sharpen and reflect text cursor/plugins#1236 renderer fix in
backends/mermaid.tsandrun.ts, with its tests (test/chart.test.ts,test/corpus.test.ts,test/render.test.ts,test/labels.ts, newtest/drawn.ts) and the regeneratedtest/corpus/Login/chart.mmd. - If the chart skill states how to run the script, add the native-Windows line from fix(pstack): run /statechart on native Windows and read TLC's \r\n line ends cursor/plugins#1292's
SKILL.md.
Done when
- No line split on TLC output in
plugins/formal-verification/skills/chart/scripts/usessplit("\n")alone. - No script under
plugins/formal-verification/skills/chart/scripts/(tests excluded) spawns/bin/sh. - Every corpus case writes the committed chart and report from TLC output with CRLF line ends, in a test.
- The feat(pstack): new default models, one-file why and how, statechart fixes, sharpen and reflect text cursor/plugins#1236 renderer tests pass on our copy.
- The chart skill's node suite passes with
node --test --test-concurrency=4. - The
statechartrow ofdocs/upstream/cursor-pstack.mdrecords both fixes as taken.
References
- Upstream: fix(pstack): run /statechart on native Windows and read TLC's \r\n line ends cursor/plugins#1292 and feat(pstack): new default models, one-file why and how, statechart fixes, sharpen and reflect text cursor/plugins#1236, pstack at
0b46ec399d55f2829e88822998f53b84944837d3 - Drift re-audit that recorded this adapt: docs(upstream): re-audit cursor pstack drift and move the pin to 0b46ec3 #18165 (refs Upstream drift: cursor/plugins #16404)
- Adoption of the copy: Add the formal-verification plugin's chart skill, setup and consumer contract, proven on the loop-lane claim protocol #15648
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 22, 2026
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: the formal-verification chart skill's scripts, tests, corpus chart and one row of docs/upstream/cursor-pstack.md; people running the chart skill, mainly on native Windows.
Reversible: yes; revert the port commit.
Open questions: none
Understood: port two upstream fixes (cursor/plugins#1292 for CRLF parsing, Windows process cleanup and hidden JVM console; cursor/plugins#1236 for the Mermaid renderer) into the chart copy, adapting them to our childEnv and argument-based setup. The done-when items are exact and the design is chosen. Running the suite on a Windows host is not needed to check them. No duplicate found among open issues, and no merged pull request already covers it. #18165 and #16404 are related context only.
Automated triage. A maintainer reviews it.
docs(upstream): record adapt and already-have for two pstack changes
melodic-automation-lanes commentedon Nov 22, 2026
Not admitted to the issue lane yet: open pull request #18165 is for it.
melodic-automation-lanes commentedon Nov 22, 2026
{"v":1,"actor_id":337595936,"title_sha256":"493cda9828302b4b36edcade280e836a5aae57471a0e0ea55ff6290d038ba649","body_sha256":"6e25507dae9eb0b5de59333a44ec12a83686e8dff0ed040daa4a7e7784df50a9"}
github-actions commentedon Nov 22, 2026