Skip to content

FormPDF 0.63.0: starting and stopping cleanly on Windows (engine side only), and a folder for each Antigravity tab - #13

Merged
nodemode-ai merged 5 commits into
mainfrom
feat/windows-start-0.63.0
Nov 20, 2026
Merged

nodemode-ai merged 5 commits into
mainfrom
feat/windows-start-0.63.0

Conversation

@nodemode-ai

Copy link
Copy Markdown
Collaborator

FormPDF 0.63.0: starting and stopping cleanly on Windows (engine side only), and a folder for each Antigravity tab

This branch sits on merged main (0.62.0) and covers the five commits after it. It brings the engine side of the Windows start and stop work that FormTools 0.10.0 has, and the two small changes in the desktop shell that the engine side cannot do without. The Windows job object and the full failure text are not in; see Held.

What changes for people

The engine and the app start and stop together

  • Only one FormPDF engine uses a data folder at a time. A second one says "formpdf is already running on [folder] (engine process N)." and stops, and the first keeps working. Before, two engines could serve the same folder.
  • The engine leaves within about two seconds when the app that started it is gone, however the app ended. Before, an engine could stay behind after the app was ended.
  • An engine of this version that was left running although its app is gone is ended and replaced at the next start. A lock file that is damaged, empty, or names an unrelated program is replaced and that program is left alone.
  • The engine keeps a log: Logs/formpdf-engine.log in the data folder (Formpdf in your home folder unless you set another). An error that stops the engine is written there first. When the engine has no error stream of its own, as in a Windows build without a console, its errors go to Logs/formpdf-engine-errors.log.
  • The packaged engine opened on its own (a double click on formpdf-engine) opens FormPDF and stops, or says that it is a part of FormPDF when no app is beside it. It no longer starts a server nobody uses.
  • A data folder that cannot be made is said in one sentence at start.

A start that fails is said

  • When the engine gives the app no address, the message is now shown first and the loading window closes only after you dismiss it. Before, the loading window closed first, and on Windows the app could end without showing anything.
  • The message is new: it says that a copy of FormPDF may already be open, to use that window or open FormPDF again, and where the engine's log is.

Antigravity tabs

  • Each Antigravity tab in the terminal panel now has a folder of its own under the data folder, with its own formpdf_tab entry. Before, two Antigravity tabs shared one entry: the second tab took over the first one's access to FormPDF's tools, and closing either one took it from the other.
  • When a tab closes, its entry is removed, and its folder is removed when nothing else is in it. A folder the program wrote into is kept with what it wrote.
  • The agent folder setting no longer decides where an Antigravity tab starts. Codex and Cursor tabs are unchanged.

How it was checked

Every job of the pull request workflow was rehearsed on a clone of the release commit (16cfdec), Python 3.12.3, Node 22:

job what ran result
scripts bash -n over the workflow's file list; the workflow's em dash and emoji scan over git ls-files exit 0; clean
backend pip install -r requirements.txt, python -m compileall -q app formpdf_engine.py, python formpdf_engine.py --selfcheck, the engine booted on 8198 and asked for /api/health and /api/version all exit 0; both routes answered with version 0.63.0
test python -m pytest tests -q -p no:cacheprovider in backend 195 passed, 0 failed (180 at 0.62.0)
frontend npm ci, npm audit, npm run build exit 0; 0 vulnerabilities; built
window the built window with Playwright 1.63.0 and Chromium, python -m pytest frontend/tests/window -q -p no:cacheprovider 3 passed

The workflow has no lint step. ./formpdf agents sync --check: in step.

Seen on Linux with stand-ins (a sleep process as the app, a shell script as the app program, a stand-in agy); no real agent program was started:

  • A second engine with another live app was refused with the sentence and exit code 2 while the first kept serving. An engine whose app ended left within one second, and its lock and discovery file were gone. A stopped engine whose app had ended was replaced. Lock files holding text that is not JSON, a list, a wrong process id, nothing, and the id of an unrelated live process were replaced, and that process still ran.
  • The engine started and served with its input, output and error streams closed, and the errors file was there when the error stream was absent.
  • Started alone as a packaged engine (the packaged state was set by hand, not built), it opened the stand-in app in the Windows, macOS, Linux package and resource-folder layouts and took no lock and no port; with no app near it said its sentence and stopped with exit code 4.
  • A data folder under a file gave the sentence and exit code 5.
  • Two Antigravity tabs open at once had different folders, each with its own entry and token. Closing the first ended its token and removed its folder while the second's entry and token were unchanged. Closing the second kept a folder that held another file.

Not run

  • Nothing was run on Windows or macOS. Every Windows branch of the new start code has never run anywhere.
  • The desktop shell was not compiled on the build machine; the first compile is the release build. src-tauri/src/main.rs changes in three places: one added .env("FORMPDF_SHELL_PID", std::process::id().to_string()) beside its two twins, one message string, and one existing statement (close_splash(&handle);) moved below the dialog call it stood above. Each was read against the code around it; no new name, type or crate.
  • A really packaged engine was not built or run.
  • The start failure message was not seen on any screen.
  • The real Claude Code, Codex, Cursor and Antigravity were not run; stand-ins only. Whether a real agy reads .agents/mcp_config.json from the folder it is started in was not seen.
  • The refusal for a tab folder that cannot be made was not seen (the checks ran as root, which can always make it) and has no test.
  • The two tracked demo bundles were not rebuilt; only their version string was changed by hand, as in 0.62.0.

Only a Windows machine can show: that the engine built without a console starts at all; that no formpdf-engine is left in Task Manager after a quit and after the app is ended there; that the failure message is on screen before the loading window goes; that a double click on formpdf-engine.exe opens FormPDF and shows no console window. The test plan's section "Starting and stopping on Windows" lists each as a step.

Held

  • The Windows job object that ends the engine, and what the engine started, together with the app however the app ends (win_job.rs). Until it is in, the engine's own watch on the app covers this, and a program started by a terminal tab may outlive an app that was ended by force.
  • The failure message with the engine's exit code and last lines and the log's full path (engine_start.rs). Today's message is one fixed sentence whatever the reason.
  • A limit on the wait for the engine's address. An engine that starts and never gives its address leaves the loading window up.
  • An engine of 0.62.0 or older that was left running is not ended by this version: it wrote no lock. It does not block the new engine, which starts beside it on its own port.
  • When the engine leaves because its app is gone, the folder of an Antigravity tab that was open stays in agent-tabs/antigravity with its file. The token in it counts for nothing once the engine has stopped. Folders are not swept at start.
  • Packaging changes for Windows: not started.

For the owner to know: the app as built depends on the shell's FORMPDF_SHELL_PID line. A packaged engine that is given no such variable takes itself for one opened on its own, opens the app and serves nothing. FormPDF has no CHANGELOG; none was created.

Merge

Merge with a merge commit. Do not squash and do not rebase-merge.

…n (0.63.0)

Every Antigravity tab wrote its formpdf_tab entry into the one agent folder, so a second tab took the first one's entry and closing one touched the other's. A tab now starts in agent-tabs/antigravity/<id> under the data folder, its entry is written there, and at close the entry, the emptied file and the emptied folder are removed; a folder that holds anything else is kept.

Run with a stand-in agy through the real routes: two tabs at once had their own folder, entry and token; closing one ended its token and removed its folder and left the other's file and token unchanged. tests/test_dock_contract.py: 13 passed. The test that read the entry from the agent folder is replaced by one for two tabs. Not run: a real agy, Windows, macOS.
… gone, and keeps a log (0.63.0)

The family's Windows start and stop pattern, engine side. core/startup.py is FormTools's file with formpdf's names. The entry now makes the data folder and starts Logs/formpdf-engine.log first (exit 5 with one sentence when it cannot), keeps an absent standard error in a file, opens the app when a frozen engine is started alone (or says it serves nothing on its own, exit 4), takes engine.lock by the family's rules (a second engine is refused with a sentence, exit 2; an engine left without its app is ended and replaced), and leaves within about two seconds when the process in FORMPDF_SHELL_PID ends. formpdf had no lock and no log file before; uvicorn app.main:app takes no lock and gets the log.

Run on Linux with stand-ins for the shell and the app: every row above, the three closed-stream starts, damaged locks and an unrelated process in the lock. tests/test_startup.py (FormTools's tests with formpdf's names, plus three), test_window_key.py and test_f5_boot.py: 48 passed. Not run: Windows, macOS, a really frozen engine. The shell does not set FORMPDF_SHELL_PID yet, so in the app as built today a frozen engine opens the app and stops unless that variable or FORMPDF_NO_SHELL=1 is set: the shell side has to land with this.
The engine watches the process in FORMPDF_SHELL_PID and a frozen engine that is given none opens the app and serves nothing, so the shell sets the variable to its own process id where it starts the engine. One line in main.rs. The rest of the shell-side pattern (the Windows job object, the failure text, the wait limit, the dialog before the last window closes) is not built.

Not compiled: the desktop shell cannot be built here; the line was read against the .env calls beside it. Not run on Windows or macOS.
…w closes (0.63.0)

src-tauri/src/main.rs, the branch taken when the engine gave no address and key: the message is shown first and the loading window is closed only after it returns. It was closed first, and at that moment it is the app's only window, so on Windows the person could see nothing. The sentence says that a copy of FormPDF may already be open, since only one engine can use the data folder now, and where the engine's log is.

Not compiled: the desktop shell cannot be built here. One string, and one existing statement moved below the call it stood above. Not run on any system.

Held: the rest of the family's shell side (the Windows job object, the failure text with the engine's last lines and exit code, a limit on the wait for the address). frontend/HASHOUT_LOG.md entries 130 and 131 say so.
Bumps every version site from 0.62.0 to 0.63.0, the same set as 0.62.0: frontend and demo package.json and package-lock.json (both fields each), version.ts, backend __version__, src-tauri Cargo.toml, the formpdf entry in Cargo.lock, tauri.conf.json, the README badge, the version field in the two skill SKILL.md files under .claude (their .agents mirrors written by agents sync), and the version string in the tracked demo bundles demo/assets/demo.js and demos/protect/assets/protect.js (hand-edited, not rebuilt). The repo has no CHANGELOG.

Verified on this tree before the commit: backend pytest 195 passed (including test_f4_versions), tsc --noEmit clean, agents sync --check in step; git grep -F 0.62.0 outside the HASHOUT logs prints nothing. On the commit before it, every job of the pull request workflow was rehearsed on a clone: scripts clean, compileall and --selfcheck exit 0, the engine booted on 8198 and answered health and version, 195 passed, npm ci, npm audit (0 vulnerabilities) and npm run build exit 0, the window check 3 passed. The desktop shell was not compiled, and nothing was run on Windows or macOS.
@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 20, 2026 05:44
@nodemode-ai
nodemode-ai merged commit 9c48042 into main Nov 20, 2026
5 checks passed
@nodemode-ai
nodemode-ai deleted the feat/windows-start-0.63.0 branch November 20, 2026 05:48
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.

1 participant