feat(desktop): debug-only nuke & fresh start with full local wipe - #2954
Conversation
fraimz — ✅ PASSED1 passed · 0 failed · 0 skipped — run Full frame proof with validated screenshots: ✅ debug-nuke-fresh-start — Debug nuke wipes Windows local state and relaunches to sanitized sign-inUser-facing flow demo
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Additional independent Windows Daytona validationA second fresh Windows VM also passed the complete flow (not a rerun on the original profile):
This independently reconfirmed normal wipe/relaunch, sanitized bootstrap, absence of seeded state, exclusive Windows file-lock retry, retained sentinel, and cleanup on the next true out-of-band boot. |



Why
Early enterprise testers can accumulate state across many pre-release builds (desktop profile, OpenWork runtime DB, OpenCode sessions/auth, MCP OAuth, orchestrator credentials, browser storage). The existing Danger-zone "nuke" only removed Electron userData and called
app.exit(0); it skipped most state roots, skipped graceful shutdown, could leave children rewriting files, and could not reliably delete Windows-locked Chromium/SQLite state.What changed
AlertDialogpreviews every path that will be deleted / preserved and requires typing NUKE.persist:openwork-browserChromium storage; sanitize bootstrap; delete/verify filesystem roots; write a receipt; relaunch.~/.opencode/bin, user workspace folders (including workspace.opencode), and a sanitized org bootstrap containing only deployment URL, require-signin, branding, and freshwrittenAt. Handoff grants, claim-link tokens, and prepared metadata are stripped.ELECTRON_RUN_AS_NODEcleanup worker waits for parent exit, finishes deletion, and only then relaunches OpenWork. Worker payload allowlists paths/PID only—no auth/env secrets or arbitrary commands.Explicit non-goals / limitations
~/.opencode/bin.tokens.jsonmay be regenerated after relaunch; proof verifies none of the old seeded state survives.Automated verification
pnpm --filter @openwork/desktop test→ 99 pass, 1 expected skip, 0 failpnpm --filter @openwork/desktop typecheck:electron→ passpnpm --filter @openwork/app typecheck→ passpnpm --filter @openwork/types build→ passReal Windows Daytona proof
Tested a native Windows CI artifact on Daytona Windows VM
c502b6da-baff-43f4-8902-c7f76f605fdf, interactive Administrator session 1, driven via packaged Electron CDP. The flow seeds all state roots, real localStorage, provider/MCP auth files, runtime DBs, orchestrator auth, and bootstrap secrets.debug-nuke-fresh-startresult: PASSED — all 5 frames + voiceoverArtifact:
evals/results/2026-07-21T10-00-06-584Z/fraimz.html. A follow-up PR comment will post a second live run viapnpm fraimz --flow debug-nuke-fresh-start --pr.Bugs found and fixed during real Windows validation
No claims are based only on unit tests; these failure modes were reproduced and repaired on the Windows VM.