pi-crew 0.11.54 → 0.11.55
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 +37 -0
- package/dist/index.mjs +500 -500
- package/package.json +1 -1
- package/src/config/env-allowlist-registry.ts +4 -0
- package/src/config/env-vars.ts +4 -0
- package/src/extension/team-tool/parallel-dispatch.ts +5 -0
- package/src/extension/team-tool/respond.ts +65 -2
- package/src/extension/team-tool/run.ts +8 -0
- package/src/runtime/child-pi/child-pi-spawn.ts +25 -1
- package/src/runtime/child-pi/child-pi.ts +9 -0
- package/src/runtime/goal-workflow/goal-loop-runner.ts +6 -0
- package/src/runtime/task-runner/child-executor.ts +7 -0
- package/src/state/atomic-write.ts +59 -0
- package/src/state/contracts.ts +7 -0
- package/src/state/coordination/mailbox.ts +52 -6
- package/src/state/event-log/event-reconstructor.ts +5 -0
- package/src/state/stores/state-store.ts +8 -0
- package/src/state/types.ts +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.11.55] — ask-park clobber fix + w1a dispatcher key distribution (2026-10-31)
|
|
4
|
+
|
|
5
|
+
**Fixed (product, FINDING A — ask-park clobber).** Cross-process coalesce race on tasks.json: the HOST process's 50ms coalesced
|
|
6
|
+
progress flush (per-process buffer) blindly overwrote the DETACHED BROKER's run-locked sync `waiting` park ~3ms after it landed
|
|
7
|
+
(live incidents team_20261031084714 + team_20261031045633), losing BOTH the status and the questionId marker — every leader respond
|
|
8
|
+
then rejected "is running, not waiting" and all asks timed out (silent degradation of the whole mailbox-interactive flow).
|
|
9
|
+
|
|
10
|
+
- `atomic-write.ts`: flush-time staleness CAS — queue-time mtimeMs+size identity, re-stat at flush; an EXTERNAL write landing between
|
|
11
|
+
queue and flush discards the stale snapshot instead of clobbering (cross-process supersession was invisible to the same-process
|
|
12
|
+
`cancelPendingCoalescedWrite`). Live-proven: `coalesced-stale-drop` fired at the exact park moment in all three probe runs.
|
|
13
|
+
- `respond.ts`: no-waiting fallback repairs a clobbered park from the surviving `manifest.waitState` pointer inside the same run-lock
|
|
14
|
+
section (`task.waiting_repaired` event), then the answer path runs verbatim — defense-in-depth backstop for the post-park re-queue
|
|
15
|
+
residual the CAS cannot see. Live-proven: repair + accept + mailbox delivery in one probe run.
|
|
16
|
+
- contracts/event-reconstructor: `task.waiting_repaired` → waiting.
|
|
17
|
+
- Tests: atomic-write CAS (external temp+rename sims), state-store clobber regression, respond clobber-repair — 9/9.
|
|
18
|
+
|
|
19
|
+
**Fixed (product, FINDING B — w1a cross-process signing).** w1a per-process Ed25519 signing broke ALL cross-process ask/respond delivery in async runs: `respond.ts` writes the
|
|
20
|
+
respond row with the LEADER session's keypair while the DETACHED RUNNER spawns the workers, so the worker's single spawner-key env
|
|
21
|
+
(`PI_CREW_MAILBOX_VERIFY_KEY`) could never verify the row — it dropped as noise at `parseMailboxFile` and every `ask` poll timed out (480s
|
|
22
|
+
hang, then "proceed with best judgment"). Same class for the leader-signed steering fs-fallback line (`team-tool.ts`). Fix = distribute the
|
|
23
|
+
DISPATCHER'S PUBLIC key (hướng C):
|
|
24
|
+
|
|
25
|
+
- `resolveCoordinationVerifyKeys()` (mailbox.ts) now merges + dedupes `[PI_CREW_MAILBOX_VERIFY_KEYS (plural env),
|
|
26
|
+
PI_CREW_MAILBOX_VERIFY_KEY (singular env — semantics unchanged), in-process keypair]` — no source shadows another; the old
|
|
27
|
+
`if (envKey) return [envKey]` early-return made an env key HIDE the writer's own keypair (shadow bug).
|
|
28
|
+
- New `PI_CREW_MAILBOX_VERIFY_KEYS` env var (registered in env-vars.ts + env-allowlist-registry.ts): comma-separated base64 SPKI PUBLIC
|
|
29
|
+
verify keys handed to children by child-pi-spawn (deduped with the inherited set for same-run grandchildren via the existing
|
|
30
|
+
relay-match guard — never relayed across runs).
|
|
31
|
+
- Threading: team-tool run/parallel dispatch stamps `TeamRunManifest.dispatcherVerifyKey` (new optional field, byte-compatible when
|
|
32
|
+
absent) via `ensureCoordinationPublicVerifyKey()`; goal-loop turn manifests inherit the OUTER manifest's key; child-executor threads it
|
|
33
|
+
into every worker spawn (`ChildPiRunInput.dispatcherVerifyKey`).
|
|
34
|
+
- Docs: trust-model v1.4 documents the w1a sender binding + dispatcher key distribution with accepted residual gaps (leader restart
|
|
35
|
+
mid-run, foreign-session respond, scheduled no-leader runs, pre-fix manifests); hướng A (broker-RPC signing) noted as follow-up.
|
|
36
|
+
- Tests: resolver merge/shadow-fix; cross-process delivery (foreign-process signer harness — dispatcher-signed respond row DELIVERS via
|
|
37
|
+
plural env, stranger-signed + unsigned stay dropped, steering entry verifies); spawn-env wiring (leader / nested relay dedupe /
|
|
38
|
+
no cross-run leak / legacy unchanged); manifest persistence + byte-compat.
|
|
39
|
+
|
|
3
40
|
## [0.11.54] — deep-review verified fix set, waves A–G + closing hardenings (2026-10-31)
|
|
4
41
|
|
|
5
42
|
**Fixed (product).** The v0.11.53 deep review's 15 findings were cold-verified by three independent verifiers
|