Skip to content

fix(pstack): preserve unrecorded TLC files - #1

Merged
deanrie merged 2 commits into
deanrie:pstack/statechart-foreign-recursivefrom
kam-hak:codex/statechart-owned-tlc
Oct 24, 2026
Merged

deanrie merged 2 commits into
deanrie:pstack/statechart-foreign-recursivefrom
kam-hak:codex/statechart-owned-tlc

Conversation

@kam-hak

@kam-hak kam-hak commented Oct 23, 2026

Copy link
Copy Markdown

Why

The tlc/ check in cursor#785 accepts any .cfg, .out, or .dot file. A successful rerun can delete a user's backup.

Each run records the TLC filenames it writes. The next run uses that record to identify unrelated files.

Scope

This extends cursor#785 with exact TLC filenames and regression tests. The existing top-level checks stay the same.

Tradeoffs

Existing output folders, including those written by upstream main, have no tlc/.written.json record. If their tlc/ folder has files, use a new --out folder. Files named in a valid record remain replaceable, including files that a user edited.

Blast radius

This changes output-folder validation and adds a record to each completed run. It also updates the generated Claude Code copy.

Verification

  • With real TLC and the upload.mmd fixture, normal reruns pass. An added backup config causes exit 2 and leaves all output files unchanged.
  • The new regressions pass for unrelated files, changed rules, invalid records, symlinks, and directories.
  • The tests that run without TLC pass. node scripts/generate-pstack-harness-trees.mjs --check passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants