codeburn/mac/Tests/CodeBurnMenubarTests
iamtoruk 4ffec37861 fix(menubar): run CLI exit-wait and timeout off the cooperative pool
The menubar wedged on "Loading Today…" for hours after an idle period.
Root cause: DataClient.runCLI called the blocking process.waitUntilExit()
from an async function on Swift's cooperative thread pool. On a 16-core
machine, 16 concurrent slow `codeburn` subprocesses pinned all 16
cooperative threads inside waitUntilExit; the 45s timeout — itself a Task
on that same pool — could then never be scheduled to kill them, so the
deadlock was permanent. Confirmed via sample: 16/16 cooperative threads
parked in waitUntilExit. PR #412 (AppStore inFlightKeys bookkeeping) was a
layer above the OS-thread deadlock and could not fix it.

Move both blocking points off the cooperative pool: bridge waitUntilExit
through a global (overcommit) queue via a continuation, and drive the
timeout from a DispatchSource on a global queue so it fires even when the
pool is saturated. Extract runProcess for testability; add a concurrency +
timeout smoke test and an output/exit-code test.
2026-06-01 02:09:05 -07:00
..
AppStoreRefreshRecoveryTests.swift fix(menubar): popover-open always force-recovers current key 2026-05-29 23:51:48 -07:00
AppVersionTests.swift Normalize menubar version display 2026-05-11 11:21:39 -07:00
CapacityEstimatorTests.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
CodexTerminalFailureTests.swift test(menubar): lock in Codex terminal-failure classification 2026-05-30 12:32:19 -07:00
DataClientProcessTests.swift fix(menubar): run CLI exit-wait and timeout off the cooperative pool 2026-06-01 02:09:05 -07:00
MenubarPeriodSettingsTests.swift Add configurable menubar status period (#302) 2026-05-24 03:15:39 -07:00
MenubarStatusCacheTests.swift feat(menubar): refresh via headless app binary instead of node script 2026-05-30 13:05:48 -07:00
UpdateCheckerTests.swift Harden menubar refresh and installer 2026-05-14 18:32:15 -07:00