From the 2026-07-19 complementary swarm review (read-only, orthogonal to #44).
P0 — reliability
P1 — performance & reliability
P1 — simplify
Validation
bun test per touched package; typecheck; verify reaper picks up an artificially leaked android session.
From the 2026-07-19 complementary swarm review (read-only, orthogonal to #44).
P0 — reliability
REAPER_CLEANUP_PENDING_META_KEY(packages/android/src/session.ts:106-119,137-153), unlike desktop/browser. A leaked emulator can become permanently untracked by the reaper. Fix: set/clear the pending-cleanup meta key with the same protocol the other runtimes use.P1 — performance & reliability
appendActiondoes a full recursivereaddir+lstatwalk of the run directory on every evidence action (packages/core/src/evidence.ts:925-957,1069). Cache or incrementally track size instead of rescanning.run-logresource reads entire log file into memory with no size cap (packages/mcp-server/src/resources.ts:589— screenshots are guarded at:528, logs are not), then 9 regexredactSecretspasses. Add the same size guard as screenshots + stream/tail semantics.\narrives (packages/browser/src/supervisor.ts). Bound the buffer.P1 — simplify
core/session.ts:87-122,run.ts:61-92,config.ts:105-125,evidence.ts:66,744-751,1244-1251); 3 copies leak the tmp file on rename failure. Correct impl exists atagent-installers/src/atomicFile.ts. HoistwriteFileAtomicinto core and use everywhere (do NOT touch evidence.ts's concurrency-critical claim/lock paths beyond the two safe call sites).Validation
bun testper touched package; typecheck; verify reaper picks up an artificially leaked android session.