Skip to content

fix: keep unreadable settings intact, keep the window heartbeat alive, record a lasting launcher path, start checkout scripts directly on Windows - #20

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

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

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Settings: reading settings.json now tells a missing file (defaults) from one that cannot be read or parsed. Saving refuses to replace a file that cannot be read. While it is unreadable, the gateway keeps its last good settings, logs the problem once and starts no app. formmcp settings shows the error.
  • Secrets: setting or removing a secret reads the settings first and stops before touching the keychain if the file cannot be read, so a secret is never stored or deleted without its name being recorded.
  • Extensions: the settings mark used for undo refuses an unreadable file instead of marking the defaults. The window refreshes its heartbeat every second while it runs an agent's command or waits on consent (extension_beat in the app, extensions beat on the command line, POST /api/extensions/beat in the dev server).
  • Connecting an agent never records a temporary copy of the app. Inside an AppImage mount it records the AppImage file. A copy macOS made on first launch is refused with a note to move the app to Applications. FORMMCP_LAUNCHER still takes precedence.
  • Windows: a dev checkout's .bat is started directly, so the standard library quotes the script path and escapes the arguments. A path with a control character or % is refused with the reason.
  • Tests: settings_mark (new), host_files launcher test, family_and_reach Windows script test, and two mcp_stdio_and_http tests (unreadable settings, window heartbeat).

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.

…l it is fixed

Reading settings.json now tells a missing file (defaults) from one that
cannot be read or parsed. Saving refuses to replace a file that cannot
be read, so a toggle no longer writes defaults over the hook, profiles,
switches and secret names. While the file cannot be read the gateway
keeps its last good settings, logs the problem and starts no app, and
formmcp settings shows the error.
Only taking requests refreshed the window's heartbeat, and the window
takes no requests while it runs one, so a command that waited on the
consent dialog or ran longer than ten seconds was reported to the agent
as failed while the window still ran it. The window now refreshes the
heartbeat every second while it is busy (extension_beat in the app,
extensions beat on the command line).
Connecting an agent wrote the running program's path. When the app runs
from a copy macOS makes on first launch, or from inside an AppImage's
mount folder, that path is gone later and the agent cannot start
formMCP. An AppImage now records the AppImage file itself, and a copy
macOS made is refused with a note to move the app to Applications.
A dev checkout's .bat was started through a cmd /c line built from its
path. It now starts the script itself, so the standard library quotes
the path and escapes the arguments, and a path with a control character
or % is refused with the reason.
…nnot be read

Setting or removing a secret now reads settings.json first and stops
before touching the keychain when the file cannot be read, so a secret
is never stored or deleted without its name being recorded. The window's
settings mark refuses an unreadable file instead of marking the defaults,
so undo cannot later write defaults over a repaired file. The gateway
also starts no app early while its settings cannot be read.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 18:18
@nodemode-ai
nodemode-ai merged commit 5fa7d02 into main Nov 29, 2026
4 checks passed
@nodemode-ai
nodemode-ai deleted the fix/review-2026-11-28 branch November 29, 2026 18:55
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