pi-crew 0.11.41 → 0.11.43
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 +60 -0
- package/dist/index.mjs +495 -495
- package/package.json +1 -1
- package/src/runtime/process/zombie-scanner.ts +97 -42
- package/src/runtime/process-status.ts +28 -1
- package/src/state/event-log/event-log.ts +42 -0
- package/src/ui/agents-jobs-browser.ts +34 -4
- package/src/ui/run-dashboard.ts +68 -13
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,66 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.11.43] — fix wave 15: render trusts task heartbeats + teardown sweep batch 1 (2026-10-25)
|
|
6
|
+
|
|
7
|
+
Wave 13 fixed the watchdog's frozen-evidence hung verdicts by adding task heartbeats, but the render layer still
|
|
8
|
+
judged liveness from `lastActivityAt` alone — which freezes by construction during one long tool call. A run
|
|
9
|
+
executing a 20-min test suite displayed as "stale"/"orphaned" on the dashboard while its heartbeat was fresh.
|
|
10
|
+
Meanwhile the bare-`rmSync` inventory from the same deep review counted ~1,400 sites across 470 files; this wave
|
|
11
|
+
ships the render half and the first sweep batch (SPEC `fixwave15-display-heartbeat-sweep1-2026-10-25`).
|
|
12
|
+
|
|
13
|
+
**Added — `hasFreshTaskHeartbeatEvidence(tasks, now, ttl)`.** Pure predicate export from
|
|
14
|
+
`src/runtime/process-status.ts` (shared predicates untouched per GAP-4 purity). The render layer — run dashboard
|
|
15
|
+
and agents-jobs-browser — now treats a run with a fresh task heartbeat (`lastSeenAt` within the 5-min TTL,
|
|
16
|
+
`alive !== false`) as active and suppresses the "stale"/"orphaned" labels, closing the render half of wave 13's
|
|
17
|
+
liveness work. Old behavior pinned: no heartbeat / expired / `alive === false` ⇒ stale label stands.
|
|
18
|
+
|
|
19
|
+
**Fixed — teardown races in batch 1 of the bare-`rmSync` sweep.** 336 sites across 84 files in `test/unit/state/**`
|
|
20
|
+
+ `test/unit/prompt/**` migrated to `cleanupStateRoot`/`removeDirWithRetry` (drain-then-remove over
|
|
21
|
+
retry-racing the async event-log writer). Intentional residuals kept: the `drain-event-log-writers` in-body
|
|
22
|
+
plain-`rmSync` assertion (it pins the exact race the API exists to fix), single-file deletes, and child-source
|
|
23
|
+
strings.
|
|
24
|
+
|
|
25
|
+
**Battery (PASS, adjudicated).** targeted ×3 (h1 heartbeat-evidence 11/11, h2 run-dashboard 4/4, h3
|
|
26
|
+
agents-jobs-browser 5/5 incl. 2 new heartbeat tests), sweep clusters 1,895 test-runs (4 load-timing fail-events,
|
|
27
|
+
all solo ×3 green), `test:critical` 124/124, full unit 10,081 pass / 1 adjudicated flake / 4 skipped, integration
|
|
28
|
+
144/0/4, static gates 0, dist MATCH (1,893,087 B).
|
|
29
|
+
|
|
30
|
+
**Docs.** Battery report
|
|
31
|
+
`docs/real-test/reports/real-test-2026-10-25-wave15-render-heartbeat-sweep1-battery.md`. Residual noted:
|
|
32
|
+
health-monitor is not wired to the new predicate (its scan loop consumes tasks internally, not display).
|
|
33
|
+
Backlog: sweep batches 2a (415 sites/124 files), 2b (816/210), 3 (88/33).
|
|
34
|
+
|
|
35
|
+
## [0.11.42] — fix wave 14: event-log drain API + zombie-scanner seam (2026-10-25)
|
|
36
|
+
|
|
37
|
+
Wave 12d papered over the recurring `ENOTEMPTY` teardown race with `removeDirWithRetry`; the root cause stayed:
|
|
38
|
+
production fires **66 event writes across 23 files** without awaiting them (`void appendEventAsync` ×23,
|
|
39
|
+
`appendEventFireAndForget` ×43), and each queued write re-creates the run dir before appending — so teardown that
|
|
40
|
+
`rmSync`s the state dir mid-flight races the async writer and loses. There was no way for a test to await one
|
|
41
|
+
run's writers: the queue drain was private and `beforeExit`-only (SPEC `fixwave14-drain-api-zombie-seam-2026-10-25`).
|
|
42
|
+
|
|
43
|
+
**Added — `drainEventLogWriters(eventsPath?)`.** Public per-run drain API for the event-log async writer queues
|
|
44
|
+
(allSettled tail await + per-path buffer flush, never throws). Lets tests await in-flight writers before removing
|
|
45
|
+
a run state dir instead of retry-racing them — the race repro (drain → plain `rmSync`, no retry) is now a pinned
|
|
46
|
+
test.
|
|
47
|
+
|
|
48
|
+
**Added — `cleanupStateRoot(dir, eventsPath?)` test helper.** Best-effort drain then `removeDirWithRetry(settleMs: 0)`.
|
|
49
|
+
|
|
50
|
+
**Added — `ZombieScanOptions` seam on `scanZombieSubagents`** (`platform`/`getuid`/`readProcFile`/`listProcPids`/
|
|
51
|
+
`pidAlive`/`getParentPid`, defaults byte-exact). **7 previously linux-only tests now run on every OS** via
|
|
52
|
+
synthetic `/proc` fixtures (+2 new seam tests; 2 real-`/proc` default-path tests stay linux-gated).
|
|
53
|
+
|
|
54
|
+
**Fixed — teardown races by adopting drain-then-remove in pilot tests.** `team-tool-steer-clamp` (retry-only →
|
|
55
|
+
drain), `dwf-setresult` (12 bare `rmSync`), `event-log-batch`/`event-log-async`, plus dedup of two local
|
|
56
|
+
`removeDirWithRetry` variants (`subagent-steer-live`, `subagent-tools-integration`).
|
|
57
|
+
|
|
58
|
+
**Battery (PASS).** targeted ×3 (drain 4/4, zombie 26/26 skip=0, 6 pilot files), `test:critical` 124/124, full
|
|
59
|
+
unit 10,075 pass / 1 ambient-adjudicated / 4 skipped, integration 144/0/4, static gates 0, dist MATCH.
|
|
60
|
+
|
|
61
|
+
**Docs.** Battery report `docs/real-test/reports/real-test-2026-10-25-wave14-drain-zombie-battery.md`; closed
|
|
62
|
+
investigation (no code change): the "hung" alert for an already-cancelled run was delivery timing — `cancelled`
|
|
63
|
+
is already terminal in both the emit and delivery gates.
|
|
64
|
+
|
|
5
65
|
## [0.11.41] — fix wave 13: watchdog liveness — false "appears hung" alerts on healthy direct runs (2026-10-25)
|
|
6
66
|
|
|
7
67
|
Five false alarms landed in one working session (2026-10-24/25), all the same shape: healthy direct single-agent
|