You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: windows fixture can read an empty state.json after a timed-out focus #399
packages/mcp-server/test/desktop-windows.test.ts > "records timeout and human-control failures without permitting mutation during takeover" can fail with SyntaxError: Unexpected end of JSON input at packages/desktop-linux/test/windows-fixture.ts:44.
The fixture keeps fake window state in state.json. The fake xdotool windowfocus and the test's state() helper both rewrite it with fs.writeFileSync, which truncates the file before it writes. The test runs desktop_focus with timeoutMs: 150. On a slow runner the fake can be killed between truncate and write, or still be writing, so the next read sees an empty file.
Seen in the release workflow dry run for 0.7.1 (run 40741753333, Lab gates). The same code passed on the v0.7.0 tag run.
Acceptance criteria
Writers of the fixture state replace the file atomically, so a reader never sees a partial or empty file.
The test passes repeatedly.
Checklist
Write the state through a temp file and rename in the fake and the helper
Activity
test(desktop): replace the windows fixture state atomically