Skip to content

✨ feat(protocol): project three-lane Repro work - #352

Merged
zrr1999 merged 2 commits into
feat/autonomy-vnext-rolloutfrom
codex/repro-three-lane-projection
Aug 14, 2026
Merged

✨ feat(protocol): project three-lane Repro work#352
zrr1999 merged 2 commits into
feat/autonomy-vnext-rolloutfrom
codex/repro-three-lane-projection

Conversation

@zrr1999

@zrr1999 zrr1999 commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

动机

#311 建立了 Repro owner 的三线领域合同,但 daemon、TUI 与 Web 需要一个有界且 JSON-safe 的共享投影,ReportModel 也必须从 work-summary/v2 迁移到三线 v3,不能让各表面各自解释领域状态。

解决方案

  • 将 view-model protocol 从 1 硬切到 2,同时保持 WebSocket runtime envelope 为 spark.runtime.v1alpha1;daemon 与 TUI 不增加混合版本协商。
  • 新增 SparkSessionReproWorkView.lanes,每线最多六项,只暴露稳定 ID、状态、关联 ref 与计数;Repro owner 提供唯一的 display-safe projector。
  • 将 ReportModel 升级为 spark.repro.work-summary/v3,通过纯幂等 v2→v3 迁移保留 Formalize 权威,并接入真实三线状态;不伪造 handoff、resolution 或 formalized tip。
  • Goal view 仍是单线 runtime,只增加可选的 ready/blocked TaskRef 与 pending request readiness 投影。
  • 同步更新 protocol v2 consumers 与 fixtures;Ask producer 使用当前协议常量,completion evaluator 与既有 Workbench 先把 v3 严格规范化回 formal base,不提前引入 Web lane rendering。
  • 将发布线切到 0.4.0,根清单与 41 个 workspace 保持 lockstep;sparkRelease.nMinusOneMigrationExemptions["0.4.0"] 是唯一、精确版本匹配的 N-1 豁免,rollbackCompatibility 不再声明可执行回滚范围。

本层验证:

  • pnpm run check:static
  • pnpm test test/release-migration-gate.test.ts:7 tests
  • pnpm run release:pack:5 个 0.4.0 tarball 与 publint 通过
  • node scripts/verify-release-state.mjs --artifact-only
  • node scripts/smoke-npm-product.mjs ...:精确五包安装、daemon/TUI/Hub lifecycle 通过
  • node scripts/test-release-migration.mjs ...:精确命中 0.4.0 豁免
  • Ask 8 tests、Hub coordination 156 tests、Turn 103 tests、Update 27 tests、ACP 7 tests
  • protocol 204 tests、Repro 80 tests、daemon 1070 tests

说明

  • Stack base:✨ feat(repro): define three-lane domain contract #311
  • 本 PR 定义协议、投影及必要 consumer cutover,不推导 daemon frontier、不增加状态仓库或调度动作。
  • 0.4.0 是一次性 coordinated hard cut:混跑 0.3.x0.4.0 明确不受支持;发布前必须停止旧 Hub/daemon/TUI 并验证备份,回退只能停机并恢复 cutover 前备份。
  • 豁免不继承到 0.4.1 或后续版本;显式 --baseline-version 仍可用于事故复现,不会被豁免短路。

后续工作

下一层 #354 由 daemon 从 Repro 与 TaskGraph owner 状态构造 Session work projection,并覆盖重启恢复与 Goal waiting-decision 的独立 ready task 行为。

@codspeed-hq

codspeed-hq Bot commented Aug 13, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 3 untouched benchmarks


Comparing codex/repro-three-lane-projection (6b0e227) with feat/autonomy-vnext-rollout (7eb20ee)

Open in CodSpeed

@zrr1999
zrr1999 force-pushed the codex/repro-three-lane-projection branch from 4441cb5 to 6b0e227 Compare August 14, 2026 03:25
@zrr1999
zrr1999 marked this pull request as ready for review August 14, 2026 03:49
@zrr1999
zrr1999 merged commit b41d43a into main Aug 14, 2026
20 of 22 checks passed
@zrr1999
zrr1999 deleted the codex/repro-three-lane-projection branch August 14, 2026 04:27
zrr1999 added a commit that referenced this pull request Aug 14, 2026
## 动机

#311#352 已定义 Repro 三线领域状态及有界协议,但 Session snapshot 仍需由 daemon 从真正的
owner 状态重建 lane/frontier、Goal readiness 与 pending human decision,不能由
TUI/Web 推断。

## 解决方案

- daemon 每次 Session snapshot 从持久 `SparkSessionRepro v8` 投影三线
summary、handoff/resolution 计数与 `formalizedTip`。
- 从该 Session 选中的 TaskGraph project 推导 ready/blocked
TaskRefs,并按协议各截断为六项、保留完整计数。
- 从 daemon-owned pending human waits 推导 Goal `waiting_decision`;独立 ready
TaskRefs 不被隐藏或阻塞。
- 重启后重新读取 Repro、handoff、resolution 与 revision-fenced owner state;不解析
transcript、提示词或渲染文本。
- 增加 display-safe 路径保护和内部 daemon 说明。

## 说明

- Stack dependencies:#311#352 → 本 PR。
- 本层不新增 scheduler/store,不修改 Goal 的持久状态枚举;`waiting_decision` 只是 runtime
projection。
- 本地验证:daemon check(312 files typecheck,126 files / 1029
tests);architecture inventory/governance;dependency boundaries;focused
session projection 9 tests。

## 后续工作

下一层 `codex/repro-three-lane-composition` 将把 extension action、TaskGraph
reconciliation 与现有 GitChange/原生 PR stack owner 连接到这些 daemon/Repro 合同。
zrr1999 added a commit that referenced this pull request Aug 14, 2026
## 动机

#311#352#354 已分别定义 Repro 三线领域、协议和 daemon 投影,但公共组合入口仍需把
Evidence、TaskGraph 与 GitChange owner 安全接到同一个 canonical `repro({ action
})` surface,不能复制领域状态机或 Git stack 权威。

## 解决方案

- 在现有 `repro({ action })` 增加 work
register/rematerialize、finding/mismatch、handoff、formalize bind 与
resolution action,不新增公共工具或别名。
- 所有三线语义委托给 `spark-repro`;extension 仅做 JSON-safe 输入归一化和 owner 适配。
- Evidence ref 通过 EvidenceStore 验证;work item 的 Task/GitChange 关联通过
TaskGraph owner API 幂等 reconciliation。
- Formalize 只接受 attached、单 current entry、`gh-stack` authority 的
GitChange,并绑定当前 Session 为唯一 stack integrator。
- resolution 写入 Repro 后再幂等取消未完成的临时 Task;重复或过期输入没有第二次副作用。
- 覆盖 rebase revision fence、无 isolate+resync 的 skip 拒绝、legacy stack 拒绝与双向
resolution 回消。

## 说明

- Stack dependencies:#311#352#354 → 本 PR。
- 本层不创建 scheduler、store、Git topology 或新的 RefKind;GitChange Artifact 仍拥有
owning worktree 与原生 PR stack。
- 本地验证:spark-extension typecheck(192 files);44 files / 591
tests;tool-surface(39 tools,aliases=0);architecture
inventory/governance;dependency boundaries(2037 modules / 8113
dependencies);格式与 diff 检查。

## 后续工作

下一层 `codex/repro-three-lane-tui` 将消费 daemon 的有界投影,交付常驻摘要、Repro
inspector、键盘导航与 `/reload` 后的纯 UI 状态重建。
zrr1999 added a commit that referenced this pull request Aug 14, 2026
## 动机

前四层已经提供 Repro 三线的领域、协议、daemon 与 composition owner 路径。native TUI 需要把
daemon 的有界 `session.snapshot.work.repro` 变成可持续观察和导航的本地呈现,同时保留
transcript/composer 核心区域,并确保 `/reload` 不复制或推断 durable 状态。

## 解决方案

- 将 daemon 投影的 Repro work view 保存到 process-local hub state;按 `updatedAt`
拒绝陈旧投影,不读取 transcript 或本地计时推断 lane。
- 在顶部增加一行 Implementation/Exactness/Formalize 计数、blocked、pending
handoff、resolution 与 `formalizedTip` 摘要。
- 新增 Session inspector `repro` panel;活跃 Repro 时 `Ctrl+K` 首开该
panel,`Shift+Ctrl+K` 循环,`/inspect repro` 直接进入。
- 支持 `1/2/3` lane、方向键或 `j/k` work item、Enter 展开现有
Task/Run/GitChange/Evidence projector 详情、Esc 按详情→panel→transcript 返回。
- 收紧极窄布局:始终保留最新 transcript 行与 composer 活动行,再分配摘要、footer 和其他状态。
- worker supervisor 测试证明 `/reload` 后换 PID、保留同 Session/Repro 投影,同时重置
panel、lane selection 和 detail expansion;已完成 Ask 不由 TUI 重放。

## 说明

- Stack dependencies:#311#352#354#356 → 本 PR。
- 本层不新增 TUI store、详情模型、Kanban 或调度动作;所有 durable truth 仍来自 daemon/Repro
owner。
- 本地验证:spark-tui typecheck(122 files);36 files / 584 tests;80×24 与 42×8
component viewport;Direct PTY lane navigation;worker-process
reload;source-process smoke;layout/controller 18
tests;architecture/governance;dependency boundaries(2038 modules / 8121
dependencies)。

## 后续工作

下一层 `codex/repro-three-lane-web` 将把 Workbench 的 Plan tab 演进为
Lanes,继续只渲染共享 A2UI/投影,不新增 Hub store、页面或调度动作。
zrr1999 added a commit that referenced this pull request Aug 14, 2026
## 动机

三线 Repro stack 需要一个跨真实 daemon 进程、持久状态、报告和公开文档的最终验收层,证明 Implementation
Explore 与 Exactness Explore 不会被误当作正式进度,并验证 Formalize 的 canonical
retirement 能在重启后恢复。

## 解决方案

- 扩展 Repro Golden Journey:注册稳定 work item,执行两次前向 handoff、Exactness
首个异常边界记录、Formalize 接受以及两级后向 resolution,并验证重复 resolution 无副作用。
- 在完成后再次替换 daemon 进程,通过 `session.snapshot` 核对 v8 owner state、v3 work
summary 和有界 view-model v2 lane projection;明确验证 projection 不泄露 scope 正文。
- 更新 Repro Golden Journey 运维文档,以及 TUI、Hub、Automation、Feature Map
的中英文公开文档;记录 `/inspect repro`、三线导航、窄终端优先级和 `/reload` 重投影语义。
- 继承 #352 的 `0.4.0` coordinated hard cut:同版本制品与运行链继续严格验证,只豁免 `0.3.x` ↔
`0.4.0` mixed-version migration/IPC 矩阵。

本层验证:

- `pnpm run check`
- `pnpm run test:journey:repro`:19 个三线里程碑、三次 daemon generation、最终 live
PID 为 0
- `pnpm run test:browser`:Hub 31、shared UI 39 browser tests
- TUI 定向:Direct PTY、component harness、reload/process
supervisor、rendering 共 117 tests
- `pnpm run release:pack`、精确五包安装 smoke、artifact identity 与 `0.4.0`
migration-policy gate
- 顶层 package smoke 与整仓 source/process lifecycle 均通过

## 说明

- Stack dependency: #358;属于 GitHub Stack #353。
- Journey 使用真实 daemon/SQLite/RPC/Git/worktree/commit 路径,只有模型与 GitHub
网络边界使用确定性替身。
- 不新增 scheduler、state store、RefKind 或 Web/TUI 状态权威。
- `0.4.0` 不声明 N-1 二进制回滚或混跑兼容;上线前必须停止 `0.3.x` 进程并验证备份,失败时停机恢复 cutover
前状态。
- 全栈暂保持 Draft,待各层最新 head CI、冲突状态和最终 diff 全部回读通过后再转 Ready。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant