pi-crew 0.11.8 → 0.11.9

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 CHANGED
@@ -1,5 +1,80 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.11.9] — F-BAT1: broker socket dir dodges /tmp pi-crew-* sweeps + stale-probe race (2026-10-08)
4
+
5
+ Live-caught by the full-tier battery (T9b-W): worker coordination (`ask`/`message`/`delegate`)
6
+ returned ENOENT in BOTH sync and async runs while the runs stayed green (graceful degrade —
7
+ the exact silent-failure class the battery exists to catch).
8
+
9
+ Two stacked root causes:
10
+
11
+ 1. **Namespace collision** — with `XDG_RUNTIME_DIR` absent (sessions launched from
12
+ non-login envs), the broker's per-user dir fell back to `/tmp/pi-crew-<uid>`, which
13
+ THREE /tmp workspace sweeps (`cleanupLegacyOrphanTempDirs`, the orphan temp
14
+ reconciler, the health zombie scan) pattern-match as `pi-crew-*` debris and `rmSync`
15
+ — deleting the LIVE broker socket dir. Sessions with XDG_RUNTIME_DIR were
16
+ unaffected (/run/user is never swept), which is why this only bit some launches.
17
+ Fix: the no-XDG fallback now uses `.pi-crew-broker-<uid>` (dot-prefixed — no sweep
18
+ matches). XDG path unchanged.
19
+ 2. **Stale-probe race** — `removeStaleBrokerSocket` treated a connect TIMEOUT as
20
+ "stale" and unlinked a HEALTHY (slow-to-accept) broker socket. Only a definitive
21
+ `ECONNREFUSED` (kernel rejects connect on a listener-less socket) may ever unlink.
22
+
23
+ Cross-platform hardening (CI 2026-10-08, macOS catch): a NON-SOCKET entry at the
24
+ socket path (the classic leftover corpse) is now removed deterministically via
25
+ `lstat` — no connect probe — because connect() to a non-socket path is undefined
26
+ across kernels (Linux yields ECONNREFUSED, macOS a different errno). Sockets keep
27
+ the probe path: ECONNREFUSED → remove, timeout/other → keep.
28
+
29
+ Live re-verified end-to-end on the fixed bundle: socket binds at
30
+ `/tmp/.pi-crew-broker-1000/`, `ask` round-trip delivers the leader reply through
31
+ dependency-context (worker quotes it verbatim), `message` notify delivered, socket
32
+ survives the whole run. Pin suite `socket-path-fbat1.test.ts` (6 tests,
33
+ mutation-checked both halves; single mutations are neutralized by the paired guard —
34
+ defense-in-depth by design).
35
+
36
+ ## [0.11.9] — UI instability fix wave L1–L9 (2026-10-07)
37
+
38
+ Live-battery-driven fixes from the 2026-10-07 UI review
39
+ (docs/real-test/reports/real-test-2026-10-07-ui-instability-review.md +
40
+ real-test-2026-10-07-ui-fix-wave.md — 4 real runs, 308 live frames, T1/T5/T13 gates,
41
+ 5/5 mutation-verified pins).
42
+
43
+ ### Fixed
44
+
45
+ - **L1 — crew dock renders in every session (HIGH)**: `activeWidgetRuns()` no longer filters
46
+ runs by `ownerSessionId` — bystander terminals now see active runs owned by other sessions
47
+ (live evidence: 308 frames across 3 async runs + 1 headless run rendered 0 docks; widget of
48
+ another extension updated fine in the same session). Crash-recovery scoping unchanged.
49
+ - **L2 — no more flicker around run completion (HIGH-MED)**: the render-loop health gates
50
+ (GATE 1 / FIX#1 / GATE 3) now rebuild snapshots in place (`scheduleRefresh`) instead of
51
+ hard-deleting cache entries — restoring the FLICKER FIX invariant the gates had been
52
+ violating on every tick for terminal/divergent runs.
53
+ - **L3 — dashboard defaults to the right-anchored panel**: `ui.dashboardPlacement` default
54
+ `"center"` → `"right"` (mirrors updated in install.mjs + both EFFECTIVE_DEFAULTS maps). The
55
+ centered 90% overlay exposed chopped background words at both margins on every width probed
56
+ (160/100/80) — pi-tui keeps base content visible outside overlay bounds by design.
57
+ - **L4 — sidebar auto-close deadline no longer slides**: the deadline is captured on first
58
+ eligibility and re-armed only when the run leaves terminal state; the "auto-close in 3s…"
59
+ countdown now reflects a fixed deadline instead of being reset by every re-render.
60
+ - **L6 — sidebar height locked** (dashboard `targetHeight()` pattern): loading → loaded →
61
+ shrunk frames share one height, killing ghost `┃` rows.
62
+ - **L5 — sync snapshot rebuild off the paint path**: new `readForRender()` cached-only accessor
63
+ + coalesced async refresh for render(); keypress paths with sync read-after-write keep
64
+ `refreshIfStale` (Tier 11a read-your-writes preserved).
65
+
66
+ ### Changed
67
+
68
+ - **L7 — TUI dialect sweep**: dashboard agent preview + mailbox pane now use `↑/↓` compact
69
+ usage instead of `tok=/in=/out=/model=/age=` wire format; live-conversation overlay uses
70
+ `formatDuration` (`5m44s`) instead of raw seconds; dead `formatLiveDuration` export removed.
71
+ - **L8 — `CURSOR_MARKER` defensive resolve** (settings overlay, mailbox compose): named import
72
+ replaced with the W4/G22 typeof-guard pattern — no ESM crash on hosts whose pi-tui lacks the
73
+ export.
74
+ - **L9 — dock truncation priority**: status pieces (`1 running`, `3/5 done`) are atomic — they
75
+ render whole or drop, never split mid-word (`1 runnin…` gone at 40 cols); meta pieces drop
76
+ first; plurals via `formatCount` across dashboard/panes/dispatcher.
77
+
3
78
  ## [0.11.8] — Pi 1.0.4 adoption + RPC/surface hardening + battery-proven stability (2026-10-07)
4
79
 
5
80
  ### Added — deep-learn polish batch (docs/reviews/pi-1.0.0-deep-learn-r3-2026-10-03.md R3 matrix)