Skip to content

fix: safer recovery, chapter rewrites, saves, shared review pages and Windows agent starts - #15

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

  • Recovery only opens and clears snapshots FormDesign wrote itself (a numeric file name plus its JSON sidecar), so other .fdoc files in a folder are left alone.
  • An outside agent now asks before running file.recovery.open or file.recovery.save, and before the book paginate and sync actions rewrite chapter files.
  • Book chapter rewrites keep the earlier .fdes as a version first, and .fdes saves and chapter rewrites write through a temporary file and an atomic rename (following a linked file to its target), so a failed or interrupted write leaves the earlier file whole.
  • On Windows, an npm .cmd shim is resolved to the node script or .exe it runs and started directly, so chat text reaches the agent unchanged and Stop stops the real process. Any other .cmd or .bat goes through cmd /d /v:off /c, and text it would rewrite is refused: control characters, %, double quotes, and & | < > ^ ( ) ! outside a quoted word. When the program path itself is quoted, those characters are refused in every word. Shared finder version 1.0.2 and its hash are recorded.
  • Tests: native_files.rs recovery tests and new backend tests in tests/test_reported_fixes.py, each confirmed to fail on the earlier code.
  • Open: Agent Connect still trusts the name a local MCP client reports for itself; how that should change needs a product decision.
  • On Windows, when a program still has to go through the command interpreter, any argument containing & | < > ^ ( ) ! % " or a control character is now refused, whether or not it is quoted or contains spaces. The error suggests passing long text through standard input or a file.
  • npm-style .cmd shims are still resolved to the node script or .exe they wrap and started directly with an argument list, so text passes through unchanged.
  • Added platform-independent unit tests for the shim path and the strict command interpreter path.

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.

@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 18:18
@nodemode-ai
nodemode-ai merged commit b4c0f78 into main Nov 29, 2026
6 checks passed
@nodemode-ai
nodemode-ai deleted the fix/review-2026-11-28 branch November 29, 2026 18:57
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