feat: Workspace filesystem cleanup #391
1 issue
code-review: Found 1 issue (1 low)
Low
Startup registry lock leaks on errors before server.listen callback - `src/daemon.ts:186-197`
The daemon registry mutation lock is acquired at line 186 but only released in three places: the server.listen callback's finally block, the server.on('error') handler, and the duplicate-daemon check at line 200. If an exception is thrown between lock acquisition and reaching server.listen (e.g., from buildDaemonToolCatalogFromManifest, setSentryRuntimeContext, or other code on lines 208-414), the main().catch handler at line 470 exits the process without releasing the lock. While the 30-second lease prevents permanent deadlock, subsequent daemon-start attempts within that window will fail to acquire the lock and exit with Unable to acquire daemon registry lock.
Duration: 13m 26s · Tokens: 891.2k in / 7.1k out · Cost: $5.02