Skip to content

fix(formal-verification): port upstream statechart CRLF, Windows cleanup and renderer fixes to chart #18224

Closed

Description

@kyle-sexton

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

Done when

  • No line split on TLC output in plugins/formal-verification/skills/chart/scripts/ uses split("\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 statechart row of docs/upstream/cursor-pstack.md records both fixes as taken.

References

Activity

  1. added
    needs-triage
    on Nov 22, 2026
  2. github-actions commented on Nov 22, 2026

    @github-actions
    Contributor

    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.

  3. removed
    needs-triage
    on Nov 22, 2026
  4. melodic-automation-lanes commented on Nov 22, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane yet: open pull request #18165 is for it.

  5. melodic-automation-lanes commented on Nov 22, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"493cda9828302b4b36edcade280e836a5aae57471a0e0ea55ff6290d038ba649","body_sha256":"6e25507dae9eb0b5de59333a44ec12a83686e8dff0ed040daa4a7e7784df50a9"}

  6. github-actions commented on Nov 22, 2026

    @github-actions
    Contributor
    No description provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Work status

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions