pi-crew 0.11.41 → 0.11.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/dist/index.mjs +453 -453
- package/package.json +1 -1
- package/src/runtime/process/zombie-scanner.ts +97 -42
- package/src/state/event-log/event-log.ts +42 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.11.42] — fix wave 14: event-log drain API + zombie-scanner seam (2026-10-25)
|
|
6
|
+
|
|
7
|
+
Wave 12d papered over the recurring `ENOTEMPTY` teardown race with `removeDirWithRetry`; the root cause stayed:
|
|
8
|
+
production fires **66 event writes across 23 files** without awaiting them (`void appendEventAsync` ×23,
|
|
9
|
+
`appendEventFireAndForget` ×43), and each queued write re-creates the run dir before appending — so teardown that
|
|
10
|
+
`rmSync`s the state dir mid-flight races the async writer and loses. There was no way for a test to await one
|
|
11
|
+
run's writers: the queue drain was private and `beforeExit`-only (SPEC `fixwave14-drain-api-zombie-seam-2026-10-25`).
|
|
12
|
+
|
|
13
|
+
**Added — `drainEventLogWriters(eventsPath?)`.** Public per-run drain API for the event-log async writer queues
|
|
14
|
+
(allSettled tail await + per-path buffer flush, never throws). Lets tests await in-flight writers before removing
|
|
15
|
+
a run state dir instead of retry-racing them — the race repro (drain → plain `rmSync`, no retry) is now a pinned
|
|
16
|
+
test.
|
|
17
|
+
|
|
18
|
+
**Added — `cleanupStateRoot(dir, eventsPath?)` test helper.** Best-effort drain then `removeDirWithRetry(settleMs: 0)`.
|
|
19
|
+
|
|
20
|
+
**Added — `ZombieScanOptions` seam on `scanZombieSubagents`** (`platform`/`getuid`/`readProcFile`/`listProcPids`/
|
|
21
|
+
`pidAlive`/`getParentPid`, defaults byte-exact). **7 previously linux-only tests now run on every OS** via
|
|
22
|
+
synthetic `/proc` fixtures (+2 new seam tests; 2 real-`/proc` default-path tests stay linux-gated).
|
|
23
|
+
|
|
24
|
+
**Fixed — teardown races by adopting drain-then-remove in pilot tests.** `team-tool-steer-clamp` (retry-only →
|
|
25
|
+
drain), `dwf-setresult` (12 bare `rmSync`), `event-log-batch`/`event-log-async`, plus dedup of two local
|
|
26
|
+
`removeDirWithRetry` variants (`subagent-steer-live`, `subagent-tools-integration`).
|
|
27
|
+
|
|
28
|
+
**Battery (PASS).** targeted ×3 (drain 4/4, zombie 26/26 skip=0, 6 pilot files), `test:critical` 124/124, full
|
|
29
|
+
unit 10,075 pass / 1 ambient-adjudicated / 4 skipped, integration 144/0/4, static gates 0, dist MATCH.
|
|
30
|
+
|
|
31
|
+
**Docs.** Battery report `docs/real-test/reports/real-test-2026-10-25-wave14-drain-zombie-battery.md`; closed
|
|
32
|
+
investigation (no code change): the "hung" alert for an already-cancelled run was delivery timing — `cancelled`
|
|
33
|
+
is already terminal in both the emit and delivery gates.
|
|
34
|
+
|
|
5
35
|
## [0.11.41] — fix wave 13: watchdog liveness — false "appears hung" alerts on healthy direct runs (2026-10-25)
|
|
6
36
|
|
|
7
37
|
Five false alarms landed in one working session (2026-10-24/25), all the same shape: healthy direct single-agent
|