pi-crew 0.8.14 → 0.9.0
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 +271 -0
- package/README.md +112 -2
- package/docs/FEATURE_INTAKE.md +1 -1
- package/docs/HARNESS.md +20 -19
- package/docs/PROJECT_REVIEW.md +132 -133
- package/docs/PROJECT_REVIEW_FIXES.md +130 -131
- package/docs/actions-reference.md +127 -121
- package/docs/architecture.md +1 -1
- package/docs/code-review-2026-05-11.md +134 -134
- package/docs/commands-reference.md +108 -106
- package/docs/comparison-pi-subagents-vs-pi-crew.md +105 -105
- package/docs/deep-review-report.md +1 -1
- package/docs/dynamic-workflows.md +90 -0
- package/docs/fixes/BATCH_A_H1_H2.md +17 -17
- package/docs/fixes/bug-007-async-notifier-stale-ctx.md +23 -23
- package/docs/followup-plan-2026-05-12.md +135 -135
- package/docs/followup-review-2026-05-12.md +86 -86
- package/docs/followup-review-round3-2026-05-12.md +123 -123
- package/docs/goals.md +59 -0
- package/docs/implementation-plan-top3.md +4 -4
- package/docs/issue-29-analysis.md +2 -2
- package/docs/oh-my-pi-research.md +154 -154
- package/docs/optimization-plan.md +2 -0
- package/docs/perf/baseline-2026-05.md +9 -9
- package/docs/perf/final-report-2026-05.md +2 -2
- package/docs/perf/sprint-1-report.md +2 -2
- package/docs/perf/sprint-2-report.md +1 -1
- package/docs/perf/upgrade-plan-2026-05.md +72 -72
- package/docs/pi-crew-bugs.md +230 -230
- package/docs/pi-crew-investigation-report.md +102 -102
- package/docs/pi-crew-test-round5.md +4 -4
- package/docs/runtime-analysis-child-vs-live.md +57 -57
- package/docs/runtime-migration-in-process-analysis.md +97 -97
- package/package.json +2 -4
- package/skills/orchestration/SKILL.md +11 -11
- package/src/agents/agent-config.ts +4 -0
- package/src/config/config.ts +39 -0
- package/src/config/types.ts +11 -0
- package/src/extension/action-suggestions.ts +2 -1
- package/src/extension/async-notifier.ts +10 -0
- package/src/extension/help.ts +14 -0
- package/src/extension/registration/commands.ts +27 -0
- package/src/extension/team-tool/destructive-gate.ts +1 -1
- package/src/extension/team-tool/goal-wrap.ts +288 -0
- package/src/extension/team-tool/goal.ts +405 -0
- package/src/extension/team-tool/run.ts +103 -4
- package/src/extension/team-tool/workflow-manage.ts +194 -0
- package/src/extension/team-tool.ts +20 -0
- package/src/hooks/types.ts +3 -1
- package/src/runtime/async-runner.ts +24 -2
- package/src/runtime/background-runner.ts +68 -19
- package/src/runtime/child-pi.ts +6 -1
- package/src/runtime/completion-guard.ts +1 -1
- package/src/runtime/dynamic-workflow-context.ts +450 -0
- package/src/runtime/dynamic-workflow-runner.ts +180 -0
- package/src/runtime/global-worker-cap.ts +96 -0
- package/src/runtime/goal-evaluator.ts +294 -0
- package/src/runtime/goal-loop-runner.ts +612 -0
- package/src/runtime/goal-state-store.ts +209 -0
- package/src/runtime/pi-args.ts +10 -2
- package/src/runtime/result-extractor.ts +32 -0
- package/src/runtime/team-runner.ts +11 -1
- package/src/runtime/verification-gates.ts +85 -5
- package/src/runtime/verification-integrity.ts +110 -0
- package/src/runtime/verification-worktree.ts +136 -0
- package/src/runtime/workspace-lock.ts +448 -0
- package/src/schema/config-schema.ts +26 -0
- package/src/schema/team-tool-schema.ts +39 -4
- package/src/state/atomic-write.ts +9 -0
- package/src/state/contracts.ts +14 -0
- package/src/state/crew-init.ts +18 -5
- package/src/state/event-log.ts +7 -1
- package/src/state/state-store.ts +2 -0
- package/src/state/types.ts +82 -0
- package/src/state/worker-atomic-writer.ts +176 -0
- package/src/utils/redaction.ts +104 -24
- package/src/workflows/discover-workflows.ts +25 -1
- package/src/workflows/workflow-config.ts +13 -0
- package/teams/parallel-research.team.md +1 -1
- package/workflows/examples/hello.dwf.ts +24 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# pi-crew v0.2.20 —
|
|
1
|
+
# pi-crew v0.2.20 — Investigation Results and Analysis
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
**
|
|
5
|
-
**
|
|
3
|
+
**Date:** 2026-05-19
|
|
4
|
+
**Environment:** linux/x64, Node v22.22.0, Pi CLI v0.75.3
|
|
5
|
+
**Models:** zai/glm-5.1 (planner, executor, test-engineer), minimax/MiniMax-M2.7-highspeed (explorer, analyst, reviewer, verifier, writer, critic)
|
|
6
6
|
**pi-crew version:** 0.2.20
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
## 1.
|
|
10
|
+
## 1. pi-crew architecture overview
|
|
11
11
|
|
|
12
|
-
### 1.1
|
|
12
|
+
### 1.1 Source code structure
|
|
13
13
|
|
|
14
14
|
```
|
|
15
15
|
pi-crew/src/
|
|
16
|
-
├── adapters/ —
|
|
16
|
+
├── adapters/ — Adapters for external systems
|
|
17
17
|
├── agents/ — Agent discovery & config (10 agents)
|
|
18
18
|
├── config/ — Configuration, defaults, drift detection
|
|
19
19
|
├── extension/ — Pi extension registration
|
|
@@ -21,16 +21,16 @@ pi-crew/src/
|
|
|
21
21
|
├── observability/ — Metrics, correlation, exporters (OTLP, Prometheus)
|
|
22
22
|
├── prompt/ — Prompt runtime & pipeline
|
|
23
23
|
├── runtime/ — Core runtime (~30+ files)
|
|
24
|
-
│ ├── async-runner.ts — Background process spawning
|
|
24
|
+
│ ├── async-runner.ts — Background process spawning with jiti loader
|
|
25
25
|
│ ├── background-runner.ts — Background entry point, team execution
|
|
26
26
|
│ ├── child-pi.ts — Child Pi process lifecycle, stdout capture, timeout
|
|
27
27
|
│ ├── child-pi-pool.ts — Warm pool skeleton (disabled, size=0)
|
|
28
|
-
│ ├── live-session-runtime.ts — Live-session (
|
|
28
|
+
│ ├── live-session-runtime.ts — Live-session (reuses the parent Pi)
|
|
29
29
|
│ ├── team-runner.ts — Main team run orchestrator
|
|
30
30
|
│ ├── worker-heartbeat.ts — Heartbeat state tracking
|
|
31
31
|
│ ├── worker-startup.ts — Startup failure classification
|
|
32
32
|
│ ├── pi-spawn.ts — Pi binary resolution & spawn command
|
|
33
|
-
│ ├── pi-args.ts — Build args
|
|
33
|
+
│ ├── pi-args.ts — Build args for child Pi workers
|
|
34
34
|
│ ├── runtime-resolver.ts — Resolve live-session vs child-process
|
|
35
35
|
│ ├── crash-recovery.ts — Crash recovery logic
|
|
36
36
|
│ ├── deadletter.ts — Dead letter queue
|
|
@@ -49,7 +49,7 @@ pi-crew/src/
|
|
|
49
49
|
|
|
50
50
|
### 1.2 Resource inventory
|
|
51
51
|
|
|
52
|
-
| Resource | Count |
|
|
52
|
+
| Resource | Count | Details |
|
|
53
53
|
|---|---|---|
|
|
54
54
|
| **Teams** | 6 | default, fast-fix, implementation, parallel-research, research, review |
|
|
55
55
|
| **Workflows** | 6 | default, fast-fix, implementation, parallel-research, research, review |
|
|
@@ -59,12 +59,12 @@ pi-crew/src/
|
|
|
59
59
|
|
|
60
60
|
### 1.3 Runtime modes
|
|
61
61
|
|
|
62
|
-
pi-crew
|
|
62
|
+
pi-crew supports 2 runtime modes:
|
|
63
63
|
|
|
64
|
-
| Mode |
|
|
64
|
+
| Mode | Description | Pros | Cons |
|
|
65
65
|
|---|---|---|---|
|
|
66
|
-
| **live-session** |
|
|
67
|
-
| **child-process** |
|
|
66
|
+
| **live-session** | Reuses the current Pi session | Fast, shares the provider connection | Cannot run async/background |
|
|
67
|
+
| **child-process** | Spawns a new Pi process | Can run background/async | Needs its own provider connection |
|
|
68
68
|
|
|
69
69
|
**Runtime resolution flow:**
|
|
70
70
|
```
|
|
@@ -77,9 +77,9 @@ team action='run' + async=true
|
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
80
|
-
## 2.
|
|
80
|
+
## 2. Comprehensive test results
|
|
81
81
|
|
|
82
|
-
### 2.1
|
|
82
|
+
### 2.1 Summary table
|
|
83
83
|
|
|
84
84
|
| Category | Tests | Pass | Fail | Partial |
|
|
85
85
|
|---|---|---|---|---|
|
|
@@ -91,13 +91,13 @@ team action='run' + async=true
|
|
|
91
91
|
| Diagnostics (doctor, validate, help) | 3 | ✅ 3 | 0 | 0 |
|
|
92
92
|
| Portability (export, import) | 2 | ✅ 2 | 0 | 0 |
|
|
93
93
|
| Configuration (settings, autonomy) | 2 | ✅ 2 | 0 | 0 |
|
|
94
|
-
| **
|
|
94
|
+
| **Total** | **27** | **20** | **6** | **1** |
|
|
95
95
|
|
|
96
|
-
### 2.2
|
|
96
|
+
### 2.2 Per-test details
|
|
97
97
|
|
|
98
98
|
#### ✅ Resource Discovery — 5/5 PASS
|
|
99
99
|
|
|
100
|
-
| Test | Input | Output |
|
|
100
|
+
| Test | Input | Output | Result |
|
|
101
101
|
|---|---|---|---|
|
|
102
102
|
| `team list` | List all resources | 6 teams, 6 workflows, 10 agents | ✅ |
|
|
103
103
|
| `team get` team | Get team=default | 4 roles (explorer→planner→executor→verifier) | ✅ |
|
|
@@ -107,13 +107,13 @@ team action='run' + async=true
|
|
|
107
107
|
|
|
108
108
|
#### ✅ Diagnostics — 3/3 PASS
|
|
109
109
|
|
|
110
|
-
| Test | Input | Output |
|
|
110
|
+
| Test | Input | Output | Result |
|
|
111
111
|
|---|---|---|---|
|
|
112
112
|
| `team doctor` | Full diagnostics | 17/17 checks OK (runtime, filesystem, discovery, validation, drift, schema, async, worktrees) | ✅ |
|
|
113
113
|
| `team validate` | Validate all resources | 10 agents, 6 teams, 6 workflows, 0 issues | ✅ |
|
|
114
114
|
| `team help` | Show help | Full command reference (core, inspection, maintenance, portability, diagnostics) | ✅ |
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
Detailed doctor checks:
|
|
117
117
|
- Runtime: cwd, platform, node, pi, git, config, model — all OK
|
|
118
118
|
- Filesystem: user state, project state, artifacts — all OK
|
|
119
119
|
- Discovery: 10 agents, 6 teams, 6 workflows, 10 model hints — all OK
|
|
@@ -124,10 +124,10 @@ Doctor checks chi tiết:
|
|
|
124
124
|
|
|
125
125
|
#### ✅ State Management — 6/6 PASS
|
|
126
126
|
|
|
127
|
-
| Test | Input | Output |
|
|
127
|
+
| Test | Input | Output | Result |
|
|
128
128
|
|---|---|---|---|
|
|
129
129
|
| `team status` | Check run state | Detailed: task graph, events, artifacts, policy decisions | ✅ |
|
|
130
|
-
| `team events` | Get event log | 20+ events
|
|
130
|
+
| `team events` | Get event log | 20+ events from run.created → task.failed with timestamps | ✅ |
|
|
131
131
|
| `team artifacts` | List artifacts | 14 artifacts (prompts, results, metadata, logs, shared) | ✅ |
|
|
132
132
|
| `team summary` | Run overview | Status, goal, tasks, usage summary | ✅ |
|
|
133
133
|
| `team prune` | keep=2, confirm=true | 9 runs pruned, 2 kept, audit trail in prune.jsonl | ✅ |
|
|
@@ -135,38 +135,38 @@ Doctor checks chi tiết:
|
|
|
135
135
|
|
|
136
136
|
#### ✅ Portability — 2/2 PASS
|
|
137
137
|
|
|
138
|
-
| Test | Input | Output |
|
|
138
|
+
| Test | Input | Output | Result |
|
|
139
139
|
|---|---|---|---|
|
|
140
140
|
| `team export` | Export completed run | run-export.json + run-export.md created | ✅ |
|
|
141
141
|
| `team import` | Import exported bundle | Bundle imported to .crew/imports/ with README.md | ✅ |
|
|
142
142
|
|
|
143
143
|
#### ✅ Configuration — 2/2 PASS
|
|
144
144
|
|
|
145
|
-
| Test | Input | Output |
|
|
145
|
+
| Test | Input | Output | Result |
|
|
146
146
|
|---|---|---|---|
|
|
147
147
|
| `team settings` | Show effective settings | Complete: agent overrides, UI config, autonomous mode | ✅ |
|
|
148
148
|
| `team autonomy` | Show autonomy profile | Profile=suggested, enabled=true, inject policy=true | ✅ |
|
|
149
149
|
|
|
150
150
|
#### ✅ Planning — 1/1 PASS
|
|
151
151
|
|
|
152
|
-
| Test | Input | Output |
|
|
152
|
+
| Test | Input | Output | Result |
|
|
153
153
|
|---|---|---|---|
|
|
154
154
|
| `team plan` | goal="Add health-check endpoint" | 4-step plan: explore → plan → execute → verify | ✅ |
|
|
155
155
|
|
|
156
156
|
#### ❌ Subagent Lifecycle — 0/4 FAIL
|
|
157
157
|
|
|
158
|
-
| Test | Agent ID | Type | Duration | Output |
|
|
158
|
+
| Test | Agent ID | Type | Duration | Output | Result |
|
|
159
159
|
|---|---|---|---|---|---|
|
|
160
160
|
| Agent(explorer) | agent_mpc423rq_1 | explorer | 305s | Empty | ❌ |
|
|
161
161
|
| Agent(planner) | agent_mpc423rv_2 | planner | 305s | Empty | ❌ |
|
|
162
162
|
| Agent(analyst) | agent_mpc423rw_3 | analyst | 305s | Empty | ❌ |
|
|
163
163
|
| crew_agent(explorer) | agent_mpc423rw_4 | explorer | 305s | Empty | ❌ |
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
All of them: spawn successfully (PID exists) → zero output → 305s heartbeat timeout → failed.
|
|
166
166
|
|
|
167
167
|
#### ❌ Team Run Lifecycle — 1 PASS, 2 FAIL, 1 PARTIAL
|
|
168
168
|
|
|
169
|
-
| Test | Team | Runtime |
|
|
169
|
+
| Test | Team | Runtime | Result | Details |
|
|
170
170
|
|---|---|---|---|---|
|
|
171
171
|
| implementation async | implementation | child-process | ❌ FAIL | 01_assess heartbeat dead after 300s |
|
|
172
172
|
| `team retry` | — | — | ✅ PASS | Task re-queued successfully |
|
|
@@ -175,11 +175,11 @@ Tất cả đều: spawn thành công (PID tồn tại) → zero output → 305s
|
|
|
175
175
|
|
|
176
176
|
---
|
|
177
177
|
|
|
178
|
-
## 3.
|
|
178
|
+
## 3. Critical issue: `pi --print` hangs
|
|
179
179
|
|
|
180
|
-
### 3.1
|
|
180
|
+
### 3.1 Description
|
|
181
181
|
|
|
182
|
-
**
|
|
182
|
+
**All 6 background worker failures share the same root cause:** `pi --print` (non-interactive mode) hangs indefinitely.
|
|
183
183
|
|
|
184
184
|
### 3.2 Reproduce
|
|
185
185
|
|
|
@@ -190,7 +190,7 @@ $ timeout 10 pi --print "say hi"
|
|
|
190
190
|
EXIT_CODE: 124 (timeout)
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
Result: **100% reproducible**. The Pi CLI starts (prints the context-mode warning) but blocks on the provider/model call.
|
|
194
194
|
|
|
195
195
|
### 3.3 Chain of failure
|
|
196
196
|
|
|
@@ -200,36 +200,36 @@ pi-crew background run
|
|
|
200
200
|
→ async-runner.ts: resolve jiti-register.mjs
|
|
201
201
|
→ spawn("pi", [...args], { cwd, env })
|
|
202
202
|
→ Pi CLI starts, prints "[pi-crew] background loader=jiti"
|
|
203
|
-
→ Pi tries to connect to model provider
|
|
203
|
+
→ Pi tries to connect to the model provider
|
|
204
204
|
→ BLOCKS INDEFINITELY — no stdout, no stderr, no error
|
|
205
205
|
→ 300,000ms (5 min) heartbeat timeout
|
|
206
206
|
→ worker.response_timeout: "No output for 300000ms"
|
|
207
207
|
→ task.failed → run.failed
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
### 3.4
|
|
210
|
+
### 3.4 Why does live-session still work?
|
|
211
211
|
|
|
212
212
|
| Aspect | Live-session | Child-process |
|
|
213
213
|
|---|---|---|
|
|
214
|
-
| Provider connection | **
|
|
215
|
-
| Auth context |
|
|
216
|
-
| Startup time |
|
|
217
|
-
| Background capable | ❌
|
|
214
|
+
| Provider connection | **Reuses** the parent Pi's connection | Creates a new connection |
|
|
215
|
+
| Auth context | Shared with parent | Must set up itself |
|
|
216
|
+
| Startup time | Fast (no new process) | Slow (spawn + init) |
|
|
217
|
+
| Background capable | ❌ No | ✅ Yes (if the provider works) |
|
|
218
218
|
|
|
219
|
-
### 3.5
|
|
219
|
+
### 3.5 Possible causes
|
|
220
220
|
|
|
221
|
-
| # |
|
|
221
|
+
| # | Cause | Likelihood | How to verify |
|
|
222
222
|
|---|---|---|---|
|
|
223
|
-
| 1 | **API key
|
|
224
|
-
| 2 | **Provider endpoint unreachable**
|
|
225
|
-
| 3 | **Provider rate limiting** (parent + child concurrent) |
|
|
226
|
-
| 4 | **jiti loader stall** — TS compilation hangs |
|
|
223
|
+
| 1 | **API key not inherited** by the child process env | High | Check whether `sanitizeEnvSecrets()` filters too aggressively |
|
|
224
|
+
| 2 | **Provider endpoint unreachable** from the child process | Medium | `curl` to the provider API from the child env |
|
|
225
|
+
| 3 | **Provider rate limiting** (parent + child concurrent) | Medium | Check provider response headers |
|
|
226
|
+
| 4 | **jiti loader stall** — TS compilation hangs | Low | jiti import succeeded (log confirmed) |
|
|
227
227
|
|
|
228
|
-
### 3.6
|
|
228
|
+
### 3.6 Related key files
|
|
229
229
|
|
|
230
230
|
```
|
|
231
231
|
pi-crew/src/runtime/
|
|
232
|
-
├── async-runner.ts — resolveTypeScriptLoader(), spawn args
|
|
232
|
+
├── async-runner.ts — resolveTypeScriptLoader(), spawn args with --import jiti-register.mjs
|
|
233
233
|
├── child-pi.ts — runChildPi(), response timeout, stdout capture
|
|
234
234
|
│ buildChildPiSpawnOptions() → { cwd, env: sanitizeEnvSecrets(env) }
|
|
235
235
|
├── background-runner.ts — Background entry point
|
|
@@ -241,54 +241,54 @@ pi-crew/src/config/defaults.ts
|
|
|
241
241
|
└── DEFAULT_CHILD_PI.responseTimeoutMs = 5 * 60_000 (300s)
|
|
242
242
|
|
|
243
243
|
pi-crew/src/utils/env-filter.ts
|
|
244
|
-
└── sanitizeEnvSecrets() — Filter secret env vars (
|
|
244
|
+
└── sanitizeEnvSecrets() — Filter secret env vars (possibly too aggressive?)
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
### 3.7
|
|
247
|
+
### 3.7 Recommended fix
|
|
248
248
|
|
|
249
|
-
1. **Immediate:**
|
|
250
|
-
2. **Check `sanitizeEnvSecrets()`:** Verify API keys (GOOGLE_API_KEY, MINIMAX_API_KEY, ZAI_API_KEY, etc.)
|
|
251
|
-
3. **
|
|
252
|
-
4. **
|
|
253
|
-
5. **Test workaround:** Set `PI_TEAMS_MOCK_CHILD_PI=success`
|
|
249
|
+
1. **Immediate:** Run `pi --print "test"` in a terminal to confirm the provider connection issue
|
|
250
|
+
2. **Check `sanitizeEnvSecrets()`:** Verify that API keys (GOOGLE_API_KEY, MINIMAX_API_KEY, ZAI_API_KEY, etc.) are not filtered out
|
|
251
|
+
3. **Add error logging:** Capture stderr from the child Pi process into background.log
|
|
252
|
+
4. **Add a connection timeout:** The Pi CLI should time out after ~30s if the provider does not respond, instead of blocking indefinitely
|
|
253
|
+
5. **Test workaround:** Set `PI_TEAMS_MOCK_CHILD_PI=success` to bypass the provider call and verify pi-crew logic in isolation
|
|
254
254
|
|
|
255
255
|
---
|
|
256
256
|
|
|
257
|
-
## 4.
|
|
257
|
+
## 4. Secondary issue: Stale heartbeat notifications after prune
|
|
258
258
|
|
|
259
|
-
### 4.1
|
|
259
|
+
### 4.1 Description
|
|
260
260
|
|
|
261
|
-
|
|
261
|
+
After running `team prune`, the background watcher still emits "Task heartbeat dead" notifications for removed runs.
|
|
262
262
|
|
|
263
263
|
### 4.2 Pattern
|
|
264
264
|
|
|
265
265
|
```
|
|
266
266
|
team prune --keep=0 --confirm=true → 9 runs removed
|
|
267
|
-
→ Notification: "agent_mpc423rq_1 heartbeat dead" (run
|
|
268
|
-
→ Notification: "agent_mpc423rv_2 heartbeat dead" (run
|
|
269
|
-
→ Notification: "agent_mpc423rw_3 heartbeat dead" (run
|
|
270
|
-
→ Notification: "agent_mpc423rw_4 heartbeat dead" (run
|
|
271
|
-
→ ... (
|
|
267
|
+
→ Notification: "agent_mpc423rq_1 heartbeat dead" (pruned run)
|
|
268
|
+
→ Notification: "agent_mpc423rv_2 heartbeat dead" (pruned run)
|
|
269
|
+
→ Notification: "agent_mpc423rw_3 heartbeat dead" (pruned run)
|
|
270
|
+
→ Notification: "agent_mpc423rw_4 heartbeat dead" (pruned run)
|
|
271
|
+
→ ... (6+ stale notifications total)
|
|
272
272
|
```
|
|
273
273
|
|
|
274
|
-
### 4.3
|
|
274
|
+
### 4.3 Cause
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
The background watcher maintains a queue of worker health checks. When runs are pruned, the watcher does not deregister immediately — notifications already in the queue are still emitted.
|
|
277
277
|
|
|
278
278
|
### 4.4 Severity: LOW (cosmetic)
|
|
279
279
|
|
|
280
|
-
### 4.5
|
|
280
|
+
### 4.5 Recommendation
|
|
281
281
|
|
|
282
|
-
-
|
|
283
|
-
-
|
|
282
|
+
- The background watcher should check run existence before emitting heartbeat alerts
|
|
283
|
+
- Or: the watcher should deregister workers when runs are pruned
|
|
284
284
|
|
|
285
285
|
---
|
|
286
286
|
|
|
287
|
-
## 5.
|
|
287
|
+
## 5. Secondary issue: Live-session run cancelled mid-execution
|
|
288
288
|
|
|
289
|
-
### 5.1
|
|
289
|
+
### 5.1 Description
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
A fast-fix team ran in a live-session; task `01_explore` completed successfully but the run was cancelled before `02_execute` started.
|
|
292
292
|
|
|
293
293
|
### 5.2 Events
|
|
294
294
|
|
|
@@ -300,55 +300,55 @@ Fast-fix team chạy live-session, task `01_explore` hoàn thành thành công n
|
|
|
300
300
|
04:12:51 run.cancelled: "This operation was aborted"
|
|
301
301
|
```
|
|
302
302
|
|
|
303
|
-
### 5.3
|
|
303
|
+
### 5.3 Possible causes
|
|
304
304
|
|
|
305
|
-
- Session concurrency limit (
|
|
305
|
+
- Session concurrency limit (only 1 active live-session)
|
|
306
306
|
- User-initiated cancellation
|
|
307
|
-
- Conflict
|
|
307
|
+
- Conflict with concurrent test operations
|
|
308
308
|
|
|
309
309
|
### 5.4 Severity: MEDIUM
|
|
310
310
|
|
|
311
311
|
---
|
|
312
312
|
|
|
313
|
-
## 6.
|
|
313
|
+
## 6. Features working stably
|
|
314
314
|
|
|
315
|
-
|
|
315
|
+
A list of features that have been tested and work correctly:
|
|
316
316
|
|
|
317
317
|
### Resource Discovery
|
|
318
|
-
- ✅ `team list` —
|
|
319
|
-
- ✅ `team get` —
|
|
320
|
-
- ✅ `team recommend` —
|
|
321
|
-
- ✅ `team validate` —
|
|
318
|
+
- ✅ `team list` — Lists teams, workflows, agents, recent runs
|
|
319
|
+
- ✅ `team get` — Details of team/workflow/agent
|
|
320
|
+
- ✅ `team recommend` — Suggests a suitable team based on a goal
|
|
321
|
+
- ✅ `team validate` — Validates all resources
|
|
322
322
|
|
|
323
323
|
### Diagnostics
|
|
324
324
|
- ✅ `team doctor` — 17 checks (runtime, filesystem, discovery, drift, schema, async, worktrees)
|
|
325
325
|
- ✅ `team help` — Full command reference
|
|
326
326
|
|
|
327
327
|
### State Management
|
|
328
|
-
- ✅ `team status` — Run state
|
|
329
|
-
- ✅ `team events` —
|
|
330
|
-
- ✅ `team artifacts` —
|
|
328
|
+
- ✅ `team status` — Run state with task graph, events, policy decisions
|
|
329
|
+
- ✅ `team events` — Detailed chronological event log
|
|
330
|
+
- ✅ `team artifacts` — Lists artifact files (prompts, results, metadata, logs)
|
|
331
331
|
- ✅ `team summary` — Concise run overview
|
|
332
|
-
- ✅ `team prune` — Cleanup runs
|
|
332
|
+
- ✅ `team prune` — Cleanup runs with audit trail (prune.jsonl)
|
|
333
333
|
- ✅ `team cancel` — Cancel running/queued runs
|
|
334
334
|
|
|
335
335
|
### Portability
|
|
336
|
-
- ✅ `team export` — Export run
|
|
337
|
-
- ✅ `team import` — Import run bundle,
|
|
336
|
+
- ✅ `team export` — Export a run to JSON + Markdown
|
|
337
|
+
- ✅ `team import` — Import a run bundle, create a README.md summary
|
|
338
338
|
|
|
339
339
|
### Configuration
|
|
340
340
|
- ✅ `team settings` — Show effective settings (agent overrides, UI, autonomous)
|
|
341
|
-
- ✅ `team autonomy` — Show/set autonomous mode profile
|
|
341
|
+
- ✅ `team autonomy` — Show/set the autonomous mode profile
|
|
342
342
|
|
|
343
343
|
### Planning
|
|
344
|
-
- ✅ `team plan` —
|
|
344
|
+
- ✅ `team plan` — Create an execution plan with structured steps
|
|
345
345
|
|
|
346
346
|
### Retry
|
|
347
347
|
- ✅ `team retry` — Re-queue failed tasks
|
|
348
348
|
|
|
349
349
|
---
|
|
350
350
|
|
|
351
|
-
## 7.
|
|
351
|
+
## 7. Current configuration
|
|
352
352
|
|
|
353
353
|
### Autonomous Mode
|
|
354
354
|
```
|
|
@@ -381,11 +381,11 @@ DEFAULT_LIVE_SESSION.responseTimeoutMs = 600,000 (10 min)
|
|
|
381
381
|
|
|
382
382
|
---
|
|
383
383
|
|
|
384
|
-
## 8.
|
|
384
|
+
## 8. Related files
|
|
385
385
|
|
|
386
|
-
| File |
|
|
386
|
+
| File | Description |
|
|
387
387
|
|---|---|
|
|
388
|
-
| `/home/bom/source/my_pi/pi-crew-test-results.md` |
|
|
388
|
+
| `/home/bom/source/my_pi/pi-crew-test-results.md` | Detailed test report |
|
|
389
389
|
| `/home/bom/.pi/agent/pi-crew.json` | pi-crew config |
|
|
390
390
|
| `/home/bom/.pi/agent/agents/explorer.md` | Explorer agent config |
|
|
391
391
|
| `/home/bom/.pi/agent/agents/security-reviewer.md` | Security reviewer config |
|
|
@@ -397,15 +397,15 @@ DEFAULT_LIVE_SESSION.responseTimeoutMs = 600,000 (10 min)
|
|
|
397
397
|
|
|
398
398
|
## 9. Next Steps
|
|
399
399
|
|
|
400
|
-
###
|
|
401
|
-
1. **Fix `pi --print` hangs:** Investigate provider connection
|
|
402
|
-
2. **Check `sanitizeEnvSecrets()`:** Verify
|
|
403
|
-
3. **
|
|
400
|
+
### High priority
|
|
401
|
+
1. **Fix `pi --print` hangs:** Investigate the provider connection in the child process
|
|
402
|
+
2. **Check `sanitizeEnvSecrets()`:** Verify it does not filter out necessary API keys
|
|
403
|
+
3. **Add stderr logging:** background.log should capture stderr from the child Pi
|
|
404
404
|
|
|
405
|
-
###
|
|
406
|
-
4. **Test foreground team to completion:** Verify full workflow lifecycle (explore→plan→execute→verify)
|
|
407
|
-
5. **Stale notification fix:** Background watcher deregister
|
|
405
|
+
### Medium priority
|
|
406
|
+
4. **Test a foreground team to completion:** Verify the full workflow lifecycle (explore→plan→execute→verify)
|
|
407
|
+
5. **Stale notification fix:** Background watcher deregister on prune
|
|
408
408
|
|
|
409
|
-
###
|
|
410
|
-
6. **Configurable heartbeat timeout:**
|
|
411
|
-
7. **Warm pool implementation:**
|
|
409
|
+
### Low priority
|
|
410
|
+
6. **Configurable heartbeat timeout:** Replace the hardcoded 300s with a config value
|
|
411
|
+
7. **Warm pool implementation:** Currently disabled (size=0), needs Pi-side support
|
|
@@ -22,11 +22,11 @@ Error: Failed to run npm root -g: undefined
|
|
|
22
22
|
at DefaultPackageManager.getNpmInstallPath
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
**Root cause identified:** Bug #12 —
|
|
25
|
+
**Root cause identified:** Bug #12 — The fix for Bug #10 accidentally stripped out essential env vars!
|
|
26
26
|
|
|
27
|
-
`buildChildPiSpawnOptions()`
|
|
27
|
+
`buildChildPiSpawnOptions()` uses `sanitizeEnvSecrets(env, { allowList: [model API keys] })`. In allow-list mode, ONLY keys matching the allow-list are kept. All other keys (PATH, HOME, USER, etc.) are stripped.
|
|
28
28
|
|
|
29
|
-
→
|
|
29
|
+
→ The child Pi process has no PATH → cannot find npm → crashes immediately
|
|
30
30
|
|
|
31
31
|
**Workers spawned successfully (Bug #11 verified ✅):**
|
|
32
32
|
- `worker.spawned: pid=339071, pid=339077` — spawn OK
|
|
@@ -65,6 +65,6 @@ Error: Failed to run npm root -g: undefined
|
|
|
65
65
|
|
|
66
66
|
## Next Step
|
|
67
67
|
|
|
68
|
-
**Restart Pi**
|
|
68
|
+
**Restart Pi** to reload with the Bug #12 fix. Then test:
|
|
69
69
|
1. Background async team — verify workers produce output within 60s (not 300s timeout)
|
|
70
70
|
2. Foreground fast-fix team — verify all phases complete
|