chore(web): continuous handoff WBV2-P568-001
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-30 16:31:26 +08:00
parent ee9248800d
commit 5cdd5453d4
10 changed files with 482 additions and 11 deletions

View File

@@ -96,6 +96,28 @@ guardian/supervisor 的连续契约:
- guardian 或 supervisor 进程退出后,再次执行同一 guardian 命令即可从当前队列恢复;不复制旧日志、不重放未知命令。
- guardian 只负责有效 handoff 和可证明的进程恢复,不能绕过真实阻塞、治理门禁、源码编译失败或 provenance 规则。
### 动态运行状态
`nextTask.md` 的 Current Handoff Snapshot 只是写入时快照,不能用来判断进程
是否正在运行。使用下面的只读命令查看实时状态;它不会领取任务、修改队列或
重放任何命令:
```bash
node tools/web/print-wbv2-live-status.mjs
```
持续刷新终端提示:
```bash
node tools/web/print-wbv2-live-status.mjs --watch --interval-ms 2000
```
状态输出中的 `RUNNING` 表示 guardian 和 supervisor 锁对应的 PID 均存活,且
当前任务正在执行或进行交接;`IDLE` 表示没有活动实例;`BLOCKED` 表示必须先
读取 checkpoint 原因。JSON 机器读取使用 `--json`,可用于 CI、监控或重连脚本。
guardian 每两秒刷新 heartbeat,checkpoint 采用临时文件加原子改名,避免动态
提示读到半个 JSON。
## Copyable Resume Prompt
Use the following prompt when continuous execution is needed. It is the
@@ -127,6 +149,7 @@ and (when authorized) repository push:
16. PROCESS_CONTINUITY_IRON_RULE:要实现跨会话不间断执行,必须使用 `run-wbv2-guardian.mjs --max-iterations 0` 托管 `run-wbv2-supervisor.mjs`;单次聊天执行完成后不得假定代理会在下一轮自动复活。guardian/supervisor 必须按任务原子迭代、锁队列、写 checkpoint、成功后立即重读 manifest;失败或状态未知时只能停在精确 checkpoint,不得自动重试或伪造队列前进。
17. PUSH_COMPLETION_IRON_RULE:任何任务只有在 commit 成功、`git push origin main` 成功且 `git ls-remote --refs origin refs/heads/main` 返回的远端 HEAD 与本地 `git rev-parse HEAD` 相同后才算完成;确认前不得读取下一任务。网络失败最多按退避策略重试,状态未知时不得重放任务写入。
18. GUARDIAN_CONTINUITY_IRON_RULE:无人值守运行必须由 `run-wbv2-guardian.mjs` 托管 supervisor。guardian 对可证明的 `handed_off` checkpoint 自动恢复,对 `running`、`started`、`blocked`、指针漂移、远端提交不明或任务闭合状态保持精确停止;“不停歇”仅适用于安全可恢复的进程/网络故障,不能解释为绕过真实阻塞。
19. LIVE_STATUS_IRON_RULE:任何“当前是否在执行”的判断必须以 `node tools/web/print-wbv2-live-status.mjs` 的实时输出为准,不得使用 `nextTask.md` 的静态 snapshot、旧聊天消息或单个历史 manifest 推断。`RUNNING`、`IDLE`、`BLOCKED` 必须分别显示活动 PID、当前任务和 checkpoint 路径;状态工具只读,不得改变队列。
```
## Resume Command
@@ -353,12 +376,12 @@ Recorded: 2026-08-29 Asia/Shanghai
| Field | Value |
| --- | --- |
| Current task when this file was written | `WBV2-P568-001` |
| Current task when this file was written | `WBV2-P568-002` |
| Current task state | `in_progress` |
| Parent manifest | `tests/golden/WBV2-P568-000/manifest.json` |
| Current task card | `docs/tasks/WBV2-P568-001.md` |
| Current task-context nextTask | `WBV2-P568-002` |
| Focused command | `node tools/web/generate-wbv2-capability-continuation-slice.mjs --task WBV2-P568-001 --write` |
| Parent manifest | `tests/golden/WBV2-P568-001/manifest.json` |
| Current task card | `docs/tasks/WBV2-P568-002.md` |
| Current task-context nextTask | `WBV2-P568-003` |
| Focused command | `node tools/web/generate-wbv2-capability-continuation-slice.mjs --task WBV2-P568-002 --write` |
The snapshot is informational and may become stale. On every resume, the queue,
parent manifest, and fresh `print-task-context` output win. Never infer a task