codeburn/mac/Sources/CodeBurnMenubar
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
..
Data fix(menubar): run CLI exit-wait and timeout off the cooperative pool 2026-06-01 02:09:05 -07:00
Security feat(menubar): refresh via headless app binary instead of node script 2026-05-30 13:05:48 -07:00
Theme Harden menubar: fix refresh loop, concurrency, data sync, and edge cases 2026-05-01 08:01:25 -07:00
Views feat(menubar): show CLI update banner when a newer version is available 2026-05-27 06:27:49 -07:00
AppStore.swift fix(menubar): recover from stuck loading when in-flight entry is orphaned 2026-05-28 14:06:13 -07:00
AppVersion.swift Normalize menubar version display 2026-05-11 11:21:39 -07:00
CodeBurnApp.swift refactor(menubar): remove dead distributed-notification listener 2026-05-31 05:01:10 -07:00
CurrencyState.swift Harden menubar: fix refresh loop, concurrency, data sync, and edge cases 2026-05-01 08:01:25 -07:00