work-ally 0.2.0-alpha.1
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/AGENTS.md +110 -0
- package/DASHBOARD.md +160 -0
- package/PRODUCT.md +113 -0
- package/README.md +403 -0
- package/ally.sh +171 -0
- package/bridge/src/approval-rules.ts +360 -0
- package/bridge/src/channel-delivery.ts +207 -0
- package/bridge/src/channel-types.ts +22 -0
- package/bridge/src/channels/fake/adapter.ts +31 -0
- package/bridge/src/channels/feishu/adapter.ts +411 -0
- package/bridge/src/channels/feishu/approvals.ts +6 -0
- package/bridge/src/channels/feishu/formatter.ts +276 -0
- package/bridge/src/channels/feishu/normalize.ts +368 -0
- package/bridge/src/codex-config.ts +52 -0
- package/bridge/src/config.ts +240 -0
- package/bridge/src/fake-runtime-client.ts +505 -0
- package/bridge/src/handoff-service.ts +494 -0
- package/bridge/src/logger.ts +194 -0
- package/bridge/src/memory-digest.ts +186 -0
- package/bridge/src/receiver-approval-autonomy.ts +158 -0
- package/bridge/src/receiver-control-core.ts +140 -0
- package/bridge/src/receiver-control-work-session.ts +218 -0
- package/bridge/src/receiver-control.ts +83 -0
- package/bridge/src/receiver-delivery.ts +136 -0
- package/bridge/src/receiver-helpers.ts +96 -0
- package/bridge/src/receiver-human-gate.ts +333 -0
- package/bridge/src/receiver-inbound-preflight.ts +162 -0
- package/bridge/src/receiver-recovery.ts +236 -0
- package/bridge/src/receiver-runtime-callbacks.ts +367 -0
- package/bridge/src/receiver-runtime-policy.ts +132 -0
- package/bridge/src/receiver-runtime-state.ts +124 -0
- package/bridge/src/receiver-support-actions.ts +189 -0
- package/bridge/src/receiver-thread-start.ts +57 -0
- package/bridge/src/receiver-turn-coordination.ts +94 -0
- package/bridge/src/receiver-turn-execution.ts +257 -0
- package/bridge/src/receiver-turn-failure.ts +143 -0
- package/bridge/src/receiver-turn-result.ts +185 -0
- package/bridge/src/receiver-turn-steer.ts +70 -0
- package/bridge/src/receiver-work-session.ts +76 -0
- package/bridge/src/receiver.ts +329 -0
- package/bridge/src/router.ts +62 -0
- package/bridge/src/runtime-client-agent-messages.ts +150 -0
- package/bridge/src/runtime-client-message-dispatch.ts +176 -0
- package/bridge/src/runtime-client-protocol.ts +411 -0
- package/bridge/src/runtime-client-request-ops.ts +56 -0
- package/bridge/src/runtime-client-run-turn.ts +158 -0
- package/bridge/src/runtime-client-thread-ops.ts +270 -0
- package/bridge/src/runtime-client-transport.ts +309 -0
- package/bridge/src/runtime-client-turn-poll.ts +224 -0
- package/bridge/src/runtime-client-turn-read.ts +185 -0
- package/bridge/src/runtime-client-turn-state.ts +105 -0
- package/bridge/src/runtime-client.ts +344 -0
- package/bridge/src/runtime-user-input.ts +403 -0
- package/bridge/src/scheduler.ts +239 -0
- package/bridge/src/server-handoff-command.ts +364 -0
- package/bridge/src/server-main.ts +80 -0
- package/bridge/src/server-routine-command.ts +60 -0
- package/bridge/src/server-routine-execution.ts +222 -0
- package/bridge/src/server-runtime-app-support.ts +107 -0
- package/bridge/src/server-runtime-app.ts +238 -0
- package/bridge/src/server-thread-sync-command.ts +63 -0
- package/bridge/src/server.ts +17 -0
- package/bridge/src/session-store-delivery.ts +220 -0
- package/bridge/src/session-store-human-gate.ts +380 -0
- package/bridge/src/session-store-inbound-acceptance.ts +66 -0
- package/bridge/src/session-store-meta.ts +134 -0
- package/bridge/src/session-store-turn-ledger.ts +272 -0
- package/bridge/src/session-store.ts +380 -0
- package/bridge/src/system-notify.ts +220 -0
- package/bridge/src/thread-sync.ts +200 -0
- package/bridge/src/translator.ts +494 -0
- package/bridge/src/types.ts +289 -0
- package/bridge/src/utils.ts +104 -0
- package/bridge/src/work-session-store.ts +471 -0
- package/docs/.gitkeep +0 -0
- package/docs/architecture/codex-feishu-bridge-proposal.md +2742 -0
- package/docs/completed/FEATURE-feishu-markdown-and-reply-support.md +327 -0
- package/docs/completed/README.md +21 -0
- package/docs/completed/SPEC-approval-autonomy-and-safe-defaults.md +205 -0
- package/docs/completed/SPEC-approval-batch-and-strict-reply-shortcuts.md +153 -0
- package/docs/completed/SPEC-conversation-noise-reduction-and-busy-input-gate.md +538 -0
- package/docs/completed/SPEC-engineering-sop-skillization.md +190 -0
- package/docs/completed/SPEC-faithful-bridge-core-thinning-v2.md +376 -0
- package/docs/completed/SPEC-faithful-bridge-core-thinning.md +1071 -0
- package/docs/completed/SPEC-group-chat-sender-identity.md +301 -0
- package/docs/completed/SPEC-middleware-exception-visibility.md +227 -0
- package/docs/completed/SPEC-nightly-memory-digest-visibility.md +121 -0
- package/docs/completed/SPEC-project-group-chat-human-centered-conversation-mapping.md +326 -0
- package/docs/completed/SPEC-remove-cli-persona-bootstrap.md +201 -0
- package/docs/developer-workflow.md +49 -0
- package/docs/implementation/SPEC-codex-same-machine-session-handoff-implementation.md +239 -0
- package/docs/implementation/test-coverage-map.md +363 -0
- package/docs/implementation/work-ally-implementation-guide.md +790 -0
- package/docs/issues/README.md +10 -0
- package/docs/issues/pending/ANALYSIS-ally-premature-recovery-notice-and-task-state-semantics-2026-03-18.md +295 -0
- package/docs/issues/resolved/ANALYSIS-approval-waiting-visible-but-approval-artifact-missing-2026-03-16.md +466 -0
- package/docs/issues/resolved/ANALYSIS-blocking-state-visible-without-user-actionable-artifact-2026-03-16.md +261 -0
- package/docs/issues/resolved/ANALYSIS-codex-app-server-transport-disconnect-semantics-2026-03-14.md +606 -0
- package/docs/issues/resolved/ANALYSIS-premature-terminalization-on-fresh-thread-poll-and-object-error-leak-2026-03-16.md +348 -0
- package/docs/issues/resolved/ANALYSIS-runtime-turn-delivery-and-recovery-2026-03-14.md +603 -0
- package/docs/issues/resolved/ANALYSIS-self-test-gap-approval-waiting-visible-but-approval-artifact-missing-2026-03-16.md +166 -0
- package/docs/issues/resolved/ANALYSIS-self-test-gap-blocking-state-visible-without-user-actionable-artifact-2026-03-16.md +186 -0
- package/docs/issues/resolved/ANALYSIS-self-test-gap-premature-terminalization-on-fresh-thread-poll-and-object-error-leak-2026-03-16.md +166 -0
- package/docs/issues/resolved/REPORT-ally-runtime-turn-delivery-3b42fb8-2026-03-15.md +373 -0
- package/docs/manual-acceptance.md +127 -0
- package/docs/ops-runbook.md +44 -0
- package/docs/planning/FEATURE-memory-system.md +748 -0
- package/docs/planning/SPEC-active-turn-steer-and-context-compaction-visibility.md +269 -0
- package/docs/planning/SPEC-approval-rules-inheritance-and-local-validation-lane.md +450 -0
- package/docs/planning/SPEC-assistant-persona-bootstrap.md +199 -0
- package/docs/planning/SPEC-assistant-rename.md +610 -0
- package/docs/planning/SPEC-bridge-app-server-protocol-alignment.md +667 -0
- package/docs/planning/SPEC-claude-runtime-host-for-work-ally.md +434 -0
- package/docs/planning/SPEC-cli-feishu-codex-session-unification.md +236 -0
- package/docs/planning/SPEC-codex-same-machine-session-handoff.md +873 -0
- package/docs/planning/SPEC-feishu-reaction-shortcuts.md +282 -0
- package/docs/planning/SPEC-local-stable-release-boundary.md +166 -0
- package/docs/planning/SPEC-managed-thread-entry-and-surface-mobility.md +862 -0
- package/docs/planning/SPEC-minimal-bridge-semantics-and-user-visible-surface.md +362 -0
- package/docs/planning/SPEC-npm-alpha-distribution-and-install-first-release.md +222 -0
- package/docs/planning/SPEC-remove-websocket-runtime-transport.md +364 -0
- package/docs/planning/SPEC-runtime-abstraction-phase-1.md +424 -0
- package/docs/planning/SPEC-runtime-connection-and-turn-recovery-semantics.md +274 -0
- package/docs/planning/SPEC-session-presence-and-state-visibility.md +397 -0
- package/docs/planning/SPEC-skill-first-capability-packaging.md +338 -0
- package/docs/planning/SPEC-stable-archive-contract.md +456 -0
- package/docs/planning/SPEC-supervised-start-boundary.md +127 -0
- package/docs/planning/SPEC-user-barrier-reduction-and-activation.md +832 -0
- package/docs/planning/ally-next.md +1278 -0
- package/docs/planning/assistant-workbench-spec.md +725 -0
- package/docs/planning/product-workbench.md +283 -0
- package/docs/product-onboarding.md +227 -0
- package/docs/product-spec-standard.md +528 -0
- package/docs/troubleshooting.md +45 -0
- package/docs/user-quickstart.md +46 -0
- package/internal/dispatch.sh +95 -0
- package/internal/lib/common.sh +1450 -0
- package/internal/modules/assistant/manage.sh +1312 -0
- package/internal/modules/bootstrap/setup.sh +144 -0
- package/internal/modules/config/init-env.sh +10 -0
- package/internal/modules/global/manage.sh +154 -0
- package/internal/modules/handoff/manage.sh +54 -0
- package/internal/modules/mcp/manage.sh +83 -0
- package/internal/modules/ops/logs.sh +76 -0
- package/internal/modules/routines/manage.sh +55 -0
- package/internal/modules/runtime/assistant-autosave.sh +26 -0
- package/internal/modules/runtime/restart.sh +6 -0
- package/internal/modules/runtime/start.sh +283 -0
- package/internal/modules/runtime/status.sh +194 -0
- package/internal/modules/runtime/stop.sh +55 -0
- package/internal/modules/runtime/supervisor.sh +216 -0
- package/internal/modules/runtime/update.sh +26 -0
- package/package.json +41 -0
- package/runtime/config/.gitkeep +0 -0
- package/runtime/host/.gitkeep +0 -0
- package/runtime/host/healthcheck-codex-app-server.ts +22 -0
- package/runtime/host/ping-pong-codex-app-server.ts +66 -0
- package/runtime/host/probe-codex-app-server.ts +115 -0
- package/skills/archive-reader/SKILL.md +9 -0
- package/skills/feishu-production-debug/SKILL.md +37 -0
- package/skills/feishu-production-debug/references/feishu-debug-order.md +49 -0
- package/skills/feishu-production-debug/references/platform-permission-baseline.md +23 -0
- package/skills/issue-to-spec-triage/SKILL.md +44 -0
- package/skills/issue-to-spec-triage/references/triage-rules.md +66 -0
- package/skills/memory-digest/SKILL.md +9 -0
- package/skills/post-implementation-closure/SKILL.md +39 -0
- package/skills/post-implementation-closure/references/closure-checklist.md +45 -0
- package/skills/post-implementation-closure/references/doc-drift-map.md +49 -0
- package/skills/product-spec/SKILL.md +244 -0
- package/templates/env.example +5 -0
- package/templates/routines/nightly-memory-digest.yaml +10 -0
- package/templates/workspace/AGENTS.md +26 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Codex 同机双向会话接续实施文档
|
|
2
|
+
|
|
3
|
+
更新时间:2026-03-18
|
|
4
|
+
状态:已验收通过
|
|
5
|
+
Owner:implementation engineer
|
|
6
|
+
对应 spec:`docs/planning/SPEC-codex-same-machine-session-handoff.md`
|
|
7
|
+
|
|
8
|
+
当前验收结论:
|
|
9
|
+
|
|
10
|
+
- 2026-03-18:本专题已通过产品验收,same-machine、single-active 与 `work_session` 主合同成立。
|
|
11
|
+
- 自动化、shell 与帮助入口验证已通过;真实 Codex runtime smoke 仍受当前环境上游网络请求失败影响,因此这里只记主合同成立,不记真实链路全绿。
|
|
12
|
+
|
|
13
|
+
## 1. 文档定位
|
|
14
|
+
|
|
15
|
+
这不是产品 spec,而是交付给实现者的施工文档。
|
|
16
|
+
|
|
17
|
+
它承担 4 个职责:
|
|
18
|
+
|
|
19
|
+
- 把 spec 落成可执行阶段,避免工程师按自己理解 freestyle。
|
|
20
|
+
- 作为 handoff 专题的实时施工记录入口。
|
|
21
|
+
- 帮助长任务在对话压缩后按正确路径恢复。
|
|
22
|
+
- 作为交付前自检与 DoD 对照表。
|
|
23
|
+
|
|
24
|
+
硬规则:
|
|
25
|
+
|
|
26
|
+
- 本文开工前,先通读 `docs/planning/SPEC-codex-same-machine-session-handoff.md`。
|
|
27
|
+
- `SPEC` 是灯塔;实现时不能绕开它自定产品语义。
|
|
28
|
+
- 工程根目录已有其他专题的 `TASK.md` 时,不要直接复用旧内容;应新建或重写成当前专题的任务路径。
|
|
29
|
+
- 每完成一个阶段,先更新 `TASK.md`,再进入下一阶段。
|
|
30
|
+
|
|
31
|
+
## 2. 开工前必须理解的产品边界
|
|
32
|
+
|
|
33
|
+
实现前必须先接受下面这些边界,不要边做边改题。
|
|
34
|
+
|
|
35
|
+
1. 本专题要做的是 same-machine 双向 handoff,不是 backup patch。
|
|
36
|
+
2. 本专题要连续的是同一条真实 runtime thread,不是复制摘要后的“看起来连续”。
|
|
37
|
+
3. `work_session` 是新的产品对象,不是 `conversationRef -> threadId` 的别名文件。
|
|
38
|
+
4. `runtimeThreadId` 与 `cliResumeRef` 必须逻辑分离,不允许先混写再说。
|
|
39
|
+
5. V1 坚持 single-active ownership;不能为了“更丝滑”做成静默双写。
|
|
40
|
+
6. V1 只正式支持 `official_codex_cli`,不要偷扩到 desktop app / VS Code / 第三方包装层。
|
|
41
|
+
7. V1 不做 transcript 全量镜像;只做正确 handoff、attach、ownership 与拒绝路径。
|
|
42
|
+
|
|
43
|
+
## 3. 本专题建议关注的代码范围
|
|
44
|
+
|
|
45
|
+
以下范围大概率会被改动;接手前先自己读清楚。
|
|
46
|
+
|
|
47
|
+
### 3.1 bridge
|
|
48
|
+
|
|
49
|
+
- `bridge/src/session-store.ts`
|
|
50
|
+
- `bridge/src/receiver.ts`
|
|
51
|
+
- `bridge/src/router.ts`
|
|
52
|
+
- `bridge/src/runtime-client.ts`
|
|
53
|
+
- `bridge/src/server.ts`
|
|
54
|
+
- `bridge/src/translator.ts`
|
|
55
|
+
- 如有必要新增 `bridge/src/work-session-store.ts` 或等价模块
|
|
56
|
+
|
|
57
|
+
### 3.2 shell / internal
|
|
58
|
+
|
|
59
|
+
- `ally.sh`
|
|
60
|
+
- `internal/modules/global/`
|
|
61
|
+
- `internal/modules/assistant/`
|
|
62
|
+
- 需要时新增 handoff 命令实现模块
|
|
63
|
+
|
|
64
|
+
### 3.3 tests
|
|
65
|
+
|
|
66
|
+
- `tests/unit/session/*.test.mjs`
|
|
67
|
+
- `tests/integration/session/*.test.mjs`
|
|
68
|
+
- `tests/shell/*.sh`
|
|
69
|
+
- `tests/shell/codex-runtime.sh`
|
|
70
|
+
|
|
71
|
+
## 4. 必须先创建并维护的 TASK.md
|
|
72
|
+
|
|
73
|
+
接手开发后,第一步不是写代码,而是处理 `TASK.md`。
|
|
74
|
+
|
|
75
|
+
要求:
|
|
76
|
+
|
|
77
|
+
1. 工程根目录的 `TASK.md` 必须切换为当前 handoff 专题,不能继续保留其他专题的施工日志。
|
|
78
|
+
2. `TASK.md` 必须明确:
|
|
79
|
+
- 目标
|
|
80
|
+
- 范围 / 非目标
|
|
81
|
+
- 分阶段任务
|
|
82
|
+
- 每个任务的 DoD
|
|
83
|
+
- 当前进行中
|
|
84
|
+
- 风险 / 待确认问题
|
|
85
|
+
- 验证计划
|
|
86
|
+
- 验证结果
|
|
87
|
+
3. 每完成一项任务,先更新 `TASK.md`,再继续开发。
|
|
88
|
+
4. 如果你发现 spec 与真实代码现状存在冲突,先在 `TASK.md` 记录,再回写 spec 或单独提问题,不要静默偏航。
|
|
89
|
+
|
|
90
|
+
## 5. 分阶段实施建议
|
|
91
|
+
|
|
92
|
+
### 阶段 1:建立 `work_session` 持久化与查询能力
|
|
93
|
+
|
|
94
|
+
目标:
|
|
95
|
+
|
|
96
|
+
- 把 handoff 的产品对象先真正建立起来。
|
|
97
|
+
|
|
98
|
+
建议工作:
|
|
99
|
+
|
|
100
|
+
- 为 `work_session` 建立独立持久化目录与最小索引。
|
|
101
|
+
- 明确 assistant 当前 active `work_session` 查询路径。
|
|
102
|
+
- 明确 delivery conversation 当前 active `work_session` 查询路径。
|
|
103
|
+
- 明确 `runtimeThreadId` / `cliResumeRef` / `activeSurface` / `ownershipSource` 的持久化合同。
|
|
104
|
+
|
|
105
|
+
阶段 DoD:
|
|
106
|
+
|
|
107
|
+
- 已存在可独立读写的 `work_session` durable object。
|
|
108
|
+
- 不再只能依赖 `conversationRef -> threadId` 临时映射回答“当前是哪条工作线程”。
|
|
109
|
+
- `runtimeThreadId` 与 `cliResumeRef` 已分字段落盘。
|
|
110
|
+
- 对应 unit tests 成立。
|
|
111
|
+
|
|
112
|
+
### 阶段 2:收口 ownership 规则与渠道拒绝路径
|
|
113
|
+
|
|
114
|
+
目标:
|
|
115
|
+
|
|
116
|
+
- 先把“不能乱写”这件事守住。
|
|
117
|
+
|
|
118
|
+
建议工作:
|
|
119
|
+
|
|
120
|
+
- 在 router / receiver / session orchestration 中加入 `activeSurface` 判断。
|
|
121
|
+
- 当 owner 为 `official_codex_cli` 时,渠道普通文本必须明确拒绝。
|
|
122
|
+
- `/takeover`、`/new` 的行为要按 spec 收口。
|
|
123
|
+
- 明确 `idle` 与 `closed` 的最低行为。
|
|
124
|
+
|
|
125
|
+
阶段 DoD:
|
|
126
|
+
|
|
127
|
+
- owner 为 `official_codex_cli` 时,渠道普通文本不会静默推进 turn。
|
|
128
|
+
- `/takeover` 不会偷偷 `/new`。
|
|
129
|
+
- `/new` 一定创建新的 `work_session`。
|
|
130
|
+
- 拒绝路径已有 integration tests。
|
|
131
|
+
|
|
132
|
+
### 阶段 3:打通 `work-ally -> Codex CLI`
|
|
133
|
+
|
|
134
|
+
目标:
|
|
135
|
+
|
|
136
|
+
- 让用户从渠道侧能精确切回官方 Codex。
|
|
137
|
+
|
|
138
|
+
建议工作:
|
|
139
|
+
|
|
140
|
+
- 新增 `/codex` 命令语义。
|
|
141
|
+
- 新增 `./ally.sh handoff codex <assistant>` 命令面。
|
|
142
|
+
- 输出稳定、可测试、可复用的 handoff payload / command。
|
|
143
|
+
- 如果 `cliResumeRef` 不可用,返回 `not_ready` 与明确原因。
|
|
144
|
+
|
|
145
|
+
阶段 DoD:
|
|
146
|
+
|
|
147
|
+
- `/codex` 与 shell handoff 命令都能在 ready 状态下返回精确可执行接续方式。
|
|
148
|
+
- `not_ready` 时不会拿 `runtimeThreadId` 假冒 CLI 恢复句柄。
|
|
149
|
+
- shell tests 与至少一条真实 smoke 成立。
|
|
150
|
+
|
|
151
|
+
### 阶段 4:打通 `Codex CLI -> work-ally` 已链接接回
|
|
152
|
+
|
|
153
|
+
目标:
|
|
154
|
+
|
|
155
|
+
- 让原本已被 `work-ally` 管理的线程,能从官方 CLI 接回渠道侧。
|
|
156
|
+
|
|
157
|
+
建议工作:
|
|
158
|
+
|
|
159
|
+
- 新增 `/takeover` 正式语义。
|
|
160
|
+
- 基于 `runtimeThreadId` / `work_session` 恢复同一条 runtime thread。
|
|
161
|
+
- 正确更新 `activeSurface` 与 `ownershipSource`。
|
|
162
|
+
|
|
163
|
+
阶段 DoD:
|
|
164
|
+
|
|
165
|
+
- 从 linked `work_session` 切到 CLI 后,再 `/takeover`,不会新建 thread。
|
|
166
|
+
- `/takeover` 成功后,后续普通文本进入同一条 runtime thread。
|
|
167
|
+
- 集成测试覆盖主路径。
|
|
168
|
+
|
|
169
|
+
### 阶段 5:实现 unmanaged CLI thread attach
|
|
170
|
+
|
|
171
|
+
目标:
|
|
172
|
+
|
|
173
|
+
- 让先在官方 CLI 里开工的线程,也能被纳管后切回渠道侧。
|
|
174
|
+
|
|
175
|
+
建议工作:
|
|
176
|
+
|
|
177
|
+
- 实现 `./ally.sh handoff attach <assistant>`。
|
|
178
|
+
- 支持 `--last`、`--thread`、`--resume-ref`。
|
|
179
|
+
- 限定在 assistant 对应 `CODEX_HOME` 中发现候选。
|
|
180
|
+
- 做 workspace 精确匹配与歧义拒绝。
|
|
181
|
+
|
|
182
|
+
阶段 DoD:
|
|
183
|
+
|
|
184
|
+
- 候选唯一时 attach 可成功创建正式 `work_session`。
|
|
185
|
+
- 候选不唯一时稳定失败,不猜。
|
|
186
|
+
- attach 后可通过 `/takeover` 接回渠道侧。
|
|
187
|
+
|
|
188
|
+
### 阶段 6:回归、文档与交付收口
|
|
189
|
+
|
|
190
|
+
目标:
|
|
191
|
+
|
|
192
|
+
- 把实现从“能跑”收成“可交付”。
|
|
193
|
+
|
|
194
|
+
建议工作:
|
|
195
|
+
|
|
196
|
+
- 回写 README / 必要文档。
|
|
197
|
+
- 补齐 shell、unit、integration、真实 smoke。
|
|
198
|
+
- 清理临时调试逻辑与无效旧语义。
|
|
199
|
+
|
|
200
|
+
阶段 DoD:
|
|
201
|
+
|
|
202
|
+
- 文档与 shipped 行为一致。
|
|
203
|
+
- 相关自动化测试通过。
|
|
204
|
+
- `TASK.md` 已回填完整验证结果与缺口。
|
|
205
|
+
|
|
206
|
+
## 6. 明确禁止的实现偏航
|
|
207
|
+
|
|
208
|
+
实现过程中,以下做法一律视为偏航:
|
|
209
|
+
|
|
210
|
+
1. 用“复制摘要 + 新开 thread”伪装 handoff 完成。
|
|
211
|
+
2. 把 `conversationRef` 继续当成 handoff 主键。
|
|
212
|
+
3. 把 `runtimeThreadId` 与 `cliResumeRef` 写进同一字段或默认互相替代。
|
|
213
|
+
4. 当 owner 为 `official_codex_cli` 时,仍让渠道普通文本继续写入。
|
|
214
|
+
5. `attach --last` 命中多个候选时按最近修改时间自动猜。
|
|
215
|
+
6. 顺手把 scope 扩成 transcript 全量镜像。
|
|
216
|
+
7. 不更新 `TASK.md`,只在聊天里口头汇报进度。
|
|
217
|
+
|
|
218
|
+
## 7. 测试与验证基线
|
|
219
|
+
|
|
220
|
+
接手实现后,至少要补齐或运行这些验证:
|
|
221
|
+
|
|
222
|
+
- `tests/unit/session/` 下与 `work_session`、ownership 相关的单测
|
|
223
|
+
- `tests/integration/session/` 下 handoff / takeover / reject path 相关集成测试
|
|
224
|
+
- `tests/shell/` 下 `ally.sh handoff ...` 语义测试
|
|
225
|
+
- 必要的 `tests/shell/codex-runtime.sh` 或等价真实 smoke
|
|
226
|
+
- `bash -n ally.sh`
|
|
227
|
+
- 相关 shell 模块语法检查
|
|
228
|
+
- `./ally.sh help`
|
|
229
|
+
|
|
230
|
+
若因环境限制无法完整执行,必须在 `TASK.md` 与最终交付说明中明确写出缺口。
|
|
231
|
+
|
|
232
|
+
## 8. 恢复施工说明
|
|
233
|
+
|
|
234
|
+
如果对话被压缩或换人接手,恢复顺序固定如下:
|
|
235
|
+
|
|
236
|
+
1. 先读 `AGENTS.md` 与 `docs/planning/SPEC-codex-same-machine-session-handoff.md`。
|
|
237
|
+
2. 再读本文件,确认阶段、边界和禁止事项。
|
|
238
|
+
3. 然后查看工程根目录 `TASK.md`,确认当前做到哪一步、剩余 DoD 和验证缺口。
|
|
239
|
+
4. 只有当 spec 边界仍成立时才继续写代码;若边界变了,先回写 spec。
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
# Test Coverage Map
|
|
2
|
+
|
|
3
|
+
更新时间:2026-03-17
|
|
4
|
+
状态:Active
|
|
5
|
+
|
|
6
|
+
## 1. 目的
|
|
7
|
+
|
|
8
|
+
这份文档不是“测试命令清单”,而是 `work-ally` 的测试地图。
|
|
9
|
+
|
|
10
|
+
它回答 4 个问题:
|
|
11
|
+
|
|
12
|
+
1. 哪些链路可以被稳定模拟
|
|
13
|
+
2. 哪些边界暂时不适合做全自动端到端模拟
|
|
14
|
+
3. 当前自动化门禁按什么 MECE 结构组织
|
|
15
|
+
4. 新需求落地时,测试应该补到哪一层、哪个域,而不是继续拍脑袋往某个大文件里堆 case
|
|
16
|
+
|
|
17
|
+
## 2. 测试边界
|
|
18
|
+
|
|
19
|
+
### 2.1 可以稳定模拟的链路
|
|
20
|
+
|
|
21
|
+
这些是当前产品最应该建立自动化门禁的主战场:
|
|
22
|
+
|
|
23
|
+
1. CLI / shell facade -> `internal/` 生命周期与状态管理
|
|
24
|
+
2. bridge session state machine
|
|
25
|
+
3. bridge <-> fake runtime / Codex runtime client contract
|
|
26
|
+
4. channel adapter 的格式化、去重、收发规范化
|
|
27
|
+
5. approval / user-input / stop / recovery / stale suppression 等会话语义
|
|
28
|
+
6. archive / memory / routine / scheduler 的文件系统合同
|
|
29
|
+
7. 多 assistant 绑定、全局入口、多实例状态感知
|
|
30
|
+
|
|
31
|
+
### 2.2 暂时不做全自动端到端模拟的边界
|
|
32
|
+
|
|
33
|
+
目前不把下面这层当成自动化主门禁:
|
|
34
|
+
|
|
35
|
+
1. 真实 Feishu 云侧投递到本机 bridge 的公网/长连接链路
|
|
36
|
+
2. 真实手机端 Feishu 交互体验
|
|
37
|
+
3. 真实官方 Codex runtime 在线稳定性本身
|
|
38
|
+
|
|
39
|
+
原因不是它们不重要,而是:
|
|
40
|
+
|
|
41
|
+
1. 这几层更依赖外部平台与宿主环境
|
|
42
|
+
2. 它们更适合 smoke probe、人工验收、真实值班排障来兜底
|
|
43
|
+
3. `work-ally` 当前更该先把“自己可控的桥接层语义”做成确定性系统
|
|
44
|
+
|
|
45
|
+
因此当前策略是:
|
|
46
|
+
|
|
47
|
+
1. Feishu -> bridge 的真实接入,用人工验收与运行日志兜底
|
|
48
|
+
2. bridge -> runtime 的主链路,用 fake runtime + runtime client tests 做高密度自动化
|
|
49
|
+
3. shell / lifecycle / binding / release,用 shell smoke + temp workspace 做自动化门禁
|
|
50
|
+
|
|
51
|
+
## 3. 测试金字塔
|
|
52
|
+
|
|
53
|
+
### 3.1 Unit
|
|
54
|
+
|
|
55
|
+
目标:验证单模块合同、状态归一化、格式化与持久化规则。
|
|
56
|
+
|
|
57
|
+
典型特征:
|
|
58
|
+
|
|
59
|
+
1. 不拉整条桥接链路
|
|
60
|
+
2. 聚焦单个模块输入输出
|
|
61
|
+
3. 用最小 fixture 验证边界分支
|
|
62
|
+
|
|
63
|
+
### 3.2 Integration
|
|
64
|
+
|
|
65
|
+
目标:验证 bridge 主链路、状态机、fake runtime 往返、session 演进与异常收口。
|
|
66
|
+
|
|
67
|
+
典型特征:
|
|
68
|
+
|
|
69
|
+
1. fake inbound -> receiver -> fake runtime -> channel outbound
|
|
70
|
+
2. 会跨 `receiver` / `session-store` / `thread-sync` / `translator` / runtime client 语义
|
|
71
|
+
3. 用真实文件落盘验证 ledger / archive / routine 合同
|
|
72
|
+
|
|
73
|
+
### 3.3 Shell
|
|
74
|
+
|
|
75
|
+
目标:验证用户入口、assistant desk 生命周期、global 命令、多 assistant 绑定、install-first 边界。
|
|
76
|
+
|
|
77
|
+
典型特征:
|
|
78
|
+
|
|
79
|
+
1. 直接走 `ally.sh`
|
|
80
|
+
2. 用临时 HOME / workspace 验证真实 shell 行为
|
|
81
|
+
3. 补 CLI 与运行边界,而不是补 bridge 细语义
|
|
82
|
+
|
|
83
|
+
### 3.4 人工验收
|
|
84
|
+
|
|
85
|
+
目标:兜住外部平台、真实 Feishu 体验、真实本机 runtime 与移动端体感。
|
|
86
|
+
|
|
87
|
+
当前入口:
|
|
88
|
+
|
|
89
|
+
1. `docs/manual-acceptance.md`
|
|
90
|
+
2. `docs/troubleshooting.md`
|
|
91
|
+
3. `docs/ops-runbook.md`
|
|
92
|
+
|
|
93
|
+
## 4. MECE 测试域
|
|
94
|
+
|
|
95
|
+
当前把自动化测试收为 7 个互斥但合起来覆盖主线的域。
|
|
96
|
+
|
|
97
|
+
| 域 | 关注点 | 自动化层级 | 当前目录 |
|
|
98
|
+
| --- | --- | --- | --- |
|
|
99
|
+
| A. Shell / Lifecycle / Release | `ally.sh`、启动停止、global、release、锁、恢复、MCP shell 行为 | shell | `tests/shell/` |
|
|
100
|
+
| B. Channel Contract | Feishu 规范化、格式化、adapter 收发、reply context、群聊触发 | unit + integration | `tests/unit/channel/`、`tests/integration/channel/` |
|
|
101
|
+
| C. Runtime Contract | runtime client、terminal-state reconciliation、message phases、stdio transport lifecycle、runtime user input | unit | `tests/unit/runtime/` |
|
|
102
|
+
| D. Session Control | `/status`、`/stop`、`/new`、continuity、approval、user input、empty inbound | integration + unit | `tests/unit/session/`、`tests/integration/session/` |
|
|
103
|
+
| E. Presence / Recovery / Delivery | presence、协议路由、waiting user、runtime failure、recovery、redelivery、stale suppression、稳定性回归 | integration + unit(runtime) | `tests/integration/session/`、`tests/unit/runtime/` |
|
|
104
|
+
| F. Memory / Thread Materials / Routine | thread snapshots、digest、scheduler、routine delivery / reuse | unit + integration | `tests/unit/memory/`、`tests/integration/routines/` |
|
|
105
|
+
| G. System / Config | config、logger、system-notify、assistant status、runtime state 事实 | unit | `tests/unit/system/` |
|
|
106
|
+
|
|
107
|
+
说明:
|
|
108
|
+
|
|
109
|
+
1. `Session Control` 关注“用户命令和会话控制语义”
|
|
110
|
+
2. `Presence / Recovery / Delivery` 关注“运行中状态、异常、恢复、补偿送达与稳定性”
|
|
111
|
+
3. 它们相关但不混写,避免再次长成一个巨型杂糅文件
|
|
112
|
+
|
|
113
|
+
## 5. 目录与文件映射
|
|
114
|
+
|
|
115
|
+
### 5.1 Unit
|
|
116
|
+
|
|
117
|
+
#### B. Channel Contract
|
|
118
|
+
|
|
119
|
+
- `tests/unit/channel/formatter.test.mjs`
|
|
120
|
+
- `tests/unit/channel/feishu-normalize.test.mjs`
|
|
121
|
+
- `tests/unit/channel/feishu-adapter-inbound.test.mjs`
|
|
122
|
+
- `tests/unit/channel/feishu-adapter-outbound.test.mjs`
|
|
123
|
+
- `tests/unit/channel/feishu-adapter-delivery.test.mjs`
|
|
124
|
+
|
|
125
|
+
#### C. Runtime Contract
|
|
126
|
+
|
|
127
|
+
- `tests/unit/runtime/runtime-client-thread-status.test.mjs`
|
|
128
|
+
- `tests/unit/runtime/runtime-client-message-phases.test.mjs`
|
|
129
|
+
- `tests/unit/runtime/runtime-client-pull-primary-recovery.test.mjs`
|
|
130
|
+
- `tests/unit/runtime/runtime-client-pull-primary-waiting.test.mjs`
|
|
131
|
+
- `tests/unit/runtime/runtime-client-pull-primary.test.mjs`
|
|
132
|
+
- `tests/unit/runtime/runtime-client-lifecycle.test.mjs`
|
|
133
|
+
- `tests/unit/runtime/runtime-user-input.test.mjs`
|
|
134
|
+
|
|
135
|
+
#### D. Session Control
|
|
136
|
+
|
|
137
|
+
- `tests/unit/session/router.test.mjs`
|
|
138
|
+
- `tests/unit/session/session-store.test.mjs`
|
|
139
|
+
|
|
140
|
+
#### F. Memory / Thread Materials / Routine
|
|
141
|
+
|
|
142
|
+
- `tests/unit/memory/memory-digest.test.mjs`
|
|
143
|
+
- `tests/unit/memory/scheduler.test.mjs`
|
|
144
|
+
|
|
145
|
+
#### G. System / Config
|
|
146
|
+
|
|
147
|
+
- `tests/unit/system/config.test.mjs`
|
|
148
|
+
- `tests/unit/system/logger.test.mjs`
|
|
149
|
+
- `tests/unit/system/system-notify.test.mjs`
|
|
150
|
+
- `tests/unit/system/assistant-status.test.mjs`
|
|
151
|
+
|
|
152
|
+
### 5.2 Integration
|
|
153
|
+
|
|
154
|
+
#### B. Channel Contract
|
|
155
|
+
|
|
156
|
+
- `tests/integration/channel/feishu-reply-context.test.mjs`
|
|
157
|
+
- `tests/integration/channel/group-chat-sender-identity.test.mjs`
|
|
158
|
+
|
|
159
|
+
#### D. Session Control
|
|
160
|
+
|
|
161
|
+
- `tests/integration/session/approval-flow.test.mjs`
|
|
162
|
+
- `tests/integration/session/mcp-tool-approval-flow.test.mjs`
|
|
163
|
+
- `tests/integration/session/control-commands.test.mjs`
|
|
164
|
+
- `tests/integration/session/continuity-flow.test.mjs`
|
|
165
|
+
- `tests/integration/session/stop-flow.test.mjs`
|
|
166
|
+
- `tests/integration/session/user-input-flow.test.mjs`
|
|
167
|
+
- `tests/integration/session/empty-inbound-fallback.test.mjs`
|
|
168
|
+
- `tests/integration/session/fake-bridge.test.mjs`
|
|
169
|
+
- `tests/integration/session/blackbox-archive.test.mjs`(验证 final reply 后 thread-sync 快照写入)
|
|
170
|
+
|
|
171
|
+
#### E. Presence / Recovery / Delivery
|
|
172
|
+
|
|
173
|
+
- `tests/integration/session/presence-startup.test.mjs`
|
|
174
|
+
- `tests/integration/session/protocol-routing.test.mjs`
|
|
175
|
+
- `tests/integration/session/waiting-and-redelivery.test.mjs`
|
|
176
|
+
- `tests/integration/session/runtime-failure-and-recovery.test.mjs`
|
|
177
|
+
- `tests/integration/session/stale-output-and-new-turns.test.mjs`
|
|
178
|
+
- `tests/integration/session/stability-regression.test.mjs`
|
|
179
|
+
|
|
180
|
+
#### F. Memory / Thread Materials / Routine
|
|
181
|
+
|
|
182
|
+
- `tests/integration/routines/routine-flow.test.mjs`
|
|
183
|
+
- `tests/integration/routines/routine-reuse.test.mjs`
|
|
184
|
+
- `tests/integration/routines/routine-delivery.test.mjs`
|
|
185
|
+
- `tests/integration/routines/memory-pipeline.test.mjs`
|
|
186
|
+
|
|
187
|
+
### 5.3 Shell
|
|
188
|
+
|
|
189
|
+
#### A. Shell / Lifecycle / Release
|
|
190
|
+
|
|
191
|
+
- `tests/shell/check-syntax.sh`
|
|
192
|
+
- `tests/shell/smoke.sh`
|
|
193
|
+
- `tests/shell/assistant.sh`
|
|
194
|
+
- `tests/shell/assistant-remove.sh`
|
|
195
|
+
- `tests/shell/assistant-lock.sh`
|
|
196
|
+
- `tests/shell/global-entrypoint.sh`
|
|
197
|
+
- `tests/shell/global-manage.sh`
|
|
198
|
+
- `tests/shell/lifecycle.sh`
|
|
199
|
+
- `tests/shell/recovery.sh`
|
|
200
|
+
- `tests/shell/service-mode.sh`
|
|
201
|
+
- `tests/shell/status-health.sh`
|
|
202
|
+
- `tests/shell/startup-delivery-gate.sh`
|
|
203
|
+
- `tests/shell/bridge-health-fallback.sh`
|
|
204
|
+
- `tests/shell/channel-lock.sh`
|
|
205
|
+
- `tests/shell/security.sh`
|
|
206
|
+
- `tests/shell/ops.sh`
|
|
207
|
+
- `tests/shell/mcp.sh`
|
|
208
|
+
- `tests/shell/routines.sh`
|
|
209
|
+
- `tests/shell/codex-runtime.sh`
|
|
210
|
+
- `tests/shell/supervised-start-boundary.sh`
|
|
211
|
+
|
|
212
|
+
## 6. 当前专项稳定性门禁
|
|
213
|
+
|
|
214
|
+
针对这轮用户最痛的“bridge -> Codex 稳定性 / 会话状态误导 / 结果补偿送达”问题,最低门禁不是单个文件,而是下面这组:
|
|
215
|
+
|
|
216
|
+
### 6.1 Runtime 终态与 pull-primary
|
|
217
|
+
|
|
218
|
+
- `tests/unit/runtime/runtime-client-pull-primary-recovery.test.mjs`
|
|
219
|
+
- `tests/unit/runtime/runtime-client-pull-primary-waiting.test.mjs`
|
|
220
|
+
- `tests/unit/runtime/runtime-client-pull-primary.test.mjs`
|
|
221
|
+
- `tests/unit/runtime/runtime-client-lifecycle.test.mjs`
|
|
222
|
+
|
|
223
|
+
覆盖:
|
|
224
|
+
|
|
225
|
+
1. `runtime-client-pull-primary-recovery.test.mjs`:`thread/read(includeTurns=true)` 收口、late terminal reclaim、恢复窗口内对账
|
|
226
|
+
2. `runtime-client-pull-primary-waiting.test.mjs`:waitingOnApproval / waitingOnUserInput / command activity 持续时不误超时,并能通过 poll 主动上报 blocked 状态
|
|
227
|
+
3. `runtime-client-pull-primary.test.mjs`:transient `thread/read` 失败、bounded retry、fresh-thread materialization、`turn/completed` 与轮询冲突时的终态优先级
|
|
228
|
+
4. `runtime-client-lifecycle.test.mjs`:stdio child-process 异常关闭后的对账、重连 lifecycle 事件
|
|
229
|
+
|
|
230
|
+
### 6.2 Bridge 会话状态机
|
|
231
|
+
|
|
232
|
+
- `tests/integration/session/presence-startup.test.mjs`
|
|
233
|
+
- `tests/integration/session/protocol-routing.test.mjs`
|
|
234
|
+
- `tests/integration/session/waiting-and-redelivery.test.mjs`
|
|
235
|
+
- `tests/integration/session/runtime-failure-and-recovery.test.mjs`
|
|
236
|
+
- `tests/integration/session/stale-output-and-new-turns.test.mjs`
|
|
237
|
+
- `tests/integration/session/stability-regression.test.mjs`
|
|
238
|
+
|
|
239
|
+
覆盖:
|
|
240
|
+
|
|
241
|
+
1. quiet start / received status / commentary filtering
|
|
242
|
+
2. `turn/steer` 协议路由、`/new` 忙时门控 / stale active turn 清理
|
|
243
|
+
3. waiting_user 语义、long wait 不误报、blocked follow-up 拦截与解释、延迟 approval / user-input 仍能稳定暴露
|
|
244
|
+
4. runtime infrastructure failure、delivery unavailable、recovery success/failure
|
|
245
|
+
5. final reply 的 source-to-delivery 闭环:未送达结果会落账,并在 bridge 恢复后可补发
|
|
246
|
+
6. stale output suppression、旧 turn 不串回用户面前
|
|
247
|
+
7. 非 completed 但已有 reply 的终态仍按结果交付,不再被本地文案覆盖
|
|
248
|
+
8. 100 轮 bridge <-> runtime ping-pong 稳定往返
|
|
249
|
+
9. bridge / runtime 重启后,若 session 仍记得旧 threadId 但 runtime 已丢 rollout,下一条普通消息仍必须自动 fallback 到 fresh thread,而不是只在 `/codex`、`/new` 或 process-start 检查里显得正常
|
|
250
|
+
|
|
251
|
+
### 6.3 Shell 运行边界
|
|
252
|
+
|
|
253
|
+
- `tests/shell/assistant.sh`
|
|
254
|
+
- `tests/shell/global-entrypoint.sh`
|
|
255
|
+
- `tests/shell/global-manage.sh`
|
|
256
|
+
- `tests/shell/recovery.sh`
|
|
257
|
+
- `tests/shell/status-health.sh`
|
|
258
|
+
|
|
259
|
+
覆盖:
|
|
260
|
+
|
|
261
|
+
1. 多 assistant 绑定同一项目
|
|
262
|
+
2. 隐式命令歧义时必须要求 `--assistant`
|
|
263
|
+
3. install-first / global 管理 / 生命周期边界
|
|
264
|
+
4. status / recovery / global stop 基础运维路径
|
|
265
|
+
|
|
266
|
+
## 7. 新需求该怎么补测试
|
|
267
|
+
|
|
268
|
+
### 7.1 先判域,再判层
|
|
269
|
+
|
|
270
|
+
每次改动先回答两个问题:
|
|
271
|
+
|
|
272
|
+
1. 它属于哪个域
|
|
273
|
+
2. 它应该落在哪一层最先被验证
|
|
274
|
+
|
|
275
|
+
默认规则:
|
|
276
|
+
|
|
277
|
+
1. 纯格式、纯归一化、纯持久化合同:先 unit
|
|
278
|
+
2. 会话语义、bridge 状态机、异常恢复:先 integration
|
|
279
|
+
3. CLI 语义、workspace / assistant 绑定、生命周期:先 shell
|
|
280
|
+
4. 外部平台真实体验差异:落人工验收,不假装用伪 E2E 替代
|
|
281
|
+
|
|
282
|
+
补充纪律:
|
|
283
|
+
|
|
284
|
+
1. runtime 域新增用例时,先判它属于 `recovery`、`waiting` 还是 `delivery/final-state arbitration`
|
|
285
|
+
2. `tests/unit/runtime/runtime-client-pull-primary*.test.mjs` 三个文件各守一类语义,不再回到单文件巨型杂糅
|
|
286
|
+
3. 只要改动触及 `resume` / `restart` / continuity / recovery,至少补一条“重启后再发普通消息”的集成回归;不能只用 `/codex`、`/new`、`process_start` 或 fake happy-path 代替
|
|
287
|
+
4. runtime fallback 类用例必须覆盖真实错误形态:既要测裸 RPC 错误对象,也要测经过 `normalizeRuntimeError()` 之后的 `Error` 实例
|
|
288
|
+
|
|
289
|
+
### 7.2 不再新增“杂糅大文件”
|
|
290
|
+
|
|
291
|
+
新增 case 时遵守:
|
|
292
|
+
|
|
293
|
+
1. 优先放进已有测试域目录
|
|
294
|
+
2. 优先放到最贴近语义的文件
|
|
295
|
+
3. 某文件继续明显变胖时,继续按场景切小文件,而不是把不相关 case 堆一起
|
|
296
|
+
|
|
297
|
+
### 7.3 变更对照表
|
|
298
|
+
|
|
299
|
+
| 变更类型 | 最低要求 |
|
|
300
|
+
| --- | --- |
|
|
301
|
+
| Feishu 格式 / reply context / 群聊触发 | `tests/unit/channel/*.test.mjs` + `tests/integration/channel/*.test.mjs` |
|
|
302
|
+
| runtime client / disconnect / pull-primary | `tests/unit/runtime/*.test.mjs` |
|
|
303
|
+
| session 语义 / approval / user-input / protocol routing / stale suppression | `tests/integration/session/*.test.mjs` + 必要的 `tests/unit/session/*.test.mjs` |
|
|
304
|
+
| archive / digest / scheduler / routine | `tests/unit/memory/*.test.mjs` + `tests/integration/routines/*.test.mjs` |
|
|
305
|
+
| status / config / system notice | `tests/unit/system/*.test.mjs` |
|
|
306
|
+
| CLI / assistant binding / lifecycle / release | 对应 `tests/shell/*.sh` |
|
|
307
|
+
|
|
308
|
+
## 8. 测试命令
|
|
309
|
+
|
|
310
|
+
### 8.1 全量自动化
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
npm test
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### 8.2 仅 bridge 自动化
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
npm run test:bridge
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### 8.3 仅 shell
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
npm run test:shell
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### 8.4 快速回归
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
npm run test:fast
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### 8.5 渠道专项
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
node --test tests/unit/channel/*.test.mjs tests/integration/channel/*.test.mjs
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### 8.6 稳定性专项
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
node --test \
|
|
344
|
+
tests/unit/runtime/*.test.mjs \
|
|
345
|
+
tests/unit/session/*.test.mjs \
|
|
346
|
+
tests/integration/session/*.test.mjs
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
## 9. 已知缺口
|
|
350
|
+
|
|
351
|
+
当前仍保留这些清醒边界:
|
|
352
|
+
|
|
353
|
+
1. 没有自动化模拟真实 Feishu 云侧投递
|
|
354
|
+
2. 没有自动化证明真实官方 Codex runtime 在所有宿主环境下都稳定
|
|
355
|
+
3. 没有大规模压测;当前稳定性回归采用 100 轮顺序 ping-pong 作为“合理强度门禁”,避免无意义地烧 token 和时间
|
|
356
|
+
4. `tests/integration/session/` 下仍有一些 fixture 构造重复,后续若该域继续膨胀,可再抽 shared harness;但当前优先级低于保持测试语义清晰
|
|
357
|
+
5. `tests/integration/session/runtime-failure-and-recovery.test.mjs` 与 `tests/integration/session/waiting-and-redelivery.test.mjs` 仍偏大;后续新增 case 时应优先继续拆子文件,而不是继续长胖
|
|
358
|
+
|
|
359
|
+
## 10. 维护纪律
|
|
360
|
+
|
|
361
|
+
1. 先改测试地图,再扩测试域;不要让目录结构再次失真
|
|
362
|
+
2. 需求若跨多个测试域,提交说明里要明确哪些域被改动、哪些域被验证
|
|
363
|
+
3. 任何新的稳定性事故,先在这份地图里补“归类位置”,再决定新增哪类用例
|