You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chat/AI runtime: Keychain key in argv + SDK pool ref-count race, plus chat/AI/ade-action god-file & typed-dispatch decomposition #461
Summary: Two chat/AI-runtime defects (Keychain secret in argv; Droid/Cursor pool ref-count race) plus the large chat/AI/ade-action maintainability + type-safety surface centered on a 25k-line god-file and an untyped action registry.
Runtime defects:
macOS Keychain API keys written via argv, exposing provider secrets in the process table (low).writeMacosKeychainSecret() calls runSecurity(['add-generic-password',…,'-w',value]) via spawnSync — the raw key is world-readable via ps for the spawn lifetime (the read path uses stdin). apiKeyStore.ts:195,:202. Fix: feed the secret via stdin / prefer safeStorage-encrypted credentialStore.
Concurrent acquire of Droid/Cursor SDK pool can hand a connection to a non-owner without incrementing its ref (leak or premature dispose) (low). Non-owner bumps ref only if (live?.pooled===pooled) but always returns pooled; release later decrements a stale generation. droidSdkPool.ts:90,:95; cursorSdkPool.ts:227,:234. Fix: make the ref handoff atomic with entry lifetime.
Provider routing is a duplicatedif (provider===…)ladder repeated ~280 times (a missed arm falls to default). :3287,:4060,:4116,:4178,:2548 — one ProviderAdapter record with compiler exhaustiveness.
Everyrun_ade_actioneagerly rebuilds the entire ~46-service domain map to return one service (ADE-61 only partially fixed).registry.ts:2795,:837; automationService.ts:1643; adeRpcServer.ts:3596; main.ts:4016 — make the map lazy; memoize buildAdeActionRuntimeForAutomations().
ctoOperatorTools.createCtoOperatorToolsis one ~2,500-line factory registering ~103 tools inline.ctoOperatorTools.ts:528 — group tools by concern.
registry.tsmixes allowlist + 19 domain-service builders + arg-normalization in one 2,864-line module.:1369,:2471,:2795 — move builders into domains/<name>DomainService.ts.
Verification confidence: High for the Keychain leak and all line/grep counts; medium for the pool race (narrow window). ADE-61's apns-only fix confirmed as the partial fix.
Activity
linear-code commentedon May 31, 2026
ADE-72