pi-crew 0.11.52 → 0.11.53
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 +34 -7
- package/dist/index.mjs +479 -479
- package/package.json +1 -1
- package/src/state/event-log/event-log.ts +88 -45
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.11.53] — event-log in-flight flush await fix (macos CI catch) + Bug-030 RCA closed (2026-10-31)
|
|
4
|
+
|
|
5
|
+
**Fixed (product, caught by macos CI).** `flushOneEventLogBuffer` removed the queue from
|
|
6
|
+
`bufferedQueues` BEFORE its multi-turn async lock+append completed, so `flushEventLogBuffer()` /
|
|
7
|
+
`drainEventLogWriters()` were **no-ops for a path with an in-flight flush** — `await flushEventLogBuffer()` could
|
|
8
|
+
return while the batch's `appendFile` was still in flight (deterministic-await broken; the interrupt-guard
|
|
9
|
+
detached regression test read the log too early on the slower macos runner fs — CI run 41147573288; fast
|
|
10
|
+
disks hid the race locally). Same window on the exit path (`flushBufferedQueuesSync` cannot recover an
|
|
11
|
+
in-flight batch — documented limitation, sync-only). Fix: per-path in-flight flush tracker
|
|
12
|
+
(`inflightBufferFlushes`) chained single-entry per path; `flushEventLogBuffer()` and `drainEventLogWriters()`
|
|
13
|
+
await the in-flight flush FIRST, then flush whatever landed in the queue since. Pin:
|
|
14
|
+
`flushEventLogBuffer awaits an IN-FLIGHT flush` (deterministic read immediately after the await — no settling
|
|
15
|
+
sleep).
|
|
16
|
+
|
|
17
|
+
**Fixed (test-only).** `waitForPreGateEvents` (classifier-pre-gate) now THROWS on timeout with counts + path
|
|
18
|
+
instead of returning silently — the silent return turned a legit wait-timeout into a far-away
|
|
19
|
+
`TypeError: Cannot read properties of undefined (reading 'taskId')` on `preGateEvents(...)[0]!` (the [pg-10]
|
|
20
|
+
CI flake: 2 Node-22 shards, run 40797688830, 2026-10-29; rerun green). A timeout now fails AT the wait site
|
|
21
|
+
with diagnostics (found vs expected `task.verifier_pre_gate` events, eventsPath, budget).
|
|
22
|
+
|
|
23
|
+
**Bug-030 RCA (closed 2026-10-30): CI-runner I/O starvation, not an append-path bug.** Traced the full
|
|
24
|
+
delivery chain: `appendEventAsync` → per-path `asyncQueues` (in-process promise chain) →
|
|
25
|
+
`withEventLogLockAsync` (mkdir O_EXCL, 50ms retry, **5s lock timeout**) → `.seqlock` reserve → `appendFile`,
|
|
26
|
+
gated by the fire-and-forget `void` + best-effort `.catch` in `classifyVerifierPreGate`. The [pg-10] test has
|
|
27
|
+
no cross-process contention (per-test tmpdir, one process per test file), so lock acquisition is instant —
|
|
28
|
+
the missed wait was the append landing AFTER the old 3s wall-clock budget but well inside the 5s lock
|
|
29
|
+
timeout (the drop-path needs the lock timeout to throw AND be swallowed — a runner freeze, and the event
|
|
30
|
+
is best-effort diagnostic by design). The [pg-10] family has not recurred since (8 subsequent CI runs, incl.
|
|
31
|
+
v0.11.51/0.11.52 matrices). Hardened deterministically: `waitForPreGateEvents` now DRAINS the in-process
|
|
32
|
+
append queue each poll (`drainEventLogWriters(eventsPath)` — awaits the ACTUAL append instead of racing
|
|
33
|
+
wall-clock) and the budget is 10s — strictly above the 5s lock timeout, so a throw semantically means
|
|
34
|
+
"append dropped or failed", never merely "slower than 3s". New pin `[pg-11]`: the helper rejects with
|
|
35
|
+
diagnostics when nothing ever lands (never silent, never false-pass).
|
|
36
|
+
|
|
3
37
|
## [0.11.52] — live-catch backlog: cross-session cancel reaches inline runs + heartbeat-watcher false-positive class (2026-10-30)
|
|
4
38
|
|
|
5
39
|
**Fixed (runtime, live-caught run `team_20261030044630`).** Two gaps filed as backlog after the
|
|
@@ -135,13 +169,6 @@ halves) and the residuals deferred by w1b/w7a/w7b:
|
|
|
135
169
|
42 new regression tests. Owner-observed deployment checklists for the leads' impact confirmation remain in the
|
|
136
170
|
audit's NEEDS-VALIDATION.md.
|
|
137
171
|
|
|
138
|
-
## [Unreleased] — test hardening
|
|
139
|
-
|
|
140
|
-
**Fixed (test-only).** `waitForPreGateEvents` (classifier-pre-gate) now THROWS on timeout with counts + path
|
|
141
|
-
instead of returning silently — the silent return turned a legit wait-timeout into a far-away
|
|
142
|
-
`TypeError: Cannot read properties of undefined (reading 'taskId')` on `preGateEvents(...)[0]!` (the [pg-10]
|
|
143
|
-
CI flake: 2 Node-22 shards, run 40797688830, 2026-10-29; rerun green). A timeout now fails AT the wait site
|
|
144
|
-
with diagnostics (found vs expected `task.verifier_pre_gate` events, eventsPath, budget). Bug-030 RCA backlog item.
|
|
145
172
|
|
|
146
173
|
## [0.11.50] — LOW-1: PI_CREW_BROKER_STDIN fd3 handshake DEFAULT-ON ('0' opts out) (2026-10-28)
|
|
147
174
|
|