@zq-silk/yui 0.16.1 → 1.0.0-alpha

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.
Files changed (193) hide show
  1. package/ARCHITECTURE.md +12 -0
  2. package/ARCHITECTURE.zh-CN.md +8 -0
  3. package/README.md +9 -4
  4. package/dist/agent/agent.js +4 -9
  5. package/dist/agent/executionComponents.js +4 -4
  6. package/dist/agent/managedRuntimeEnvironment.js +0 -4
  7. package/dist/agentRun/agentRun.js +13 -23
  8. package/dist/artifacts/managedGit.js +3 -56
  9. package/dist/brief/taskBrief.js +3 -3
  10. package/dist/cli/agentConfigurationPicker.js +24 -21
  11. package/dist/cli/commandCatalog.js +18 -10
  12. package/dist/cli/roleWizard.js +41 -30
  13. package/dist/cli/updateCommand.js +35 -13
  14. package/dist/cli/updateOrchestrator.js +73 -44
  15. package/dist/cli/updatePorts.js +76 -86
  16. package/dist/cli/upgradeCommand.js +4 -8
  17. package/dist/cli.js +39 -33
  18. package/dist/commands/controllerCommands.js +2 -2
  19. package/dist/commands/executionAuditCommands.js +2 -2
  20. package/dist/commands/projectCommands.js +1 -1
  21. package/dist/commands/releaseCommands.js +9 -38
  22. package/dist/commands/taskCommands.js +91 -81
  23. package/dist/commands/taskCompletionGate.js +0 -117
  24. package/dist/commands/taskRoleRuntimeStatus.js +2 -2
  25. package/dist/commands/taskUpstreamCommands.js +93 -54
  26. package/dist/context/runContextPack.js +30 -54
  27. package/dist/context/runInputContract.js +9 -0
  28. package/dist/context/sessionBootstrapManifest.js +11 -19
  29. package/dist/controller/agentHostObservation.js +4 -2
  30. package/dist/controller/agentRuntimeObserver.js +4 -4
  31. package/dist/controller/clientRuntime.js +19 -44
  32. package/dist/controller/controller.js +24 -10
  33. package/dist/controller/fileSchedulerStoreAdapter.js +91 -24
  34. package/dist/controller/globalInputDelivery.js +31 -8
  35. package/dist/controller/globalRuntimeAttention.js +34 -0
  36. package/dist/controller/jobSupervisor.js +3 -3
  37. package/dist/controller/operatorNotification.js +31 -0
  38. package/dist/controller/providerRetryAdmission.js +3 -1
  39. package/dist/controller/providerRetryDelivery.js +136 -119
  40. package/dist/controller/runtime.js +2 -28
  41. package/dist/controller/sessionOwnerReconciliation.js +42 -24
  42. package/dist/controller/structuredProviderObservation.js +28 -1
  43. package/dist/controller/updateReconciliation.js +72 -20
  44. package/dist/coordination/workMailbox.js +4 -4
  45. package/dist/core/controllerIdentity.js +25 -0
  46. package/dist/core/controllerProcessIdentity.js +2 -2
  47. package/dist/core/controllerServer.js +4 -2
  48. package/dist/core/protocol.js +1 -1
  49. package/dist/doctor/doctor.js +2 -1
  50. package/dist/domain/validation.js +6 -0
  51. package/dist/event/taskEvent.js +3 -3
  52. package/dist/execution/workItemExecution.js +2 -2
  53. package/dist/executor/agentAdapter.js +28 -96
  54. package/dist/executor/agentConfigurationCatalog.js +13 -68
  55. package/dist/executor/agentConfigurationFields.js +120 -0
  56. package/dist/executor/agentConfigurationProbe.js +55 -80
  57. package/dist/executor/agentExecutor.js +11 -8
  58. package/dist/executor/effectiveLaunch.js +3 -3
  59. package/dist/executor/executorRegistry.js +0 -9
  60. package/dist/executor/fileRoleLaunchPlanner.js +12 -11
  61. package/dist/grant/capabilityGrant.js +2 -2
  62. package/dist/input/inputRequest.js +4 -4
  63. package/dist/integration/changeSet.js +3 -3
  64. package/dist/integration/integrationAttempt.js +3 -3
  65. package/dist/integration/integrationSourceApplication.js +1 -1
  66. package/dist/interaction/operatorPresentation.js +2 -1
  67. package/dist/job/durableJob.js +1 -1
  68. package/dist/job/jobRunner.js +2 -2
  69. package/dist/message/message.js +8 -6
  70. package/dist/message/messageContinuation.js +8 -9
  71. package/dist/milestone/milestone.js +3 -3
  72. package/dist/observability/executionAudit.js +1 -10
  73. package/dist/observability/runtimeIdentity.js +0 -23
  74. package/dist/output/agentConfigurationPresentation.js +4 -2
  75. package/dist/profile/agentProfile.js +3 -3
  76. package/dist/release/releaseHandover.js +2 -2
  77. package/dist/release/releaseIdempotencyStore.js +0 -23
  78. package/dist/release/releaseWorkflowPorts.js +8 -4
  79. package/dist/release/runtimeRelease.js +9 -7
  80. package/dist/repository/gitWorkspace.js +66 -19
  81. package/dist/repository/project.js +3 -3
  82. package/dist/repository/taskWorkspacePreparer.js +75 -68
  83. package/dist/resources/liveReferences.js +1 -1
  84. package/dist/resources/resourceRegistry.js +90 -44
  85. package/dist/resources/sqliteResourceRegistry.js +5 -7
  86. package/dist/review/reviewRound.js +5 -5
  87. package/dist/role/role.js +7 -8
  88. package/dist/runtime/acpProtocol.js +2 -3
  89. package/dist/runtime/acpSession.js +21 -5
  90. package/dist/runtime/agentDriverObservation.js +1 -1
  91. package/dist/runtime/agentEndpoint.js +4 -1
  92. package/dist/runtime/agentHost.js +25 -65
  93. package/dist/runtime/agentHostCleanup.js +85 -0
  94. package/dist/runtime/agentHostProtocol.js +3 -3
  95. package/dist/runtime/builtinAgentDrivers.js +46 -119
  96. package/dist/runtime/builtinTranscriptObserver.js +10 -6
  97. package/dist/runtime/codexAppServerRuntime.js +55 -89
  98. package/dist/runtime/codexInteractiveHost.js +1 -1
  99. package/dist/runtime/jsonLineChannel.js +35 -7
  100. package/dist/runtime/launchBroker.js +1 -1
  101. package/dist/runtime/processExitObservation.js +1 -1
  102. package/dist/runtime/providerContinuationReconciliationService.js +86 -38
  103. package/dist/runtime/providerRetry.js +15 -0
  104. package/dist/runtime/providerRuntimeIdentity.js +3 -3
  105. package/dist/runtime/providerRuntimeReconciler.js +12 -2
  106. package/dist/runtime/runtimeCoherence.js +7 -3
  107. package/dist/runtime/runtimeObservation.js +3 -3
  108. package/dist/runtime/sessionOwnerIdentity.js +1 -1
  109. package/dist/runtime/structuredProviderHost.js +106 -81
  110. package/dist/runtime/taskRuntimeIsolation.js +3 -3
  111. package/dist/runtime/tmuxAdapters.js +3 -3
  112. package/dist/scheduler/activeRoleRunDelivery.js +5 -1
  113. package/dist/scheduler/operatorInputNotificationProcessor.js +7 -17
  114. package/dist/scheduler/taskWake.js +1 -1
  115. package/dist/storage/baselineSchema.js +606 -0
  116. package/dist/storage/homeLayout.js +5 -16
  117. package/dist/storage/recordValidation.js +16 -4
  118. package/dist/storage/sqliteSchema.js +106 -1741
  119. package/dist/storage/sqliteStore.js +16 -14
  120. package/dist/storage/storageSchema.js +8 -7
  121. package/dist/storage/storageVersions.js +23 -16
  122. package/dist/storage/taskStore.js +3 -29
  123. package/dist/storage/upgrade/upgradeOrchestrator.js +14 -112
  124. package/dist/task/nextAction.js +33 -23
  125. package/dist/task/task.js +17 -8
  126. package/dist/task/taskActivation.js +5 -4
  127. package/dist/telemetry/sqliteTelemetryStore.js +2 -2
  128. package/dist/verification/gateArtifact.js +5 -3
  129. package/dist/verification/verificationPlan.js +6 -7
  130. package/dist/web/assets/assetManifest.js +2 -0
  131. package/dist/web/assets/client/app.js +72 -3
  132. package/dist/web/assets/client/components.js +2 -1
  133. package/dist/web/assets/client/i18n.js +2 -0
  134. package/dist/web/assets/client/taskSummary.js +345 -0
  135. package/dist/web/assets/client/taskSurface.js +44 -26
  136. package/dist/web/assets/client/view.js +33 -0
  137. package/dist/web/assets/shell.js +1 -0
  138. package/dist/web/assets/styles/cards.js +21 -0
  139. package/dist/web/webServer.js +39 -5
  140. package/dist/web/webSessions.js +165 -0
  141. package/dist/web/webSnapshot.js +23 -0
  142. package/dist/web/webTaskSurface.js +23 -0
  143. package/dist/workItem/workItem.js +6 -6
  144. package/dist/workspace/cleanupInspection.js +1 -9
  145. package/dist/worktree/managedWorkspace.js +3 -3
  146. package/docs/managed-turn-and-session-runtime.md +50 -7
  147. package/docs/managed-turn-and-session-runtime.zh-CN.md +36 -5
  148. package/docs/observability/README.md +47 -0
  149. package/docs/observability/README.zh-CN.md +37 -0
  150. package/docs/project-refresh.md +9 -0
  151. package/docs/project-refresh.zh-CN.md +8 -0
  152. package/docs/provider-retry.md +35 -0
  153. package/docs/release-workflow.md +70 -214
  154. package/docs/release-workflow.zh-CN.md +53 -157
  155. package/docs/roles-and-configuration.md +30 -0
  156. package/docs/roles-and-configuration.zh-CN.md +20 -0
  157. package/docs/sqlite-control-plane-design.md +48 -289
  158. package/docs/sqlite-control-plane-design.zh-CN.md +37 -53
  159. package/docs/storage-baseline.md +132 -0
  160. package/docs/storage-baseline.zh-CN.md +106 -0
  161. package/docs/task-delivery.md +110 -2
  162. package/docs/task-delivery.zh-CN.md +82 -2
  163. package/docs/task-discovery.md +9 -0
  164. package/docs/task-discovery.zh-CN.md +6 -0
  165. package/docs/testing/verification-levels.md +42 -164
  166. package/docs/testing/verification-levels.zh-CN.md +29 -115
  167. package/i18n/README.zh-CN.md +7 -4
  168. package/package.json +1 -1
  169. package/skills/yui-leader/SKILL.md +11 -0
  170. package/skills/yui-leader/references/execution.md +22 -0
  171. package/skills/yui-leader/references/planning.md +6 -2
  172. package/skills/yui-operator/SKILL.md +45 -13
  173. package/skills/yui-operator/references/task-delivery.md +99 -0
  174. package/skills/yui-runtime/SKILL.md +5 -3
  175. package/skills/yui-runtime/references/publication.md +56 -5
  176. package/skills/yui-runtime/references/recovery.md +12 -2
  177. package/dist/runtime/agentHostCompatibility.js +0 -127
  178. package/dist/storage/migrations/agentFailureContext.js +0 -22
  179. package/dist/storage/migrations/agentRunContract.js +0 -159
  180. package/dist/storage/migrations/artifactsToGit.js +0 -338
  181. package/dist/storage/migrations/collapseWorktreeLayout.js +0 -963
  182. package/dist/storage/migrations/currentInputContract.js +0 -86
  183. package/dist/storage/migrations/currentRuntimeContract.js +0 -228
  184. package/dist/storage/migrations/historicalVerificationPlan.js +0 -35
  185. package/dist/storage/migrations/integrationContinuation.js +0 -105
  186. package/dist/storage/migrations/narrowAgentFailureContext.js +0 -65
  187. package/dist/storage/migrations/notificationOnlyWakes.js +0 -74
  188. package/dist/storage/migrations/removeRuntimeGeneration.js +0 -207
  189. package/dist/storage/migrations/submitIntent.js +0 -126
  190. package/dist/storage/migrations/unifyHomeLayout.js +0 -925
  191. package/dist/storage/migrations/verificationPlanV1.js +0 -162
  192. package/dist/storage/migrations/verificationPolicy.js +0 -74
  193. package/dist/storage/migrations/workItemHistory.js +0 -46
@@ -0,0 +1,106 @@
1
+ # 存储基线 1.0
2
+
3
+ Yui 1.0.0-alpha 是纯净运行基线。软件版本 `1.0.0-alpha`、Home 存储版本 `1.0`、
4
+ 记录格式版本 `1`、Controller 协议版本 `1` 各有职责。后续 `1.0.0` 软件包
5
+ 复用最终已验证的预发布存储契约,不再重置。首个 alpha 发布后如需修改
6
+ 持久化契约,必须声明显式的小版本迁移。
7
+
8
+ ## 当前运行包
9
+
10
+ - `storage_schema` 的单行记录是唯一存储版本权威,包含格式、主版本、小版本、
11
+ Schema 摘要与创建时间。JSON 中版本采用 `"1.0"` 字符串,不用浮点数。
12
+ - 新 Home 一次创建最终 DDL,不执行旧 v1→v37 链。普通读取只校验当前身份、
13
+ 物理结构和类型化记录,不转换数据。
14
+ - 显式 `upgrade/update` 默认也只允许同主版本内连续的小版本升级。
15
+ 首个 `1.0` 尚无小版本升级步骤。跨主版本、降级、未知格式、旧整数版本
16
+ 都会在激活前拒绝;指定软件版本不等于授权跨存储主版本。
17
+ - Yui 自有记录格式从 1 开始。Host 控制采用独立的
18
+ `yui-agent-host-control/v1`,不会误认历史 `yui-agent-host/v1`。
19
+ 原本为 v1 的 Context、Run、Host 事件和 Driver 协议保持 v1。
20
+ 外部 Provider 协议和依赖版本不重置。
21
+ - 业务 revision、授权 epoch、ID、事件序号、原生数据和冻结 Context
22
+ 不是 Schema 版本,不能重置。
23
+ - `storage_migration_archive` 只保留不透明审计证据,不解释旧格式来执行工作。
24
+ 其中的旧版本数字与原始字节保持不变。
25
+ - Candidate 的当前权威只有所属 WorkItem 的候选数组。基线不再创建无用的
26
+ `work_item_candidates`、`coordination_locks` 表或废弃的 `idx_input_open` 索引。
27
+
28
+ 运行 tarball 不包含历史迁移模块,也不包含独立转换器。旧 tag 和发布包用于
29
+ 显式诊断,不构成运行时回退。
30
+
31
+ ## 从 0.16.2 一次性转换
32
+
33
+ 独立 `yui-baseline-cutover` 压缩包只接受精确的 0.16.2 结构和完整 v37 账本。
34
+ 更旧 Home 必须先通过 0.16.2 升级;转换器本身不执行整条旧迁移链。
35
+ 准入依据是精确的存储结构与账本,不是当前安装的软件版本号;
36
+ 已经满足该 v37 契约的 Home 不需要为了改软件编号而重写数据。
37
+
38
+ 本次尚未发布的 v37 → 1.0 转换保留缺少可选 Snapshot 引用的 Run、原始引用和结果。
39
+ 记录可以读取不代表它必须能执行:证据缺失不应阻断整个 Home 转换。
40
+ Leader/Operator 可以查看、废弃异常 Run;显式普通重试根据当前授权事实创建
41
+ 新的 Run 和 Snapshot,不改写旧证据。Review/结果汇总若要复用确切冻结证据,
42
+ 仍需满足该操作的前提。未知格式、结构损坏和未结算外部效果仍是独立的转换阻塞条件。
43
+
44
+ 1. 使用 0.16.2 结算活动 Run、Job、已认领通知、在途重试和未知外部效果。
45
+ 保留排队意图,不伪造完成。停止受管 Session 和 Controller。
46
+ `session stop --all` 会拒绝忙碌 Session,不是强停或丢弃工作的授权。
47
+ 2. 将已发布的 1.0.0-alpha 暂存在独立安装前缀中,安装所需原生依赖。
48
+ 不先覆盖全局 CLI,不让新 Controller 打开旧 Home。
49
+ 3. 核验转换包校验和并解压,调用入口。以下路径均为**占位示例**:
50
+
51
+ ```sh
52
+ node /absolute/converter/cli.mjs \
53
+ --home /absolute/home --runtime /absolute/staged/package
54
+
55
+ node /absolute/converter/cli.mjs \
56
+ --home /absolute/home --runtime /absolute/staged/package \
57
+ --apply --backup-dir /absolute/new-backup-directory
58
+ ```
59
+
60
+ `--runtime` 指包含 `package.json`、`dist/` 和可用依赖的软件包目录,
61
+ 不是 `bin/yui`。默认仅检查。`--apply` 要求 Home 外一个不存在的新备份目录,
62
+ 其父目录必须存在且为规范物理路径。从外部 Operator shell 执行,不在受管
63
+ Task 或正在转换的 Session 内执行。
64
+
65
+ 工具拒绝活动持久执行、待应用 outbox、活动 Session、仍存活的登记进程、
66
+ 可观测到引用此 Home/数据库的进程、待消费的原生 Inbox 文件,以及未完成的
67
+ Controller 交接或发现记录。登记所有者身份不可验证时仍阻塞;不会接管或
68
+ 终止无关用户进程。也应停止非受管写入者及外部工作区编辑器:普通文件复制
69
+ 不是文件系统快照。维护锁和 SQL 写事务保护实际转换。
70
+
71
+ 变更前复制整个 Home,并生成带校验和的独立 SQLite 备份。转换只处理明确的
72
+ Yui 记录封装及活动类型化验证计划,将每个改写前的原始负载和旧账本保存在审计中。
73
+ 用户文本、原生负载、冻结 Context、Git 数据、未提交文件、ID、计数和 Task
74
+ 结果保持原样。
75
+ 删除两张旧表之前,每一行原始内容都写入审计的
76
+ `baseline-v37/retired-table/<table>` 分类,不把其中的负载当作活动记录规范化。
77
+ 回执以 `retiredRows` 单独报告归档行数。
78
+
79
+ 旧 `active-release.json` 和 `runtime-identity.json` 归档到
80
+ `retired-runtime/`,不改写成新运行事实。工具不恢复旧 Host、不改全局安装、
81
+ 不启动 Controller、不提交模型输入。转换成功后,再由暂存的 1.0.0-alpha CLI
82
+ 安装精确版本并启动新运行环境;通过正常显式生命周期创建新 Session,
83
+ 历史记录不代表活动授权。
84
+
85
+ 声明的运行资源目录中的隔离所有者标记也会先验证旧摘要,再转换格式并重算
86
+ 相应指纹,原文件保存在归档中。资源路径、namespace 和端口分配不变。
87
+ 未知标记或符号链接直接阻塞,不猜测接管。
88
+
89
+ ## 证据与恢复
90
+
91
+ 成功结果为 `outcome: converted`、目标 `1.0` 及精确备份路径。
92
+ 对有效新 Home 重复运行返回 `already-current`,不再次备份或改写。
93
+
94
+ - `backup/home/` 保留 Home 树;`backup/yui.db` 是一致的独立数据库快照;
95
+ `receipt.json` 记录来源、目标、摘要及转换结果;`retired-runtime/` 保存旧绑定。
96
+ - 校验失败时回滚 SQL,并恢复本次移动的运行绑定。若恢复无法确认,错误会指出
97
+ 保留文件;Home 应继续保持停止。
98
+ - 崩溃或回执写入失败不证明数据库仍是旧版。先检查实际格式与备份,再选择恢复;
99
+ 没有自动修复 worker 或猜测性重放。
100
+ - 回滚前停止新写入者、另存失败或新 Home,再将旧 Home 树和独立 `yui.db`
101
+ 恢复到**原来的同一路径**,不能混入新 WAL/SHM。只使用 0.16.2;
102
+ 按精确进程身份检查快照中转换器自己的维护锁。
103
+ - 一旦新版产生业务写入,恢复旧备份会丢失这些新写入,必须明确处理,不能自动恢复。
104
+
105
+ 真实 Home 转换和发布需要另外获得用户授权。隔离样本通过不等于生产 Home
106
+ 已经满足转换条件。
@@ -83,7 +83,7 @@ how the Agent ordered them.
83
83
  A configured VerificationPlan reuses only complete, successful, log-verified
84
84
  evidence for the exact Project, commit, plan, toolchain and target/base boundary.
85
85
  A plan with no reusable evidence executes normally. Plans require
86
- `schemaVersion: 2` and contain no `l1` or `record/reuse/enforce` mode.
86
+ `schemaVersion: 1` and contain no `l1` or `record/reuse/enforce` mode.
87
87
  Storage 34→35 preserves the original Project declarations, L1 artifacts and
88
88
  binary logs in migration audit storage, outside current execution and cache
89
89
  lookup. Historical `historical-change-sets` Integrations must be settled and
@@ -109,7 +109,7 @@ Unstructured checks do not search historical Jobs for a substitute result.
109
109
  Fresh execution withdraws the old success before starting. Failure is recorded
110
110
  as failure; interruption, missing logs or a mutated candidate leave no reusable
111
111
  success. Both Job and local execution verify the exact clean candidate before
112
- publishing successful proof. The v5 L2-only execution digest excludes older proof without
112
+ publishing successful proof. The baseline-v1 L2-only execution digest excludes older proof without
113
113
  deleting its history. A stale
114
114
  cache consumer cannot restore an older result. Release lookup considers the
115
115
  newest recorded matching proof rather than searching past a failure for an
@@ -143,6 +143,33 @@ infer that unrecorded WorkItems mean direct execution was requested.
143
143
 
144
144
  ## Completion and remote delivery
145
145
 
146
+ `task complete` is offline by default and never integrates upstream commits or
147
+ changes Git HEAD. `--refresh-remote` only fetches remote objects in Task-owned
148
+ repositories to report freshness; it does not rebase, start Integration checks,
149
+ or update the stable Project checkout. A behind/diverged/unknown remote remains
150
+ an advisory for local completion, not a claim of remote delivery. Refresh failure
151
+ is reported as unknown with its error and never as fresh success. To inspect
152
+ without completing or preparing Review, use `task base status <task> [--refresh]`.
153
+
154
+ Choose any necessary upstream integration explicitly before completion.
155
+ `task upstream integrate <task> (--latest|--project <project>)` requests a fixed
156
+ rebase/check/CAS sequence. It returns each Integration and admitted Job, separating
157
+ the candidate from the committed HEAD. A blocked batch preserves prior results,
158
+ the failing Project/phase, any uncertain attempt and unattempted Projects; inspect
159
+ and continue exact attempts instead of replaying the whole batch. It neither
160
+ requests Review nor completes the Task.
161
+
162
+ Completion still prepares/dispatches an already-established final Review without
163
+ another approval. Without that contract it does not create a Reviewer.
164
+ JSON `stage` distinguishes `completed`, `already-completed`, `review-pending`,
165
+ `review-running`, and `review-blocked`; Review stages leave the Task active.
166
+ `projectHeads` identifies the inspected heads, and the ReviewRound carries its
167
+ separate frozen candidate and exact Run reference. After dispatch, the top-level
168
+ stage reflects its result while `command` retains the earlier preparation result.
169
+ `baseFreshness` and `warnings` expose the observation and its limitations;
170
+ freshness is null when skipped for a completed Task or existing Review.
171
+ An already-completed response does not re-observe or invent delivery heads.
172
+
146
173
  Completion checks the current WorkItems, latest captured/integrated results,
147
174
  applicable Review contract and exact clean committed Task-main snapshot.
148
175
  It also refuses completion while a new user/Operator message is still awaiting
@@ -201,6 +228,67 @@ Cancelled intent does not prove the runtime stopped. User/Operator may reopen
201
228
  cancelled Tasks; Leader may reopen completed Tasks. Reopening requires fresh
202
229
  explicit input/work selection and never replays previous delivery requests.
203
230
 
231
+ ### Route follow-up delivery to the owning Leader
232
+
233
+ Development, local acceptance, PR/MR submission, merge and ordinary corrections
234
+ are normally stages of the same result, not reasons for new Tasks. The Operator
235
+ routes the authorized request to the owning Leader, verifies evidence and reports
236
+ to the user. For several serial deliveries, inspect each Task's original request,
237
+ current authority, Publication and dependencies; send only the current Leader its
238
+ repository/target branch, authorized effects, limits and expected proof. That
239
+ Leader synchronizes and validates in its own legal managed workspace, performs
240
+ the authorized delivery, and records Publication there. Advance the next Leader
241
+ only after verifying the exact merge and accepted-result coverage. Do not default
242
+ to a common delivery Task, Global implementation, or duplicate PR registration
243
+ across Tasks. Submission acceptance, a Run terminal and Task completion are not
244
+ merge evidence.
245
+
246
+ For an active, execution-enabled Task, use
247
+ `operator submit "<request>" --task <task> --intent develop --request-id <id>` or
248
+ unaddressed `task message send <task> "<request>" --intent develop --request-id <id>`.
249
+ Choose one and retain its receipt. Ordinary Leader input omits `--to leader`;
250
+ explicit recipients require an existing WorkItem/ReviewRound Assignment.
251
+ External-effect authorization must be explicit: development does not grant
252
+ push/PR/merge, and merge does not grant release, production update or archive.
253
+
254
+ When the user explicitly requests further implementation or delivery of the same
255
+ completed, unarchived result, the Operator may perform the necessary
256
+ `task reopen <task>` before submitting the new scoped request. The user need not
257
+ add a mechanical “reopen” confirmation. These existing operations suffice; no
258
+ auto-reopen option or post-completion execution protocol is needed. Ordinary
259
+ send/queue/submit, including `--intent develop`, still refuses a completed Task
260
+ before saving new input. Queries, record-only input and discussion do not grant
261
+ reopening authority.
262
+
263
+ Reopen returns the Task to active and clears current completion metadata while
264
+ preserving original events, fixed heads/reports and Publication history. The
265
+ Leader separately verifies and accepts the new result; old validation does not
266
+ automatically cover it. Reopen preserves an independent execution stop: only the
267
+ authorized `task execution start` path can lift that gate after cleanup.
268
+ Cancelled intent requires separate restoration authority; archived Tasks cannot
269
+ reopen, and retained workspaces or Session replacement do not bypass lifecycle.
270
+
271
+ Reopening and submitting are two atomic operations with separate outcomes.
272
+ Inspect the lifecycle result and saved/queued receipt; if submission fails,
273
+ read current state and continue only the unapplied step within the same authority.
274
+ Keep the same key for a matching submission retry, never replay unknown effects,
275
+ and do not reopen again merely to retry after another completion or cancellation.
276
+ The reopen notification can arrive before the new Message: the Leader waits for
277
+ the actual request, without rerunning accepted work or immediately completing
278
+ again. Once the request arrives, it proceeds without another “continue.”
279
+
280
+ Publication upsert, diff/adopt and verify remain separate, authorized atomic
281
+ operations for completed, unarchived results. They need no reopening when no new
282
+ execution is requested. After reopened work, record its new completion without
283
+ rewriting the earlier baseline, then apply the existing candidate adoption and
284
+ verification rules where relevant.
285
+
286
+ An independently acceptable, deliverable and reversible new outcome, or an
287
+ explicit user request for a new Task, can justify a new Task; explain that reason.
288
+ Completed status, revalidation, shared files or the need for a PR alone cannot.
289
+ Configuration, authorized lifecycle actions and urgent safety interventions
290
+ remain Operator responsibilities and do not each require a new Task.
291
+
204
292
  ## Archive
205
293
 
206
294
  Archive requires independent user/Operator authorization for an exact completed
@@ -276,6 +364,26 @@ Task or new durable owner prevents quarantine/deletion; uncertainty retains the
276
364
  resource with a diagnosis. Reopened quarantined resources can be restored.
277
365
  This adds neither a retry worker nor another persistent ownership protocol.
278
366
 
367
+ Current Resource records are read strictly: required safety fields, enum values,
368
+ and every active reference must be valid. A malformed record or mismatched
369
+ SQLite/payload identity is reported without supplying defaults, dropping refs,
370
+ or rewriting stored evidence. This enforces the current storage 1.0 record contract.
371
+
372
+ Failed preparation compensates only its unadopted resources. Standalone Task
373
+ clones use exact clone identity/cleanliness checks before direct deletion;
374
+ linked worktrees use their captured path, branch, commit and own Git common
375
+ directory. A Git error (including a lock) never falls through to recursive
376
+ deletion. Same-operation temporary clone cleanup first proves its reserved
377
+ directory identity. Already-adopted workspaces remain outside compensation.
378
+ Failures preserve the original error, completed removals and exact remaining
379
+ targets, whose failed-command effects may be unknown.
380
+
381
+ An Agent may still choose direct `rm` for an exact resource within its existing
382
+ authority after inspecting ownership and contents, including when Git metadata
383
+ is unavailable. That is an explicit recovery choice, not a generic automatic
384
+ fallback or a new approval workflow. Keep Task records, other owners' resources
385
+ and unknown live processes outside that deletion.
386
+
279
387
  `yui task archive-preflight <task> (--integrated|--abandon) [--force] [--json]`
280
388
  reads current admission, delivery and exact-owner cleanup checks in one report.
281
389
  It is available before and after archive, including to the Task's authorized
@@ -70,7 +70,7 @@ Integration 在候选 worktree 中套用固定来源提交,运行已配置的
70
70
  `historical-change-sets` Integration 必须先结算且不存在执行/交付引用,才能将
71
71
  完整 payload 转为 `integration.source-retired` Task 事件;旧 ID 不会复用。
72
72
  无匹配证据时正常执行。
73
- 计划必须提供 `schemaVersion: 2`,不再包含 `l1` 或 `record/reuse/enforce` 模式。
73
+ 计划必须提供 `schemaVersion: 1`,不再包含 `l1` 或 `record/reuse/enforce` 模式。
74
74
 
75
75
  新建操作时显式要求重跑:
76
76
 
@@ -88,7 +88,7 @@ yui task upstream integrate <task> --project <project> --rerun-checks
88
88
 
89
89
  新执行开始前撤下旧成功。失败如实记录;中断、缺失日志或候选被改写时,
90
90
  不会保留可复用成功。Job 和本地执行在发布成功证据前,共同检查候选的精确提交、
91
- 分支和干净状态。v5 L2-only 执行摘要隔离旧证据,不删除原有历史。
91
+ 分支和干净状态。baseline-v1 L2-only 执行摘要隔离旧证据,不删除原有历史。
92
92
  过期的缓存使用者不能恢复旧结果。发布查询查看最新匹配证据,不跳过失败去找旧绿灯。
93
93
  缓存只表示当前可复用证据,不充当 Task 执行历史;原 Job 和 Integration 记录独立保留。
94
94
 
@@ -113,6 +113,27 @@ Reviewer Run 持有报告;执行成功不等于语义通过。验收归 Leader
113
113
 
114
114
  ## 完成与远程交付
115
115
 
116
+ `task complete` 默认离线,绝不集成上游提交或改变 Git HEAD。
117
+ `--refresh-remote` 仅在 Task 自有仓库中获取远端对象并报告新鲜度,不会 rebase、
118
+ 启动 Integration 检查或更新稳定 Project checkout。远端落后、分叉或未知仍是本地
119
+ 完成的提示,不是远端交付证明;刷新失败返回 unknown 和原始错误,不伪装成最新成功。
120
+ 只想查询而不完成或准备 Review 时,使用 `task base status <task> [--refresh]`。
121
+
122
+ 需要上游集成时,由 Agent 在完成前显式选择。
123
+ `task upstream integrate <task> (--latest|--project <project>)` 请求固定的
124
+ rebase/检查/CAS 步骤,返回每个 Integration 和已接纳的 Job,并区分候选与已提交
125
+ HEAD。批处理中途受阻仍保留先前结果、失败的 Project/阶段、效果需查证的尝试以及
126
+ 尚未尝试的 Project;应检查和续作确切尝试,不重放整个批次。此命令既不请求 Review,
127
+ 也不完成 Task。
128
+
129
+ 完成仍会按已建立的 final Review 合同准备/派发 Review,不要求重复批准;
130
+ 没有该合同时不会创建 Reviewer。JSON 的 `stage` 区分 `completed`、
131
+ `already-completed`、`review-pending`、`review-running` 和 `review-blocked`,
132
+ Review 阶段保持 Task active。`projectHeads` 标明本次检查的 head,ReviewRound
133
+ 独立携带冻结候选及确切 Run 引用。派发后顶层阶段反映实际结果,`command` 保留先前
134
+ 准备阶段的部分结果。`baseFreshness` 和 `warnings` 暴露观察与限制;已完成或已有
135
+ Review 时跳过刷新,该新鲜度字段为 null。重复完成不重新观察或补造交付 head。
136
+
116
137
  完成会检查当前的 WorkItem、最新捕获/集成的结果、适用的 Review 合同以及确切的、
117
138
  干净且已提交的 Task-main 快照。当有一条新的 user/Operator 消息仍在等待 Leader
118
139
  投递时,它也会拒绝完成。当前原生轮次必须结束,待处理的通知才能到达;随后 Leader
@@ -155,6 +176,51 @@ CLI、当前 Leader Context 和 Web 从同一组事实推导覆盖,不联网
155
176
  取消意图不证明运行时已停止。user/Operator 可以重开已取消的 Task;Leader 可以重开
156
177
  已完成的 Task。重开需要全新的显式输入/工作选择,绝不重放先前的交付请求。
157
178
 
179
+ ### 后续交付路由给原 Task Leader
180
+
181
+ 开发、本地验收、提交 PR/MR、合并和普通修正,通常是同一成果的不同阶段,不是
182
+ 新建 Task 的理由。Operator 将获授权的请求交给原 Task Leader,核验结果并向用户
183
+ 汇报。多个 Task 串行交付时,先读各自原始请求、当前权限、Publication 与依赖,
184
+ 只给当前那一个 Leader 发送仓库/目标分支、授权效果、边界和预期证据。Leader 在自己
185
+ 合法的受管工作区同步、验证、执行获授权交付,并在原 Task 记录 Publication。
186
+ 核实精确合并与已验收成果覆盖后,才推进下一个 Leader。不要默认新建统一交付 Task、
187
+ 由 Global 接管实现,或跨 Task 重复登记同一 PR。投递接受、Run 终态与 Task 完成
188
+ 都不等于合并证据。
189
+
190
+ 对于 active 且 execution enabled 的 Task,使用
191
+ `operator submit "<请求>" --task <task> --intent develop --request-id <id>` 或
192
+ 不带收件人的 `task message send <task> "<请求>" --intent develop --request-id <id>`。
193
+ 二选一并保留回执。普通 Leader 输入省略 `--to leader`;显式收件人要求已有
194
+ WorkItem/ReviewRound Assignment。外部效果必须明确获授权:开发不授予
195
+ push/PR/merge,合并不授予发版、生产升级或归档。
196
+
197
+ 用户明确要求继续同一个已完成、未归档成果的实现或交付时,Operator 可以先执行必要的
198
+ `task reopen <task>`,再提交这次有界请求。用户无需机械地额外确认“重开”。
199
+ 现有两步即可满足目标,不需要自动重开开关或后完成执行协议。普通 send/queue/submit
200
+ (包括 `--intent develop`)仍会在保存新输入前拒绝 completed Task;只读查询、
201
+ record-only 输入和讨论本身不授予重开权限。
202
+
203
+ 重开回到 active,撤下当前完成元数据,同时保留原事件、固定 head/报告和 Publication
204
+ 历史。Leader 对新结果单独验证与验收,不能把旧验证直接宣称为新结果的证据。
205
+ 重开保留独立的执行停止决定;只有获授权且完成清理的 `task execution start` 路径
206
+ 可以解除 gate。恢复 cancelled 意图需要单独明确授权;archived Task 不能重开,
207
+ 保留工作区或 Session 替换都不能绕过生命周期。
208
+
209
+ 重开与提交是两个有独立结果的原子操作。分别检查生命周期结果和 saved/queued 回执;
210
+ 提交失败时读取当前状态,仅在权限未变时继续尚未生效的那一步。相同提交重试保留原 key,
211
+ 不重放效果未知的操作,也不因重试而再次重开已经重新完成或取消的 Task。
212
+ 重开通知可能先于新 Message 到达:Leader 等待具体新请求,不重跑已验收工作,
213
+ 也不立即再次 complete;请求到达后不再要求额外“继续”。
214
+
215
+ Publication upsert、diff/adopt、verify 仍是未归档已完成成果的独立授权原子操作,
216
+ 没有新执行请求时不必重开。重开后的工作记录自己的新完成证据,不改写旧基线,
217
+ 再按需应用现有 candidate 采用与验证规则。
218
+
219
+ 真正可独立验收、交付、回滚的新成果,或用户明确要求新建 Task,可以成为例外,
220
+ 但应说明实质理由。仅因 completed、重新验证、共用文件或需要 PR 都不成立。
221
+ 配置、获授权的生命周期动作与紧急安全干预仍由 Operator 负责,不要求每个原子管理
222
+ 操作都新建 Task。
223
+
158
224
  ## 归档
159
225
 
160
226
  归档需要针对确切的 completed 或 cancelled(retired)Task 获得独立的 user/Operator
@@ -214,6 +280,20 @@ Session 进程归属只读取 SQLite `session_owners`,并校验存活 PID 和
214
280
  保留资源并给出原因。已经隔离、随后重新打开的资源可以恢复。
215
281
  不增加后台重试 worker 或第二套持久所有权协议。
216
282
 
283
+ 当前 Resource 记录严格验证必需安全字段、枚举和每条活动引用。损坏记录或 SQLite
284
+ 主键与 payload 身份不符会明确报错,不补默认值、不丢弃坏引用、不改写原始证据。
285
+ 这是执行当前存储 1.0 的记录合同。
286
+
287
+ 准备失败只补偿未采用的资源:独立 Task clone 经精确身份、干净状态检查后直接
288
+ 删除;linked worktree 使用准备时捕获的路径、分支、提交和自身 Git common directory。
289
+ 任何 Git 错误(包括锁定)都不会自动转为递归删除。同一次 clone 的临时补偿先验证
290
+ 预留目录身份;已采用工作区不进入补偿。失败保留原始错误、已完成删除和剩余精确
291
+ 目标,失败命令的效果可能仍未知。
292
+
293
+ Agent 仍可在既有授权内,检查归属和内容后主动选择对精确资源执行 `rm`,包括 Git
294
+ 元数据已不可用的情况。这是显式恢复选择,不是通用自动回退,也不新增审批流程。
295
+ Task 记录、其他 owner 的资源和存活状态不明的进程不因此获得处置授权。
296
+
217
297
  `yui task archive-preflight <task> (--integrated|--abandon) [--force] [--json]`
218
298
  一次读取归档条件、交付覆盖与各精确 owner 的清理检查。归档前后都可用,获授权的
219
299
  Task Leader reader 也可读取。这里的 `--force` 仅选择要检查的行为,不会归档、
@@ -14,6 +14,15 @@ same query at `GET /api/dashboard`. The per-Task detail endpoint retains
14
14
  execution, observability, usage and remote-delivery fields. Discovery itself
15
15
  does not change persistent records.
16
16
 
17
+ Web labels catalog-wide attention separately from filtered/page-local lists.
18
+ Native Session activity is an explicit optional read at
19
+ `GET /api/dashboard/sessions` with the same compact page parameters. It observes
20
+ only that returned page, includes direct inputs without AgentRuns and shows its
21
+ own read time. It is not part of the compact query or its 32 KiB budget, and never
22
+ claims a global running-Session count. Changing page membership clears this
23
+ observation. Task status counts and raw signals remain separate from activity
24
+ and semantic progress.
25
+
17
26
  ## Query and page contract
18
27
 
19
28
  ```sh
@@ -11,6 +11,12 @@ Context 快照、消息确认、执行判断或验收结论。
11
11
  Web 通过 `GET /api/dashboard` 使用同一查询;单个 Task 的详情接口继续保留
12
12
  执行、观测、用量和远端交付字段。目录查询本身不改变持久记录。
13
13
 
14
+ Web 将目录级关注计数与过滤后/当前页列表明确区分。原生会话活动通过
15
+ `GET /api/dashboard/sessions` 携带相同紧凑页参数显式按需读取,只观察该返回页,
16
+ 包含无 AgentRun 的直接输入,并标注独立读取时间。该观察不进入紧凑查询及其
17
+ 32 KiB 预算,不冒充全局运行会话数;页成员变化时清除观察。Task 状态数量、
18
+ 原始执行信号仍与活动和实质进展分开。
19
+
14
20
  ## 查询和分页合同
15
21
 
16
22
  ```sh
@@ -49,169 +49,46 @@ is required.
49
49
 
50
50
  ## Permanent core smoke
51
51
 
52
- `npm test` and `npm run test:core` build the checkout and run one permanent suite:
53
-
54
- 1. the built CLI starts and its catalog exposes setup/update/upgrade/Task commands;
55
- 2. one normal SQLite Task and Message survive a reopen;
56
- 3. a supported historical Home migrates through the linear storage chain to current;
57
- 4. the built-in Codex and Claude Drivers are registered;
58
- 5. one independent declarative plugin is created, validated, called and disabled
59
- through authenticated ingress, with its selection and validation preserved.
60
- 6. a Task starts from durable Operator input, exposes planning Context and enters
61
- delivery with its original intent and captured planning authority preserved;
62
- scratch workspace release does not require a fabricated Git identity.
63
- 7. Session replacement preserves pending original Messages and independent work;
64
- cleanup blocks new notification claims, and successor acceptance cannot
65
- settle an old wake or later queued input. Old Sessions keep scoped reads
66
- but cannot regain write authority;
67
- 8. InputRequests survive Session replacement without a synthetic AgentRun;
68
- 9. late native terminals cannot settle successor input or invent acceptance;
69
- 10. remote Operator startup carries its reserved workspace, Role instructions
70
- and scoped CLI identity, while offline diagnostics/recovery remain reachable.
71
- 11. durably queued native results survive Controller outages and replay without
72
- poisoning the Host; known terminal inputs do not become active merely by aging;
73
- 12. Task-final review can use its Task-local Reviewer without a global template.
74
- 13. a native error label permits replacement only with latest-Turn terminal
75
- evidence and drained background execution; a wrong native account cannot
76
- authorize cleanup.
77
- 14. Claude receives its native environment and settings paths without injected
78
- authentication helpers, rewritten approval records, or secrets forwarded
79
- to unrelated adapters; native authentication selection stays with Claude. Environment refresh
80
- removes revoked keys and keeps values out of durable Task/Role records.
81
- 15. ordinary Integration conflicts continue without a decision gate; exact Git
82
- receipts and an admitted Job resume interrupted delivery without replay.
83
- Validation settlement distinguishes current check conditions from an
84
- already-applied CAS. Migration preserves provable old bound FF Jobs and
85
- classifies old conflicts without inventing successful checks.
86
- 16. explicit force archive commits before cleanup and preserves uncertain
87
- delivery/runtime evidence; partial cleanup and late results remain traceable,
88
- while archived runtime resources never become automatically safe to delete.
89
- Archive preflight preserves durable records and the Git index, distinguishes
90
- frozen-result differences, and cleanup rechecks moved heads, owner branches
91
- and new dirt. Read-only Git status never executes configured clean filters.
92
- 17. Host facts reach the existing Inbox even when its compiled store cannot
93
- read the Home; Controller-side fencing, ACK-loss replay, and legacy-Host
94
- upgrade refusal preserve the original execution. A frozen independent v1
95
- protocol producer remains the same process across a real 19→22 migration,
96
- authenticates RPCs to both Controllers through refreshed discovery, and
97
- retains facts during the disconnected window. Production launch planning
98
- also preserves scoped startup evidence before native Session adoption
99
- without exporting a Run ID into the Session environment.
100
- This fixture is the minimum supported new wire contract, not a claim that
101
- pre-fix released Hosts can be hot-patched.
102
- Archive racing Host ingress retains the complete source envelope without
103
- reopening the Task or settling original uncertain input.
104
- 18. Project maintenance waiters yield to the holder, use a shared 60-second
105
- monotonic budget with independent 200–500ms jitter, and cancel on Controller
106
- stop without losing activation intent. Disposable lock/SQLite/Git fixtures
107
- cover exclusion, partial release and under-lock revalidation; injected time
108
- checks the minute-long deadline without sleeping for a minute. Competing
109
- activations each adopt their own workspace without replaying Git work.
110
- 19. Task usage distinguishes zero, partial and unknown across exact requests,
111
- cumulative baselines, Session replacement and native child overlap. A small
112
- event fixture checks direct Leader/parallel time semantics and the shared
113
- CLI/Web/audit lifetime projection without collecting Provider data.
114
- 20. explicit cleanup releases retained terminals without affecting other Tasks
115
- or claiming that live resources are gone; Controller replacement waits for
116
- the old process to exit.
117
- 21. structured verification preserves argv, explicit shell failure, environment
118
- and workspace-relative cwd through the actual RPC parser and both local
119
- executors. Corrected execution semantics invalidate old gate reuse without
120
- rewriting historical artifacts or migrations.
121
- 22. concurrent resource registration preserves unrelated rows and rejects
122
- stale same-record writes; GC closes owned connections on success/failure.
123
- 23. Context counts, exact inspection and bounded event deltas work without
124
- materializing complete history or acquiring a writer lock. Telemetry
125
- ingestion yields to the event loop and drains its worker on close.
126
- 24. Release resume re-queries uncertain effects, retains confirmed work and
127
- refuses exhausted grants, using disposable SQLite and fake external ports.
128
- These checks do not claim validation of real release services.
129
- 25. The pre-1.0 contract cleanup normalizes old singleton dispatches only through
130
- explicit storage migration. Unsupported CLI/ACP input, unregistered development
131
- links, unpinned release identities and unsupported quarantine receipts are
132
- refused without inventing acceptance or discarding evidence. Current link,
133
- configuration and quarantine operations remain usable.
134
- 26. Activation refuses absent intent before resource adoption and still honors
135
- planning deferral and cancellation. Retiring the integration queue preserves
136
- exact records and active attempts in one rollback-safe migration, without
137
- inventing delivery. Conflicted Integrations remain completion blockers.
138
- 27. Unknown lock ownership stays fenced, including unavailable OS evidence.
139
- PR lookup distinguishes absence, malformed/ambiguous results and transport
140
- failure through injected ports. Receipt-free Git operations remain unchanged,
141
- while normal receipt-backed continuation still works. Notification-only
142
- migration preserves current delivery and audit history and refuses live links.
143
- 28. SQLite admission ignores unrelated side files but refuses a non-empty Home
144
- without its database. Default CLI/HTTP discovery stays bounded and retains
145
- off-page Task detail; unknown writer leases diagnose without mutation.
146
- Review migration preserves candidate evidence while making scope explicit.
147
- 29. Missing authoritative readers fail before Provider preparation or queue
148
- admission instead of becoming empty evidence. WorkItem history retirement
149
- preserves the original payload and current work, advances event IDs safely,
150
- and refuses unknown old shapes without advancing the migration ledger.
151
- 30. WorkItem overlap is a read-only advisory; exact permission/dependency guards
152
- remain. Real local verification proves default reuse, explicit rerun failure,
153
- incomplete evidence and stale-consumer rejection through the current proof path.
154
- An Integration rerun cannot bypass an equivalent unfinished gate. Policy
155
- migration preserves historical execution and blocks an admitted old gate.
156
- 31. Message edits preserve submission intent and immutable request identity;
157
- no-op edits do not enqueue work, and an edited develop request cannot create
158
- a planning Run. Unkeyed discussions still plan after activation is resolved.
159
- Queue identity remains frozen through an interrupt-then handoff; completion sees explicitly
160
- queued input. Input migration preserves raw audit evidence, refuses to
161
- auto-authorize old pending immediate activations and keeps the prior ledger.
162
- The actual Controller continues admitted requests but not cancellations.
163
- Required Store reads fail before config mutation or full-scan fallback.
164
- Explicit Job requests replay one operation and reject changed or missing keys.
165
- 32. Worker Job admission/management and the pre-spawn gate reject a different
166
- owner/workspace; legitimate Worker and Leader Jobs remain usable. Candidate
167
- mutation blocks publication of reusable success, including after explicit
168
- abort/retry. Upstream wiring returns its admitted Job and continuation IDs.
169
- Plugin replacement retains delayed old-generation cleanup errors without
170
- undoing a newer selection. A shared validator rejects bad record writes,
171
- ordinary/Context reads and full-Home health checks without repairing data.
172
- 33. Built CLI calls refuse replaced Operator writes, Task-owned Home mutations
173
- and foreign-Task queries while retaining legitimate reads and current
174
- Operator actions. Job reads enforce Context scope at the Controller port.
175
- Real local runtime directories move once through quarantine/restore/purge;
176
- current durable ownership overrides a stale cleanup plan and prevents
177
- purging a reopened Task.
178
- 34. Current CLI rejects `task turn`; completion has one identity and preserves
179
- unrelated shell content through install/uninstall. GC protects exact live
180
- SQLite Session custody without consulting old JSON. The 34→35 cutover
181
- preserves raw retired payloads/log bytes and identity counters, blocks
182
- unsettled gates/custody, and rolls back malformed conversions.
183
- 35. Native model aliases/resolved IDs and open custom-model fields retain their
184
- distinct contracts; configuration errors display the observed choices.
185
- Rejected Leader startup stays quiet across Store reopen and repeated passes,
186
- preserves original/later input and blocks premature completion. Explicit
187
- retry requeues the exact rejected claim once without rewriting its history;
188
- typed contention remains retryable and unknown acceptance cannot be replayed.
189
- 36. Failure-scoped capability reads preserve the recorded model/workspace/settings
190
- selection after Role edits, reject changed Agent bindings, honor explicit
191
- metadata refresh and identify cached fallback. The Controller supplies native
192
- account context without accepting caller credentials. Task/Role/record reads
193
- stay fenced. Runless startup and native rejection reuse one error/notification.
194
- Migration 35→36 preserves historical error bytes and the earlier ledger while
195
- marking absent historical configuration unavailable, never reconstructing it.
196
- 37. Narrow failure context survives independently of execution/Review/Session
197
- protocols; 36→37 preserves the original snapshot in audit. Repeated native
198
- submission rejection creates one error and one supervisor notice through
199
- the shared writer. A small injected cache proves completed-result eviction,
200
- pending-request coalescing, explicit refresh and truthful cache provenance.
201
-
202
- Keep the test phase seconds-scale; measure TypeScript build separately. Record
203
- incremental runtime when adding a critical regression. The seven recovery boundary
204
- cases initially add about 0.4 seconds of test bodies (about 0.6 seconds standalone,
205
- including module startup) on the development host. Keep real-model launches out
206
- of this suite. Real tmux/CLI lifecycle checks belong to the bounded package smoke
207
- below, not a second core daemon matrix.
208
- The Integration continuation regressions use disposable Git repositories,
209
- SQLite and fake Jobs, without a provider or shared Home. Their test bodies
210
- take about 3 seconds on the development host; validation settlement adds
211
- about 1.4 seconds to the initial 1.5-second coverage.
212
- Archive preflight adds three small disposable Git/SQLite scenarios (about
213
- one second of test bodies); broader owner/diagnostic combinations remain
214
- temporary validation evidence, not a second permanent matrix.
52
+ `npm test` and `npm run test:core` build the checkout and run the maintained suite.
53
+ The baseline cutover retires tests owned solely by the removed v1..v37
54
+ implementation. Their source/evidence remains in the frozen 0.16.2 release;
55
+ mixed tests retain current behavior, such as Review scope and Integration
56
+ completion boundaries.
57
+
58
+ Current coverage includes:
59
+
60
+ 1. Fresh storage 1.0, exact schema/record validation, no initialization over
61
+ unknown data, and rejection of old integer formats without mutation.
62
+ 2. Independent v37 conversion: original intent/audit/counters, nested Session
63
+ envelopes, opaque Context, rollback on invalid input, offline backup and
64
+ repeat-call idempotence. The CLI fixture uses a disposable Home; it never
65
+ converts a real account. The converter is not part of the runtime tarball.
66
+ 3. Exact-version staging, mismatched-target refusal, same-major contiguous
67
+ minor preflight, explicit maintenance-owner identity across handover, and
68
+ restoration against captured protocol/storage identity rather than omitted fields.
69
+ 4. Durable Task/Message/Decision context, draft activation authority, mailbox
70
+ claims, notification idempotence, Session replacement and exact late results.
71
+ 5. Integration/Job request identity, immutable candidate proofs, conflict
72
+ continuation, Review scope and final acceptance without fabricated delivery.
73
+ 6. Runtime/Host isolation, Provider protocol parsing and bounded retry using
74
+ fake producers, current configuration provenance and native-account boundaries.
75
+ 7. Workspace/GC authority, archive cleanup, resource CAS, telemetry, Web
76
+ projections and authorized release recovery without real external effects.
77
+ 8. Idempotent per-checkout launcher installation, exact argument/Home forwarding,
78
+ refusal to overwrite unrelated files, and rejection of removed global-link
79
+ commands before side effects. Development Home reset retains its independent
80
+ identity checks and backup behavior.
81
+ 9. Failure isolation for optional Controller maintenance, individual retry
82
+ Sessions and Task continuation observation, with scoped errors and no
83
+ fabricated delivery, cancellation or quiescence.
84
+
85
+ Keep the test phase seconds-scale and measure build separately. Use the
86
+ existing assembled-package smoke for actual CLI/Controller/Host/tmux wiring,
87
+ not a second daemon matrix. Converter schema fixtures preserve one frozen
88
+ endpoint; do not reconstruct the entire historical chain in the new suite.
89
+ Real-model or real-Home checks require explicit authorization.
90
+ Current envelope checks reject arbitrary unknown fields, rather than maintaining
91
+ a blacklist of retired field names.
215
92
 
216
93
  ## Skill and instruction changes
217
94
 
@@ -234,7 +111,8 @@ on every PR, without another lint or broad regression suite.
234
111
  the actual CLI/Controller/Host/SQLite and isolated tmux, replacing only the
235
112
  external Provider with a deterministic fixture. It covers setup, durable input
236
113
  and idempotency across restart, scratch activation, native result ingestion,
237
- completion preserving the conversation, and archive releasing live/dead panes
114
+ completion preserving the conversation, explicit reopen followed by one
115
+ idempotent Operator request and its exact native result, and archive releasing live/dead panes
238
116
  and grouped viewers without affecting a similarly named neighboring session.
239
117
  The fixture owns a fresh Home and its PATH, installs cleanup before setup,
240
118
  and never calls an installed model Agent.