codeburn/app/electron
iamtoruk 4eabda17d7 fix: bound the serve drain, reap orphans on Windows, and de-flake the grace test
G1a - the stdin-EOF drain is now bounded (Promise.race against 45s, overridable
via CODEBURN_SERVE_DRAIN_MS for the test). Generous enough that no legitimate
request answered at EOF comes near it, and an async-wedged one releases the
child instead of turning it into the orphan the drain was added to prevent. The
comment names the ceiling: a SYNCHRONOUSLY wedged parse never yields to this
timer or to any other JS path, and only a signal can end that process.

G1b - Windows is the majority of the desktop fleet and had no orphan escape at
all: no ps, and no stdin-close recourse once the app has crashed. The reap now
works there. tasklist cannot report argv (image name and window title only) and
wmic is gone from current Windows, so the command line comes from
Get-CimInstance Win32_Process. Match discipline is unchanged - exact argv - with
quoting normalized on both sides, because we record a plain space-joined argv
while Windows reports the real quoted command line; a path with spaces still
round-trips. serveCommandMatches is extracted and tested directly.

G2 - the grace test raced node's cold boot (a 300ms window). The child now emits
one byte the moment it is ready, so the watchdog window is measured from
READINESS, not from spawn: boot cost cannot eat it at any machine speed. Timeout
raised on top of that. 6/6 green under 8 busy loops.

G3 - a served request heartbeats for its whole duration now, not just its parse:
the wrap moved to the one seam (runCaptured) that also covers aggregation and
payload serialization, whose ~8s tail lands back-to-back with the parse's own
quiet stretches. The one-shot path keeps the parse-only wrap, where an 8s tail
is comfortably inside the window on its own, and the CHANGELOG now says exactly
that instead of claiming every phase.

G4 - stillCold() anchors to coldStartBegan ?? bootedAt.

Text: the cold-timeout bound no longer claims to restore the "locate the CLI"
recovery (that is a not-found state, never cold-flagged), and the CHANGELOG
states the >15min case honestly - the ceiling still ends it, but partial cache
saves mean successive polls converge rather than each rescanning from nothing.
2026-08-22 10:36:58 -07:00
..
quota snap: scope personal-files to log subdirectories 2026-08-21 03:38:25 -07:00
cli-win32-reap.test.ts fix: bound the serve drain, reap orphans on Windows, and de-flake the grace test 2026-08-22 10:36:58 -07:00
cli.test.ts fix: bound the serve drain, reap orphans on Windows, and de-flake the grace test 2026-08-22 10:36:58 -07:00
cli.ts fix: bound the serve drain, reap orphans on Windows, and de-flake the grace test 2026-08-22 10:36:58 -07:00
main.test.ts fix: address adversarial review of the timeout watchdog (F1-F7) 2026-08-22 09:58:59 -07:00
main.ts fix: bound the serve drain, reap orphans on Windows, and de-flake the grace test 2026-08-22 10:36:58 -07:00
preload.ts feat(app,menubar): surface parity — Spend punchcard in the app, Pull requests strip in the menubar 2026-08-10 14:29:26 -07:00
telemetry.test.ts fix(telemetry): cap cli_error per kind per day, flush app_close on quit 2026-07-18 23:06:30 +03:00
telemetry.ts fix(telemetry): cap cli_error per kind per day, flush app_close on quit 2026-07-18 23:06:30 +03:00
updates.test.ts feat(app): update-available notifications 2026-07-17 04:58:13 -07:00
updates.ts feat(app): update-available notifications 2026-07-17 04:58:13 -07:00