Skip to content

fix: keep person-only commands out of macros and add-ins, remove history on permanent delete, stable desktop port, safer Windows agent starts - #17

Merged
nodemode-ai merged 9 commits into
mainfrom
fix/review-2026-11-28
Nov 29, 2026
Merged

nodemode-ai merged 9 commits into
mainfrom
fix/review-2026-11-28

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Delete permanently and Empty Trash now also remove the document's Versions folder, its activity log and any key held in memory. That cleanup holds the versions lock.
  • When a password is set or removed, each saved version is written to a temporary file and then renamed into place.
  • The desktop engine reuses its last port, saved in window-port.json in the data folder, when that port is free. The window origin stays the same between launches, so recovery copies and window preferences can be read again.
  • On Windows, an npm .cmd shim is resolved to its node script or exe and run directly, without cmd.exe. When cmd.exe is still needed, some arguments are refused: those with control characters, %, double quotes, or unquoted & | < > ^ ( ) !. If the program path itself is quoted, any later argument that would be quoted is refused too.
  • Tests: backend/tests/test_person_only.py, test_program_start.py, test_work_folder.py, plus new cases in test_library.py and test_startup.py. Backend suite 253 passed, window smoke 2 passed, frontend typecheck and build pass.
  • Windows agent starts that still go through the command interpreter now refuse any argument with a control character or any of & | < > ^ ( ) ! % or a double quote, whether or not it contains spaces. The message points to standard input or a file for long text.
  • The program path on such a start is checked the same way. Brackets are allowed, so paths like 'Program Files (x86)' keep working.
  • npm .cmd shims still run their node script or exe directly, so their arguments reach the program unchanged. Unit tests cover both paths on any OS.

Tests

  • Each fix has a test that fails on the previous code where practical.
  • The repo CI commands were run locally on macOS. Every failure seen locally also fails on main in the same environment (missing local tools or platform-specific tests); none is introduced here.
  • Please rely on this PR's CI run for Linux and Windows.

For the owner

  • A few related items need an owner decision; they are listed separately, not here.

How to ship

  • Independent of other repos; merge in any order. No version bump; release as usual.

Step macros and add-in command prefixes can no longer reach the terminal,
agent, cloud storage or document password commands, and outside agents
are refused password.set and password.remove like the other commands
only the person runs from the window.
…eleted for good

Delete permanently and Empty Trash now also remove the document's
version snapshots and activity log.
…ged app

A frozen engine has no repository, so the Chat agent, a resumed tab and a
plain terminal no longer start inside the installed app folder.
…him names its target

An npm .cmd shim is resolved to its node script or exe and run directly.
When a start still needs cmd.exe, arguments with control characters, %,
double quotes or unquoted command interpreter characters are refused.
The window's origin no longer changes on every launch, so recovery copies
and preferences kept in the window are found again after a restart.
When the program's path has a space, cmd /c drops the first and last
quote of the line, so a later quoted word would no longer be quoted.
Such words are now refused on the command interpreter start.
…mand interpreter start

When a Windows program still starts through cmd.exe, any argument with a
control character or one of & | < > ^ ( ) ! % or a double quote is refused,
with or without a space, and the message points to standard input or a file
for long text. The program path is checked the same way, brackets aside.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 18:20
@nodemode-ai
nodemode-ai merged commit d9b6ea4 into main Nov 29, 2026
5 checks passed
@nodemode-ai
nodemode-ai deleted the fix/review-2026-11-28 branch November 29, 2026 18:43
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