@zhuxixi/pi-agent-board 0.7.0 → 0.8.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 +26 -0
- package/README.md +6 -3
- package/VERIFY.md +2 -1
- package/docs/PTY_ATTACH_IMPLEMENTATION_PLAN.md +3 -1
- package/docs/superpowers/plans/2026-09-10-reader-consistency.md +115 -0
- package/docs/superpowers/plans/2026-09-14-attach-cursor-dectcem-gate.md +469 -0
- package/docs/superpowers/plans/2026-09-14-attach-snapshot.md +92 -0
- package/docs/superpowers/plans/2026-09-14-host-meta-orphan-lock.md +771 -0
- package/docs/superpowers/plans/2026-09-14-issue-106-terminal-frame-cognition.md +299 -0
- package/docs/superpowers/plans/2026-09-14-issue-113-foreground-preview-race.md +609 -0
- package/docs/superpowers/plans/2026-09-14-terminal-model.md +145 -0
- package/docs/superpowers/plans/2026-09-15-coordinator-pipe-root-normalize.md +224 -0
- package/docs/superpowers/plans/2026-09-15-lease-publish-eprem-reclaim.md +341 -0
- package/docs/superpowers/plans/2026-09-18-detach-anchor-reporter-endpoint.md +875 -0
- package/docs/superpowers/plans/2026-09-20-control-lifecycle.md +116 -0
- package/docs/superpowers/plans/2026-09-20-issue-121-perf-gate-out-of-coverage.md +517 -0
- package/docs/superpowers/specs/2026-09-14-attach-cursor-dectcem-gate-design.md +114 -0
- package/docs/superpowers/specs/2026-09-14-host-meta-orphan-lock-design.md +120 -0
- package/docs/superpowers/specs/2026-09-14-issue-106-terminal-frame-cognition-design.md +146 -0
- package/docs/superpowers/specs/2026-09-14-issue-113-foreground-preview-race-design.md +116 -0
- package/docs/superpowers/specs/2026-09-15-coordinator-pipe-root-normalize-design.md +84 -0
- package/docs/superpowers/specs/2026-09-15-lease-publish-eprem-reclaim-design.md +92 -0
- package/docs/superpowers/specs/2026-09-18-detach-anchor-reporter-endpoint-design.md +123 -0
- package/docs/superpowers/specs/2026-09-20-issue-121-perf-gate-out-of-coverage-design.md +204 -0
- package/package.json +3 -2
- package/runner/job-runner.mjs +8 -7
- package/runner/pty-runner.mjs +616 -27
- package/runner/state-coordinator.mjs +43 -17
- package/runner/state-runner.mjs +6 -5
- package/scripts/run-perf-gate.mjs +40 -0
- package/src/commands/agent-board.ts +8 -8
- package/src/commands/attach-flow.ts +5 -5
- package/src/core/control-protocol.mjs +482 -0
- package/src/core/editor-state-reporter.mjs +11 -1
- package/src/core/foreground-preview-cache.mjs +117 -0
- package/src/core/host-protocol.mjs +24 -0
- package/src/core/locks.mjs +68 -14
- package/src/core/paths.mjs +35 -3
- package/src/core/pid.mjs +32 -1
- package/src/core/pty-attach-jiggle-controller.mjs +27 -3
- package/src/core/pty-attach-reconnect.mjs +13 -6
- package/src/core/pty-attach-render.mjs +20 -0
- package/src/core/state-commands.mjs +88 -6
- package/src/core/status-consistency.mjs +98 -0
- package/src/core/store.mjs +59 -13
- package/src/core/terminal-attach-client.mjs +803 -0
- package/src/core/terminal-attach-protocol.mjs +252 -0
- package/src/core/terminal-model.mjs +222 -0
- package/src/core/terminal-snapshot.mjs +440 -0
- package/src/index.ts +12 -4
- package/src/runtime/service.mjs +284 -16
- package/src/ui/dashboard.ts +41 -33
- package/src/ui/pty-attach.ts +236 -72
- package/src/core/pty-input.mjs +0 -47
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
# Windows Lease Publish EPERM Reclaim Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
+
|
|
5
|
+
**Goal:** 让 `attemptAcquireLease` 在 Windows 的 publish-rename EPERM(目标目录已存在)下进入 reclaim 判定,使 coordinator / host 的租约孤锁可被自动回收(issue #114)。
|
|
6
|
+
|
|
7
|
+
**Architecture:** 把 rename 冲突码判定抽成导出的纯函数 `isPublishConflictCode(code)`(`EEXIST`/`ENOTEMPTY`/`EPERM`),`attemptAcquireLease` 的 catch 改用它;回收安全性完全由既有 `classifyLeaseOwner` 决定,本次不放宽任何回收条件。测试分三层:纯函数 unit → 注入 fs 模拟 Windows EPERM 的接管 unit/integration → spawn 真 coordinator 的端到端回归。
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** Node 24 ESM、`node:test`、零新依赖。
|
|
10
|
+
|
|
11
|
+
**Spec:** `docs/superpowers/specs/2026-09-15-lease-publish-eprem-reclaim-design.md`
|
|
12
|
+
|
|
13
|
+
## Global Constraints
|
|
14
|
+
|
|
15
|
+
- 不改 `classifyLeaseOwner` 的判定契约、不改 quarantine / inspectedToken 核对机制、不改 `ORPHAN_LEASE_AGE_MS`(5min)。
|
|
16
|
+
- 不新增依赖;不新增生产文件。
|
|
17
|
+
- 生产改动仅限 `src/core/locks.mjs`。
|
|
18
|
+
- 所有测试命令在 worktree 根目录执行(`node --test test/<file>.test.mjs`)。
|
|
19
|
+
- Windows 真机既有失败基线(修复前):`node --test test/locks.test.mjs` = 20 tests / **4 fail**(全部为租约接管路径),修复后必须 0 fail。
|
|
20
|
+
- commit 用 conventional commits;每个 task 独立 commit。
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### Task 1: `isPublishConflictCode` 纯函数 + catch 接线
|
|
25
|
+
|
|
26
|
+
**Files:**
|
|
27
|
+
- Modify: `src/core/locks.mjs`(新增导出函数;改造 `attemptAcquireLease` catch)
|
|
28
|
+
- Test: `test/locks.test.mjs`
|
|
29
|
+
|
|
30
|
+
**Interfaces:**
|
|
31
|
+
- Produces: `isPublishConflictCode(code: string|undefined): boolean`(导出)——`EEXIST`/`ENOTEMPTY`/`EPERM` → true,其余 → false。
|
|
32
|
+
- Consumes: 既有 `attemptAcquireLease` / `reclaimOrBlock`(不动其签名)。
|
|
33
|
+
|
|
34
|
+
- [ ] **Step 1: Write the failing test**
|
|
35
|
+
|
|
36
|
+
在 `test/locks.test.mjs` 的 import 块(第 6 行)把 `isPublishConflictCode` 加入解构列表:
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
import { acquireOwnedViewLock, classifyLeaseOwner, defaultLocksFs, isPublishConflictCode, releaseWithToken, tryAcquireOwnedViewLock, withFileLockSync, withViewLockSync } from "../src/core/locks.mjs";
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
在文件末尾追加测试:
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
// ---- publish-rename conflict codes (issue #114) -----------------------------
|
|
46
|
+
|
|
47
|
+
test("isPublishConflictCode: rename conflict codes including Windows EPERM", () => {
|
|
48
|
+
assert.equal(isPublishConflictCode("EEXIST"), true);
|
|
49
|
+
assert.equal(isPublishConflictCode("ENOTEMPTY"), true, "POSIX rename onto an existing dir");
|
|
50
|
+
assert.equal(isPublishConflictCode("EPERM"), true, "Windows rename onto an existing dir (errno -4048)");
|
|
51
|
+
assert.equal(isPublishConflictCode("ENOENT"), false);
|
|
52
|
+
assert.equal(isPublishConflictCode("EACCES"), false);
|
|
53
|
+
assert.equal(isPublishConflictCode(undefined), false);
|
|
54
|
+
assert.equal(isPublishConflictCode(null), false);
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- [ ] **Step 2: Run test to verify it fails**
|
|
59
|
+
|
|
60
|
+
Run: `node --test test/locks.test.mjs`
|
|
61
|
+
Expected: FAIL —— `isPublishConflictCode is not a function`(或 import 报错),其余用例不受影响。
|
|
62
|
+
|
|
63
|
+
- [ ] **Step 3: Write minimal implementation**
|
|
64
|
+
|
|
65
|
+
在 `src/core/locks.mjs` 的 `attemptAcquireLease` **之前**插入:
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
/**
|
|
69
|
+
* Whether a publish-rename failure means "the lock path already exists"
|
|
70
|
+
* (contention) rather than a genuine filesystem error.
|
|
71
|
+
*
|
|
72
|
+
* POSIX reports EEXIST/ENOTEMPTY when renaming a directory onto an existing
|
|
73
|
+
* one; Windows reports EPERM (errno -4048) for the same situation — this op's
|
|
74
|
+
* platform equivalent of EEXIST (issue #114: a crashed owner's lease could
|
|
75
|
+
* never be reclaimed because EPERM was rethrown before reclaimOrBlock).
|
|
76
|
+
* Routing a genuine permission error here stays safe: reclaimability is still
|
|
77
|
+
* decided solely by `classifyLeaseOwner`, so it resolves `blocked`/`busy`.
|
|
78
|
+
* @param {string|undefined|null} code
|
|
79
|
+
* @returns {boolean}
|
|
80
|
+
*/
|
|
81
|
+
export function isPublishConflictCode(code) {
|
|
82
|
+
return code === "EEXIST" || code === "ENOTEMPTY" || code === "EPERM";
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
把 `attemptAcquireLease` catch 中的:
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
const code = err && err.code;
|
|
90
|
+
if (code !== "EEXIST" && code !== "ENOTEMPTY") throw err;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
替换为:
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
const code = /** @type {NodeJS.ErrnoException|undefined} */ (err)?.code;
|
|
97
|
+
if (!isPublishConflictCode(code)) throw err;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- [ ] **Step 4: Run test to verify it passes**
|
|
101
|
+
|
|
102
|
+
Run: `node --test test/locks.test.mjs`
|
|
103
|
+
Expected: 新用例 PASS;其余用例与修复前一致(Windows 真机此时 4 个接管用例仍 fail —— 它们在 Task 2 的注入用例之外,属既有基线,Task 4 复验)。
|
|
104
|
+
|
|
105
|
+
- [ ] **Step 5: Commit**
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git add src/core/locks.mjs test/locks.test.mjs
|
|
109
|
+
git commit -m "fix(locks): treat Windows publish-rename EPERM as lease contention (issue #114)"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
### Task 2: 注入 fs 的 EPERM 接管测试(reclaim / busy / blocked)
|
|
115
|
+
|
|
116
|
+
**Files:**
|
|
117
|
+
- Test: `test/locks.test.mjs`
|
|
118
|
+
|
|
119
|
+
**Interfaces:**
|
|
120
|
+
- Consumes: `isPublishConflictCode` 接线后的 `tryAcquireOwnedViewLock`(Task 1)。
|
|
121
|
+
- Produces: 无生产接口;测试辅助 `windowsPublishFs(lockPath)`。
|
|
122
|
+
|
|
123
|
+
- [ ] **Step 1: Write the failing tests**
|
|
124
|
+
|
|
125
|
+
在 `test/locks.test.mjs` 顶部 import 增加 `renameSync as realRenameSync`(保留既有名字):
|
|
126
|
+
|
|
127
|
+
```js
|
|
128
|
+
import { existsSync, mkdirSync, mkdtempSync, renameSync as realRenameSync, rmSync, writeFileSync } from "node:fs";
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
在文件末尾追加:
|
|
132
|
+
|
|
133
|
+
```js
|
|
134
|
+
/** Windows-style publish fs: renaming onto an existing lock path throws EPERM
|
|
135
|
+
* (errno -4048) instead of POSIX's ENOTEMPTY; all other ops are real. */
|
|
136
|
+
function windowsPublishFs(lockPath) {
|
|
137
|
+
return {
|
|
138
|
+
...LOCK_FS,
|
|
139
|
+
renameSync: (from, to, ...rest) => {
|
|
140
|
+
if (String(to) === lockPath && existsSync(to)) {
|
|
141
|
+
const e = new Error("EPERM: operation not permitted, rename");
|
|
142
|
+
e.code = "EPERM";
|
|
143
|
+
throw e;
|
|
144
|
+
}
|
|
145
|
+
return realRenameSync(from, to, ...rest);
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const ME = { pid: process.pid, startToken: "me" };
|
|
151
|
+
const DEAD = { pid: 99999999, startToken: "dead" };
|
|
152
|
+
|
|
153
|
+
test("EPERM publish contention: dead owner with full identity is reclaimed", () => {
|
|
154
|
+
const root = freshRoot();
|
|
155
|
+
try {
|
|
156
|
+
const lockPath = P.viewLockPath(root, "v1", "coordinator");
|
|
157
|
+
mkdirSync(lockPath, { recursive: true });
|
|
158
|
+
writeFileSync(join(lockPath, "owner.json"), JSON.stringify({ token: "t", pid: DEAD.pid, identity: DEAD, startedAt: Date.now() }));
|
|
159
|
+
const got = tryAcquireOwnedViewLock(root, "v1", "coordinator", { identity: ME, fs: windowsPublishFs(lockPath) });
|
|
160
|
+
assert.equal(got.acquired, true, "EPERM contention must reach reclaimOrBlock");
|
|
161
|
+
assert.equal(got.lease.isOwner(), true);
|
|
162
|
+
got.lease.release();
|
|
163
|
+
} finally {
|
|
164
|
+
rmSync(root, { recursive: true, force: true });
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
test("EPERM publish contention: stale identity-less owner (Windows startToken:null) is reclaimed", () => {
|
|
169
|
+
const root = freshRoot();
|
|
170
|
+
try {
|
|
171
|
+
const lockPath = P.viewLockPath(root, "v1", "coordinator");
|
|
172
|
+
mkdirSync(lockPath, { recursive: true });
|
|
173
|
+
writeFileSync(join(lockPath, "owner.json"), JSON.stringify({
|
|
174
|
+
token: "t", pid: DEAD.pid,
|
|
175
|
+
identity: { pid: DEAD.pid, startToken: null },
|
|
176
|
+
startedAt: Date.now() - 10 * 60_000,
|
|
177
|
+
}));
|
|
178
|
+
const got = tryAcquireOwnedViewLock(root, "v1", "coordinator", { identity: ME, fs: windowsPublishFs(lockPath) });
|
|
179
|
+
assert.equal(got.acquired, true, "issue #112 orphan reclaim must be reachable through EPERM contention");
|
|
180
|
+
got.lease.release();
|
|
181
|
+
} finally {
|
|
182
|
+
rmSync(root, { recursive: true, force: true });
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
test("EPERM publish contention: live owner stays busy (no steal)", () => {
|
|
187
|
+
const root = freshRoot();
|
|
188
|
+
try {
|
|
189
|
+
const lockPath = P.viewLockPath(root, "v1", "coordinator");
|
|
190
|
+
mkdirSync(lockPath, { recursive: true });
|
|
191
|
+
writeFileSync(join(lockPath, "owner.json"), JSON.stringify({ token: "t", pid: process.pid, identity: { pid: process.pid, startToken: "live" }, startedAt: Date.now() }));
|
|
192
|
+
const got = tryAcquireOwnedViewLock(root, "v1", "coordinator", { identity: ME, fs: windowsPublishFs(lockPath) });
|
|
193
|
+
assert.equal(got.acquired, false);
|
|
194
|
+
assert.equal(got.reason, "busy");
|
|
195
|
+
} finally {
|
|
196
|
+
rmSync(root, { recursive: true, force: true });
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
test("EPERM publish contention: fresh identity-less owner stays blocked", () => {
|
|
201
|
+
const root = freshRoot();
|
|
202
|
+
try {
|
|
203
|
+
const lockPath = P.viewLockPath(root, "v1", "coordinator");
|
|
204
|
+
mkdirSync(lockPath, { recursive: true });
|
|
205
|
+
writeFileSync(join(lockPath, "owner.json"), JSON.stringify({ token: "t", pid: DEAD.pid, identity: null, startedAt: Date.now() }));
|
|
206
|
+
const got = tryAcquireOwnedViewLock(root, "v1", "coordinator", { identity: ME, fs: windowsPublishFs(lockPath) });
|
|
207
|
+
assert.equal(got.acquired, false);
|
|
208
|
+
assert.equal(got.reason, "blocked");
|
|
209
|
+
} finally {
|
|
210
|
+
rmSync(root, { recursive: true, force: true });
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- [ ] **Step 2: Run tests to verify they pass**
|
|
216
|
+
|
|
217
|
+
Run: `node --test test/locks.test.mjs`
|
|
218
|
+
Expected: 4 个新用例 PASS。
|
|
219
|
+
|
|
220
|
+
- [ ] **Step 3: Prove the tests actually pin the fix (revert check)**
|
|
221
|
+
|
|
222
|
+
临时把 Task 1 的 catch 判定改回旧形态(`if (code !== "EEXIST" && code !== "ENOTEMPTY") throw err;`),运行:
|
|
223
|
+
|
|
224
|
+
Run: `node --test test/locks.test.mjs`
|
|
225
|
+
Expected: 4 个新用例 FAIL(`EPERM` 被 throw)。确认后恢复 Task 1 的实现,再跑一次确认 PASS。
|
|
226
|
+
|
|
227
|
+
- [ ] **Step 4: Commit**
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
git add test/locks.test.mjs
|
|
231
|
+
git commit -m "test(locks): cover EPERM publish contention reclaim/busy/blocked (issue #114)"
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
### Task 3: `ensureCoordinator` 端到端孤锁接管(spawn 真 coordinator)
|
|
237
|
+
|
|
238
|
+
**Files:**
|
|
239
|
+
- Test: `test/coordinator-client.test.mjs`
|
|
240
|
+
|
|
241
|
+
**Interfaces:**
|
|
242
|
+
- Consumes: 既有 `ensureCoordinator(root, { runnerScript })`、文件内辅助 `track(pid)` / `cleanupRoot(root)`、`COORDINATOR_SCRIPT` 常量。
|
|
243
|
+
- Produces: 无生产接口。
|
|
244
|
+
|
|
245
|
+
- [ ] **Step 1: Write the failing test**
|
|
246
|
+
|
|
247
|
+
在 `test/coordinator-client.test.mjs` 的 node:fs import 中加入 `mkdirSync`:
|
|
248
|
+
|
|
249
|
+
```js
|
|
250
|
+
import { mkdirSync, mkdtempSync, rmSync } from "node:fs";
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
在 `ensureCoordinator spawns the real coordinator; ...` 测试之后追加:
|
|
254
|
+
|
|
255
|
+
```js
|
|
256
|
+
test("ensureCoordinator reclaims a stale identity-less orphan lease (issue #114)", async (t) => {
|
|
257
|
+
const root = freshRoot();
|
|
258
|
+
t.after(async () => {
|
|
259
|
+
await cleanupRoot(root);
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// Residue of a killed coordinator on a platform without startToken (Windows):
|
|
263
|
+
// dead pid, identity-less, past the 5min orphan age.
|
|
264
|
+
const lockPath = P.viewLockPath(root, "_coordinator", "state-coordinator");
|
|
265
|
+
mkdirSync(lockPath, { recursive: true });
|
|
266
|
+
writeFileSync(join(lockPath, "owner.json"), JSON.stringify({
|
|
267
|
+
token: "orphan-lease",
|
|
268
|
+
pid: 99999999,
|
|
269
|
+
identity: { pid: 99999999, startToken: null },
|
|
270
|
+
startedAt: Date.now() - 10 * 60_000,
|
|
271
|
+
}), "utf8");
|
|
272
|
+
|
|
273
|
+
const ensured = await ensureCoordinator(root, { runnerScript: COORDINATOR_SCRIPT });
|
|
274
|
+
assert.equal(ensured.ok, true, "the orphan lease must be reclaimed, not block startup");
|
|
275
|
+
assert.match(ensured.instanceId, /^[0-9a-f]+$/);
|
|
276
|
+
track(ensured.pid);
|
|
277
|
+
});
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
- [ ] **Step 2: Run test to verify it passes**
|
|
281
|
+
|
|
282
|
+
Run: `node --test test/coordinator-client.test.mjs`
|
|
283
|
+
Expected: 新用例 PASS;同文件其余用例不受影响。
|
|
284
|
+
|
|
285
|
+
- [ ] **Step 3: Commit**
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
git add test/coordinator-client.test.mjs
|
|
289
|
+
git commit -m "test(coordinator): e2e orphan lease takeover via ensureCoordinator (issue #114)"
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
### Task 4: 真机 Windows 验证 + 全量回归(验收 A5/A6/A7)
|
|
295
|
+
|
|
296
|
+
**Files:** 无代码改动(验证任务)。
|
|
297
|
+
|
|
298
|
+
- [ ] **Step 1: Windows 真机:锁测试转绿(A5)**
|
|
299
|
+
|
|
300
|
+
Run: `node --test test/locks.test.mjs`
|
|
301
|
+
Expected: **0 fail**(基线 20 tests / 4 fail → 修复后 25 tests / 0 fail,含 Task 1-2 新增用例)。
|
|
302
|
+
|
|
303
|
+
- [ ] **Step 2: Windows 真机:coordinator 集成套件(A7)**
|
|
304
|
+
|
|
305
|
+
Run: `node --test test/coordinator-client.test.mjs test/coordinator-journal.test.mjs`
|
|
306
|
+
Expected: 0 fail(含 Task 3 新增用例)。
|
|
307
|
+
|
|
308
|
+
- [ ] **Step 3: 类型检查(A6)**
|
|
309
|
+
|
|
310
|
+
Run: `npm run typecheck`
|
|
311
|
+
Expected: 零错误。
|
|
312
|
+
|
|
313
|
+
- [ ] **Step 4: 全量回归(A6)**
|
|
314
|
+
|
|
315
|
+
Run: `npm test 2>&1 | tail -40`
|
|
316
|
+
Expected: 失败集不新增。与修复前基线对比:在**同一 worktree、未含本次改动**的 `a129b09` 上先记录一次基线失败清单(`git stash` 或另存输出),修复后按名字逐项比对,仅允许减少、不允许新增。(Windows 既有环境类失败照旧记录。)
|
|
317
|
+
|
|
318
|
+
- [ ] **Step 5: 记录验收结果到 issue**
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
gh issue comment 114 --repo zhuxixi/pi-agent-board --body "## 实现完成:验收结果 A1–A7
|
|
322
|
+
<贴各命令与结果摘要>"
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
- [ ] **Step 6: Commit(如有验证脚本或文档微调)**
|
|
326
|
+
|
|
327
|
+
若 Step 1-4 全部通过且无文件改动,本任务无 commit;若为跑基线在 worktree 内产生了临时产物,确认未 add 后删除。
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Self-Review
|
|
332
|
+
|
|
333
|
+
- **Spec coverage**:A1 → Task 1 Step 1;A2/A3/A4 → Task 2;A5/A6 → Task 4;A7 → Task 3 + Task 4 Step 2;U1(用户实测)→ 合并部署后由用户执行(spec §3 已标 pending 规则)。
|
|
334
|
+
- **Placeholder scan**:无 TBD/TODO;所有测试与实现代码已给出完整文本。
|
|
335
|
+
- **Type consistency**:`isPublishConflictCode(code)` 签名在 Task 1 定义、Task 2 测试辅助通过行为依赖;`windowsPublishFs` 仅测试内使用;`track` / `cleanupRoot` / `COORDINATOR_SCRIPT` 均为既有名字。
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## Execution notes
|
|
340
|
+
|
|
341
|
+
- `b29ca2d` — Task 3 fix round 1 (controller-ruled): test-fixture robustness fix in `test/coordinator-client.test.mjs` — condition-based wait for SIGKILLed pids plus bounded EPERM/EBUSY retry on root removal. It also flipped 4 pre-existing spawn-real test failures green; no plan task was rewritten.
|