Skip to content

fix(store): leave the CLI's own process chain out of the editor-open guard - #171

Merged
renezander030 merged 2 commits into
masterfrom
fix/volta-shim-editor-guard
Nov 6, 2026
Merged

renezander030 merged 2 commits into
masterfrom
fix/volta-shim-editor-guard

Conversation

@renezander030

Copy link
Copy Markdown
Owner

Fixes #168.

Under Volta the capcut command is a shim executable named capcut that starts node. The editor-open guard compared process names only, so it matched the CLI's own parent as the CapCut editor and refused every --apply.

The guard now reads ps -axo pid=,ppid=,comm= (posix) and the PID column of tasklist (Windows), leaves out the CLI's own process and every ancestor of it, and still reports an editor that runs beside it. On Windows, where tasklist lists no parent ids, the direct parent is left out. matchEditorProcesses keeps its name-only behaviour from #99.

Evidence

  • npm test: 1392 tests, 1390 pass, 0 fail (2 skipped); biome check --error-on-warnings src/ test/: no issues.
  • New tests in test/editor-processes.test.mjs: a Volta shim chain (.volta/bin/capcut -> node) is ignored; an editor beside that chain is still detected; the whole parent chain is walked; a command name with spaces stays whole; on Windows the direct parent is left out and a real CapCut.exe is still found.
  • The stand-in ps in test/sync-timelines.test.mjs answers in the new pid ppid comm format; "refuses --apply while the editor is running unless --force-write" passes with it.

Door

Two-way door: a guard-only change, reverted by reverting this commit; no draft data, file format or flag changes.

Blast radius

Only the editor-open check before writes (editorProcesses in src/store.ts) on macOS, Linux and Windows. If the process listing cannot be read the guard reports no editor, as before.

renezander030 and others added 2 commits November 5, 2026 16:21
…guard

Under Volta the `capcut` command is a shim executable named `capcut` that
starts node, so the guard matched the CLI's own parent as the CapCut editor
and refused every --apply. The guard now lists pid and ppid with the process
names, leaves out the CLI's own process and every ancestor of it (the direct
parent on Windows, where tasklist has no parent ids), and still detects an
editor running beside it.

Fixes #168
@renezander030
renezander030 merged commit 0f58b83 into master Nov 6, 2026
15 checks passed
@renezander030
renezander030 deleted the fix/volta-shim-editor-guard branch November 6, 2026 09:24
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.

editor-open guard false-positives under Volta: the shim binary itself is named 'capcut'

1 participant