@zhuxixi/pi-agent-board 0.13.0 → 0.14.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 +65 -0
- package/README.md +37 -12
- package/docs/SECTION_FOLDING.md +53 -0
- package/docs/superpowers/plans/2026-10-23-issue-222-attach-ready.md +290 -0
- package/docs/superpowers/plans/2026-10-26-issue-245-key-hints-doc-sync.md +244 -0
- package/docs/superpowers/plans/2026-10-27-issue-172-fullscreen-selection-clear.md +344 -0
- package/docs/superpowers/plans/2026-10-27-issue-252-select-key-hints.md +209 -0
- package/docs/superpowers/plans/2026-10-28-issue-255-coordinator-endpoint-zombie.md +442 -0
- package/docs/superpowers/plans/2026-10-28-issue-257-legacy-pty-runner-endpoint-cleanup.md +256 -0
- package/docs/superpowers/plans/2026-11-03-cwd-favorites-full-pool.md +266 -0
- package/docs/superpowers/plans/2026-11-03-issue-266-alt-h-detach.md +467 -0
- package/docs/superpowers/plans/2026-11-04-issue-270-scenario-stdout-flush.md +584 -0
- package/docs/superpowers/plans/2026-11-05-issue-278-ctrl-g-external-editor.md +381 -0
- package/docs/superpowers/plans/2026-11-06-issue-280-frame-witness-delivery.md +430 -0
- package/docs/superpowers/plans/2026-11-07-issue-284-attach-recovery.md +115 -0
- package/docs/superpowers/plans/2026-11-07-issue-284-u1-u2-trial-guide.md +39 -0
- package/docs/superpowers/plans/2026-11-08-host-restart-model-override.md +894 -0
- package/docs/superpowers/plans/2026-11-08-issue-288-cap-floor.md +51 -0
- package/docs/superpowers/plans/2026-11-09-dashboard-fold-flake.md +166 -0
- package/docs/superpowers/plans/2026-11-09-issue-273-harness-console-log-exit.md +369 -0
- package/docs/superpowers/plans/2026-11-10-issue-258-board-selection-settle.md +760 -0
- package/docs/superpowers/plans/2026-11-13-issue-294-snapshot-resize-intent.md +590 -0
- package/docs/superpowers/plans/2026-11-16-greeting-title-poll.md +838 -0
- package/docs/superpowers/plans/2026-11-22-issue-297-compaction-mirror.md +797 -0
- package/docs/superpowers/plans/2026-11-23-issue-254-cursor-keep-position.md +663 -0
- package/docs/superpowers/plans/2026-11-23-issue-95-legacy-quarantine.md +320 -0
- package/docs/superpowers/specs/2026-10-23-issue-222-attach-ready-design.md +204 -0
- package/docs/superpowers/specs/2026-10-26-issue-245-key-hints-doc-sync-design.md +72 -0
- package/docs/superpowers/specs/2026-10-27-issue-172-fullscreen-selection-clear-design.md +248 -0
- package/docs/superpowers/specs/2026-10-27-issue-252-select-key-hints-design.md +95 -0
- package/docs/superpowers/specs/2026-10-28-issue-255-coordinator-endpoint-zombie-design.md +380 -0
- package/docs/superpowers/specs/2026-10-28-issue-257-legacy-pty-runner-endpoint-cleanup-design.md +197 -0
- package/docs/superpowers/specs/2026-11-03-cwd-favorites-full-pool-design.md +106 -0
- package/docs/superpowers/specs/2026-11-03-issue-266-alt-h-detach-design.md +185 -0
- package/docs/superpowers/specs/2026-11-04-issue-270-scenario-stdout-flush-design.md +176 -0
- package/docs/superpowers/specs/2026-11-05-issue-278-ctrl-g-external-editor-design.md +185 -0
- package/docs/superpowers/specs/2026-11-07-issue-284-attach-recovery-design.md +166 -0
- package/docs/superpowers/specs/2026-11-08-host-restart-model-override-design.md +115 -0
- package/docs/superpowers/specs/2026-11-08-issue-288-cap-floor-design.md +86 -0
- package/docs/superpowers/specs/2026-11-09-dashboard-fold-flake-design.md +109 -0
- package/docs/superpowers/specs/2026-11-09-issue-273-harness-console-log-exit-design.md +182 -0
- package/docs/superpowers/specs/2026-11-10-issue-258-board-selection-settle-design.md +109 -0
- package/docs/superpowers/specs/2026-11-13-issue-294-snapshot-resize-intent-design.md +141 -0
- package/docs/superpowers/specs/2026-11-16-greeting-title-poll-design.md +174 -0
- package/docs/superpowers/specs/2026-11-22-issue-297-compaction-mirror-design.md +158 -0
- package/docs/superpowers/specs/2026-11-22-issue-95-legacy-quarantine-design.md +209 -0
- package/docs/superpowers/specs/2026-11-23-issue-254-cursor-keep-position-design.md +201 -0
- package/package.json +1 -1
- package/runner/pty-runner.mjs +526 -63
- package/runner/state-coordinator.mjs +62 -5
- package/runner/title-runner.mjs +33 -24
- package/src/commands/agent-board.ts +5 -1
- package/src/core/attach-detach.mjs +27 -0
- package/src/core/attach-frame-proof.mjs +897 -0
- package/src/core/attach-frame-reporter.mjs +738 -0
- package/src/core/attach-frame-stream.mjs +266 -0
- package/src/core/attach-pr-label.mjs +12 -0
- package/src/core/attach-recovery.mjs +239 -0
- package/src/core/attach-screen-owner.mjs +55 -0
- package/src/core/attach-view-proof.mjs +709 -0
- package/src/core/auto-state.mjs +6 -1
- package/src/core/cwd-stats.mjs +3 -1
- package/src/core/dashboard-prefs.mjs +31 -0
- package/src/core/derive.mjs +8 -1
- package/src/core/events.mjs +127 -1
- package/src/core/foreground-projection-cache.mjs +1 -0
- package/src/core/frame-witness-update.mjs +35 -0
- package/src/core/fullscreen-selection.mjs +60 -0
- package/src/core/host-coordination.mjs +48 -0
- package/src/core/host-protocol.mjs +13 -2
- package/src/core/hosted-frame-witness.mjs +60 -0
- package/src/core/paths.mjs +10 -3
- package/src/core/pty-attach-render.mjs +239 -0
- package/src/core/pty-kitty-images.mjs +237 -0
- package/src/core/pty-scroll.mjs +8 -8
- package/src/core/rows.mjs +43 -7
- package/src/core/session-entries.mjs +82 -0
- package/src/core/session-launch-prefs.mjs +45 -0
- package/src/core/session-view.mjs +3 -63
- package/src/core/store.mjs +1 -0
- package/src/core/terminal-attach-client.mjs +199 -20
- package/src/core/terminal-attach-protocol.mjs +221 -7
- package/src/core/terminal-model.mjs +24 -3
- package/src/core/terminal-snapshot.mjs +10 -0
- package/src/core/title-flow.mjs +66 -0
- package/src/core/title.mjs +101 -0
- package/src/core/types.mjs +17 -0
- package/src/index.ts +85 -0
- package/src/runtime/service.mjs +87 -18
- package/src/ui/dashboard.ts +206 -49
- package/src/ui/pty-attach.ts +1472 -99
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
# Issue #95 Legacy Marker-Failure Quarantine 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:** Temporarily skip only the legacy half of the marker-failure integration case, preserve and instrument the owned half, and mechanically prove both outcomes.
|
|
6
|
+
|
|
7
|
+
**Architecture:** Keep the quarantine and postmortem wiring in the existing integration file. Put source-scanning primitives in a pure `test-support/` module, use a static guard for source invariants, and use one separate integration guard that parses real TAP output.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** Node.js 22/24, `node:test`, `assert/strict`, ESM, child-process spawn, repository test-support helpers.
|
|
10
|
+
|
|
11
|
+
## Global Constraints
|
|
12
|
+
|
|
13
|
+
- Work only in this worktree; never edit the main checkout.
|
|
14
|
+
- Test-only: do not change `runner/`, `src/`, `.github/workflows/ci.yml`, dependencies, or test case names.
|
|
15
|
+
- Preserve `waitFor` defaults `timeoutMs = 15000` and `intervalMs: 25`; preserve the target case's 15000/5000 waits.
|
|
16
|
+
- Use exactly the conditional form `skip: legacy ? "issue #95: temporary quarantine for CI wall-clock contention; restore after process-phase serialization" : undefined`.
|
|
17
|
+
- Use a named `const capture = () => formatPostmortem(capturePostmortem(root, viewId, null));` and pass bare `capture` as the final argument, without a trailing comma after it.
|
|
18
|
+
- Do not import one test file from another. Pure scanners live in `test-support/test-source-scan.mjs`.
|
|
19
|
+
- The PR says `Refs #95`, never `Fixes #95`; this slice does not close the umbrella issue.
|
|
20
|
+
- Follow red-green TDD for the new scanner and quarantine behavior. Preservation guards for assertions that already exist may be green at baseline, but the new skip/capture/default-value guards must fail before the target edit.
|
|
21
|
+
- Every commit is a conventional commit and stages files by name, never `git add -A`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
### Task 1: Pure source scanner and migration
|
|
26
|
+
|
|
27
|
+
**Files:**
|
|
28
|
+
- Create: `test-support/test-source-scan.mjs`
|
|
29
|
+
- Create: `test/frame-witness-quarantine.test.mjs`
|
|
30
|
+
- Modify: `test/wait-capture-wiring.test.mjs`
|
|
31
|
+
|
|
32
|
+
**Interfaces:**
|
|
33
|
+
- Consumes: existing `testCaseBody(source, marker)` and `waitForCalls(body)` implementations in `test/wait-capture-wiring.test.mjs`.
|
|
34
|
+
- Produces: `testCaseBody(source, marker)`, `waitForCalls(body)`, and `indentedTestCaseBody(source, marker)` as named exports from `test-support/test-source-scan.mjs`.
|
|
35
|
+
|
|
36
|
+
**Acceptance IDs:** A1; A6 for the unchanged five wiring tests.
|
|
37
|
+
|
|
38
|
+
- [ ] **Step 1: Write the failing scanner tests**
|
|
39
|
+
|
|
40
|
+
Create `test/frame-witness-quarantine.test.mjs` with these tests, using tabs for indentation:
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
import assert from "node:assert/strict";
|
|
44
|
+
import test from "node:test";
|
|
45
|
+
|
|
46
|
+
import { indentedTestCaseBody } from "../test-support/test-source-scan.mjs";
|
|
47
|
+
|
|
48
|
+
const SAMPLE = [
|
|
49
|
+
"for (const legacy of [false, true]) {",
|
|
50
|
+
"\ttest(`one`, async () => {",
|
|
51
|
+
"\t\tconst value = 1;",
|
|
52
|
+
"\t});",
|
|
53
|
+
"\ttest(`two`, async () => {",
|
|
54
|
+
"\t\tconst value = 2;",
|
|
55
|
+
"\t});",
|
|
56
|
+
"}",
|
|
57
|
+
"",
|
|
58
|
+
].join("\n");
|
|
59
|
+
|
|
60
|
+
test("A1: indentedTestCaseBody stops at the matching indented case boundary", () => {
|
|
61
|
+
const body = indentedTestCaseBody(SAMPLE, "\ttest(`one`");
|
|
62
|
+
assert.match(body, /const value = 1/);
|
|
63
|
+
assert.doesNotMatch(body, /test\(`two`/);
|
|
64
|
+
assert.ok(body.endsWith("\n\t});"));
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test("A1: indentedTestCaseBody fails closed on an absent marker or closing boundary", () => {
|
|
68
|
+
assert.throws(() => indentedTestCaseBody(SAMPLE, "\ttest(`missing`"), /case not found/);
|
|
69
|
+
assert.throws(() => indentedTestCaseBody("\ttest(`open`, async () => {", "\ttest(`open`"), /case end not found/);
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- [ ] **Step 2: Verify RED**
|
|
74
|
+
|
|
75
|
+
Run: `node --test test/frame-witness-quarantine.test.mjs`
|
|
76
|
+
|
|
77
|
+
Expected: failure resolving `../test-support/test-source-scan.mjs`, because the module does not exist yet.
|
|
78
|
+
|
|
79
|
+
- [ ] **Step 3: Move the existing scanners and implement the indented scanner**
|
|
80
|
+
|
|
81
|
+
Create `test-support/test-source-scan.mjs`. Move `testCaseBody` and `waitForCalls` verbatim from `test/wait-capture-wiring.test.mjs`, including their JSDoc, and add:
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
/**
|
|
85
|
+
* Return the source of one tab-indented `test("<marker>", …)` case.
|
|
86
|
+
* Missing markers and closing boundaries throw so an empty scan cannot pass.
|
|
87
|
+
* @param {string} source
|
|
88
|
+
* @param {string} marker
|
|
89
|
+
* @returns {string}
|
|
90
|
+
*/
|
|
91
|
+
export function indentedTestCaseBody(source, marker) {
|
|
92
|
+
const start = source.indexOf(marker);
|
|
93
|
+
assert.notEqual(start, -1, `case not found: ${marker}`);
|
|
94
|
+
assert.ok(start === 0 || source[start - 1] === "\n", `marker is not at line start: ${marker}`);
|
|
95
|
+
const close = source.indexOf("\n\t});", start);
|
|
96
|
+
assert.notEqual(close, -1, `case end not found: ${marker}`);
|
|
97
|
+
return source.slice(start, close + 5);
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The new module imports `assert` from `node:assert/strict`. Change `test/wait-capture-wiring.test.mjs` to import `testCaseBody` and `waitForCalls` from `../test-support/test-source-scan.mjs`; remove those two definitions from the test file and leave all five tests unchanged.
|
|
102
|
+
|
|
103
|
+
- [ ] **Step 4: Verify GREEN and migration regression**
|
|
104
|
+
|
|
105
|
+
Run:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
node --test test/frame-witness-quarantine.test.mjs
|
|
109
|
+
node --test test/wait-capture-wiring.test.mjs
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Expected: two scanner tests pass; all five existing wiring tests pass.
|
|
113
|
+
|
|
114
|
+
- [ ] **Step 5: Commit Task 1**
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
git add test-support/test-source-scan.mjs test/frame-witness-quarantine.test.mjs test/wait-capture-wiring.test.mjs
|
|
118
|
+
git commit -m "test: add an indented test-case scanner (issue #95)"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Task 2: Conditional quarantine, postmortem wiring, and TAP proof
|
|
124
|
+
|
|
125
|
+
**Files:**
|
|
126
|
+
- Modify: `test/frame-witness-quarantine.test.mjs`
|
|
127
|
+
- Create: `test/frame-witness-quarantine-tap.test.mjs`
|
|
128
|
+
- Modify: `test/attach-frame-witness.integration.test.mjs`
|
|
129
|
+
|
|
130
|
+
**Interfaces:**
|
|
131
|
+
- Consumes: `indentedTestCaseBody` and `waitForCalls` from Task 1; existing `capturePostmortem`, `formatPostmortem`, and `waitForWithPostmortem` from `test-support/flake-postmortem.mjs`.
|
|
132
|
+
- Produces: static guards for A2–A5 and a real TAP guard for A7. No production interface changes.
|
|
133
|
+
|
|
134
|
+
**Acceptance IDs:** A2, A3, A4, A5, A6, A7. A8 is CI-only after the PR gate; U1/U2 are post-merge or later restoration checks, not implementation steps.
|
|
135
|
+
|
|
136
|
+
- [ ] **Step 1: Add the failing static guards**
|
|
137
|
+
|
|
138
|
+
Extend `test/frame-witness-quarantine.test.mjs` with filesystem reads and the two scanner imports:
|
|
139
|
+
|
|
140
|
+
```js
|
|
141
|
+
import { readFileSync } from "node:fs";
|
|
142
|
+
import { join } from "node:path";
|
|
143
|
+
import { fileURLToPath } from "node:url";
|
|
144
|
+
import { indentedTestCaseBody, waitForCalls } from "../test-support/test-source-scan.mjs";
|
|
145
|
+
|
|
146
|
+
const PACKAGE_ROOT = fileURLToPath(new URL("..", import.meta.url));
|
|
147
|
+
const TARGET = "test/attach-frame-witness.integration.test.mjs";
|
|
148
|
+
const read = (rel) => readFileSync(join(PACKAGE_ROOT, rel), "utf8");
|
|
149
|
+
const targetCase = () => indentedTestCaseBody(read(TARGET), "\ttest(`internal marker failure revokes capability");
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Add four guards:
|
|
153
|
+
|
|
154
|
+
```js
|
|
155
|
+
test("A2: the shared wait keeps its 15000 ms default and 25 ms interval", () => {
|
|
156
|
+
const source = read(TARGET);
|
|
157
|
+
assert.match(source, /async function waitFor\(predicate, timeoutMs = 15000, capture = null\)/);
|
|
158
|
+
assert.match(source, /waitForWithPostmortem\(predicate, \{ timeoutMs, intervalMs: 25, capture \}\)/);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
test("A3: both marker-failure waits carry the named postmortem capture", () => {
|
|
162
|
+
const calls = waitForCalls(targetCase());
|
|
163
|
+
assert.equal(calls.length, 2);
|
|
164
|
+
for (const args of calls) assert.match(args, /,\s*capture\s*$/);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
test("A4: only the legacy branch carries the temporary issue #95 skip", () => {
|
|
168
|
+
const body = targetCase();
|
|
169
|
+
assert.match(body, /skip:\s*legacy\s*\?\s*"issue #95[^"]*"\s*:\s*undefined/);
|
|
170
|
+
assert.match(body, /temporary quarantine/);
|
|
171
|
+
assert.match(body, /restore after process-phase serialization/);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
test("A5: both capability-loss assertions remain in the parameterized case", () => {
|
|
175
|
+
const body = targetCase();
|
|
176
|
+
assert.match(body, /msg\.status\?\.frameWitness\?\.enabled === false/);
|
|
177
|
+
assert.match(body, /readHost\(root, viewId\)\?\.frameWitness\?\.enabled === false/);
|
|
178
|
+
});
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
- [ ] **Step 2: Write the failing TAP guard**
|
|
182
|
+
|
|
183
|
+
Create `test/frame-witness-quarantine-tap.test.mjs`:
|
|
184
|
+
|
|
185
|
+
```js
|
|
186
|
+
import assert from "node:assert/strict";
|
|
187
|
+
import { spawn } from "node:child_process";
|
|
188
|
+
import test from "node:test";
|
|
189
|
+
import { fileURLToPath } from "node:url";
|
|
190
|
+
|
|
191
|
+
const PACKAGE_ROOT = fileURLToPath(new URL("..", import.meta.url));
|
|
192
|
+
const TARGET = "test/attach-frame-witness.integration.test.mjs";
|
|
193
|
+
const CASE_NAME = "internal marker failure revokes capability via onUnavailable";
|
|
194
|
+
|
|
195
|
+
function runTargetFile() {
|
|
196
|
+
// An inherited NODE_TEST_CONTEXT makes this nested `node --test` skip files
|
|
197
|
+
// as a recursive run; scrub it so the guard measures the real target file.
|
|
198
|
+
const { NODE_TEST_CONTEXT, ...parentEnv } = process.env;
|
|
199
|
+
return new Promise((resolve, reject) => {
|
|
200
|
+
const child = spawn(process.execPath, ["--test", "--test-reporter=tap", TARGET], {
|
|
201
|
+
cwd: PACKAGE_ROOT,
|
|
202
|
+
env: parentEnv,
|
|
203
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
204
|
+
});
|
|
205
|
+
let stdout = "";
|
|
206
|
+
let stderr = "";
|
|
207
|
+
child.stdout.on("data", (chunk) => { stdout += chunk; });
|
|
208
|
+
child.stderr.on("data", (chunk) => { stderr += chunk; });
|
|
209
|
+
child.on("error", reject);
|
|
210
|
+
child.on("close", (code, signal) => resolve({ code, signal, stdout, stderr }));
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
test("A7: TAP runs owned and skips only legacy with the issue reason", { timeout: 240_000 }, async () => { // budget: spawns the whole 29-case file; 4 min = 5.3x the 45.08s local measurement
|
|
215
|
+
const result = await runTargetFile();
|
|
216
|
+
assert.equal(result.signal, null, result.stderr);
|
|
217
|
+
assert.equal(result.code, 0, `target file failed\n${result.stdout}\n${result.stderr}`);
|
|
218
|
+
const rows = result.stdout
|
|
219
|
+
.split(/\r?\n/)
|
|
220
|
+
// Exclude `# Subtest:` headers, which carry the same case name as result rows.
|
|
221
|
+
.filter((line) => /^(?:not )?ok \d+ - /.test(line) && line.includes(CASE_NAME));
|
|
222
|
+
const owned = rows.find((line) => line.includes("(owned main)"));
|
|
223
|
+
const legacy = rows.find((line) => line.includes("(legacy main)"));
|
|
224
|
+
assert.ok(owned, `owned TAP row missing\n${result.stdout}`);
|
|
225
|
+
assert.match(owned, /^ok \d+ - /);
|
|
226
|
+
assert.doesNotMatch(owned, /# SKIP/i);
|
|
227
|
+
assert.ok(legacy, `legacy TAP row missing\n${result.stdout}`);
|
|
228
|
+
assert.match(legacy, /^ok \d+ - .*# SKIP issue \\?#95/);
|
|
229
|
+
});
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
- [ ] **Step 3: Verify RED for the new behavior**
|
|
233
|
+
|
|
234
|
+
Run:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
node --test test/frame-witness-quarantine.test.mjs
|
|
238
|
+
node --test test/frame-witness-quarantine-tap.test.mjs
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Expected before the target edit: A2/A3/A4 fail because the optional capture and conditional skip are absent; A5 may pass because it preserves existing assertions. The TAP guard fails because legacy has no `# SKIP issue #95` row and owned is not yet the sole running half.
|
|
242
|
+
|
|
243
|
+
- [ ] **Step 4: Implement the minimal target-file changes**
|
|
244
|
+
|
|
245
|
+
In `test/attach-frame-witness.integration.test.mjs`:
|
|
246
|
+
|
|
247
|
+
1. Add this import:
|
|
248
|
+
|
|
249
|
+
```js
|
|
250
|
+
import { capturePostmortem, formatPostmortem, waitForWithPostmortem } from "../test-support/flake-postmortem.mjs";
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
2. Replace only the local wait helper with:
|
|
254
|
+
|
|
255
|
+
```js
|
|
256
|
+
async function waitFor(predicate, timeoutMs = 15000, capture = null) {
|
|
257
|
+
return waitForWithPostmortem(predicate, { timeoutMs, intervalMs: 25, capture });
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
3. Add the exact conditional option to the existing parameterized test, without renaming it:
|
|
262
|
+
|
|
263
|
+
```js
|
|
264
|
+
{ skip: legacy ? "issue #95: temporary quarantine for CI wall-clock contention; restore after process-phase serialization" : undefined }
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
4. Immediately after `startHost(...)` in that case, add:
|
|
268
|
+
|
|
269
|
+
```js
|
|
270
|
+
const capture = () => formatPostmortem(capturePostmortem(root, viewId, null));
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
5. Pass `15000, capture` to the first wait and `5000, capture` to the second. Use bare `capture` as the final argument with no trailing comma after it. Leave both capability-loss assertions unchanged.
|
|
274
|
+
|
|
275
|
+
- [ ] **Step 5: Verify GREEN at every focused layer**
|
|
276
|
+
|
|
277
|
+
Run:
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
node --test test/frame-witness-quarantine.test.mjs
|
|
281
|
+
node --test test/wait-capture-wiring.test.mjs
|
|
282
|
+
node --test test/flake-postmortem.test.mjs
|
|
283
|
+
node --test test/attach-frame-witness.integration.test.mjs
|
|
284
|
+
node --test test/frame-witness-quarantine-tap.test.mjs
|
|
285
|
+
node --test test/budget-audit.test.mjs
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Expected: all commands exit 0. The target file reports 29 tests, 28 pass, 1 skipped, 0 fail; the TAP guard independently proves owned `ok` without SKIP and legacy `ok … # SKIP issue #95`.
|
|
289
|
+
|
|
290
|
+
- [ ] **Step 6: Run the repository-wide acceptance gate**
|
|
291
|
+
|
|
292
|
+
Run: `npm run verify`
|
|
293
|
+
|
|
294
|
+
Expected: exit 0, including typecheck, opt-in perf gate, full tests, c8 coverage thresholds (lines 85 / funcs 80 / branches 70), and package dry-run. If a failure is outside this diff, record its exact signature and do not weaken unrelated tests to obtain green.
|
|
295
|
+
|
|
296
|
+
- [ ] **Step 7: Commit Task 2**
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
git add test/attach-frame-witness.integration.test.mjs test/frame-witness-quarantine.test.mjs test/frame-witness-quarantine-tap.test.mjs
|
|
300
|
+
git commit -m "test: quarantine the legacy marker-failure case (issue #95)"
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Implementation Amendments
|
|
304
|
+
|
|
305
|
+
Task 2 exposed three factual defects in the original A7 sample before the target edit. The controller approved all three without changing scope: scrub inherited `NODE_TEST_CONTEXT`, parse only TAP result rows rather than `# Subtest:` headers, and tolerate Node's escaped `\#95` skip reason. The sample above now matches the tested implementation.
|
|
306
|
+
|
|
307
|
+
## Acceptance Traceability
|
|
308
|
+
|
|
309
|
+
| Acceptance ID | Owning task | Evidence |
|
|
310
|
+
|---|---|---|
|
|
311
|
+
| A1 | Task 1 | Scanner truth table and fail-closed errors |
|
|
312
|
+
| A2 | Task 2 | Static default-value guard and target-file run |
|
|
313
|
+
| A3 | Task 2 | Two waits end in bare `capture` |
|
|
314
|
+
| A4 | Task 2 | Conditional-skip source guard |
|
|
315
|
+
| A5 | Task 2 | Both original assertions pinned by source guard |
|
|
316
|
+
| A6 | Tasks 1–2 | Existing wiring tests plus `npm run verify` |
|
|
317
|
+
| A7 | Task 2 | Real TAP parse: owned non-SKIP, legacy SKIP with issue reason |
|
|
318
|
+
| A8 | After PR authorization | Required Node 22 and Node 24 checks |
|
|
319
|
+
| U1 | After merge | Observe at least five main runs for this signature |
|
|
320
|
+
| U2 | When process-phase serialization lands | Revert quarantine and update the guards |
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Issue #222:Attach 首屏就绪设计(spec)
|
|
2
|
+
|
|
3
|
+
Drafted: callyouai/gpt-6.1-sol (selected) · callyouai/gpt-6.1-sol (physical) @ 2026-10-21T14:44:19.875Z
|
|
4
|
+
Revised: callyouai/gpt-6.1-sol (selected) · callyouai/gpt-6.1-sol (physical) @ 2026-10-22T14:56:20.840Z
|
|
5
|
+
Revised: callyouai/gpt-6.1-sol (selected) · callyouai/gpt-6.1-sol (physical) @ 2026-10-22T15:13:30Z
|
|
6
|
+
Revised: callyouai/gpt-6.1-sol (selected) · callyouai/gpt-6.1-sol (physical) @ 2026-10-22T15:57:13.939Z
|
|
7
|
+
|
|
8
|
+
- Issue:[zhuxixi/pi-agent-board#222](https://github.com/zhuxixi/pi-agent-board/issues/222)
|
|
9
|
+
- 状态:两轮异模型设计复核已收敛;第 2 轮无真缺口,父已吸收 1 项定时器细化,等待用户审批。尚未批准或实现;复核不等于实测通过。
|
|
10
|
+
- 调查/既有测量基线:`main@9a197f4bc2216e63cbda12f0cd9890ec9b3b6b34`。2026-10-22 回收复核时实际 HEAD 已为 `d41a16bbd3e55c6df1d1cdd60c43a7c2e2492482`;该范围只含 #221 的 events 源码/测试与设计文档,所引用 attach 文件无差异。旧测量仍只归属原基线;P1 必须重新记录实际检出、核对依赖变化,不把不同 commit 当同一性能样本。
|
|
11
|
+
- 实施计划:[issue-222-attach-ready-check.md](../plans/2026-10-23-issue-222-attach-ready.md)。本文定义行为、状态和验收契约;计划负责任务、修改文件与执行顺序。
|
|
12
|
+
- 落位例外:本轮 Plannotator 规划模式只允许在当前工作目录内写 Markdown,因此临时放在 `plans/`。不写 `~/.github-issue-driven/`、不改配置、不创建 worktree;规划解除并获准后按 issue-driven 归档到隔离 worktree 的 `docs/superpowers/specs/2026-10-21-issue-222-attach-ready-design.md`,调研/复核留痕迁至 issue 归档目录。不得把临时路径当作已完成归档。
|
|
13
|
+
|
|
14
|
+
## 1. 问题与目标
|
|
15
|
+
|
|
16
|
+
忙碌会话持续输出时,attach 等待约 2.5 秒才显示内容;快照本身约 5ms 已到。已确认的原因是每个输出解析回调重置 250ms 安静期,最后由 2500ms 硬上限结束 loading。旧逻辑负责遮挡日志回放和 resize-jiggle;现代协议仍复用了这段等待。
|
|
17
|
+
|
|
18
|
+
用户要求同时解决切入速度和过渡画面:第一个会话画面直接包含最新回复尾部及输入区域;活动提问/选择界面保持当前状态;之后不得露半帧、旧内容、错误尺寸、残影或双光标。用户主动向上滚动后不抢回底部。体验参照 Claude Code 会话恢复/子代理切换,不推测其实现。
|
|
19
|
+
|
|
20
|
+
既有单次记录为持续输出首屏 2512ms、安静首屏 268ms。这些数字只证明现状延迟;半帧泄露仍是假设,候选性能与成功率均未测量。
|
|
21
|
+
|
|
22
|
+
## 2. 调研依据与边界
|
|
23
|
+
|
|
24
|
+
已复用前轮代码与历史调查,并读取 issue #222 正文、PR #122 的实现说明和 CR:序号连续性、旧尺寸、协议降级、重启空基线和旧日志污染都已有兼容性契约。`finishCollecting()` 的快照校验与本地 `whenIdle()` 不能证明子 TUI(终端界面)已完成整帧;resize applied 也不证明重绘完成。
|
|
25
|
+
|
|
26
|
+
JFox 永久笔记中的 attach 输入分段、就地删除和安装路径材料用于确认输入/命令入口/部署边界,没有找到可直接证明本问题闪屏根因的笔记。最近查询结果和历史依据记入本轮调研留痕,不将历史安装版本当作当前加载版本。
|
|
27
|
+
|
|
28
|
+
本轮只设计;不运行新实验、不改源码或测试、不提交或发布。既有 `screen.log`、legacy settle/jiggle、底部投影、主题桥、恢复协议和 detach 契约均为本次设计的约束。
|
|
29
|
+
|
|
30
|
+
## 3. 范围与非目标
|
|
31
|
+
|
|
32
|
+
- 现代 snapshot+subscribe 路径改用有证据的画面就绪条件;正常忙碌会话不再等待全局安静期。
|
|
33
|
+
- 首屏和后续绘制共用画面完整性契约,避免控制消息绕过输出合并器。
|
|
34
|
+
- 同尺寸、尺寸变化、空基线、恢复和 legacy 分开定义、测量及验收。
|
|
35
|
+
- 不升级依赖、不修改协议版本、不增加 End 注入、不增大全屏清理次数;不夹带输入拦截或延迟显示 loading 的体验改动。
|
|
36
|
+
- 缺少可证明的完成信号时不猜测;以诊断证据为依据决定是否需要另审协议扩展。
|
|
37
|
+
|
|
38
|
+
## 4. 组件与数据流
|
|
39
|
+
|
|
40
|
+
### 4.1 职责与权威来源
|
|
41
|
+
|
|
42
|
+
`createTerminalAttachClient()` 继续拥有订阅、序号校验、补发、恢复和 generation(子进程代次)判断;`snapshotReady` 仅表示传输基线已校验,不直接触发显示。`PtyAttachComponent` 拥有本地解析、当前目标尺寸、视口意图和可发布投影;TUI 继续拥有调度、差分绘制和终端写入。测试观测器只观察实际输出,不能成为生产就绪逻辑的一部分。
|
|
43
|
+
|
|
44
|
+
```mermaid
|
|
45
|
+
flowchart LR
|
|
46
|
+
Host[Runner 快照与输出] --> Client[现有协议客户端:校验与恢复]
|
|
47
|
+
Client --> Parser[当前代次本地 xterm:持续解析]
|
|
48
|
+
Parser --> Gate[就绪决策:基线/完整边界/尺寸/代次]
|
|
49
|
+
Gate --> View[完整投影:行/光标/视口来源]
|
|
50
|
+
View --> TUI[现有 TUI 调度与 Terminal.write]
|
|
51
|
+
TUI --> Observe[测试:外层 xterm 与逐帧断言]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 4.2 本地状态与最小数据模型
|
|
55
|
+
|
|
56
|
+
以下为待新增的设计接口,名称不是现存 API。纯状态定义在 `src/core/pty-attach-render.mjs`;组件中的适配器读取现有事件并执行作用。保持现有 `createAttachOutputRenderScheduler()` 的 40ms 合并,不把每个 chunk 都变成全屏渲染。
|
|
57
|
+
|
|
58
|
+
| 状态数据 | 定义与失效条件 |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| `connectionToken` | 当前 socket 连接标识;旧 socket 消息不可改动当前状态。 |
|
|
61
|
+
| `baselineToken` | 每次权威基线替换递增;与 `generation`、parser 实例共同围住异步解析队列。 |
|
|
62
|
+
| `targetSize`/`geometryRevision` | 当前实际 body 列/行及尺寸修订号;真实 resize 或目标变化就使旧尺寸投影失效。 |
|
|
63
|
+
| `baselineState` | `unverified`/`hydrating`/`valid-empty`/`valid-content`;日志回放永远不能赋值为协议有效基线。 |
|
|
64
|
+
| `frameState` | `unknown`/`open`/`complete`;来自真实 xterm 同步更新模式与已验证的帧边界。 |
|
|
65
|
+
| `deadlineState` | `pending`/`expired`;组件适配器持有现有保护定时器,按本次连接/等待身份写入到期事件。纯决策只消费该输入,不读时钟、不启动 timer;到期仅改变等待原因/有界恢复动作,不能把未完成画面升级为 ready。旧身份到期回调和 dispose 后回调无效。 |
|
|
66
|
+
| `committedView` | 对有同步标记的现代路径无条件保留最小完整视图:当前可见完整投影行、光标、来源 token、尺寸修订号、视口意图及可见范围交互所需元数据;不得引用会继续变化的 xterm 行对象。 |
|
|
67
|
+
| `transitionFinished` | 只从 false 变 true;只管首次 attach 副作用,不被恢复重置。 |
|
|
68
|
+
| `closed` | dispose 后永久 true;所有回调、调度、探测与监听器都必须服从。 |
|
|
69
|
+
|
|
70
|
+
`decideAttachPresentation(state)` 是拟新增纯函数,返回 `wait`(附原因)/`publish`/`legacy`/`closed`,不读时钟、终端或文件。`canPublishAttachView(viewIdentity, currentIdentity)` 是拟新增来源比较纯函数,用于拒绝旧 token、尺寸、generation 或 parser 的投影。当前 `receivedOutput` 只表示缓冲区有内容,不再单独承担现代协议就绪语义。
|
|
71
|
+
|
|
72
|
+
### 4.3 解析隔离与基线替换
|
|
73
|
+
|
|
74
|
+
在新的权威基线进入时,组件替换本地 xterm 实例,保留构造参数、现有历史上限与投影规则;将 `term` 的 readonly 绑定改为受组件管理的当前 parser。新 parser 先安装同样的边界观察,再接收权威帧和有序补发;旧 parser 的回调即使后来完成也无法污染新 buffer,且必须同时通过 token 与实例身份检查才能发布。旧 parser 和 CSI 注册句柄被 dispose;不能只给回调加 token,却让旧 write 留在同一个活动解析队列中。
|
|
75
|
+
|
|
76
|
+
替换发生在 `snapshotReady`,因为此前序号校验尚未完成;`snapshotBegin` 只保存尺寸和当前 collecting 身份,不把未校验内容发布。新基线使历史 floor、selection 与缓存的来源同步更新;滚动意图按既有行为保留,只有内容身份确实变更或旧坐标不再有效时才清除,不因普通 live 输出回到底部。非空水合后继续使用 `historyFloorAfterHydrate()`;空基线 floor 为 0。
|
|
77
|
+
|
|
78
|
+
水合生成的 ANSI(控制终端的转义序列)本身含模式恢复和光标停车,不能把其中任何一次 CSI 关闭当作用户画面已经完成。`hydrating` 期间禁止边界发布;水合回调完成后才能读取恢复后的模式、光标和有效投影。`finishCollecting()` 随后同步 emit 的 catch-up flush 必须按原有顺序排队;每个完整边界上的投影需当时复制,不能等整个 chunk 回调时才读取已经进入下一帧的网格。
|
|
79
|
+
|
|
80
|
+
### 4.4 完整投影与交互
|
|
81
|
+
|
|
82
|
+
对有同步标记的现代路径,帧边界发布、最小 `committedView` 和 `render()` 投影选择入口的门控是无条件机制:首屏和后续绘制共用同一规则,status、ticker、鼠标和主题渲染都不能绕过。同步块打开期间只显示同来源、同尺寸的上一张完整视图;不存在时显示 loading。关闭边界通过 `parser.registerCsiHandler()` 观察并返回 `false`,保持默认解析;先验证 handler 时刻能读取的网格/光标状态,再取不可变投影。此机制不以 P2 是否重现用户现场闪屏为开关;P2 用于定位现场原因并验证机制接缝,不能用“本实验未复现”免除 A3。
|
|
83
|
+
|
|
84
|
+
帧尾之后的 Pi 光标停车通常在同步块外;这类光标/模式变化按现有 cursor coalescing 处理,只能更新完整网格对应的光标,不能解锁正在写入的新网格。测试分别检查硬件光标和字符属性形成的软光标。最小完整视图只在有效完整边界/可验证的完整投影变更时提交,继续使用现有 40ms 调度;不逐 chunk 复制历史、不反复序列化终端。超出可见范围的额外历史缓存或通用缓存框架不属默认方案,只有具体证据表明现有接缝不足时才另行修订。无同步标记和 legacy 的保证边界仍由 §5.3/A7 单独定义。
|
|
85
|
+
|
|
86
|
+
滚动、选择、复制和链接命中必须使用与当前呈现一致的行/坐标来源,不能显示缓存 A 却从解析中 B 复制。优先只缓存可见范围及现有命中测试所需的文本、属性和链接信息;不复制整个历史。同步更新期间用户触发超出缓存范围的滚动请求时,记录视口意图,在下一完整边界用既有 `project()` 应用,期间保持当前完整画面;新输出不得取消该意图。若实测所需的选择/命中信息无法局限在这个接缝内,诊断 gate 要求修订缓存设计,不能默默退化交互。
|
|
87
|
+
|
|
88
|
+
## 5. 状态、事件与就绪规则
|
|
89
|
+
|
|
90
|
+
### 5.1 正常现代协议路径
|
|
91
|
+
|
|
92
|
+
正常首次 publish 必须同时满足:模式为 protocol、当前非空权威基线已校验并解析、没有已知未完成同步更新、完整画面属于当前连接/基线/generation、目标尺寸有效且有该尺寸画面的完成证据、组件未关闭。水合后恢复模式为 closed 的同尺寸非空快照可以作为已提交屏幕;恢复为 open 的快照必须等其真正帧尾,不能把传输层 `snapshot_end` 当帧尾。
|
|
93
|
+
|
|
94
|
+
现代协议 publish 不调用 `deferAttachSettle()`;输出持续更新也不重置就绪。首次满足规则后通过现有 `finishAttachTransition()` 完成 timer cleanup、一次强制替换、健康探测、主题桥和颜色探测。已完成之后的普通更新只发布完整投影,不重开 loading,不重做首次副作用。
|
|
95
|
+
|
|
96
|
+
现有 connect 回调会在模式判定前 `startAttachSettle()`,因此仅删除输出中的 defer 不足以改变转换时序。确认 `mode=protocol` 时组件必须解除已武装的 250ms settle,并将现有 2500ms hard timeout 收编为 `deadlineState` 的到期输入;已经排队的旧 timer 回调仍须核对模式、等待身份与 closed。模式尚为 undecided 时两类 timer 均不得直接调用 `finishAttachTransition()`;现代路径只有合格 publish 决策能执行首次转换。若客户端选择 legacy,则恢复既有 settle/jiggle/hard-timeout 路径和期限,不重置原等待起点来额外增加等待,协议 probe 期限不变。这保留 #128 的“首次转换单点翻转、hooks 至多一次”约束,并防止 S/A4/A5/C 等待超过 250ms 时提前启动主题桥、清屏或健康探测。
|
|
97
|
+
|
|
98
|
+
| 事件/前置 | 画面状态与动作 | 验收 ID |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| 初始 undecided | 保持 loading;日志/探针广播可按现有路径解析但不能成为 protocol 首屏。 | A2、A6 |
|
|
101
|
+
| `snapshotBegin` 同尺寸 | 保存 collecting 身份,不发 resize、不发布。 | A1、A4 |
|
|
102
|
+
| `snapshotBegin` 不同尺寸 | 记录目标修订号,只发一次真实目标尺寸;遮住旧尺寸内容。 | A4 |
|
|
103
|
+
| 校验失败/`resubscribing` | 延用客户端既有有界恢复;本地基线标无效,不发布未校验内容。 | A2、A6 |
|
|
104
|
+
| 非空 `snapshotReady` | 替换 parser,进入 hydrating,权威帧后接原顺序补发;解析完成再判完整模式与尺寸。 | A1–A3、A6 |
|
|
105
|
+
| 空 `snapshotReady` | 替换 parser、清 floor 与旧内容,状态 valid-empty;等待本代 child 的有效完整编辑画面。 | A5、A6 |
|
|
106
|
+
| 同步块开启/关闭 | 开启只解析;关闭且满足 gate 才复制投影并请求绘制。同 chunk 关开必须保住关帧瞬间。 | A3、A8 |
|
|
107
|
+
| 同 generation 断连 | 可保留同尺寸完整画面并显示重连状态;停止新连接身份未确认的发布。 | A6 |
|
|
108
|
+
| 同 generation 连续重放恢复 | 保留 parser 与连续缓存;依客户端连续性事件恢复发布,不要求必有新快照。 | A6 |
|
|
109
|
+
| epoch 更换/新的空基线 | 立即使旧画面失效;只允许新 generation 的权威基线或完整 live 画面。 | A5、A6 |
|
|
110
|
+
| protocol→legacy fallback | 关闭现代发布门控,保留既有 legacy settle/jiggle/heal,不借现代就绪事件提前放行。 | A7 |
|
|
111
|
+
| dispose/detach | 撤销 listener、定时器、CSI handler、parser 与缓存;延迟回调零发布;detach 行为沿用现有协议。 | A9 |
|
|
112
|
+
|
|
113
|
+
### 5.2 尺寸变化和冷启动的诊断 gate
|
|
114
|
+
|
|
115
|
+
当前协议没有“本次 resize 的 child 全面重绘已完成”的权威事件,`applied`、下一输出 chunk、任意一次同步块关闭都不足以替代。因此 A4 是**实施前诊断 gate**:批准后先用可控 child 和真实 TUI 记录时序,确认能否仅用现有生产信号归属当前目标尺寸的完整重绘;fixture 的帧号/INPUT 标记只能作为独立测试真值,不能混进生产判定。
|
|
116
|
+
|
|
117
|
+
A5 同样要求区分 boot 文本、raw-mode 信号和完整编辑画面。当前 `childInputReady` 只用于颜色报告安全,不单独证明首屏就绪;生产不能硬编码搜索 `INPUT` 或中文界面文本。诊断阶段必须验证真实 Pi 完整渲染边界与其启动序列能否形成充分条件。
|
|
118
|
+
|
|
119
|
+
诊断结果必须是可审查的事件条件和反例测试。如果 A4/A5 缺少充分条件,则**不进入生产修复 P4**:记录无法区分的最小两条事件轨迹,给出所需最小信号并修订本 spec 后重新复核/审阅。不能仅优化同尺寸路径后声称 #222 全部解决,也不能为这些场景添加新的固定等待。
|
|
120
|
+
|
|
121
|
+
### 5.3 超时和兼容输出
|
|
122
|
+
|
|
123
|
+
2500ms 在现代协议中只是诊断/恢复保护线,不能强制 publish 已知半帧、空基线或错误尺寸。到期保留可 detach 的等待画面,记录等待原因;只复用现有客户端恢复预算,不添加无界重订阅或反复重置 2500ms 的死循环。协议错误最终按既有预算进入 legacy;纯粹没有完整帧的场景不能谎报成功,记试验失败。
|
|
124
|
+
|
|
125
|
+
无同步标记的输出走既有保守策略,单列为兼容场景,不宣称具备现代整帧保证。legacy 的 250ms/2500ms 与 jiggle 行为保持,既有 `AGENT_BOARD_TERMINAL_SNAPSHOT=0` 仍是显式回滚开关。probe 超时等兼容性期限不因本 issue 改变。
|
|
126
|
+
|
|
127
|
+
## 6. 可测性拆分
|
|
128
|
+
|
|
129
|
+
以下模块接口是拟新增设计,不作为当前仓库能力对外陈述;函数的最终导出名可在不改变边界和验收 ID 的前提下调整,并更新计划。
|
|
130
|
+
|
|
131
|
+
| 接缝/位置 | 独立输入与输出 | 最低足够测试层级/覆盖边界 | 验收 ID |
|
|
132
|
+
| --- | --- | --- | --- |
|
|
133
|
+
| `decideAttachPresentation()`,现有 render helper | 含 `deadlineState` 的纯状态 → wait 原因/publish/legacy/closed;无 timer、I/O | unit:枚举门禁组合、空基线、尺寸 unknown、保护线 pending/expired、过期身份到期无效且超时不可强制就绪 | A1、A4、A5、A7、A9 |
|
|
134
|
+
| `canPublishAttachView()`,同 helper | 投影身份与当前身份 → boolean | unit:旧连接、基线、parser、尺寸、generation、closed 均拒绝 | A2、A6、A9 |
|
|
135
|
+
| `observeAttachFrameBoundary()`,组件薄适配(待新增) | xterm 公开 CSI hook/模式,输出 immutable 完整边界;返回 dispose | component:真 xterm、分片 CSI、同 chunk 关开、水合屏蔽、帧尾光标;禁止并行 ANSI 正则解析器 | A3、A8、A9 |
|
|
136
|
+
| `commitAttachView()`,组件内部方法(待新增) | 通过 gate 的真实 parser 投影 → 当前可见缓存与 requestRender | integration:实际 TUI 输出、所有渲染入口、滚动与命中测试;不把调用次数当屏幕正确 | A1–A3、A8 |
|
|
137
|
+
| 现有 `handleAttachEvent()`/`pushOutput()`/`finishAttachTransition()` | 协议事件 → parser 隔离、一次副作用、恢复和主题 I/O | integration:真实客户端与 runner;独立 fixture 事件提供时序真值 | A2、A4–A7、A9 |
|
|
138
|
+
| `attach-presentation-fixture.ts`(待新增) | 原样 Terminal.write → 外层 xterm 中逐帧网格/光标/时间 | unit+component:先注入单帧旧内容、空屏、上下半屏错号、第二光标,确认全能检出;块外写也可见 | A10 |
|
|
139
|
+
| 重复实验统计 helper(scenario 测量文件内,待新增) | JSON 试验记录 → 分位数/成功率/Wilson 区间/失败清单 | unit:已知样本、超时 `+∞`、基础设施失败单列、固定分位数算法;opt-in E2E 测真实性能 | A10、A11 |
|
|
140
|
+
|
|
141
|
+
新增 `test/attach-ready-report.test.mjs` 对统计纯函数进行已知输入断言;普通 `npm test` 只跑确定性用例。重复 100/30 次实验显式开启,不加入每次 CI。真实时间试验与 fake clock 回归分开,父进程统一单调时钟标记;跨进程只比较父侧收到事件的时刻,并报告测量边界。
|
|
142
|
+
|
|
143
|
+
## 7. 验收矩阵
|
|
144
|
+
|
|
145
|
+
自动化证明门禁、事件顺序和写给终端的画面;用户实测核对当前终端中的实际呈现。每项都必须有计划任务及实际证据,自动化通过不能关闭实测 pending。
|
|
146
|
+
|
|
147
|
+
本矩阵的 A1–A12/U1–U3 仅限 issue #222 命名空间;报告、检查记录与 issue 评论使用 `#222-A11` 等全称。仓库 README/VERIFY.md 中 #121/#91 的裸 A11 是 `npm run test:perf` 的既有三项 perf-gate,不是本设计的 1660 次重复试验;两者分别留证,不能互相替代。
|
|
148
|
+
|
|
149
|
+
| ID | 功能点/决策 | 验收方式 | 命令/操作与通过标准 | 计划任务 |
|
|
150
|
+
| --- | --- | --- | --- | --- |
|
|
151
|
+
| A1 | 同尺寸完整基线立即发布,忙碌/安静均不等 settle | 自动化(unit+integration) | `node --test test/pty-attach-render.test.mjs test/pty-attach-ready.test.mjs`;完整条件已成立时未到 250ms 即正确首屏,零 resize/jiggle;完整帧被推迟到 >250ms 且 <2500ms 时不得提前转换 | P3、P4 |
|
|
152
|
+
| A2 | 权威来源、校验失败、catch-up 和水合不露中间状态 | 自动化(integration) | 上述 ready 测试+`node --test test/pty-attach-protocol-e2e.test.mjs test/terminal-snapshot.integration.test.mjs`;毒日志、未校验帧、旧队列均不发布,原序号恢复不退化 | P2–P4 |
|
|
153
|
+
| A3 | 同步块内所有绘制入口都看完整画面 | 自动化(component+integration) | ready 测试;分片、同 chunk 关开、status/ticker/主题各触发绘制;完整目标前零半帧,后续也无错误帧 | P2–P4 |
|
|
154
|
+
| A4 | 目标尺寸的完成证据、零/一次真实 resize | 自动化(integration;实施前 gate) | ready+protocol 测试,G1–G3;旧尺寸帧与 ack 不可发布;先证明确切生产条件或停止 P4 修订设计 | P2–P4 |
|
|
155
|
+
| A5 | 空基线/冷启动不会显示旧屏、boot 或半个编辑器 | 自动化(integration;实施前 gate) | ready 测试,C;boot、raw-mode、完整 live 帧分阶段;仅充分条件成立后发布,否则停止 P4 | P2–P4 |
|
|
156
|
+
| A6 | reconnect、epoch reset、resnapshot 来源正确 | 自动化(integration) | ready+protocol 测试驱动既有 restart fixture,R 两子格;无新快照续播可恢复,新代次不回流旧画面 | P3、P4 |
|
|
157
|
+
| A7 | unframed/legacy fallback、保护期限与异常等待 | 自动化(unit+integration) | ready 测试+`node --test test/pty-attach-desync-health-e2e.test.mjs test/pty-attach-desync-heal.test.mjs`;legacy settle/jiggle 保留,现代超时不露已知坏屏,detach 可用 | P3、P4 |
|
|
158
|
+
| A8 | 底部、活动界面、长历史、宽字符与光标;上滚及复制命中一致 | 自动化(component+integration) | ready 测试,L 与附加交互用例;首屏 TAIL+INPUT 或当前选择界面,滚动意图保留,复制/链接与可见内容一致 | P3、P4 |
|
|
159
|
+
| A9 | 一次就绪副作用、颜色延迟、dispose 清理 | 自动化(unit+integration) | ready 测试+`node --test test/pty-attach-scheme-readiness.test.mjs test/pty-attach-settle-scheme.test.mjs test/pty-attach-startup-color.test.mjs`;D/T 与旧回调零发布;延迟完整帧前 hooks 为 0、首次合格 publish 后为 1,迟到 timer 不再触发;现有 pending scheme 语义保留 | P3、P4 |
|
|
160
|
+
| A10 | 观察器和统计本身能检错、失败留痕完整 | 自动化(unit+static) | ready 测试含观察器自测+`node --test test/attach-ready-report.test.mjs`;人为错误帧不能被最终正确帧抹掉,超时不从分布消失 | P2、P3、P5 |
|
|
161
|
+
| A11 | 延迟与成功率达到分场景目标 | 自动化(opt-in E2E) | 计划中的真实入口重复 CLI;B/Q/L 总延迟 P95≤200ms、最大≤500ms,S/C/R 完整画面后 P95≤100ms、最大≤200ms;G 总延迟 P95≤500ms、最大≤1000ms,完整目标帧后 P95≤100ms;每格零产品画面错误 | P5 |
|
|
162
|
+
| A12 | 类型、性能、全仓回归、coverage、打包 | 自动化(static+build+unit/integration) | `npm run verify` 全通过;不得只用 `npm test` 替代 | P6 |
|
|
163
|
+
| U1 | 实际终端切入当前工作区、无可见闪烁/残影/双光标 | 用户实测 | 候选明确加载后,隔离会话 fullscreen B/Q/L 各10次、regular B/Q各5次,录屏逐帧核对;每次首屏正确、过程无错误画面 | P6 |
|
|
164
|
+
| U2 | 实际终端尺寸变化、冷启动、重连/重启 | 用户实测 | 同候选环境,各5次隔离试验;首屏尺寸与来源正确,无历史位置再跳底、无旧代次回流;冷启动耗时单列 | P6 |
|
|
165
|
+
| U3 | 交互及退出仍正常 | 用户实测 | U1/U2 每类至少1次继续输入、主动上滚后让 child 输出、选择复制已知文本、detach/再 attach;输出不抢回、复制一致、退出正常 | P6 |
|
|
166
|
+
|
|
167
|
+
A11 的具体子格、样本量和统一统计口径在计划 Verification 中固定:B/Q/S 与 L 两子格各100次,G1–G3/C/R两子格/T两子格/U两子格/D各30次,两版共1660次正式试验。每格5次预热排除且单列,候选/基线交错,首屏后观察至少3秒。P50/P95 为排序后第 `ceil(p×n)` 项;产品超时按 `+∞`;所有失败保留、95% Wilson 区间不外推未测环境。每次上限10秒,基础设施失败超过5%整格无效。
|
|
168
|
+
|
|
169
|
+
## 8. 部署、回滚与保证边界
|
|
170
|
+
|
|
171
|
+
U1–U3 在代码实现、自动化完成、候选可加载后执行;不以录屏替代精确自动化时序,也不把外层 xterm 当作真实终端像素证据。终端渲染/图形合成与输入法行为不适合由进程内模拟完全证明,所以保留实测;60fps 录屏无法排除更短的像素变化,报告须写明这一限制。
|
|
172
|
+
|
|
173
|
+
实际检查使用独立 Pi 测试会话、临时 agent root 和明确的本地扩展入口,不修改全局设置、不对活跃用户会话发测试输入或 kill。启动前后记录父 Pi、child Pi、TUI、xterm 的实际加载路径/版本、终端名/版本及尺寸;现有仓库 Pi TUI 1.1.0 与宿主安装目录 1.3.0 必须分清,目录名不是解析证明。
|
|
174
|
+
|
|
175
|
+
候选加载前只读检查 `~/.pi/agent/extensions/agent-board` 的存在与真实指向,并核对候选入口的 realpath/commit/文件哈希。U 项固定使用隔离进程的一次性显式入口,不执行 `pi install`、不改全局 symlink:待实现获准后,以临时 `PI_CODING_AGENT_DIR`、`--no-extensions` 关闭自动发现,再用 `--extension` 指向候选 worktree 的绝对 `index.ts`;显式入口在关闭自动发现后仍会加载。以下只是已从宿主 Pi 的 `docs/cli.md`、`docs/packages.md` 与 `docs/environment-variables.md` 核实的拟执行命令,当前不启动新 Pi:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
PI_CODING_AGENT_DIR="$ATTACH_222_AGENT_DIR" pi --no-extensions --no-mcp --extension "$ATTACH_222_CANDIDATE_ENTRY" --tui-mode fullscreen --verbose
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
`ATTACH_222_AGENT_DIR` 是获准后准备的临时配置目录,不复用真实会话;`ATTACH_222_CANDIDATE_ENTRY` 是经 realpath 核对的候选 `index.ts` 绝对路径。regular 验收只改变 `--tui-mode`。执行前核对实际 Pi 版本对应的 CLI 支持和安全认证前置;不复制/回显凭据,不因配置缺失改用全局安装。全新试验进程启动后,再从实际资源加载记录与模块解析证据核对入口和依赖;`--verbose` 或启动命令本身不是证明。不能证明运行的是候选、发生双重加载或无法在隔离环境启动时,U 项保持 pending。
|
|
182
|
+
|
|
183
|
+
发布与全局安装不在本轮授权内;临时 `AGENT_BOARD_TERMINAL_SNAPSHOT=0` 仅在隔离进程验证 legacy,不持久更改配置。正式回退可按既有 PR/版本流程撤销改动;该开关只恢复 legacy 路径,不等于新的完整帧保证。
|
|
184
|
+
|
|
185
|
+
A4/A5 没有充分生产信号、完整投影需要越界改协议、解析 API 不可用、重复实验出现未归因错误,均停止生产修复并留证修订。单次 guard 失败不以增加等待掩盖;同架构连续三次针对性假设失败转架构复盘。人工验收环境不可用时 U 项保持 pending,不能宣称“快且不闪”全部验收。
|
|
186
|
+
|
|
187
|
+
## 9. 流程交接
|
|
188
|
+
|
|
189
|
+
当前处于 issue-driven 步 4(设计/根因报告),不能把先前实施计划替代设计 gate。设计完成后按 `spec-cross-review` 异模型复核,默认最多 4 轮,每轮只读 fresh-context reviewer,由主会话统一修订和写留痕;然后在 Plannotator 提交同一计划及本 spec。
|
|
190
|
+
|
|
191
|
+
实际授权归档不存在,默认 `stepwise`。当前用户明确要求使用 issue-driven 并补 spec,覆盖设计与该流程要求的只读复核;不升格为自动 push/PR/合并授权。认领/issue 评论、仓外归档、worktree、代码实现和提交等后续动作受当前规划限制及既有授权约束,未执行的步骤明确标为 pending。
|
|
192
|
+
|
|
193
|
+
## 10. 交叉复核状态
|
|
194
|
+
|
|
195
|
+
2026-10-22:第 1 轮从运行产物收回完整 structuredOutput,提出 1 个真缺口和 4 项细化,父逐条裁定并修订。第 2 轮重新核对五视角与真实代码,确认前轮修订有效,返回 0 个真缺口、1 项细化、6 项核对通过。原报告把 passes 误写为 5,父保存原始版后只请求计数勘误;已核验 findings/lenses/被审版本均未变化,未重跑审查、未新增轮次。
|
|
196
|
+
|
|
197
|
+
两轮 child 实际模型均为 `zai-coding-cn/glm-5.3`,主会话最近 assistant physical 为 `callyouai/gpt-6.1-sol`,异构审计通过。父按第 2 轮建议吸收 R2-D1:明确初始 settle 和 hard timer 的模式门控/处置,并补 A1/A9 的延迟完整帧时序断言。按技能规则,零真缺口且细化吸收后进入设计待确认,不启动第三轮;此最终小修订不是又一轮独立复核结果。
|
|
198
|
+
|
|
199
|
+
哈希、运行 ID、原始回报、计数勘误和逐条裁定统一记在 [spec-cross-review-state.md](/home/elling/.github-issue-driven/zhuxixi/pi-agent-board/issue-222/research/spec-cross-review-state.md)、[第 1 轮报告](/home/elling/.github-issue-driven/zhuxixi/pi-agent-board/issue-222/research/spec-review-round-1.md) 与 [第 2 轮报告](/home/elling/.github-issue-driven/zhuxixi/pi-agent-board/issue-222/research/spec-review-round-2.md),不把本文件的被审哈希写回本文件。设计复核已收敛,但审批 gate 仍关闭;必须经用户确认并解除规划限制后,才可进入 worktree、实施或 Step 6 正式计划。
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
## Execution Handoff — 2026-10-23
|
|
203
|
+
|
|
204
|
+
Design approved by the user at 2026-10-23T08:20:19+08:00. Planning restrictions are explicitly ended for this approved execution. This is the approved design with only link relocation and this handoff note; archived spec SHA-256 remains `10c0a158ff4ac222d0c11a394f14b275292e96ee44b047cf17f1be45f949a64e`. Diagnostic #222-A4/A5 and manual U1–U3 gates remain binding. No commit/push/publication authorization is implied.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# spec — issue #245:key hints 与实际绑定同步(三条文档欠账)
|
|
2
|
+
|
|
3
|
+
Drafted: deepseek/deepseek-flash (selected) · deepseek/deepseek-flash (physical) @ 2026-10-26T22:40:00+08:00
|
|
4
|
+
Revised: deepseek/deepseek-flash (selected) · deepseek/deepseek-flash (physical) @ 2026-10-26T22:55:00+08:00 — cross-review R1:R1-D1 接受(D3 钉死 9 行小表,含 `?`/`!`);R1-D2 接受(U1/U2 补部署前置与可执行时机);R1-D3 接受(§5 补 fitToHeight 截尾陷阱);R1-D4 接受(删除无出处数字 89/1257,改为实测 1404)
|
|
5
|
+
|
|
6
|
+
基线:main @ 724c4da(v0.13.0 之后)。调研留档:`research/01-verify-three-gaps.md`(三条主张全部复核属实)。
|
|
7
|
+
|
|
8
|
+
## 1. 背景
|
|
9
|
+
|
|
10
|
+
#229 落地 vim 键位时按「加键须同步三处文案」的纪律补了 README 表、`?` 帮助面板、hints 行,但有三处历史欠账没覆盖:peek 视图的 in-view footer 仍宣传旧键位;README 的 Peek/Transcript 两表漏写 `!`;README 的多选段落从未写过移动键。本 issue 是一次纯文案同步,**无行为变更**。
|
|
11
|
+
|
|
12
|
+
## 2. 设计决策表
|
|
13
|
+
|
|
14
|
+
| # | 决策 | 依据 |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| D1 | peek footer 改为 `↑↓/j/k prev/next · →/l attach · d done · v transcript · e evidence · r reply · esc back` | 与 #237 给 session/evidence footer 补 `↑↓/j/k` 的写法严格一致;与 peek 的 `?` 行、README Peek 表口径对齐 |
|
|
17
|
+
| D2 | README Peek 表与 Transcript 表各加一行 `\| \`!\` \| Open node-pty diagnostics and repair hints. \|`,措辞照抄 Main list 表(:148) | 同一功能三种视图应同措辞;Evidence 表**不加**(`handleEvidenceKey` 无 `!` 分支) |
|
|
18
|
+
| D3 | README 多选段落改为**独立小表**(`### Multi-select`),**固定 9 行**,逐行对应 `handleSelectKey` 的全部绑定:`↑`/`↓`/`j`/`k` 移动 · `space` toggle · `a` 全选 · `u` 清空 · `d` 批量 Done · `ctrl+x` 删除 · `m`/`esc` 退出 · `?` 帮助 · `!` PTY 诊断 | select 模式现有 9 组绑定,句子已列 5 项;README 四视图凡绑定多的都用表格。**行数必须钉死 9,不可只写 7 组**——只列模式专属的 7 组会把 `?`/`!` 原样遗留,正是本 issue 在修的同类欠账(R1-D1)。**备选方案**:延伸 `README.md:120` 的句子(改动更小但可读性差)——见 §6 待裁决 |
|
|
19
|
+
| D4 | 顺手给 peek footer 加渲染断言(`test-support/vim-keys-wrap.ts` 的 `out.copy` 补 `peekRender`,A 项断言) | 现有探针断言了 list/select/session/evidence 渲染,**唯独漏 peek** —— 这正是本轮欠账能漂移的机制原因。不补则下次同样漂移 |
|
|
20
|
+
| D5 | 不动任何 handler 代码、不动 `?` 帮助面板、不动 hints 行 | 三处已正确;本 issue 只修「对外文档」侧,避免范围扩张 |
|
|
21
|
+
|
|
22
|
+
## 3. 改动清单
|
|
23
|
+
|
|
24
|
+
| 文件 | 位置 | 改动 |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `src/ui/dashboard.ts` | :1543 `renderPeek` footer | 文案 `↑↓ prev/next · →/> attach` → `↑↓/j/k prev/next · →/l attach` |
|
|
27
|
+
| `README.md` | Peek 表(:152-167) | 新增 `!` 行 |
|
|
28
|
+
| `README.md` | Transcript 表(:169-183) | 新增 `!` 行 |
|
|
29
|
+
| `README.md` | 多选段落(:120) | 依 D3 改为独立小表(或延伸句子,见 §6) |
|
|
30
|
+
| `test-support/vim-keys-wrap.ts` | `out.copy` 段 | 新增 `peekRender` 捕获 |
|
|
31
|
+
| `test/dashboard-vim-keys.test.mjs` | A7 测试 | 新增 peek footer 断言 |
|
|
32
|
+
|
|
33
|
+
## 4. 验收矩阵
|
|
34
|
+
|
|
35
|
+
| ID | 功能点 | 验收方式 | 具体验证 | 通过标准 |
|
|
36
|
+
|----|--------|----------|----------|----------|
|
|
37
|
+
| A1 | peek footer 渲染出 `j/k` 与 `l` | 自动化(unit,探针渲染) | `node --test test/dashboard-vim-keys.test.mjs` | `assert.match(peekRender, /↑↓\/j\/k prev\/next/)` 与 `/→\/l attach/` 均通过 |
|
|
38
|
+
| A2 | 改前先红、改后转绿 | 自动化(unit) | 同一命令,先提交断言跑一次 | 改文案前 FAIL(旧 footer 无 `j/k`);改后 PASS |
|
|
39
|
+
| A3 | peek footer 不再出现旧措辞 | 自动化(unit,探针渲染) | `assert.doesNotMatch(peekRender, /↑↓ prev\/next · →\/> attach/)` | 负向断言通过 |
|
|
40
|
+
| A4 | 其余视图 footer/hints 未回归 | 自动化(unit,现有断言) | `npm test` | 全量用例(当前实测 1404:1401 pass / 3 skipped / 0 fail)全绿,且 `dashboard-vim-keys` 两条测试均过 |
|
|
41
|
+
| A5 | typecheck + 全量门槛 | 自动化(build/test) | `npm run verify` | typecheck、perf gate、全测试、coverage 阈值(lines 85/funcs 80/branches 70)、pack:dry 全过 |
|
|
42
|
+
| U1 | README 三处改动可读且与代码一致 | 用户实测 | **前置**:PR 合并后 `git pull` main;本地 checkout 由 pi 自动发现加载(README:63 Development auto-discovery),重启 pi 后测;README 必须是合并后版本(旧版本内容不同)。**步骤**:① 对照 `### Peek` 表逐行按 `!`,确认打开 PTY 诊断(此绑定 v0.13.0 已存在,对旧版本同样成立)② 同样验 `### Transcript` ③ 进 `m` 多选模式,按小表**全部 9 行**逐项核对(移动 / space / a / u / d / ctrl+x / m·esc / `?` / `!`) | 三处无遗漏、无虚构键位;小表 9 行逐项可用 |
|
|
43
|
+
| U2 | peek footer 实际显示 | 用户实测 | **前置**:同 U1(新 footer 只存在于合并后的代码,旧安装仍是旧文案 → 不拉取就必然假失败)。**步骤**:`space` 进 peek,看底部提示行 | 显示 `↑↓/j/k prev/next · →/l attach · …` |
|
|
44
|
+
|
|
45
|
+
## 5. 可测性拆分设计
|
|
46
|
+
|
|
47
|
+
**不新增函数、不改拆分**:唯一的产品改动是 `renderPeek` 内一个字符串字面量。`renderPeek(width)` 已是独立纯渲染方法(输入 width,输出 string[]),副作用只在终端写入,符合「纯函数优先、副作用隔离」的既有结构。
|
|
48
|
+
|
|
49
|
+
**测试边界**:继续用 `test-support/vim-keys-wrap.ts` 探针 —— `dash.render(120)` 取整屏文本,正则断言(与 A7 现有 28 条渲染断言同类)。**不新增测试文件、不新增探针文件**:本 issue 的自动化面只有一条 footer 文案,扩展现有探针是最低成本层级(unit),无需 integration。
|
|
50
|
+
|
|
51
|
+
**⚠️ fitToHeight 截尾陷阱(R1-D3)**:`render()` 走 `fitToHeight`,它对超出行高的输出是**截尾部**(`src/ui/dashboard.ts:1280` `lines.slice(0, height)`)。peek footer 是 `renderPeek` 输出的**最后一行**,而探针终端默认 24 行——只要 peek 内容(Summary / Auto-state / Refs / Question / Latest output / Error 各段加 wrap 折行)超过 24 行,footer 就会被切掉,A1/A3 假红。**实现时必须在 peek 捕获前临时把 `tui.terminal.rows` 调大**(A7 段已用同样手法把 help 捕获提到 40 行,照此先例),或保证夹具视图足够矮。不处理会误判为渲染逻辑问题。
|
|
52
|
+
|
|
53
|
+
**README 三处不可自动化**:仓内无任何测试读 README(`rg -ln 'README' test/` 仅命中两个与文档无关的用例),为此新建 README-lint 测试属于超出本 issue 范围的基础设施投入 → 归 A5 之外的 U1 用户实测,spec 明说不自动化的原因。
|
|
54
|
+
|
|
55
|
+
## 6. 待裁决:D3 的呈现形态
|
|
56
|
+
|
|
57
|
+
- **方案 A(推荐)**:新增 `### Multi-select` 小表,与四个视图表并列。理由:9 组绑定用句子不可读;README 现有结构是「视图/模式 → 表」。
|
|
58
|
+
- **方案 B**:延伸 `README.md:120` 的句子加「`↑`/`↓`/`j`/`k` to move」。理由:diff 最小(一行),不动文档结构。
|
|
59
|
+
|
|
60
|
+
选 A 的代价是要动 README 章节结构(可能影响锚点);选 B 的代价是句子继续变长。
|
|
61
|
+
|
|
62
|
+
## 7. 非目标
|
|
63
|
+
|
|
64
|
+
- 不改任何 handler 行为、不改 `?` 帮助面板、不改 hints 行(D5)。
|
|
65
|
+
- 不给 Evidence 表加 `!`(该模式无此绑定)。
|
|
66
|
+
- 不新建 README 测试基础设施。
|
|
67
|
+
- 不处理 help 面板矮终端裁剪(那是 #246)。
|
|
68
|
+
|
|
69
|
+
## 8. 保证边界
|
|
70
|
+
|
|
71
|
+
- 只保证 §3 列出的六处改动;不保证 README 其它段落(如 `## Dashboard Workflow` 的叙述)与键位完全一致。
|
|
72
|
+
- A1–A4 只证明 peek footer 与既有渲染断言;README 三处的正确性仅由 U1 人工核对保证,无机器门禁——这是本 spec 明说的保证边界,不假装有自动化兜底。
|