mirror of
https://github.com/thedotmack/claude-mem.git
synced 2026-09-20 04:23:02 +08:00
b556f94e59
The capability skip fired for every non-ghost shape, not just the one it was
written for: the branch returned whenever no owner was found under the dead
pid, which also covers a free port whose sidecar chain died with the worker,
a port held by an unrelated process, a ghost sharing the port with another
owner, and a recycled fixture pid. Each of those returned before
ensureWorkerStarted(), the orphan assertions and the health check — so the
gate could pass while testing no recovery at all (Greptile P1 on the skip
branch).
classifyPostKillState() (tests/integration/helpers/ghost-state.ts) names the
settled state from the final port-owner sample, the fixture's liveness and
the post-kill sidecar chain:
ghost -> the recovery assertions run (unchanged)
runtime-capability-skip -> the ONLY skippable state: port free AND the
pre-kill-verified chain still alive (the
measured bun >= 1.4 socket-inheritance change)
malformed -> fail, with the reason and the observed owners:
chain-died / fixture-pid-recycled /
ghost-shared-port / foreign-owner
The function is pure so the whole table is unit-tested
(helpers/ghost-state.test.ts): these environmental states cannot be produced
on demand — they are the anomalies being named.