Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed29cb5200 | ||
|
|
e9d57ea772 | ||
|
|
241bfccc1e | ||
|
|
f2a7fa94d2 | ||
|
|
ea3eeadb77 |
@@ -42,7 +42,6 @@
|
||||
| 架构设计 | [system-design/README.md](system-design/README.md) |
|
||||
| 测试报告 | [test-reports/](test-reports/) |
|
||||
| 历史功能设计 | [archive/design/superpowers/](archive/design/superpowers/) |
|
||||
| Herdr 角色、审批与备援 | [ops/2026-09-13-herdr-agent-roster.md](ops/2026-09-13-herdr-agent-roster.md) |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,62 +1,29 @@
|
||||
# ADR:以纵向绞杀方式实施模块化单体解耦
|
||||
# ADR:模块化单体解耦——契约通信、单一写者、编排下沉
|
||||
|
||||
## 状态
|
||||
|
||||
提议(2026-09-14;架构与实施计划已修订,等待用户确认后进入首个实现里程碑)
|
||||
已接受(2026-09-14;Wave 0 契约骨架与 arch-check warn 基线已落地,未占集成槽)
|
||||
|
||||
## 背景
|
||||
|
||||
`internal/server`、`internal/bizdev`、共享 `UserProjectContext`、工作区路径和多表写入形成隐式耦合。
|
||||
历史受控正文 404/409、刷新后投影缺失和任务终态不完整说明,单纯搬包不会修复事实源、事务与恢复边界。
|
||||
多轮审计与实测表明:一处修改波及多处的根因不是模块数量不足,而是——
|
||||
`internal/server`(17k 行)同时是组合根、跨模块闭包事件总线、编排载体与文件系统/SSE 细节持有者;`internal/bizdev` 是第二组合根(依赖 16 个内部包);`UserProjectContext` 被 chat/coordinator 双向直改;`document_records` 有 5 个写者;工作区路径与 squad 文件 schema 是无版本化的隐性公共契约;`intent→bizdev` 反向依赖。
|
||||
证据与完整诊断见 [../system-design/2026-09-14-module-decoupling-architecture.md](../system-design/2026-09-14-module-decoupling-architecture.md) §1。
|
||||
|
||||
## 决策
|
||||
|
||||
1. **保持模块化单体**:不拆微服务;进程内调用使用窄端口,跨进程可靠性只用于持久事件和 FAV。
|
||||
2. **纵向绞杀**:先在现有包边界插入端口和适配器,迁完一条业务链并验证后再移动或重命名包;禁止“先全量搬包、以后再接口化”。
|
||||
3. **契约分层**:外部 API DTO 归 `server/api`;持久 schema、公共事件和稳定共享词汇进入按领域划分的 contracts;一对一内部接口由消费者拥有。
|
||||
4. **命令与事务同属一个应用用例**:一个业务命令只有一个事务 owner;跨表属主通过同一不透明事务作用域协作,业务状态、账本、当前指针、staging 和 outbox 原子提交。
|
||||
5. **单一写者不等于单独事务**:表属主控制 SQL 和不变量;应用 UnitOfWork 控制跨属主提交边界。属主端口不得私自嵌套提交。
|
||||
6. **并发正确性以数据库为准**:用户编辑使用乐观版本/ETag;状态转换使用行锁和条件更新;项目级不变量可使用事务级 advisory lock;进程内 mutex 只能优化,不能作为多副本正确性依据。
|
||||
7. **锁顺序固定**:同一事务按 project/workflow instance → document record → document version/snapshot → task run → outbox/staging 的顺序取锁;事务内禁止 LLM、对象存储、网络调用和长文件 I/O。
|
||||
8. **可靠事件采用 transactional outbox**:事件按至少一次投递设计,具有稳定 ID、schema version、环境/项目范围、聚合序号、因果链和幂等键;逐消费者记录 delivery、重试、租约和死信。
|
||||
9. **工作区是可清理投影**:跨模块只传不可伪造 Workspace ID 和受限 artifact key;物理路径只在 workspace/squadrun 适配器内解析和校验。
|
||||
10. **最终成果进入 FAV**:PostgreSQL 保存业务关系和授权,FAV 只保存已确认终态的精确 payload、manifest、回执和删除状态,workspace 不承担最终成果事实源。
|
||||
11. **授权逐动作校验**:认证适配器构造不可由请求覆盖的 Principal;HTTP、CLI、后台订阅者和恢复流程都按 action/resource/current state fail closed。
|
||||
12. **先完成文档可靠性试点**:只有受控正文刷新、重启、并发提交、投影缺失降级和授权负例通过后,才批准 chat、squad、编排层和传输层扩展。
|
||||
13. **迁移采用 expand/migrate/contract**:允许新增 Goose migration;不得修改已发布迁移;回滚只保证回到最近的兼容阶段,不能任意独立 revert 早期依赖。
|
||||
14. **协议改造独立立项**:统一错误信封和 PI Runner `result.json` 不作为核心模块解耦前置条件;它们使用独立兼容与 E2E 验收。
|
||||
|
||||
## 并发与失败语义
|
||||
|
||||
- 普通聚合状态转换默认 `READ COMMITTED` + 明确行锁/条件更新;涉及跨聚合唯一不变量时才使用 Serializable,并对 `40001`/`40P01` 重跑完整事务。
|
||||
- outbox worker 使用小批次 `FOR UPDATE SKIP LOCKED` 认领,处理发生在事务外;完成、续租和失败回填使用 fencing token 防止过期 worker 覆盖新 owner。
|
||||
- 每个写命令必须同时有 idempotency key、expected version 或两者;相同 key 不同 payload 返回 typed conflict。
|
||||
- 锁等待、事务时长、重试次数、队列积压和死信必须可观测;超过预算时失败返回,不无限等待。
|
||||
|
||||
## 授权与恢复语义
|
||||
|
||||
- Principal 至少携带 actor、环境、认证来源和请求关联 ID;项目、会话、文档、阶段与 duty 从数据库权威关系重新解析。
|
||||
- 持久事件中的 actor 只用于审计,不能替代订阅者对当前资源状态的授权检查。
|
||||
- FAV 降级读取要求运行库授权图完整;授权图缺失时禁止面向用户返回内容。
|
||||
- 恢复只允许进入 scratch identity;promotion 需要系统管理员与数据责任人确认,并通过各属主端口提交,禁止恢复 CLI 直写运行表。
|
||||
1. **架构形态**:维持模块化单体(不做微服务拆分),新增 `internal/contracts` 作为跨模块接口/DTO/事件/共享枚举的唯一 SSOT;模块间仅允许「调 contracts 接口」与「发布/订阅 contracts 事件」两种通信。
|
||||
2. **单一写者**:每张表、每类文件唯一属主(docgov 独占 `document_records`;chatlog 独占 chat_* 表;workspace 独占工作区路径);跨模块写走属主端口方法。
|
||||
3. **编排下沉**:跨模块流程收敛到应用编排层(chatflow/stageflow/docflow,拆自 bizdev/coordinator/chat);HTTP handler 只做参数→服务→DTO 三行式。
|
||||
4. **组合根唯一**:wiring 迁 `internal/app`;`server.NewServer` 只剩 HTTP 装配;SSE 帧协议下沉 `internal/stream/transport`。
|
||||
5. **squadrun 契约**:系统备好工作区与 `InputBundle`,小队按 `OutputContract` 交货并写 `RunManifest`(SchemaVer=1);外部禁止直读/覆写工作区内部文件。
|
||||
6. **机器门禁**:`scripts/arch-check.sh` + `module-boundaries.yaml`(import allowlist / 表属主 / 路径字面量属主),warn 两周后 block 进 CI 与集成槽位冒烟。
|
||||
7. **兼容承诺**:HTTP URL 与响应结构在 Wave 1–5 不变;**零表结构迁移**;旧路径设一版兼容期后删除。
|
||||
8. **实施顺序**:Wave 0 立规矩 → 1 止血 → 2 读路径 API 化 → 3 小队契约化 → 4 单写者 → 5 编排事件化(可拆 5a/5b)→ 6 传输收口;每 Wave 独立分支、独立回滚,遵守 AGENTS.md §6 mutex/槽位纪律,避开在途认领。
|
||||
|
||||
## 后果
|
||||
|
||||
- 首个实现里程碑的改动面小于原 Wave 1–6,但会先增加 UnitOfWork、事件投递和授权基础设施。
|
||||
- “单表唯一写者”检查改为生产 SQL 写权限检查,并允许 migration、测试和经批准运维脚本存在表名。
|
||||
- `feature/final-artifact-vault` 是候选依赖,不直接假定可合入;必须先按当前 dev 重放测试、迁移和权限审计。
|
||||
- 包物理移动、错误信封、SSE 和 PI Runner 协议可延后,不阻塞文档一致性整改。
|
||||
|
||||
## 替代方案
|
||||
|
||||
- **一次性横向搬包**:拒绝。冲突面大,不能先证明用户故障减少。
|
||||
- **仅增加 arch-check**:拒绝。门禁不能替代事务、锁和授权契约。
|
||||
- **拆微服务**:拒绝。当前问题是模块边界和数据一致性,不需要引入分布式事务与跨服务部署成本。
|
||||
- **继续把 workspace 作为恢复来源**:拒绝。工作区属于可清理计算现场,不能成为最终事实源。
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [模块解耦架构](../system-design/2026-09-14-module-decoupling-architecture.md)
|
||||
- [模块解耦整改与重构计划](../remediation/2026-09-14-module-decoupling-refactor-plan.md)
|
||||
- [方案复核](../audit/2026-09-14-module-decoupling-plan-review.md)
|
||||
- [文档版本边界 ADR](./2026-09-13-document-version-boundary.md)
|
||||
- 新增包:contracts / app / chatlog / contextasm / docquery / squadrun(squad 换壳);
|
||||
- `internal/bizdev` 与 `internal/ctxmgr` 将被拆解退役(知识迁移到 use case 与两个子包);
|
||||
- 所有后续新能力(含软件项目自举)必须基于新边界实现,禁止再挂 bizdev 门面;
|
||||
- 任何契约(contracts 中已发布的 DTO/事件/文件 schema)变更须走 ADR。
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
title: "事件连续性采用 consumer checkpoint + 首事件 bootstrap"
|
||||
status: accepted
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
---
|
||||
|
||||
# ADR:事件连续性采用 consumer checkpoint + 首事件 bootstrap
|
||||
|
||||
## 状态
|
||||
|
||||
接受(E0A)。在独立 FAV 审计或明确的无缺口 event sequence 迁移完成前不得改为 gap blocking。
|
||||
|
||||
## 背景
|
||||
|
||||
`event_envelopes` 已有 `UNIQUE (aggregate_type, aggregate_id, aggregate_version)`。受控文档的首次持久事件常常从较高 `aggregate_version`(账本 version_no)开始,中间版本从未发事件。若把领域版本号当成无缺口事件序号并在缺号时等待,会永久阻塞 delivery。MemoryBus 的 `TestGapDoesNotSkipVersion` 只是 characterization,不得搬到 PostgreSQL dispatcher。
|
||||
|
||||
## 决策
|
||||
|
||||
1. Track E 选择 **consumer checkpoint + 首事件 bootstrap**。
|
||||
2. 每个 `(consumer, aggregate_type, aggregate_id)` 记录已成功处理的 `event_id` 与可选 `aggregate_version`。该 aggregate 上的第一件 **safe** 事件即为 bootstrap,不要求 version=1。
|
||||
3. 同一版本多个不同类型事件:当前唯一约束禁止。E0A 审计后保持该约束;需要同版本多事件时另立 additive 迁移,把序号改到独立 `event_seq`,不在本 ADR 启用。
|
||||
4. **禁止** 在 dispatcher 启用 gap wait / `ErrGapWait` 阻塞,直到另有 ADR 选择独立无缺口 event sequence 且完成回填。
|
||||
5. 未知 schema、project 0、错误 environment、未知 consumer 的记录进入 inventory,不得 live claim。
|
||||
|
||||
## 后果
|
||||
|
||||
- E0B checkpoint 表随 dispatcher migration 增加。
|
||||
- Projection 以 `document_id + source_snapshot_id + digest` no-replace,不依赖连续 version。
|
||||
- poison 事件 quarantine 后不静默跳号;其他 aggregate 继续。
|
||||
@@ -1,85 +0,0 @@
|
||||
# ADR:纯软件工作流 key 与领域边界(SWBOOT-00)
|
||||
|
||||
## 状态
|
||||
|
||||
已接受(2026-09-16)
|
||||
|
||||
## 背景
|
||||
|
||||
工作流引擎已声明 `non_medical_software` 产品域,但正式目录、创建入口与模板仍以医疗器械三工作流(`main` / `product_manager` / `test_manager`)为硬编码白名单。继续复用医疗 manifest 会造成临床/注册/CDO 语义污染;直接改写既有三 key 会破坏已激活医疗实例。
|
||||
|
||||
详细设计见 [software-project-bootstrap-workflow](../system-design/2026-09-14-software-project-bootstrap-workflow.md)。
|
||||
|
||||
## 决策
|
||||
|
||||
### 1. 新增正式可选工作流 key
|
||||
|
||||
| key | 定位 | 默认产品域 | 可重复实例 |
|
||||
|-----|------|------------|------------|
|
||||
| `software_bootstrap` | 一次性建立项目事实、需求、架构、风险、路线与验证基线 | `non_medical_software` | 否(默认一次;终止后可重建并保留旧证据) |
|
||||
| `software_delivery` | 按里程碑/发布重复交付,承接 change brief → 证据 → 验证 → 发布 → 复盘 | `non_medical_software` | 是 |
|
||||
|
||||
医疗三 key **保持不变**,仍为正式可选;不得在其 published hash 上替换为软件语义。
|
||||
|
||||
### 2. 目录策略:published + selectable,而非“仅三 key”
|
||||
|
||||
项目可选工作流 = 已发布 (`latest_published_version > 0`) ∩ `project_selectable=true` ∩ 策略白名单。
|
||||
|
||||
白名单扩展为:
|
||||
|
||||
```text
|
||||
main | product_manager | test_manager | software_bootstrap | software_delivery
|
||||
```
|
||||
|
||||
固定文档数量校验 **仅** 继续约束医疗三 key;软件工作流按 manifest 自身完整性校验,不强制医疗文档数。
|
||||
|
||||
### 3. 领域与合规分离
|
||||
|
||||
- `product_domain=non_medical_software` 只说明非医疗器械,不关闭鉴权/审计/安全基线。
|
||||
- `compliance_profile` / `governance_profile` / `execution_mode` / `team_mode` 为项目级独立字段。
|
||||
- 首期默认:`governance=standard`,`compliance=internal_control+security_baseline`,`execution_mode=docs_only`。
|
||||
- `controlled_patch` 在 SWBOOT-10 受控执行器就绪前 **不可真正启用**;仅保留 allowlist stub。
|
||||
|
||||
### 4. 串联而非回环
|
||||
|
||||
```text
|
||||
software_bootstrap(完成 + 创建者确认)
|
||||
→ 仅建议 software_delivery
|
||||
→ 创建者确认后新建 planning/激活实例
|
||||
```
|
||||
|
||||
bootstrap 完成不得自动创建或激活 delivery。
|
||||
|
||||
### 5. Solo 审批策略(契约)
|
||||
|
||||
- `collaborative`:独立三权(author/reviewer/approver 不同人)。
|
||||
- `solo`:`creator_acknowledgement`;页面与审计持续标注“未独立评审”。
|
||||
- `controlled` 或要求独立审查的 compliance profile:**禁止 solo**。
|
||||
|
||||
### 6. 错误码(首期)
|
||||
|
||||
| code | 含义 |
|
||||
|------|------|
|
||||
| `ERR_WORKFLOW_NOT_SELECTABLE` | key 不在正式可选白名单或未 published |
|
||||
| `ERR_DOMAIN_INCOMPATIBLE` | 工作流与项目 `product_domain` / `project_type` 不兼容 |
|
||||
| `ERR_COMPLIANCE_PROFILE` | 合规配置非法或与治理冲突(如 controlled+solo) |
|
||||
| `ERR_EXECUTION_MODE_DISABLED` | 请求 `controlled_patch` 但受控执行器未启用 |
|
||||
| `ERR_REPO_PATH_NOT_ALLOWLISTED` | 仓库路径不在管理员 allowlist(SWBOOT-10 stub) |
|
||||
| `ERR_CREATION_PREVIEW_STALE` | creation token / plan_hash 过期或不匹配(409) |
|
||||
|
||||
### 7. 运行时权威不变
|
||||
|
||||
继续遵守 [workflow-runtime-authority](./2026-09-12-workflow-runtime-authority.md):任务只能从冻结 `doc_task_instance` 启动;禁止客户端 `task_key`/duty/stage 旁路。
|
||||
|
||||
## 后果
|
||||
|
||||
- Bootstrap seed 与 catalog API 必须同时暴露软件两 key,且按 `product_domain` 过滤时不把医疗默认话术塞进软件项目。
|
||||
- 项目表 additive 增加 `project_type_key` / `compliance_profile_key` 等字段;旧项目不自动分类为医疗或软件。
|
||||
- SWBOOT-10 仅落地 allowlist stub:任何真实 patch/merge/push 必须 fail closed,直到独立 Epic 验收。
|
||||
- 医疗三工作流黄金用例与固定文档数门禁保持回归基线。
|
||||
|
||||
## 关联
|
||||
|
||||
- 实施任务:`.doc/ops/short-term/2026-09-16-software-project-bootstrap.md`
|
||||
- Backlog:`.doc/ops/long-term/2026-09-14-software-project-bootstrap-implementation.md`
|
||||
- 验收清单:`.doc/ops/checklists/2026-09-14-software-project-bootstrap-acceptance.md`
|
||||
@@ -2,7 +2,7 @@
|
||||
title: "Herdr Agent 角色、备援与自动审批治理"
|
||||
status: done
|
||||
created: 2026-09-13
|
||||
updated: 2026-09-13
|
||||
updated: 2026-09-14
|
||||
owner: Codex
|
||||
branch: feature/herdr-agent-governance
|
||||
worktree: .worktrees/feature-herdr-agent-governance
|
||||
@@ -11,6 +11,8 @@ mutex: ops-governance
|
||||
|
||||
# Herdr Agent 角色、备援与自动审批治理
|
||||
|
||||
> **superseded 2026-09-14**:活文档与 `scripts/herdr-agent-*.sh` 已移除;本文件仅作历史证据。见 [2026-09-14-remove-herdr-agent-settings.md](./2026-09-14-remove-herdr-agent-settings.md)。
|
||||
|
||||
## 目标
|
||||
|
||||
建立可审计的 Herdr Agent 能力分工、额度保护、故障接管和免人工工具审批入口,并明确 Herdr PI 与产品容器 PI Agent Runner 不是同一执行体。
|
||||
@@ -47,9 +49,10 @@ mutex: ops-governance
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Agent roster: [../../ops/2026-09-13-herdr-agent-roster.md](../../ops/2026-09-13-herdr-agent-roster.md)
|
||||
- Handoff: [../../ops/handoffs/2026-09-13-herdr-agent-governance.md](../../ops/handoffs/2026-09-13-herdr-agent-governance.md)
|
||||
- Agent roster: [2026-09-13-herdr-agent-roster.md](./2026-09-13-herdr-agent-roster.md)
|
||||
- Handoff: [handoffs/2026-09-13-herdr-agent-governance.md](./handoffs/2026-09-13-herdr-agent-governance.md)
|
||||
- Test report: 本任务文“证据 / 备注”
|
||||
- 移除设定任务: [./2026-09-14-remove-herdr-agent-settings.md](./2026-09-14-remove-herdr-agent-settings.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
|
||||
+6
-4
@@ -1,10 +1,12 @@
|
||||
# Herdr Agent 角色、审批与备援 SSOT
|
||||
|
||||
**更新**: 2026-09-13
|
||||
**owner**: `orchestrator_codex`
|
||||
**status**: active
|
||||
> **archived / superseded 2026-09-14**:不再作为活协作规范;脚本已删除。历史证据保留本文件。移除任务见 [./2026-09-14-remove-herdr-agent-settings.md](./2026-09-14-remove-herdr-agent-settings.md)。
|
||||
|
||||
本文只管理工程协作终端,不管理产品运行时智能体。通用分支、worktree、mutex、集成槽、密钥和破坏性操作规则仍以仓库根 [AGENTS.md](../../AGENTS.md) 为准。
|
||||
**更新**: 2026-09-13(归档标注 2026-09-14)
|
||||
**owner**: `orchestrator_codex`
|
||||
**status**: archived
|
||||
|
||||
本文只管理工程协作终端,不管理产品运行时智能体。通用分支、worktree、mutex、集成槽、密钥和破坏性操作规则仍以仓库根 [AGENTS.md](../../../AGENTS.md) 为准。
|
||||
|
||||
## 1. 身份边界
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
---
|
||||
title: "可靠事件与 FAV 集成 M2–M3"
|
||||
status: cancelled
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-15
|
||||
owner: TBD
|
||||
branch: refactor/durable-event-fav-integration
|
||||
worktree: "-"
|
||||
mutex: event-delivery
|
||||
---
|
||||
|
||||
# 可靠事件与 FAV 集成 M2–M3
|
||||
> 2026-09-15:本任务把 durable event 与未审计 FAV 绑成同一关闭条件,且步骤状态已与 U8/U9 后续交付漂移。任务停止使用;持久事件由 [Track E](../../ops/short-term/2026-09-15-durable-event-track-e.md) 接续,FAV subscriber 继续走独立审计,不把本条已勾选步骤视为生产 dispatcher 验收。
|
||||
|
||||
## 目标
|
||||
|
||||
完成 U5–U9,使投影、通知、RunManifest 和最终成果在多 worker、崩溃、重放和 workspace 清理后仍可恢复且不越权。
|
||||
|
||||
## 范围
|
||||
|
||||
- opaque workspace capability、lease 和 fencing。
|
||||
- durable outbox、逐消费者 delivery/inbox、重试和 dead letter。
|
||||
- 审计并集成 `feature/final-artifact-vault` 的适用实现。
|
||||
- taskrun finalize、RunManifest 持久化、FAV coverage 和迁移 corpus。
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不盲目整分支 cherry-pick FAV。
|
||||
- 不启用跨授权图的 vault 读取。
|
||||
- 不自动销毁 dev/main 数据。
|
||||
- 不执行 U10–U12。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 读取 M1 test report,确认继续 M2 的 go/no-go 已通过。
|
||||
2. [x] 重新分配 Goose 序号并审计 U6/FAV schema 组合。
|
||||
3. [x] 实现 U5–U6,多 app/worker 和 crash matrix 先通过。
|
||||
4. [x] 逐文件审计 FAV 分支,按 U7 边界迁移合格实现。
|
||||
5. [ ] 实现 U8,收敛 taskrun terminal finalize 与 RunManifest。
|
||||
6. [ ] 实现 U9 的 checkpoint backfill、corpus、quarantine 和 cleanup gates。
|
||||
7. [ ] 完成真实 PI、浏览器、workspace 清理、scratch recovery 和 rebuild 演练。
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [ ] 多订阅者有独立 delivery,失败者不阻塞其他订阅者。
|
||||
- [ ] worker crash/retry/replay 不造成重复可见副作用。
|
||||
- [ ] workspace 清空后,verified 最终文档/回复仍可定位并校验。
|
||||
- [ ] 授权图缺失、跨项目、tombstone、坏 digest 和 stale fencing 全部拒绝。
|
||||
- [ ] clean/oldest/previous/hazard/import/reload/rollback/artifact recovery 八轨有独立证据。
|
||||
- [ ] 任何数据销毁仍需完整备份、corpus、FAV coverage 和用户批准。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: [../checklists/2026-09-14-module-decoupling-refactor-acceptance.md](../../ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md)
|
||||
- Handoff: 实施时创建
|
||||
- Test report: 实施后按 M2、M3 分开创建
|
||||
- Plan: [../../remediation/2026-09-14-module-decoupling-refactor-plan.md](../../remediation/2026-09-14-module-decoupling-refactor-plan.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
本任务依赖 M1,不得与 M1 同时修改 docgov/docrevision 的事务主链。
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
title: "模块解耦架构与重构计划修订"
|
||||
status: done
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
owner: Codex
|
||||
branch: feature/module-decoupling-remediation
|
||||
worktree: .worktrees/feature/module-decoupling-remediation
|
||||
mutex: architecture-docs
|
||||
---
|
||||
|
||||
# 模块解耦架构与重构计划修订
|
||||
|
||||
## 目标
|
||||
|
||||
把模块解耦方案修订为可以分段实施、验证和回滚的架构与重构计划,补齐事务、并发互斥、授权、可靠事件、FAV、数据迁移和真实页面验收。
|
||||
|
||||
## 范围
|
||||
|
||||
- 修订模块化单体架构设计与 ADR。
|
||||
- 新增详细整改与重构计划。
|
||||
- 建立首个文档可靠性纵向试点及后续里程碑任务。
|
||||
- 更新 CURRENT、FEATURE-MATRIX 和相关索引。
|
||||
|
||||
## 非目标
|
||||
|
||||
- 本任务不修改业务代码、数据库迁移或部署配置。
|
||||
- 本任务不合并 `feature/final-artifact-vault`,只定义其集成依赖和边界。
|
||||
- 本任务不执行共享容器验证,也不占用集成槽位。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 对照当前源码、已接受 ADR、FAV 分支和外部权威资料复核原方案。
|
||||
2. [x] 修订架构设计与 ADR。
|
||||
3. [x] 编写详细整改计划、里程碑任务和验收清单。
|
||||
4. [x] 更新协作 SSOT 与索引并完成文档一致性检查。
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 计划明确事务所有权、锁顺序、事件投递语义、授权主体和恢复边界。
|
||||
- [x] 首个独立交付边界直接覆盖受控文档刷新、重启、投影缺失和授权负例。
|
||||
- [x] 每个后续里程碑有依赖、文件范围、并发风险、测试矩阵、停走门和回滚边界。
|
||||
- [x] FAV、迁移语料库和完整备份的职责不重叠,工作区不再承担最终成果事实源。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: [../../ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md](../../ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md)
|
||||
- Handoff: 不需要;实现阶段使用两个 planned short-term 接续
|
||||
- Test report: 本任务仅产出计划,不生成业务验收报告
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- 原方案位于主工作区未跟踪文件;本任务在独立 worktree 重建并修订,未覆盖原工作区。
|
||||
- `feature/final-artifact-vault` 已有实现与测试证据,但尚未合入本任务基线,实施前必须重新审计分支差异。
|
||||
- 文档校验:本地相对链接、R/KTD/U ID 唯一性、Mermaid fence 和 `git diff --check` 均通过。
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
title: "移除 Herdr 工作与角色设定"
|
||||
status: done
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
owner: Cursor-Auto
|
||||
branch: feature/remove-herdr-agent-settings
|
||||
worktree: "-"
|
||||
mutex: agent-collab-docs
|
||||
---
|
||||
|
||||
# 移除 Herdr 工作与角色设定
|
||||
|
||||
## 目标
|
||||
|
||||
从仓库活文档与脚本中移除 Herdr Agent 角色、审批、备援与派发设定,协作规范回到通用 AGENTS / worktree / mutex 流程。
|
||||
|
||||
## 范围
|
||||
|
||||
- 删除 `scripts/herdr-agent-start.sh`、`scripts/herdr-agent-dispatch.sh`
|
||||
- 归档 roster / 相关 handoff
|
||||
- 从 `AGENTS.md`、`PROJECT.md`、`.doc/README.md` 去掉 Herdr 专章与索引
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不改写历史 audit / remediation / 已归档任务中的执行者名(如 `implementer_cursor`)作为证据
|
||||
- 不卸载本机 Herdr 客户端
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 从 `dev` 开 `feature/remove-herdr-agent-settings` 并认领
|
||||
2. [x] 移除活文档与脚本中的 Herdr 设定
|
||||
3. [x] 归档 roster / handoff 并更新 CURRENT
|
||||
4. [x] 提交
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 活文档与 `scripts/` 无 Herdr 角色/派发入口
|
||||
- [x] 历史证据在 `archive/` 可追溯
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Roster(已归档): [./2026-09-13-herdr-agent-roster.md](./2026-09-13-herdr-agent-roster.md)
|
||||
- 既有治理归档: [./2026-09-13-herdr-agent-governance.md](./2026-09-13-herdr-agent-governance.md)
|
||||
- Handoff(已归档): [./handoffs/2026-09-13-herdr-agent-governance.md](./handoffs/2026-09-13-herdr-agent-governance.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- 删除:`scripts/herdr-agent-start.sh`、`scripts/herdr-agent-dispatch.sh`
|
||||
- 文档:去掉 `AGENTS.md` §6.6、`PROJECT.md` §10 Herdr 章与索引行、`.doc/README.md` roster 入口
|
||||
- 归档:roster + handoff → `.doc/archive/ops/`
|
||||
@@ -1,63 +0,0 @@
|
||||
---
|
||||
title: "M5/M6 组合根与传输门禁 U11–U12"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/app-composition-u11-u12
|
||||
worktree: "-"
|
||||
mutex: app
|
||||
---
|
||||
|
||||
# M5/M6 组合根与传输门禁 U11–U12
|
||||
|
||||
## 目标
|
||||
|
||||
按整改计划四个子切片完成组合根、文档通知闭包迁出、stageflow 用例、UserProjectContext CAS;再收口 SSE 编码与已清零规则的 arch-check block。用户已明确授权继续 U11/U12(推翻 U10 报告的停止扩面)。
|
||||
|
||||
## 范围
|
||||
|
||||
- U11a:`internal/app` 唯一 composition root;幂等 Start/Stop
|
||||
- U11b:文档 `OnOutbox` 通知迁到 `internal/app/docnotify`
|
||||
- U11c:`internal/app/stageflow` 拥有 ExecuteTask / ExecuteStage
|
||||
- U11d:`ContextUpdate` 版本 CAS,禁止跨模块字段级直改
|
||||
- U12:SSE 中性 frame 编码;`import`/`event` 转 block;不改错误信封与 PI Runner 协议
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不碰 `intent` 包行为(编码阶段 mutex 仍由 Codex 占用;合入后浏览器门另开 handoff)
|
||||
- 不整支 merge `feature/final-artifact-vault`;不启用 `FAV_DEGRADED_READ`
|
||||
- 不终止或改写项目 143
|
||||
- 不删除未到期的 sql_write/path 例外(U3/U5 残留)
|
||||
- 不在 worktree 内 `env-service`
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 认领 CURRENT + 本任务
|
||||
2. [x] U11a composition root
|
||||
3. [x] U11b docnotify
|
||||
4. [x] U11c stageflow
|
||||
5. [x] U11d ContextUpdate
|
||||
6. [x] U12 SSE + arch-check block_kinds
|
||||
7. [x] 短测 / 目标包 race / 报告
|
||||
8. [x] 占槽 `--no-ff` 合入 `dev` + 主仓 `dev rebuild`
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 重复 Start 不重复注册 subscriber;Stop 后再 Start worker 仍在
|
||||
- [x] server 生产代码不再赋值 `OnOutbox`
|
||||
- [x] HTTP 与 CLI 走同一 stageflow 用例
|
||||
- [x] ContextUpdate 并发 stale version 不丢更新赢家
|
||||
- [x] `arch-check --mode block` 对已清零的 import/event 通过
|
||||
- [x] 测试报告回链 U11/U12
|
||||
- [x] 合入后 `/health` `/ready` schema 38、`pi-agent`、新镜像 digest
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: [../../ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md](../../ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md)
|
||||
- Plan: [../../remediation/2026-09-14-module-decoupling-refactor-plan.md](../../remediation/2026-09-14-module-decoupling-refactor-plan.md)
|
||||
- Test report: [../../test-reports/2026-09-15-app-composition-u11-u12-test-report.md](../../test-reports/2026-09-15-app-composition-u11-u12-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
用户口头授权:「继续解耦到 U11、U12」。合入 `dev@bf59cce`。rebuild 镜像 `sha256:a8e3e940f01111c4298c67947ae9f4cd6105f13cf58134672f4a87daa19e27ab`。health/ready:`.doc/test-reports/assets/2026-09-15-app-composition-u11-u12/rebuild-health-ready.txt`。
|
||||
@@ -1,45 +0,0 @@
|
||||
---
|
||||
title: "D4 bizdev locator 最终移除"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/bizdev-locator-removal
|
||||
worktree: "-"
|
||||
mutex: bizdev
|
||||
---
|
||||
|
||||
# D4 bizdev locator 最终移除
|
||||
|
||||
## 目标
|
||||
|
||||
删除 bizdev 上 8 个 locator getter;组合根一次性 Snapshot 后由 Runtime/Server 持有端口。
|
||||
|
||||
## 范围
|
||||
|
||||
- `Pool` `DocGov` `DocRevision` `ContextManager` `CAS` `ProjectWorkflow` `FreeformDoc` `KB`
|
||||
- Runtime / Server 字段
|
||||
- archtest 禁止把 getter 加回去
|
||||
- 调用方迁移
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不删 SchemaVersion / DatabaseReady
|
||||
- 不切事件 live
|
||||
- 不实现 Track P
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] Snapshot + Runtime 端口
|
||||
2. [x] 迁移 server/cmd/tests
|
||||
3. [x] 同批删除 8 getter
|
||||
4. [x] 报告合入
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 生产无 8 个 getter
|
||||
- [x] [S1 报告](../../test-reports/2026-09-15-bizdev-locator-removal-test-report.md)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Phase 2 D4
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: "D7b chat 编排剩余批次"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/chatflow-orchestration-boundary
|
||||
worktree: "-"
|
||||
mutex: chat
|
||||
---
|
||||
|
||||
# D7b chat 编排剩余批次
|
||||
|
||||
## 目标
|
||||
|
||||
`internal/chat` 生产代码不再 import bizdev;任务请求走 stageflow 类型别名。
|
||||
|
||||
## 范围
|
||||
|
||||
- action_executor 去掉 Bizdev 字段
|
||||
- 收紧 chat import allowlist
|
||||
- 表征测试保留
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不搬空测试 import
|
||||
- 不把 taskrun 签名从 bizdev 别名拷成独立结构
|
||||
- 不切事件 live
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] action_executor 改 stageflow 类型
|
||||
2. [x] 收紧 yaml
|
||||
3. [x] 报告合入
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] chat 生产无 bizdev import
|
||||
- [x] [S4b 报告](../../test-reports/2026-09-15-chatflow-orchestration-boundary-test-report.md)
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
title: "U10 chatlog/contextasm 原地端口化"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/chatlog-contextasm-u10
|
||||
worktree: "-"
|
||||
mutex: chat
|
||||
---
|
||||
|
||||
# U10 chatlog/contextasm 原地端口化
|
||||
|
||||
## 目标
|
||||
|
||||
在不物理拆包的前提下,为对话读取与 prompt 装配建立带 Principal 的消费者端口,使正文、分类、计数、导出、摘要和恢复使用同一授权可见集合。
|
||||
|
||||
## 范围
|
||||
|
||||
- `internal/app/chatflow` ChatLog / ContextAssembler 端口
|
||||
- ctxmgr 表所有权不变;adapter 内做可见性过滤
|
||||
- server 历史读取 handler 改走 ChatLog;忽略 query/body 中的 user_id 身份
|
||||
- 会话 restore / 记忆召回只注入允许集合
|
||||
- 不碰 `intent` mutex,不物理搬到 `chatlog`/`contextasm` 包
|
||||
|
||||
## 非目标
|
||||
|
||||
- U11–U12
|
||||
- 整支 merge `feature/final-artifact-vault`
|
||||
- 启用 `FAV_DEGRADED_READ`
|
||||
- 纯搬包
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 核实 `chat` mutex:`fix/chat-history-refresh` 已是 `dev` 祖先;剩余真实 PI 刷新与 U10 同批收口
|
||||
2. [x] 从最新 `dev` 开 `feature/chatlog-contextasm-u10` 并登记 CURRENT
|
||||
3. [x] 定义 chatflow 端口与 ctxmgr adapter
|
||||
4. [x] 迁移 window/day/stats/search/unread/export/digest/history/restore/memory
|
||||
5. [x] 合同测试:同集计数、非 owner 403、restore/digest 不放大不可见消息
|
||||
6. [x] 验收报告;最后一句 **停止扩面**
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 刷新前后同一授权集合的正文与分类计数一致(adapter 合同测试)
|
||||
- [x] 跨用户负例 fail closed(guest 非 owner)
|
||||
- [x] context assembly / digest 只使用允许集合
|
||||
- [x] 真实 PI 闲聊刷新 E2E 证据(与对话刷新活验同批;编制任务链 save 400 未纳入停走)
|
||||
- [x] 未物理拆包;DTO 转换为 0,拆包收益不成立
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: [../checklists/2026-09-14-module-decoupling-refactor-acceptance.md](../checklists/2026-09-14-module-decoupling-refactor-acceptance.md)
|
||||
- Plan: [../../remediation/2026-09-14-module-decoupling-refactor-plan.md](../../remediation/2026-09-14-module-decoupling-refactor-plan.md)
|
||||
- Chat refresh: [../../test-reports/2026-09-13-chat-history-refresh-test-report.md](../../test-reports/2026-09-13-chat-history-refresh-test-report.md)
|
||||
- Test report: [../../test-reports/2026-09-15-chatlog-contextasm-u10-test-report.md](../../test-reports/2026-09-15-chatlog-contextasm-u10-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
U9 最后一句 **继续 U10** 只批准进入 M4。禁止 U11–U12。`intent` 认领仍 `in_progress`,本单元不改意图分类。活验项目 6252 / `sess-p6252-u10`;产物 `.doc/test-reports/assets/2026-09-15-chat-history-refresh-live/live.json`。未占槽 rebuild。
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
title: "M3 U9 存量回填、migration corpus 与数据生命周期"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/dataset-lifecycle-u9
|
||||
worktree: "-"
|
||||
mutex: dataset
|
||||
---
|
||||
|
||||
# M3 U9 存量回填、migration corpus 与数据生命周期
|
||||
|
||||
## 目标
|
||||
|
||||
只保留可解释的演示/回归数据,并持续验证旧数据迁移、重载和受控恢复。backfill 可暂停续跑,异常进 quarantine;八条轨道可重复;销毁默认 fail closed。
|
||||
|
||||
## 范围
|
||||
|
||||
- dataset registry(pinned / demo / regression / migration_baseline / ephemeral / quarantine)
|
||||
- checkpoint 分批 backfill:只枚举 snapshot、approved/commit event、completed chat turn
|
||||
- SKIP LOCKED 多 worker;禁止扫描 workspace
|
||||
- 销毁门禁:FAV coverage + 完整备份 restore + corpus + 精确 manifest + 双人批准 + quarantine 观察窗
|
||||
- restore 拒绝共享 env DSN;只允许 scratch
|
||||
- 八轨:clean / oldest-supported / previous / hazard / import / reload / rollback / artifact recovery
|
||||
|
||||
## 非目标
|
||||
|
||||
- U10–U12;不碰 `chat` / `intent` mutex
|
||||
- 不整支 merge `feature/final-artifact-vault`;不启用 `FAV_DEGRADED_READ`
|
||||
- 不修改历史 Goose;不销毁 `agent_system_dev/test/main`
|
||||
- 不终止或改写项目 143;worktree 内禁止 `env-service`
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] CURRENT 认领 `mutex=dataset`;从 `dev` 开 `feature/dataset-lifecycle-u9`
|
||||
2. [x] Goose 00038 + `module-boundaries.yaml`
|
||||
3. [x] `internal/artifactvault/backfill.go` + `internal/dataset` + `cmd/dataset`
|
||||
4. [x] 硬化 `scripts/restore-system-db-drill.sh`
|
||||
5. [x] 隔离库 + 八轨 + 目标包 `-race` + 占槽 rebuild
|
||||
6. [x] 验收报告;最后一句 **继续 U10**
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] backfill 中断、重复、并发新终态时分母/分子可复算且不重复 artifact
|
||||
- [x] legacy-v0 / 旧 schema / 高 ID / projection fork / 缺 snapshot → quarantine 或升级
|
||||
- [x] restore 拒绝共享 DSN、错误 storage identity、篡改 manifest、缺权限
|
||||
- [x] coverage / backup / corpus 任一失败阻止 destroy
|
||||
- [x] 批准 dataset 导入后关系、SHA、sequence 可复算
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: `.doc/ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md`
|
||||
- Plan: `.doc/remediation/2026-09-14-module-decoupling-refactor-plan.md` U9
|
||||
- Test report: `.doc/test-reports/2026-09-15-dataset-lifecycle-u9-test-report.md`
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
见验收报告。Goose 00038。dev schema 38。
|
||||
@@ -1,46 +0,0 @@
|
||||
---
|
||||
title: "D6 doccontent canonical 边界"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/doccontent-canonical-boundary
|
||||
worktree: "-"
|
||||
mutex: docgov
|
||||
---
|
||||
|
||||
# D6 doccontent canonical 边界
|
||||
|
||||
## 目标
|
||||
|
||||
Markdown canonicalization 与 SHA 抽到 `internal/doccontent`;生产 `docgov` 不再 import `docrevision`。
|
||||
|
||||
## 范围
|
||||
|
||||
- `internal/doccontent`
|
||||
- `docgov/lease.go` 改走 doccontent
|
||||
- `docrevision` 薄封装保持旧调用方
|
||||
- golden + wrapper 对账
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不改 hash 语义
|
||||
- 不碰项目 143 数据
|
||||
- 不删 `docrevision.CanonicalizeMarkdown` 导出(兼容)
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 分支与 CURRENT
|
||||
2. [x] 提取模块与切断 docgov→docrevision
|
||||
3. [x] golden / arch-check
|
||||
4. [x] 报告并合入
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 生产 docgov 不 import docrevision
|
||||
- [x] project143 hard-break golden 仍过
|
||||
- [x] [S3 报告](../../test-reports/2026-09-15-doccontent-canonical-boundary-test-report.md)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Phase 2: [../../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md](../../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md)
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
title: "Track E 持久事件交付"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/event-e2-hook-guard
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# Track E 持久事件交付
|
||||
|
||||
## 目标
|
||||
|
||||
按 E0A→E0B→E1A→E1B→E1C 完成 notify、workflow advance、projection 的 PG 持久交付,并用授权页面刷新/重启恢复证据关闭 `DOC-RELIABILITY-PILOT` 的事件部分。
|
||||
|
||||
## 范围
|
||||
|
||||
- E0A:生产入口/UoW、event contract、runtime registry、历史数据与 sequence 门。
|
||||
- E0B:PG dispatcher、attempt audit、独立进程、并发与故障注入。
|
||||
- E1A/B/C:三个消费者独立 shadow、switch、rollback 和真实恢复验收。
|
||||
|
||||
## 非目标
|
||||
|
||||
- FAV consumer 激活、bizdev/chat/intent 结构重构、HTTP 错误信封、PI typed result。
|
||||
- 删除或覆盖历史事件;在 E0A 通过前启动 dispatcher。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] E0A 单独建 short-term/分支,dispatcher 保持 off。
|
||||
2. [x] E0A 报告通过后再认领 E0B。
|
||||
3. [x] 依次交付 E1A notify、E1B workflow advance、E1C projection;每步独立 go/no-go。
|
||||
4. [x] E2 兼容守卫:live 时闭包停写;hook API 待 live 窗口后删除。
|
||||
5. [x] 同步 test report、CURRENT、FEATURE-MATRIX、gap-matrix、[复盘](../research/2026-09-15-track-e-retrospective.md)。
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [ ] 满足 [Phase 2 Track E Definition of Done](../../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md#track-e-definition-of-done)(共享 live 与删除 hook API 仍开放)。
|
||||
- [x] 每个波次拥有独立 owner、mutex、分支、报告和回滚证据。
|
||||
- [x] 未把计划、MemoryBus、stub 或日志冒充生产 PG/browser/restart 验收。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: 按每个波次建立
|
||||
- Audit: [Phase 2 方案审阅](../../audit/2026-09-15-module-decoupling-phase2-plan-review.md)
|
||||
- Remediation: [Phase 2 修订计划](../../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md)
|
||||
- Test report: [E2](../../test-reports/2026-09-15-event-e2-hook-guard-test-report.md)
|
||||
- 复盘: [./research/2026-09-15-track-e-retrospective.md](../research/2026-09-15-track-e-retrospective.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
本条只建立执行入口,不代表已批准 E0A 或已认领 mutex。实施前必须按 CURRENT 检查冲突并从当时最新 dev 建分支。
|
||||
@@ -1,49 +0,0 @@
|
||||
---
|
||||
title: "E0A 事件生产、契约与历史数据门"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/event-production-scope-contract
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# E0A 事件生产、契约与历史数据门
|
||||
|
||||
## 目标
|
||||
|
||||
组合根注入唯一 `docflow.Commands`;candidate-ready、downstream-impact、approved 三条链在同一 UoW 写 envelope/delivery;缺 env/project fail closed;FAV 不写入;allowlist 与 runtime registry parity;历史 inventory 分类且不删数据;dispatcher 保持 off。
|
||||
|
||||
## 范围
|
||||
|
||||
- D3 生产入口与作用域
|
||||
- D10 既有 event allowlist 补全与 registry parity
|
||||
- D11 inventory、sequence ADR、repair/quarantine/expire、replay 骨架、service principal 表
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不实现/启动 PG dispatcher
|
||||
- 不激活 FAV,不写 staging/artifact/publication
|
||||
- 不删除历史事件
|
||||
- 不开始 Track S/P
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 从最新 `dev` 开 `fix/event-production-scope-contract` 并登记 CURRENT
|
||||
2. [x] 唯一 Commands、三条链同 UoW、FAV 隔离
|
||||
3. [x] allowlist + registry parity + 动态 FAV 注册失败
|
||||
4. [x] inventory/repair/replay/principal additive schema 与用例
|
||||
5. [x] 连续性模型 ADR;gap blocking 关闭
|
||||
6. [x] 隔离库 PG 证据与 test-report
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 见 [E0A 测试报告](../../test-reports/2026-09-15-event-e0a-production-scope-contract-test-report.md)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Remediation: [../../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md](../../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md)
|
||||
- Track E: [./2026-09-15-durable-event-track-e.md](./2026-09-15-durable-event-track-e.md)
|
||||
- Report: [../../test-reports/2026-09-15-event-e0a-production-scope-contract-test-report.md](../../test-reports/2026-09-15-event-e0a-production-scope-contract-test-report.md)
|
||||
- ADR: [../../adr/2026-09-15-event-consumer-checkpoint.md](../../adr/2026-09-15-event-consumer-checkpoint.md)
|
||||
@@ -1,43 +0,0 @@
|
||||
---
|
||||
title: "E0B PG dispatcher 基座"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/events-dispatcher-pg
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# E0B PG dispatcher 基座
|
||||
|
||||
## 目标
|
||||
|
||||
原子 lease/attempt/heartbeat/fencing、独立 `cmd/events`、默认 mode=off、1/2/4 worker 与崩溃注入。
|
||||
|
||||
## 范围
|
||||
|
||||
- Goose 00040、ClaimLeases、cmd/events、compose events 服务
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不把任何 consumer 切 live
|
||||
- 不激活 FAV
|
||||
- 不删除历史
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 从 E0A 后 `dev` 开 `feature/events-dispatcher-pg`
|
||||
2. [x] additive schema + atomic claim
|
||||
3. [x] worker/heartbeat/fencing/shadow scan
|
||||
4. [x] cmd/events + compose
|
||||
5. [x] 隔离库 PG + race + 报告
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] [E0B 测试报告](../../test-reports/2026-09-15-event-e0b-dispatcher-pg-test-report.md)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Track E: [./2026-09-15-durable-event-track-e.md](./2026-09-15-durable-event-track-e.md)
|
||||
- Report: [../../test-reports/2026-09-15-event-e0b-dispatcher-pg-test-report.md](../../test-reports/2026-09-15-event-e0b-dispatcher-pg-test-report.md)
|
||||
@@ -1,48 +0,0 @@
|
||||
---
|
||||
title: "E1A notify shadow 与切换"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/event-notify-cutover
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# E1A notify shadow 与切换
|
||||
|
||||
## 目标
|
||||
|
||||
notify 消费者具备 shadow 覆盖门、live 唯一可见结果与显式 rollback;生产集群保持 off。
|
||||
|
||||
## 范围
|
||||
|
||||
- Goose 00041、`EmitVisibleDocumentEvent`、`docnotify.EventConsumer`、Handler 与 Ack 同事务
|
||||
- cmd/events 注册 notify(mode=off 时不 claim)
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不把共享环境 notify 切 live
|
||||
- 不删除 OnOutbox 闭包
|
||||
- 不激活 FAV / workflow advance / projection live
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 从 E0B 后 `dev` 开 `fix/event-notify-cutover`
|
||||
2. [x] additive `source_event_id` 与可见结果唯一索引
|
||||
3. [x] shadow dry-run + live 同事务 ack
|
||||
4. [x] fixture N=30、quarantine、correlation、rollback
|
||||
5. [x] 隔离库 PG + race + 报告
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] [E1A 测试报告](../../test-reports/2026-09-15-event-e1a-notify-cutover-test-report.md)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Track E: [./2026-09-15-durable-event-track-e.md](./2026-09-15-durable-event-track-e.md)
|
||||
- Report: [../../test-reports/2026-09-15-event-e1a-notify-cutover-test-report.md](../../test-reports/2026-09-15-event-e1a-notify-cutover-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
隔离库 `agent_rel_e1a` 测完已 DROP。共享 `event_consumer_modes.notify=off`。
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
title: "E1B workflow advance shadow 与切换"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/event-workflow-advance
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# E1B workflow advance shadow 与切换
|
||||
|
||||
## 目标
|
||||
|
||||
workflow_advance 具备 shadow/live/rollback;并发或重放批准只产生一次阶段可推进可见结果。生产集群保持 off。
|
||||
|
||||
## 范围
|
||||
|
||||
- Goose 00042、`docadvance.EventConsumer`、`EmitVisibleStageReady`、MarkDocTaskApproved 走 fenced tx
|
||||
- cmd/events 注册 workflow_advance
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不把共享环境 workflow_advance 切 live
|
||||
- 不删除 AddOnApprovedHook
|
||||
- 不激活 FAV / projection live
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 从 E1A 后 `dev` 开 `fix/event-workflow-advance`
|
||||
2. [x] additive source_event_id on stage_advance_requests
|
||||
3. [x] consumer 重读文档并同事务 ack
|
||||
4. [x] 隔离库并发/重放/quarantine/rollback
|
||||
5. [x] 报告
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] [E1B 测试报告](../../test-reports/2026-09-15-event-e1b-workflow-advance-test-report.md)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Track E: [./2026-09-15-durable-event-track-e.md](./2026-09-15-durable-event-track-e.md)
|
||||
- Report: [../../test-reports/2026-09-15-event-e1b-workflow-advance-test-report.md](../../test-reports/2026-09-15-event-e1b-workflow-advance-test-report.md)
|
||||
@@ -1,41 +0,0 @@
|
||||
---
|
||||
title: "E1C projection no-replace"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/event-projection-cutover
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# E1C projection no-replace
|
||||
|
||||
## 目标
|
||||
|
||||
projection 消费者幂等只前进;共享集群保持 off。
|
||||
|
||||
## 范围
|
||||
|
||||
- Goose 00043、ProjectHeadNoReplace、docproject.EventConsumer
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不把共享 projection 切 live
|
||||
- 不激活 FAV
|
||||
- 不删除闭包
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 分支与 additive schema
|
||||
2. [x] no-replace SQL + consumer
|
||||
3. [x] 隔离库 + race + worker 重启
|
||||
4. [x] 报告
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] [E1C 测试报告](../../test-reports/2026-09-15-event-e1c-projection-test-report.md)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Track E: [./2026-09-15-durable-event-track-e.md](./2026-09-15-durable-event-track-e.md)
|
||||
@@ -1,48 +0,0 @@
|
||||
---
|
||||
title: "E2 闭包 live 停写与 Track E 复盘"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/event-e2-hook-guard
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# E2 闭包 live 停写与 Track E 复盘
|
||||
|
||||
## 目标
|
||||
|
||||
在 dispatcher 仍默认 off 时保留 `OnOutbox` / `AddOnApprovedHook` 接线,使对应消费者切 `live` 后闭包立即停写,避免双写;并写 Track E 复盘。不关闭 `DOC-RELIABILITY-PILOT`。
|
||||
|
||||
## 范围
|
||||
|
||||
- `events.WriterLive`
|
||||
- `docnotify.Subscriber.SkipWrite`
|
||||
- Runtime / 遗留 HTTP hook 在 `workflow_advance` live 时 no-op
|
||||
- 复盘与 E2 测试报告
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不删除 hook API(须等 live 发布窗口)
|
||||
- 不把共享 notify/advance/projection 切 live
|
||||
- 不激活 FAV
|
||||
- 不关闭 Track E 发布 blocker
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 从最新 `dev` 开 `fix/event-e2-hook-guard` 并登记 CURRENT
|
||||
2. [x] WriterLive + 闭包守卫 + 单测
|
||||
3. [x] 隔离库 mode 矩阵
|
||||
4. [x] 复盘与报告
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] live 时闭包不写;off/shadow 仍写
|
||||
- [x] 生产仍保留 Bind / AddOnApprovedHook(mode=off 必需)
|
||||
- [x] [E2 报告](../../test-reports/2026-09-15-event-e2-hook-guard-test-report.md)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Track E: [./2026-09-15-durable-event-track-e.md](./2026-09-15-durable-event-track-e.md)
|
||||
- 复盘: [../research/2026-09-15-track-e-retrospective.md](../research/2026-09-15-track-e-retrospective.md)
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
title: "共享环境事件消费者 live 切换"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/event-shared-live-cutover
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# 共享环境事件消费者 live 切换
|
||||
|
||||
## 目标
|
||||
|
||||
在共享 `agent-dev` 上按 notify → workflow_advance → projection 完成 shadow → drain → live → 回滚演练,再删除生产 hook 注册。
|
||||
|
||||
## 范围
|
||||
|
||||
- `scripts/event-consumer-mode.sh` + `cmd/eventmode`
|
||||
- 共享 `agent_system_dev` inventory / quarantine
|
||||
- 逐消费者 live 与授权页纵切(项目 6275;143 只读)
|
||||
|
||||
## 非目标
|
||||
|
||||
- FAV live
|
||||
- test/main 环境
|
||||
- 编辑 Phase 2 计划原文
|
||||
- Track P(独立波次)
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] L0 受控 SetMode 与 inventory
|
||||
2. [x] L1 notify
|
||||
3. [x] L2 workflow_advance
|
||||
4. [x] L3 projection + 授权页
|
||||
5. [x] L4 删除生产 hook 注册
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] fav / test / main 切模式失败
|
||||
- [x] 每消费者独立 live 报告
|
||||
- [x] 生产代码无 `OnOutbox =` / `AddOnApprovedHook(`
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Long-term: [.doc/archive/ops/2026-09-15-event-shared-live-cutover.md](../../archive/ops/2026-09-15-event-shared-live-cutover.md)
|
||||
- Notify: [.doc/test-reports/2026-09-15-event-notify-shared-live-test-report.md](../../test-reports/2026-09-15-event-notify-shared-live-test-report.md)
|
||||
- Advance: [.doc/test-reports/2026-09-15-event-workflow-advance-shared-live-test-report.md](../../test-reports/2026-09-15-event-workflow-advance-shared-live-test-report.md)
|
||||
- Projection: [.doc/test-reports/2026-09-15-event-projection-shared-live-test-report.md](../../test-reports/2026-09-15-event-projection-shared-live-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
已合入 `dev@39dc68d`。生产 hook 注册已删;方法本体保留一个窗口。
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
title: "共享环境事件消费者 live 切换"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
---
|
||||
|
||||
# 共享环境事件消费者 live 切换
|
||||
|
||||
## 动机
|
||||
|
||||
Track E 已在隔离库证明 notify / workflow_advance / projection 的 exactly-one visible outcome 与 E2 闭包守卫。共享集群仍为 `off`,HTTP 闭包仍是唯一真实写者。未 live 则不能删 hook API,也不能关闭 `DOC-RELIABILITY-PILOT`。
|
||||
|
||||
## 成功标准
|
||||
|
||||
- 按消费者独立:shadow coverage → drain → 原子 live;E2 守卫使对应闭包停写。
|
||||
- 授权页刷新/重启正文与 head digest 一致;未授权不泄露。
|
||||
- 回滚开关保留一个发布窗口后再删 `OnOutbox` / `AddOnApprovedHook`。
|
||||
- FAV 保持 disabled;项目 143 只读。
|
||||
|
||||
## 依赖
|
||||
|
||||
- E0A–E2 已合入;隔离库报告已归档。
|
||||
- 需要明确授权:动共享 `agent-dev` 消费者 mode。
|
||||
|
||||
## 暂不启动原因
|
||||
|
||||
已完成共享 live 与生产去注册。方法本体保留一个窗口。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- [Track E 复盘](../research/2026-09-15-track-e-retrospective.md)
|
||||
- [E2 报告](../../test-reports/2026-09-15-event-e2-hook-guard-test-report.md)
|
||||
- [gap-matrix DOC-RELIABILITY-PILOT](../../remediation/gap-matrix.md)
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: "D7a intent 与 bizdev 解绑"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/intent-bizdev-boundary
|
||||
worktree: "-"
|
||||
mutex: intent
|
||||
---
|
||||
|
||||
# D7a intent 与 bizdev 解绑
|
||||
|
||||
## 目标
|
||||
|
||||
intent 只依赖成熟度词汇叶子包,不再 import bizdev。
|
||||
|
||||
## 范围
|
||||
|
||||
- `internal/maturity`
|
||||
- intent 生产与表征测试
|
||||
- bizdev 类型别名保持兼容
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不改识别规则
|
||||
- 不迁 coordinator / chatflow(D5/D7b)
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 叶子包与别名
|
||||
2. [x] intent 切断 bizdev
|
||||
3. [x] 表征测试与 arch-check
|
||||
4. [x] 报告
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] intent 生产 import 无 bizdev
|
||||
- [x] [S4a 报告](../../test-reports/2026-09-15-intent-bizdev-boundary-test-report.md)
|
||||
@@ -1,50 +0,0 @@
|
||||
---
|
||||
title: "清点旁支并收口已合入本地分支"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: chore/leftover-branch-cleanup
|
||||
worktree: "-"
|
||||
mutex: ops
|
||||
---
|
||||
|
||||
# 清点旁支并收口已合入本地分支
|
||||
|
||||
## 目标
|
||||
|
||||
删除 tip 已是 `dev` 祖先的本地旁支与对应 worktree;不整支合入会回归或触红线的 5 条未合并分支;主仓跑一次 short 冒烟。
|
||||
|
||||
## 范围
|
||||
|
||||
- 拆 7 个已合入 worktree
|
||||
- `git branch -d` 已 `--merged` 旁支
|
||||
- CURRENT 记录故意保留的 FAV / herdr-removal / diagnosis / data-root / `dev-old-linear`
|
||||
- vet / short / arch-check / health+ready
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不整支 merge `feature/final-artifact-vault`;不启用 `FAV_DEGRADED_READ`
|
||||
- 不合入 `feature/remove-herdr-agent-settings`(会回归 U12 arch-check、删 Herdr 脚本)
|
||||
- 不合入 `fix/project143-controlled-content-404-diagnosis`(会回退审计关闭结果)
|
||||
- 不合入 `fix/dev-runtime-data-root-guard`、`dev-old-linear`
|
||||
- 不 push;不删 `origin/*`;不从 worktree 起 docker;不碰项目 143
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 占 CURRENT 集成槽
|
||||
2. [x] 拆已合入 worktree
|
||||
3. [x] 删除已 merged 本地旁支
|
||||
4. [x] 冒烟并写报告
|
||||
5. [x] 槽位 idle + archive
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 已合入旁支 worktree 只剩 FAV 错名目录
|
||||
- [x] `--merged dev` 旁支已删(31 条)
|
||||
- [x] 5 条未合入分支仍在
|
||||
- [x] 测试报告 + health/ready schema 38
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Test report: [../../test-reports/2026-09-15-leftover-branch-cleanup-test-report.md](../../test-reports/2026-09-15-leftover-branch-cleanup-test-report.md)
|
||||
@@ -1,57 +0,0 @@
|
||||
---
|
||||
title: "审阅并修订模块解耦 Phase 2 方案"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Codex
|
||||
branch: docs/module-decoupling-ipc-assessment
|
||||
worktree: "-"
|
||||
mutex: architecture-docs
|
||||
---
|
||||
|
||||
# 审阅并修订模块解耦 Phase 2 方案
|
||||
|
||||
## 目标
|
||||
|
||||
以当前代码、migration、ADR 和 Phase 1 计划为证据,修正调研与 Phase 2 方案,并补齐高并发、互斥、权限、历史数据、灰度和回滚设计;不实施业务代码。
|
||||
|
||||
## 范围
|
||||
|
||||
- 复核调研报告与原 Phase 2 方案的事实、依赖和完成边界。
|
||||
- 将事件可靠性、结构解耦、HTTP/PI 协议拆成独立轨道。
|
||||
- 补充 PG 状态机、fencing、幂等、顺序、连接预算、权限、replay、脱敏、迁移和 browser/restart 验收。
|
||||
- 同步 audit、remediation、CURRENT、FEATURE-MATRIX 与 gap-matrix。
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不实现 dispatcher、consumer、migration 或协议代码。
|
||||
- 不合并、部署、重启容器、删除数据或审计/合入 FAV 分支。
|
||||
- 不把文档完成写成系统能力完成。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 完成仓库启动链和上位 ADR/Phase 1 证据复核。
|
||||
2. [x] 完成一致性、可行性、范围、安全、产品与对抗视角审阅。
|
||||
3. [x] 修正调研报告中的 PG、依赖方向、allowlist 与进程边界事实。
|
||||
4. [x] 重写 Phase 2 为 Track E/S/P,补齐详细实施和停走门。
|
||||
5. [x] 同步索引与状态 SSOT。
|
||||
6. [x] 执行文档链接、diff、冲突标记和术语检查。
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 调研不再把 SELECT-only Claim、MemoryBus 测试或 allowlist 基线写成生产闭环。
|
||||
- [x] Track E 可独立关闭,FAV/D8/D9 不阻塞。
|
||||
- [x] 方案明确 at-least-once 与 exactly-one visible outcome、最终提交点 fencing、集群级切换和授权模型。
|
||||
- [x] 历史脏数据只分类/隔离/修复,不授权删除。
|
||||
- [x] 文档状态一致且没有实施或发布声明。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Audit: [方案审阅](../../audit/2026-09-15-module-decoupling-phase2-plan-review.md)
|
||||
- Remediation: [Phase 2 修订计划](../../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md)
|
||||
- Research: [IPC/RPC 现状评估](../../ops/research/2026-09-15-module-decoupling-ipc-assessment.md)
|
||||
- Test report: 不适用(文档审阅,无业务实现)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
本任务沿用用户已创建的 `docs/module-decoupling-ipc-assessment` 分支。该分支名早于当前 `feature/*|fix/*` 规则;未改写或重命名用户分支。起点提交为 `a3392e3` 与 `5cef856`,本轮未获授权 commit/push。
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
title: "PI typed-result-v1 P1–P4"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/pi-typed-result
|
||||
worktree: "-"
|
||||
mutex: pi-agent
|
||||
---
|
||||
|
||||
# PI typed-result-v1 P1–P4
|
||||
|
||||
## 目标
|
||||
|
||||
Runner additive 输出 `result_v1`;Go typed-first fail-closed;共享 dev 真实 PI 双轨对账;去掉 stderr/legacy 明文错误。
|
||||
|
||||
## 范围
|
||||
|
||||
- `configs/schemas/pi-run-result-v1.json`
|
||||
- `deploy/pi-agent/result-v1.mjs` + runner 接线
|
||||
- `internal/agent` parser / 负例 / `RUN_PI_E2E=1` 双轨
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不把 member 正文搬进 `result_v1`(仍走 `patches[]`)
|
||||
- 不改 HTTP 状态码;不启用 FAV;不写项目 143
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] Schema + Runner additive
|
||||
2. [x] Go typed-first + handshake
|
||||
3. [x] 真实 PI 双轨
|
||||
4. [x] 删 stderr/隐式 legacy;报告与合入
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] typed-present-invalid 永不 fallback
|
||||
- [x] handshake downgrade 负例 PASS
|
||||
- [x] `RUN_PI_E2E=1` 成功/失败/取消/超时对账
|
||||
- [x] test-report 归档
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Test report: `.doc/test-reports/2026-09-15-pi-typed-result-v1-test-report.md`
|
||||
- Remediation: `.doc/remediation/2026-09-15-pi-typed-result-v1-remediation.md`
|
||||
- P0: `.doc/ops/research/2026-09-15-pi-typed-result-p0-matrix.md`
|
||||
@@ -1,45 +0,0 @@
|
||||
---
|
||||
title: "晋升 dev → test 并部署测试环境"
|
||||
status: in_progress
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/promote-dev-to-test-2026-09-15
|
||||
worktree: "-"
|
||||
mutex: infra
|
||||
---
|
||||
|
||||
# 晋升 dev → test 并部署测试环境
|
||||
|
||||
## 目标
|
||||
|
||||
把已完成的 Phase 2 代码从本地 `dev` 合入 `test`,重建并冒烟测试环境,供人工实测。不实施多意图 HITL。
|
||||
|
||||
## 范围
|
||||
|
||||
- `test` 分支 `--no-ff` 合入当前 `dev`
|
||||
- `./scripts/env-service.sh test rebuild`
|
||||
- test 库 notify/workflow_advance/projection 切 live(L4 去 hook 后 off 会停写);FAV 保持 off
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不实施多意图 HITL U1+
|
||||
- 不合入 `main`、不启用 FAV
|
||||
- 不写项目 143
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 确认 Phase 2 已在本地 `dev`
|
||||
2. [ ] occupy 集成槽并合入 `test`
|
||||
3. [ ] rebuild 测试服务
|
||||
4. [ ] health/ready + schema 冒烟
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [ ] `:8081` health/ready PASS
|
||||
- [ ] events `:8089` health PASS
|
||||
- [ ] FAV 仍 off
|
||||
|
||||
## 相关链接
|
||||
|
||||
- CURRENT: `.doc/ops/CURRENT.md`
|
||||
@@ -1,40 +0,0 @@
|
||||
---
|
||||
title: "D5 stageflow 类型归属与 D7b chatflow 首批"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: fix/stageflow-type-ownership
|
||||
worktree: "-"
|
||||
mutex: stageflow
|
||||
---
|
||||
|
||||
# D5 stageflow 类型归属与 D7b chatflow 首批
|
||||
|
||||
## 目标
|
||||
|
||||
coordinator 生产代码不再 import bizdev;task/stage 请求走 stageflow 类型;chatflow assembler 改用 maturity。
|
||||
|
||||
## 范围
|
||||
|
||||
- stageflow 类型别名与状态常量
|
||||
- coordinator 构造改为 StageTaskRunner + ContextServices
|
||||
- chatflow 去掉 bizdev import
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不复制行为方法成 DTO(身份别名 + token golden)
|
||||
- 不删除 bizdev 八个 getter(D4)
|
||||
- 不搬空 chat 包
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 类型边界与 coordinator 解绑
|
||||
2. [x] chatflow assembler
|
||||
3. [x] 表征测试与 arch-check
|
||||
4. [x] 报告
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] coordinator 生产 import 无 bizdev
|
||||
- [x] [S2/S4b 报告](../../test-reports/2026-09-15-stageflow-type-ownership-test-report.md)
|
||||
@@ -1,60 +0,0 @@
|
||||
---
|
||||
title: "M3 U8 TaskRun 终态与 RunManifest"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/taskrun-runmanifest
|
||||
worktree: "-"
|
||||
mutex: taskrun
|
||||
---
|
||||
|
||||
# M3 U8 TaskRun 终态与 RunManifest
|
||||
|
||||
## 目标
|
||||
|
||||
TaskRun 终态在同一 UoW 内 CAS 写入唯一合法状态,并持久化类型化 RunManifest;重复 finalize / cancel race / SSE 断线不得产生第二条助手消息或第二份 artifact;workspace 清理仅在 verified receipt 之后。
|
||||
|
||||
## 范围
|
||||
|
||||
- Goose 00037 `task_run_manifests` + `finalizing` 状态
|
||||
- `internal/taskrun` RunManifest 规范字节 / SHA / members
|
||||
- `taskrun.Commands.Finalize` 唯一 finalize 命令;server 变薄
|
||||
- `ctxmgr.FinalizeAssistantTaskMessage` 仅此写路径加入 UoW
|
||||
- workspace 清理门禁;`ReadArtifact` 替代 `Join(workDir, "output.md")`
|
||||
- BackendRef 服务端 policy;隔离库并发测试;占槽 rebuild;U8 报告
|
||||
|
||||
## 非目标
|
||||
|
||||
- U9 backfill / corpus / 八轨 / 销毁
|
||||
- M4–M6;整支 merge FAV;启用 `FAV_DEGRADED_READ`
|
||||
- 终止或改写项目 143
|
||||
- 动 `chat` / `intent` 刷新任务
|
||||
- worktree 内 `env-service`
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] CURRENT 认领 `mutex=taskrun`;从本地 `dev` 开 `feature/taskrun-runmanifest`
|
||||
2. [x] Goose 00037 Up+Down;`module-boundaries.yaml` 表属主
|
||||
3. [x] Finalize 同 UoW:CAS + 助手 turn + manifest + envelope/staging
|
||||
4. [x] 清理门禁与 server 去路径、BackendRef
|
||||
5. [x] 隔离库双 pool / race;占槽 rebuild;报告最后一句只能「继续 U9」或「停止扩面」
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 重复 finalize:同一 status、同一 manifest SHA、助手消息 1 条、envelope/staging 不加倍
|
||||
- [x] finalize ∥ cancel:恰好一个合法终态
|
||||
- [x] SSE `done` 不出现在 TX 失败路径;commit 前断线重试不第二 turn
|
||||
- [x] 无 verified receipt 则 cleanup FAIL;有 receipt 则可清 workspace 且 staging 仍能取出原 SHA
|
||||
- [x] 报告最后一句为「继续 U9」或「停止扩面」;U9 清单项保持未勾
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: [2026-09-14-module-decoupling-refactor-acceptance.md](../checklists/2026-09-14-module-decoupling-refactor-acceptance.md)
|
||||
- Remediation: [2026-09-14-module-decoupling-refactor-plan.md](../../remediation/2026-09-14-module-decoupling-refactor-plan.md)
|
||||
- 权威停走门: [2026-09-14-document-reliability-m2-test-report.md](../../test-reports/2026-09-14-document-reliability-m2-test-report.md)(继续 M3)
|
||||
- Test report: [2026-09-15-taskrun-runmanifest-u8-test-report.md](../../test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
未签字前禁止 U9–U12。合入 + 容器测占集成槽,主仓 `./scripts/env-service.sh dev rebuild`。
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
title: "Track P 协议实施(信封与 typed-result)"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
---
|
||||
|
||||
# Track P 协议实施(信封与 typed-result)
|
||||
|
||||
## 动机
|
||||
|
||||
H0/P0 盘点后独立实施 HTTP 信封与 PI typed-result,不回退事件 live。
|
||||
|
||||
## 成功标准
|
||||
|
||||
已关闭:
|
||||
|
||||
- [HTTP 信封 H1–H3](../../test-reports/2026-09-15-http-error-envelope-h1-h3-test-report.md)
|
||||
- [PI typed-result P1–P4](../../test-reports/2026-09-15-pi-typed-result-v1-test-report.md)
|
||||
|
||||
## 依赖
|
||||
|
||||
mutex `server`/`web`/`pi-agent` 已释放。
|
||||
|
||||
## 暂不启动原因
|
||||
|
||||
已完成。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- [Phase 2 计划](../../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md)
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
title: "Wave 2 PU4 真实 PI 补证(U8 + full/none)"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: feature/wave2-real-pi-evidence
|
||||
worktree: "-"
|
||||
mutex: intent-plan
|
||||
---
|
||||
|
||||
# Wave 2 PU4 真实 PI 补证(U8 + full/none)
|
||||
|
||||
## 目标
|
||||
|
||||
补齐 multi-intent U8 与工作流 full/none 的真实 PI / PG / 跨用户 / 恢复证据。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 认领 + 占槽 rebuild
|
||||
2. [x] U8 live 证据路径
|
||||
3. [x] full/none 混合长链 live 测试
|
||||
4. [x] 报告 + 矩阵更新 + 释放槽位
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] U8 真实 PI PASS
|
||||
- [x] full 跨用户审批 PASS
|
||||
- [x] none 免审批且不阻塞 PASS
|
||||
- [x] 报告归档 `.doc/test-reports/2026-09-16-wave2-real-pi-evidence-test-report.md`
|
||||
+6
-4
@@ -8,6 +8,8 @@ status: closed
|
||||
|
||||
# 交接:Herdr Agent 治理分支待集成
|
||||
|
||||
> **superseded 2026-09-14**:Herdr 角色/脚本已从活文档移除;本交接仅作历史证据。见 [.././2026-09-14-remove-herdr-agent-settings.md](.././2026-09-14-remove-herdr-agent-settings.md)。
|
||||
|
||||
## 目标(下一位 Agent 应完成什么)
|
||||
|
||||
治理规范已完成并准备合入 `dev`;本文件保留为集成证据。
|
||||
@@ -36,9 +38,9 @@ status: closed
|
||||
|
||||
| 路径 | 说明 |
|
||||
|------|------|
|
||||
| `.doc/ops/2026-09-13-herdr-agent-roster.md` | 角色与路由 SSOT |
|
||||
| `scripts/herdr-agent-start.sh` | 免人工审批启动入口 |
|
||||
| `scripts/herdr-agent-dispatch.sh` | 主备派发与防重复策略 |
|
||||
| `.doc/archive/ops/2026-09-13-herdr-agent-roster.md` | 角色与路由 SSOT(已归档) |
|
||||
| `scripts/herdr-agent-start.sh` | 免人工审批启动入口(已删除) |
|
||||
| `scripts/herdr-agent-dispatch.sh` | 主备派发与防重复策略(已删除) |
|
||||
| `AGENTS.md` / `PROJECT.md` | 强制入口与 PI 身份边界 |
|
||||
|
||||
## 如何验证
|
||||
@@ -59,5 +61,5 @@ git diff --check
|
||||
## 相关链接
|
||||
|
||||
- CURRENT: [CURRENT.md](../CURRENT.md)
|
||||
- Task: [2026-09-13-herdr-agent-governance.md](../../archive/ops/2026-09-13-herdr-agent-governance.md)
|
||||
- Task: [2026-09-13-herdr-agent-governance.md](./2026-09-13-herdr-agent-governance.md)
|
||||
- Checklist: 任务文中的验收标准
|
||||
@@ -1,49 +0,0 @@
|
||||
---
|
||||
title: "FEATURE-MATRIX 深度测试 + 晋升部署 test"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor-Auto
|
||||
branch: feature/matrix-deep-test-promote-test
|
||||
worktree: "-"
|
||||
mutex: infra
|
||||
---
|
||||
|
||||
# FEATURE-MATRIX 深度测试 + 晋升部署 test
|
||||
|
||||
## 目标
|
||||
|
||||
按 FEATURE-MATRIX 对已实现模块做分层深度回归,通过后将本地 `dev` 晋升到 `test`(`rc-v1.0.0-beta.2`)并 rebuild/冒烟 `:8081`。
|
||||
|
||||
## 范围
|
||||
|
||||
- Wave 1:vet/short/arch/npm/bundle + 模块定向 + 隔离治理 PG
|
||||
- Wave 2:dev `:8080` live API 抽检
|
||||
- Wave 3:真实 PI 抽样(失败再升格三链)
|
||||
- Wave 4:`dev` → `test` + rebuild + smoke
|
||||
- Wave 5:测试报告 + SSOT
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不实现纯软件项目自举
|
||||
- 不默认 28min 三工作流 PI;不合 `main`;不改项目 143;不启用 FAV
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 认领占槽
|
||||
2. [x] 自动化深度回归
|
||||
3. [x] live `:8080` 抽检
|
||||
4. [x] PI 抽样
|
||||
5. [x] 晋升 test 并冒烟
|
||||
6. [x] 报告与归档
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 矩阵已实现行均有 PASS 证据
|
||||
- [x] `:8081` health/ready schema=47;`test-env-smoke.sh` PASS
|
||||
- [x] tag `rc-v1.0.0-beta.2`;报告归档
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Plan: matrix_deep_test_promote
|
||||
- FEATURE-MATRIX / CURRENT / gap-matrix
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
title: "发布门禁闭环 → production_ready"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor-Auto
|
||||
branch: docs/production-ready-flip
|
||||
worktree: "-"
|
||||
mutex: ci
|
||||
---
|
||||
|
||||
# 发布门禁闭环 → production_ready
|
||||
|
||||
## 目标
|
||||
|
||||
按 gap-matrix 发布门禁勾选 B1–B4,对齐环境 schema 后翻 `production_ready=yes`。
|
||||
|
||||
## 范围
|
||||
|
||||
- B1 CI TEST_DATABASE_URL + 治理 PG(已完成)
|
||||
- B2 真实 PI 三工作流 E2E(已完成)
|
||||
- B3 对话全链路恢复(已完成)
|
||||
- B4 版本冲突/终止 preview(已完成)
|
||||
- B5 SSOT 翻旗 + main schema 对齐(已完成)
|
||||
|
||||
## 非目标
|
||||
|
||||
- 多意图 U9–U12、软件项目自举、FAV、完整 PI change-report 叙事
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] B1 BUG-08
|
||||
2. [x] B2 PI E2E
|
||||
3. [x] B3 chat refresh + restart
|
||||
4. [x] B4 conflict + termination-preview + envelope unwrap
|
||||
5. [x] B5 merge/smoke、main rebuild 迁库、翻旗
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] gap 门禁四框可勾(含对话与前端)
|
||||
- [x] FEATURE-MATRIX / gap / CURRENT `production_ready: yes`
|
||||
- [x] main/dev/test health schema_version=47
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Test reports: `2026-09-16-ci-governance-pg-bug08`、`pi-three-workflow-e2e`、`chat-refresh-gate`、`frontend-gate-b4`
|
||||
- gap-matrix / FEATURE-MATRIX / CURRENT
|
||||
@@ -1,48 +0,0 @@
|
||||
---
|
||||
title: "Wave 2B PU5B:nightly PI + promotion receipt"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: feature/wave2b-nightly-promotion-receipt
|
||||
worktree: "-"
|
||||
mutex: ci
|
||||
---
|
||||
|
||||
# Wave 2B PU5B:nightly PI + promotion receipt
|
||||
|
||||
## 目标
|
||||
|
||||
落地夜间真实 PI 回归入口、不可变 promotion receipt,以及晋升脚本强制校验;same-image digest 晋升本轮仅做到 same-commit + digest 可追溯。
|
||||
|
||||
## 范围
|
||||
|
||||
- promotion receipt 写/校验 + waiver
|
||||
- nightly-real-pi.yml + run-nightly-real-pi.sh
|
||||
- git-workflow-helper / promote-to-test / release-to-main 门禁钩子
|
||||
- 报告与 FEATURE-MATRIX / remediation 同步
|
||||
|
||||
## 非目标
|
||||
|
||||
- compose 按 digest pull 的同镜像晋升流水线
|
||||
- Playwright 双标签;升 MULTI_INTENT tier
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 认领 + 开分支
|
||||
2. [x] receipt 写/校验脚本
|
||||
3. [x] nightly workflow + 本机脚本
|
||||
4. [x] 晋升钩子
|
||||
5. [x] 报告 + 合入 dev
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 缺 secret/runner → infra_fail,晋升拒绝
|
||||
- [x] product_fail → 晋升拒绝
|
||||
- [x] pass receipt → 晋升可过;无 receipt → 非零退出
|
||||
- [x] 报告归档(`.doc/test-reports/2026-09-16-wave2b-nightly-promotion-receipt-test-report.md`)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Remediation PU5B: `../../remediation/2026-09-16-feature-matrix-production-readiness-plan.md`
|
||||
- Test report: `../../test-reports/2026-09-16-wave2b-nightly-promotion-receipt-test-report.md`
|
||||
@@ -1,41 +0,0 @@
|
||||
---
|
||||
title: "Wave 2C:同 digest 镜像晋升"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: feature/wave2c-same-image-digest
|
||||
worktree: "-"
|
||||
mutex: infra
|
||||
---
|
||||
|
||||
# Wave 2C:同 digest 镜像晋升
|
||||
|
||||
## 目标
|
||||
|
||||
候选 commit 一次构建;test/main 按 receipt digests 启动;pinned 禁止 rebuild 另造镜像。
|
||||
|
||||
## 范围
|
||||
|
||||
- candidate-images-build/apply
|
||||
- compose + env-service pinned
|
||||
- promote/release 钩子 + receipt --require-digests
|
||||
- nightly digests 对齐
|
||||
|
||||
## 非目标
|
||||
|
||||
- 远程 registry;升 tier;Playwright;U8 quality_failed(Phase 3)
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 认领 + 开分支
|
||||
2. [x] build/apply + check digests
|
||||
3. [x] compose/env-service/hooks
|
||||
4. [x] nightly align
|
||||
5. [x] 报告合入
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] PASS receipt 含 digests;apply 后 ID 一致
|
||||
- [x] pinned rebuild 不换 ID(env-service 拒绝 --build)
|
||||
- [x] 缺 digest 拒绝晋升
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: "Wave 3 PU6–PU8 go/no-go 文档任务"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: feature/wave3-pu6-pu8-go-no-go
|
||||
worktree: "-"
|
||||
mutex: architecture-docs
|
||||
---
|
||||
|
||||
# Wave 3 PU6–PU8 go/no-go 文档任务
|
||||
|
||||
## 目标
|
||||
|
||||
完成 PU6–PU8 产品 go/no-go 记录与获批后契约;未获批不实施。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 调研 go/no-go 总文
|
||||
2. [x] PU6–PU8 / U9–U12 契约
|
||||
3. [x] 勾 DoD + 矩阵/CURRENT 同步 + 合入
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Research: `../research/2026-09-16-wave3-pu6-pu8-go-no-go.md`
|
||||
@@ -76,7 +76,7 @@ severity: high
|
||||
## 关联整改
|
||||
|
||||
- Remediation: [../remediation/2026-09-13-chat-history-refresh-remediation.md](../remediation/2026-09-13-chat-history-refresh-remediation.md)
|
||||
- Short-term: [../archive/ops/2026-09-13-chat-history-refresh-remediation.md](../archive/ops/2026-09-13-chat-history-refresh-remediation.md)
|
||||
- Short-term: [../ops/short-term/2026-09-13-chat-history-refresh-remediation.md](../ops/short-term/2026-09-13-chat-history-refresh-remediation.md)
|
||||
- Gap matrix: [../remediation/gap-matrix.md](../remediation/gap-matrix.md)
|
||||
|
||||
## 证据
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
---
|
||||
title: "arch-check U1 可重放基线"
|
||||
title: "arch-check Wave 0 基线"
|
||||
status: done
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
severity: medium
|
||||
---
|
||||
|
||||
# arch-check U1 可重放基线
|
||||
# arch-check Wave 0 基线
|
||||
|
||||
## 现象
|
||||
|
||||
Wave 0 的全仓 grep 会把 Goose、`*_test.go` 和路径字面量一视同仁,无法作为生产写者门禁。U1 用 `go list` + AST/正则拆成四类规则,并给每条既有债写明 owner、原因、截止里程碑和到期日。
|
||||
模块边界此前只能靠人工约定。Wave 0 用当前 `go list` 生成 import allowlist,并用目标属主扫描表名与路径字面量,得到可重复的 warn 基线。
|
||||
|
||||
## 根因分析
|
||||
|
||||
- `document_records` 的生产写者不止 `docgov`:`docrevision.projectRootPointersTX` 与 `docduty` 职责槽位仍直接 `UPDATE`。
|
||||
- `output.md` / `data/dev` / `workspaces/` 仍被 agent、bizdev、coordinator、docgov、docrevision、server、storage 用 `filepath.Join`、字符串字面量或间接常量构造。
|
||||
- Goose 与测试夹具大量出现同样表名,不能算生产写者债。
|
||||
`document_records`、`output.md`、`data/dev` 被多个包直接提及,与「单一写者 / 路径属主」目标不一致。这些不是本轮回归,而是 Wave 1+ 的收口对象。
|
||||
|
||||
## 严重度
|
||||
|
||||
@@ -26,39 +24,29 @@ Wave 0 的全仓 grep 会把 Goose、`*_test.go` 和路径字面量一视同仁
|
||||
|
||||
- ADR: [../adr/2026-09-14-modular-monolith-decoupling.md](../adr/2026-09-14-modular-monolith-decoupling.md)
|
||||
- 设计: [../system-design/2026-09-14-module-decoupling-architecture.md](../system-design/2026-09-14-module-decoupling-architecture.md)
|
||||
- 边界: [../system-design/module-boundaries.yaml](../system-design/module-boundaries.yaml)
|
||||
- 任务: [../ops/short-term/2026-09-14-document-reliability-pilot.md](../ops/short-term/2026-09-14-document-reliability-pilot.md)
|
||||
- 任务: [../ops/short-term/2026-09-14-module-decoupling-wave0.md](../ops/short-term/2026-09-14-module-decoupling-wave0.md)
|
||||
|
||||
## 证据
|
||||
|
||||
命令(2026-09-14,`refactor/document-reliability-pilot` worktree):
|
||||
命令:`./scripts/arch-check.sh --mode warn`(2026-09-14,本工作区)
|
||||
|
||||
- import 相对基线 allowlist:**0** 条新边
|
||||
- 目标属主扫描:**21** 条 warn(按包去重)
|
||||
|
||||
```
|
||||
./scripts/arch-check.sh --mode warn
|
||||
go test ./internal/archtest -count=1
|
||||
WARN R5 table document_records mentioned in authz, workspace, docduty, server, bizdev, docrevision
|
||||
WARN R5 table freeform_documents mentioned in docrevision
|
||||
WARN R5 table task_runs mentioned in server, projectinstance, docgov
|
||||
WARN R6 path output.md mentioned in coordinator, server, bizdev, docgov, docrevision, agent
|
||||
WARN R6 path data/dev mentioned in coordinator, server, bizdev, storage
|
||||
WARN R6 path workspaces/ mentioned in server
|
||||
violations=21
|
||||
arch-check warn: recorded 21 baseline findings
|
||||
```
|
||||
|
||||
可重放计数(只含生产 Go;Goose/`*_test.go` 不计):
|
||||
`--mode block` 会因这 21 条失败,故 **不得**在 warn 期满前把脚本挂进集成冒烟。
|
||||
|
||||
| 规则 | 计数 | 处理 |
|
||||
|------|------|------|
|
||||
| import | 0 | 相对 2026-09-14 production `go list` allowlist,无新边 |
|
||||
| sql_write | 5 | 例外,U3/U8 到期 |
|
||||
| path | 17 | 例外,U4/U5/U8 到期 |
|
||||
| event | 0 | `OnOutbox` 生产者属主为 docrevision,server/notification 为消费者 |
|
||||
## 后续
|
||||
|
||||
验证:
|
||||
|
||||
- `deploy/postgres/goose` 与 `*_test.go` 出现 `document_records` 不报生产写者违规。
|
||||
- 迷你仓 `internal/server/rogue_write.go` 新增 `UPDATE document_records` 时 `go test ./internal/archtest` 失败并指出文件。
|
||||
- `filepath.Join`、字符串拼接、间接常量构造 `output.md` 均可检出。
|
||||
- 无到期日例外、过期例外立即 block。
|
||||
- `baseline_counts` 锁定现有计数,只能下降。
|
||||
|
||||
`--mode block` 在例外清零前会失败,不得挂进集成冒烟。
|
||||
|
||||
## 开放问题
|
||||
|
||||
- U3 收口 `document_records` / `freeform_documents` 跨属主写。
|
||||
- U4/U5 收口 handler 与投影路径构造。
|
||||
- U8 收口 `task_runs` 终止写与 finalize `output.md`。
|
||||
- Wave 1 起按属主清零上表,再把对应规则转 block
|
||||
- 本轮不占集成槽、不 `env-service` rebuild
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
---
|
||||
title: "模块解耦方案复核"
|
||||
status: done
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
scope: architecture, transactions, concurrency, authorization, events, artifact recovery
|
||||
---
|
||||
|
||||
# 模块解耦方案复核
|
||||
|
||||
## 结论
|
||||
|
||||
模块化单体、单一写者、瘦传输层和应用编排层的方向成立,但原方案不能直接批准 Wave 1–6。
|
||||
原方案把事务、事件、工作区和最终成果四条边界拆开设计,可能在包依赖减少后产生新的数据不一致、跨租户授权旁路和不可恢复投影。
|
||||
整改应先打通一条真实文档纵向链路,再按证据决定是否扩展到 chat、squad、SSE 和 PI Runner。
|
||||
|
||||
## 已确认问题
|
||||
|
||||
### A1. 单一写者拆分会破坏跨表原子性
|
||||
|
||||
`internal/docrevision/pg_mutate.go` 当前在一个事务中写版本账本并投影 `document_records` 根指针。
|
||||
原方案要求 docrevision 改调 docgov/freedoc 普通端口,却没有定义跨属主事务或命令所有权。
|
||||
如果各端口各自提交,会出现版本账本、正文 head、治理状态和 outbox 部分成功。
|
||||
|
||||
### A2. 现有 outbox 不是可泛化的可靠事件总线
|
||||
|
||||
`internal/docrevision/service.go` 在版本事务完成后调用 `OnOutbox`,并忽略回调错误。
|
||||
`outbox_events` 只有全局 `published_at`,没有逐消费者确认、租约、重试、死信和幂等收件箱。
|
||||
拟议的 `Publish(ctx, event)` 也没有事务作用域,不能兑现“与业务同事务”。
|
||||
|
||||
### A3. 工作区仍被当成事实源
|
||||
|
||||
原 `WorkspaceRef` 暴露 `Root`、`OutputDir` 和 `ManifestPath`,`OutputContract` 继续接受裸路径。
|
||||
这不能从类型上阻止路径拼接、跨工作区访问或链接逃逸。
|
||||
docquery 若继续在运行时从 `output.md` 选择正文,会保留导致历史 404/409 的 split-brain 根因。
|
||||
|
||||
### A4. 最终成果保险库未进入模块边界
|
||||
|
||||
`feature/final-artifact-vault` 已设计并实现终态归档、只读降级和 scratch 恢复,但尚未合入当前 dev 基线。
|
||||
原解耦方案没有为 artifactvault 分配端口、事件、授权和恢复边界,后续容易由 docquery 或 CLI 重建旁路。
|
||||
|
||||
### A5. contracts 可能成为新的高扇入万能包
|
||||
|
||||
原方案把内部接口、HTTP DTO、事件、错误码和共享枚举集中到一个包,并要求所有 DTO 版本化。
|
||||
这会把语义耦合搬到 `contracts` 和 `app`,使普通内部调整承担不必要的 ADR 成本。
|
||||
|
||||
### A6. 并发控制只覆盖了进程内互斥
|
||||
|
||||
当前代码同时存在 `sync.Mutex`、行锁、乐观 ETag、唯一幂等键和 `pg_advisory_xact_lock`。
|
||||
原方案没有规定哪些锁用于正确性、锁顺序、超时、重试边界和多副本行为。
|
||||
进程内锁只能优化单实例竞争,不能作为跨实例正确性条件。
|
||||
|
||||
### A7. 授权主体和后台执行边界缺失
|
||||
|
||||
“在应用层入口统一授权”没有定义可信 Principal 的来源,也没有覆盖 CLI、事件订阅者、恢复工具和后台任务。
|
||||
若端口继续接受调用方填写的 `UserID`、`ProjectID` 或裸 `DocRef`,可能形成 confused-deputy 或跨项目访问。
|
||||
|
||||
### A8. 横向 Wave 缺少最小可交付边界
|
||||
|
||||
原方案先物理搬包,再接口化,最后才处理单写者和事件语义。
|
||||
这会重复修改高扇出代码,并在真正验证边界之前冻结大量无消费者契约。
|
||||
错误信封和 PI Runner 协议与文档一致性解耦没有直接依赖,不应阻塞核心路线。
|
||||
|
||||
### A9. 迁移与回滚承诺不成立
|
||||
|
||||
可靠多消费者 outbox、FAV 集成和必要的状态字段需要增量 migration,因此“数据零迁移”不成立。
|
||||
后续里程碑会依赖前序契约,不能任意独立 revert;只能按 expand/migrate/contract 阶段和兼容窗口回退。
|
||||
|
||||
### A10. 架构检查范围会产生误报
|
||||
|
||||
表名和路径字面量合法存在于 Goose migration、fixture、测试和运维脚本。
|
||||
R5/R6 应检查生产运行时的越权写入和路径解析,不应以全仓 grep 的零出现作为完成条件。
|
||||
|
||||
## 外部规则核对
|
||||
|
||||
- PostgreSQL 行锁和事务级 advisory lock 会在事务结束时释放,适合短期业务互斥;session 级 advisory lock 不跟随回滚,不用于本方案的业务锁。[PostgreSQL explicit locking](https://www.postgresql.org/docs/17/explicit-locking.html)
|
||||
- `SKIP LOCKED` 适合多消费者队列表,不适合作为普通一致性查询语义。[PostgreSQL SELECT](https://www.postgresql.org/docs/current/sql-select.html)
|
||||
- Serializable 或 deadlock 重试必须重跑完整事务,包括决定 SQL 和参数的业务逻辑。[PostgreSQL serialization failure handling](https://www.postgresql.org/docs/16/mvcc-serialization-failure-handling.html)
|
||||
- 授权必须默认拒绝,并在每次请求或后台动作上重新校验,不能信任客户端传入的身份和资源归属。[OWASP Authorization Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html)
|
||||
|
||||
## 整改结论
|
||||
|
||||
1. 暂停批准原 Wave 1–6,保留只读架构基线。
|
||||
2. 先定义事务、锁、授权、事件和持久成果契约。
|
||||
3. 首个交付只覆盖受控文档读取与终态提交纵向链。
|
||||
4. FAV、迁移语料和完整备份作为三个互补层接入。
|
||||
5. 通过真实页面刷新、重启、并发、权限和恢复停走门后,再批准其他模块拆分。
|
||||
|
||||
## 证据入口
|
||||
|
||||
- `internal/docrevision/pg_mutate.go`
|
||||
- `internal/docrevision/service.go`
|
||||
- `internal/workspace/resolver.go`
|
||||
- `internal/docduty/revoke.go`
|
||||
- `internal/taskrun/manager.go`
|
||||
- `deploy/postgres/goose/00018_2026-09-12-outbox-notifications-stage-advance.sql`
|
||||
- `.doc/adr/2026-09-13-document-version-boundary.md`
|
||||
- `feature/final-artifact-vault` 分支中的 FAV ADR、整改方案与测试报告
|
||||
@@ -1,56 +0,0 @@
|
||||
---
|
||||
title: "planning 项目残留 active_workflow_key 异态审计"
|
||||
status: done
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
severity: low
|
||||
---
|
||||
|
||||
# planning 项目残留 active_workflow_key 异态审计
|
||||
|
||||
## 现象
|
||||
|
||||
dev 库存在 `lifecycle_status='planning' AND active_workflow_key <> ''` 行。评审时记为 81;本轮只读复测为 **83**(相对评审 +2)。这些行看起来像「已选工作流但未走设置激活」。
|
||||
|
||||
## 根因分析
|
||||
|
||||
关闭 `initial_workflow_key` 直通前,`CreateProject` 在键非空时会写 `lifecycle=active` + `ActiveWorkflowKey`。本异态是 **planning 却带 key**,更符合自动化测试夹具成对插入(`PROJ_MGR_*` / `TEST_PROJ_*`),而不是真实用户走创建旁路后的 active 项目。
|
||||
|
||||
本轮 **未** `UPDATE`/`DELETE`。
|
||||
|
||||
## 严重度
|
||||
|
||||
`low`
|
||||
|
||||
创建旁路已在 `fix/governance-action-level-authz` 关闭。存量 83 行全部无 live 实例、无创建人,不影响项目 143,也不阻塞 G1 鉴权矩阵。
|
||||
|
||||
## 关联整改
|
||||
|
||||
- Short-term: [2026-09-14-governance-action-level-authz](../archive/ops/2026-09-14-governance-action-level-authz.md)
|
||||
- Research: [2026-09-14-mvp-governance-rules-review](../ops/research/2026-09-14-mvp-governance-rules-review.md)
|
||||
|
||||
## 证据
|
||||
|
||||
只读查询(`shuimu-context-pg-dev` / `agent_system_dev`,2026-09-14):
|
||||
|
||||
| 指标 | 数量 |
|
||||
|------|------|
|
||||
| `lifecycle=active` | 141 |
|
||||
| `lifecycle=planning` | 209 |
|
||||
| `planning AND active_workflow_key <> ''` | **83** |
|
||||
|
||||
分类(禁止改库,仅标注):
|
||||
|
||||
| 分类 | 数量 | 判定 |
|
||||
|------|------|------|
|
||||
| 测试夹具 | **83** | `code` 为 `PROJ_MGR_YYYYMMDDHHMMSS`(名「智能微创内窥镜」)或 `TEST_PROJ_*`(名「测试内窥镜系统」);`active_workflow_key=main`;`workflow_selection_version=1`;`creator_user_id` 空;`has_live_instance=false`;时间戳成对出现于 2026-09-12~09-14 |
|
||||
| 历史直通(真实用户创建旁路) | **0** | 无非夹具命名、无创建人、无 live 实例的业务项目 |
|
||||
| 不明 | **0** | — |
|
||||
|
||||
样本 id(完整 83 行均属上表夹具模式,不逐条展开):61–62、122–128、6015–6021、6160–6161、6192/6195。项目 **143 不在此集合**。
|
||||
|
||||
相对评审 81 的 +2:`6192` / `6195`,创建于 2026-09-14 07:26 UTC,仍是同一对夹具命名。
|
||||
|
||||
## 开放问题
|
||||
|
||||
- 是否在后续专项清理夹具行(需单独任务与备份,不在本治理鉴权波次)。
|
||||
@@ -1,85 +0,0 @@
|
||||
---
|
||||
title: "前端 mock 交付物污染真实项目:幻影受控文档伪造终审已生效态与法定职责"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
severity: critical
|
||||
---
|
||||
|
||||
# 前端 mock 交付物污染真实项目:幻影受控文档伪造终审已生效态与法定职责
|
||||
|
||||
## 现象
|
||||
|
||||
用户在 **test 环境**(127.0.0.1:8081)新建测试项目「测试项目」(test 库 `projects.id=1`,唯一项目),工作台立即显示 11 份「受控文档」,其中包括与该项目毫无关系的:
|
||||
|
||||
- 《4K超高清荧光内窥镜系统立项与可行性报告》
|
||||
- 《微创外科内窥镜全球竞品技术与临床深度调研报告》
|
||||
- 神经外科双频超声吸引(NeuroPulse)系列
|
||||
- CUSA 超声手术吸引系统系列
|
||||
|
||||
这些文档:
|
||||
|
||||
1. 显示**伪造的生命周期状态**(`reviewing` / `approved`——`DeckDrawer.tsx` 将 `approved` 渲染为「**终审已生效**」),即用户所称「生效区」出现从未经过任何 docgov 生命周期流转的"已生效"文档;
|
||||
2. 带有**伪造的法定职责人**(author 张工 / reviewer 李主管 / approver 王总监——均非真实用户);
|
||||
3. 带有伪造版本号(V1.0)、伪造更新时间、伪造正文全文;
|
||||
4. 在项目成员视角按真实受控文档参与 RBAC 可见性过滤与工作流槽位合并,**与真实服务端文档混排**。
|
||||
|
||||
而 test 库 `document_records` 为 **0 行**——服务端受控文档台账完全为空,这 11 份文档**全部来自前端硬编码 mock 数据**。
|
||||
|
||||
## 根因分析
|
||||
|
||||
### 1. mock 交付物硬编码绑定 projectId 1/2/3/5201/6001–6010
|
||||
|
||||
`web/src/App.tsx:267` `INITIAL_DELIVERABLES` 硬编码 7 份 mock 交付物 `projectId: 1`(doc-001~004、doc-shared-001、doc-private-001/002);`P2_INITIAL`(projectId 2)、`CUSA_INITIAL_DELIVERABLES`(projectId 3)、`NEUROPULSE`(5201)、`TEN_PROJECTS`(6001+)同理。`ALL_INITIAL_DELIVERABLES` 聚合后作为 `loadDeliverables()` 的默认值(App.tsx:621),并经 `saveDeliverables` **写入 localStorage 持久化**。
|
||||
|
||||
### 2. 项目过滤按数字 ID 匹配,新建项目与 mock 项目 ID 撞车
|
||||
|
||||
`App.tsx:1014`:`currentProjectDeliverables = deliverables.filter(doc => doc.projectId === currentProjectId)`。
|
||||
|
||||
- test 库为全新库,用户新建的第一个项目得到 `id=1` → 与 mock 的 `projectId: 1` **精确撞车**,7 份幻影文档全部"归属"该项目;
|
||||
- 新建项目时 `createProjectTemplateDeliverables`(App.tsx:3844)再克隆 7 份模板骨架(`doc-p1-*`,`lifecycleState: 'template'`,合规)→ 7 mock + 4~7 模板/私有,构成用户看到的 11 份;
|
||||
- **dev 库同样中招**:`agent_system_dev.projects` 存在真实项目 id 1–8(智能微创内窥镜/测试内窥镜系统等),id 1/2/3 的真实项目同样被 mock 文档污染。
|
||||
|
||||
### 3. mock 正文与 mock 用户/权限无环境门控,已进生产构建产物
|
||||
|
||||
- `mockDocuments.ts` 无任何 `import.meta.env` 门控;`App.tsx` 中 `MOCK_USERS`(含伪造 `projectPermissions: {doc-001: approver...}`)作为 `loadUsers()` 默认值与 `currentUser` 初始身份兜底(App.tsx:610/617);
|
||||
- **构建产物已验证污染**:`web/dist/assets/index-DogUjae5.js` 中 grep 命中「4K超高清荧光」字符串——dev/test/main 三环境共用同一前端构建,main 生产环境同样受影响。
|
||||
|
||||
### 4. 既有防线只挡"正文请求",不挡"清单展示"
|
||||
|
||||
团队已知悉 legacy mock ID(`revisionToolbarMount.ts:24 isLegacyLocalMockDocId`:`doc-\d{3}` / `doc-shared-*` / `doc-private-*` / `doc-cusa-*`),并禁止它们发起 content/revision 请求(`controlledDocHydrate.ts:shouldLoadControlledContent` 排除)。但这只防住了「幻影文档冒充服务端正文」,**没有防住幻影文档出现在交付物清单、生命周期徽章(终审已生效)、职责栏与项目文档统计中**——用户看到的正是后者。
|
||||
|
||||
### 5. 服务端权威清单未做前端对账
|
||||
|
||||
`GET /api/v1/projects/{id}/documents`(`docgov/project_docs.go`,`WHERE project_id=$1 AND task_key<>''`,服务端已正确按项目隔离)返回空数组时,`mergeWorkflowDocumentsFromServer`(`deliverableSync.ts:41`)**直接 `return prev`,不删除本地多余项**——本地幻影文档无任何下架机制。
|
||||
|
||||
## 严重度
|
||||
|
||||
`critical`:
|
||||
|
||||
1. **治理完整性破坏**:空项目展示「终审已生效」受控文档 + 三级法定职责人,在医疗器械合规语境下(ISO 13485 / 21 CFR Part 11 电子记录可靠性)构成"记录失实";
|
||||
2. **跨环境广泛影响**:dev 真实项目 id 1–8、test 新建项目、main 生产同构建产物全部受影响;
|
||||
3. **权限视图失真**:伪造职责人/权限映射混入 RBAC 过滤链,用户对"谁可审批什么"产生错误认知;
|
||||
4. 既有防线(isLegacyLocalMockDocId)证明团队已两次踩坑(本审计为同域第三类症状),说明 mock 数据保留策略系统性不足。
|
||||
|
||||
## 关联整改
|
||||
|
||||
- Remediation: [2026-09-15-mock-deliverables-pollution-remediation.md](../remediation/2026-09-15-mock-deliverables-pollution-remediation.md)
|
||||
|
||||
## 证据
|
||||
|
||||
- test 库(`shuimu-system-pg-test`,127.0.0.1:5434):`projects` 仅 id=1「测试项目」(通用医疗器械);`document_records` 0 行;全库 87 张业务表除 projects/users/auth_sessions/chat_sessions/project_workflows 外全部为空
|
||||
- dev 库(`shuimu-context-pg-dev`,127.0.0.1:5433):真实项目 id 1–8(智能微创内窥镜 / 测试内窥镜系统)→ 与 mock projectId 1/2/3 撞车
|
||||
- `web/src/App.tsx:267-498`(INITIAL_DELIVERABLES/P2/CUSA/ALL_INITIAL_DELIVERABLES)、`621`(loadDeliverables)、`1014`(projectId 过滤)、`3844`(新建克隆模板)
|
||||
- `web/src/data/mockDocuments.ts:32-505`(mock 文档全文与伪造 lifecycleState/职责人)、`web/src/data/seeds/neuropulseSeed.json`(projectId 5201)、`tenProjectsSeed.json`(6001–6010)
|
||||
- `web/dist/assets/index-DogUjae5.js`:grep 命中「4K超高清荧光」(生产构建含 mock 数据)
|
||||
- `web/src/features/documentRevision/revisionToolbarMount.ts:24-32`(isLegacyLocalMockDocId 既有防线)
|
||||
- `web/src/lib/deliverableSync.ts:41-45`(serverDocs 空时不回收本地项)
|
||||
- `web/src/components/doc/DeckDrawer.tsx:87-103`(approved → 「终审已生效」渲染)
|
||||
- `web/src/api/projectDocuments.ts:46-58`(服务端清单 API,服务端隔离正确)
|
||||
|
||||
## 开放问题
|
||||
|
||||
- mock 数据的保留意图(demo 演示模式?)需要在整改方案中决策:彻底移除 vs 环境门控(`import.meta.env.MODE` / 构建期注入 `VITE_ENABLE_DEMO_SEEDS`)
|
||||
- localStorage 中已被 `saveDeliverables` 持久化的 mock 项,需要一次性迁移清理(对齐既有 `dropRecordKeys`/ControlledInvalidationPlan 机制)
|
||||
- main 环境是否已有真实用户看过幻影文档(`document_access_audit` 为 0 行,无服务端读取痕迹,风险主要在前端展示层)
|
||||
@@ -1,111 +0,0 @@
|
||||
---
|
||||
title: "模块解耦 Phase 2 方案审阅"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
severity: high
|
||||
---
|
||||
|
||||
# 模块解耦 Phase 2 方案审阅
|
||||
|
||||
## 结论
|
||||
|
||||
模块化单体、消费者端口、组合根和持久事件的方向成立,但原 Phase 2 方案不能直接进入实施。它把事件可靠性、结构整理和两个外部协议绑成一个完成目标,并基于数项不成立的代码事实设计切换门。修订版已把 Track E(持久事件)、Track S(结构解耦)、Track P(外部协议)拆开,Track E 必须先完成生产者与历史数据门,再启动 dispatcher。
|
||||
|
||||
## 高优先级发现
|
||||
|
||||
### A1. PG delivery 尚未形成生产闭环
|
||||
|
||||
`internal/events/pg.go` 的 `ClaimIDs` 只做 SELECT + `FOR UPDATE SKIP LOCKED`,没有在同一事务写 lease owner/token/until;也没有 PG ack/fail/retry/dead-letter 的完整生产实现。`internal/events/dispatcher_test.go` 验证的是 MemoryBus。原方案把这些能力写成“已有”,会低估 D1 的 migration、状态机和故障测试范围。
|
||||
|
||||
整改:D1 增加 additive migration、原子 lease、heartbeat、fenced side-effect/ack、retry/dead/quarantine、不可变 attempt 表和独立 `cmd/events` 进程。
|
||||
|
||||
### A2. “恰好一次投递”不可由当前算法保证
|
||||
|
||||
副作用成功后、ack 前崩溃会导致重放。Fencing 若只拦 ack,也拦不住租约过期的旧 worker 提交副作用。
|
||||
|
||||
整改:契约改为 at-least-once delivery + exactly-one visible outcome。Token 进入 consumer command 和最终提交点;数据库副作用与 inbox/token 校验同事务,projection 使用 expected version、digest 和单调 marker。
|
||||
|
||||
### A3. 原 shadow 定义会双写,且按天零差异可空跑通过
|
||||
|
||||
旧方案同时写闭包和消费者结果,却又称“不产生可见变化”;两者矛盾。三天 dev 流量也可能没有低频文档事件或失败分支。
|
||||
|
||||
整改:闭包是 shadow 期间唯一真实写者。消费者只计算 normalized intended outcome 并写 reconciliation。停走门同时要求预登记样本、分支覆盖、最短时间和零未解释 diff;生产入口未证明出事件前不开始计时。
|
||||
|
||||
### A4. 文档事件源与作用域尚不可信
|
||||
|
||||
部分生产 HTTP 路径临时构造 `docflow.Commands`,没有稳定注入 EventSink/UoW。`Environment:"dev"`、`ProjectID:0` 和 FAV stage project 0 会使跨环境/项目 delivery 失真。
|
||||
|
||||
整改:E0A 先由组合根注入唯一命令对象;领域变化、envelope、delivery 同一 UoW;缺 project/env fail closed;旧数据先 inventory。
|
||||
|
||||
### A5. AggregateVersion 不能直接当无缺口事件序号
|
||||
|
||||
当前只在部分领域转换发事件。历史文档首次事件可能从较高版本开始;按缺号等待会永久阻塞。
|
||||
|
||||
整改:D11 在独立 event sequence 与 consumer checkpoint/bootstrap 中二选一,审计现有 aggregate/version 唯一约束并迁移。未决前禁止开启 gap blocking。
|
||||
|
||||
### A6. docgov/docrevision 不是双向 import
|
||||
|
||||
生产方向为 `docgov → docrevision`,用途集中在 canonical Markdown 与 SHA helper。原方案“提升无行为类型到 vocabulary”不能承载 canonicalization 行为。
|
||||
|
||||
整改:D6 改为提取内聚 `doccontent` 行为模块和 golden vectors;D6 可独立执行,不依赖 bizdev/stageflow。
|
||||
|
||||
### A7. event allowlist 已存在
|
||||
|
||||
`module-boundaries.yaml` 已有 `event_producers`/`event_consumers`。问题是映射稀疏,且运行时注册没有与静态清单做 parity 检查。
|
||||
|
||||
整改:D10 提升到 E0A,补 payload schema/version、enabled state 与 registry parity;FAV 标记 disabled。
|
||||
|
||||
### A8. FAV、HTTP、PI 不应阻塞核心
|
||||
|
||||
FAV 分支未完成独立审计。ADR 已把 HTTP 错误信封和 PI result protocol 定义为独立工作。把三者放入 Track E DoD 会延迟最有价值的刷新恢复闭环。
|
||||
|
||||
整改:Track E 只激活 notify、workflow advance、projection。FAV 只预留 disabled 契约;D8/D9 分别另建 remediation。
|
||||
|
||||
### A9. Replay、后台权限与日志脱敏不足
|
||||
|
||||
延迟事件不能沿用历史用户权限;当前 replay 校验不足以支持生产 apply。Raw payload/error 进入 dead-letter 或 reconciliation 会泄露正文、路径或凭证。
|
||||
|
||||
整改:每 consumer 独立 service principal,处理时重读资源和当前权限。Replay 采用 capability + 精确范围 + dry-run digest/apply exact digest + 审计;多项目/批量 apply 两人批准。日志只存 ID/digest/typed code/sanitized summary。
|
||||
|
||||
### A10. 滚动切换缺少集群级权威写者
|
||||
|
||||
删除新版本 hook 不会阻止旧实例继续执行。若 dispatcher 同时 live,滚动部署会双写。
|
||||
|
||||
整改:`off|shadow|live` 使用带 revision 的集群级状态;先部署兼容代码、drain 全部旧实例、记录 backlog 水位,再原子切换。回滚先暂停 claim并核对 receipt/backlog。
|
||||
|
||||
### A11. Locator 门禁原文过宽
|
||||
|
||||
全局禁止 `*pgxpool.Pool`/`pgx.Tx` 会拦截组合根注入与登记表属主的合法 UoW unwrap。
|
||||
|
||||
整改:只禁止领域/用例 API 暴露、返回、转发 pool/tx;明确允许 app/cmd 构造注入和登记属主 unwrap。
|
||||
|
||||
## 范围修订
|
||||
|
||||
| 轨道 | 内容 | 关闭条件 |
|
||||
|---|---|---|
|
||||
| Track E | D1/D2/D3/D10/D11 | PG + browser + restart + auth/replay 证据完成后独立关闭 |
|
||||
| Track S | D4/D5/D6/D7a/D7b | 各单元独立 go/no-go 与报告 |
|
||||
| Track P | HTTP error、PI typed result | 各自独立 remediation,不阻塞 Track E/S |
|
||||
|
||||
## 关联整改
|
||||
|
||||
- [修订后的 Phase 2 计划](../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md)
|
||||
- [修订后的现状调研](../ops/research/2026-09-15-module-decoupling-ipc-assessment.md)
|
||||
|
||||
## 审阅方法与证据
|
||||
|
||||
- 代码证据:`internal/events/pg.go`、`bus.go`、`dispatcher_test.go`、`replay.go`、`internal/app/docflow/commands.go`、`internal/docgov/lease.go`、`internal/bizdev/service.go`。
|
||||
- Schema:`deploy/postgres/goose/00035_2026-09-14-durable-event-delivery.sql`。
|
||||
- 边界:`.doc/system-design/module-boundaries.yaml`。
|
||||
- 上位决策:模块化单体 ADR 与 Phase 1 U6。
|
||||
- 审阅视角:一致性、可行性、范围、安全、产品价值、对抗失败预演;外部 reviewer 的有效结论仅用于交叉验证,不替代仓库证据。
|
||||
|
||||
## 开放问题
|
||||
|
||||
以下问题必须由 E0A 的代码/数据审计回答,不能在计划阶段猜测:
|
||||
|
||||
- projection consumer 的最终 owner 与 no-replace 提交接口。
|
||||
- event sequence 或 checkpoint/bootstrap 的选择及迁移成本。
|
||||
- 每类事件前 7 天基线流量、shadow 样本 N 和 worker 连接预算。
|
||||
- 现存错误 scope/schema delivery 的数量和 repair/quarantine/expire 分类。
|
||||
@@ -1,122 +0,0 @@
|
||||
---
|
||||
title: "多意图与 HITL 方案复核"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
severity: high
|
||||
---
|
||||
|
||||
# 多意图与 HITL 方案复核
|
||||
|
||||
## 结论
|
||||
|
||||
提案方向合理,且可复用现有 IntentFrameV2、ActionRegistry、PendingExpectation、交互卡和可靠事件骨架。但初稿不能直接实施:它会让 LLM backend 进入 `internal/intent`、把跨模块执行继续堆入 coordinator,并以不足以抵御多实例竞态的 PlanID+StepID 代替状态机和动作幂等,存在解耦回退、越权和双执行风险。
|
||||
|
||||
已按审阅结果重写[系统设计](../system-design/2026-09-15-multi-intent-hitl-plan.md)与[任务总览](../ops/short-term/2026-09-15-multi-intent-hitl.md)。本次仅修改文档,没有实施业务代码。
|
||||
|
||||
## 已确认问题
|
||||
|
||||
### P1:原 LLM 接线破坏 intent 纯模块边界
|
||||
|
||||
初稿要求在 `internal/intent/segmenter.go` 经既有 `agent.Backend` 分段;当前边界只允许 `intent -> maturity`。照此实施必然新增 intent 到 agent/coordinator 的依赖。
|
||||
|
||||
**整改:** 规则分段留在 intent;可选 LLM 仅作为 `app/intentflow` 外围 adapter,返回不可信分段建议,每段重新走确定性识别、安全扫描和 ActionRegistry。任何阶段都禁止 intent import agent、PG、storage 或 coordinator。
|
||||
|
||||
### P1:计划持久化缺少权威状态机与并发协议
|
||||
|
||||
初稿两表只有宽泛 status/payload,PlanID+StepID 只是标识,不能防重复确认、确认/取消/过期竞态、两个 worker 同时执行,也不能处理业务成功而步骤 receipt 未落库的崩溃窗口。
|
||||
|
||||
**整改:** 增加 plan revision/digest、append-only decisions、expected revision、decision nonce、步骤 CAS、lease/fencing、动作级幂等 receipt 和恢复对账。PG 是唯一权威;UserProjectContext/消息只保存 plan 引用。
|
||||
|
||||
### P1:确认未与当前授权绑定
|
||||
|
||||
持久化 user/role 或用户曾经确认都不能证明执行时仍有权。原稿没有要求恢复、读取和每步执行重新检查当前项目成员、duty、资源生命周期与版本。
|
||||
|
||||
**整改:** 确认只记录意愿;所有读取/决策验证 user/session/project 四元作用域;每步由动作 owner 按当前 principal 和 expected resource version 重新授权。失败 fail closed,不以系统身份代执行。
|
||||
|
||||
### P1:执行器方案会让 coordinator 再次成为 service locator
|
||||
|
||||
初稿拟扩展 `coordinator/action_planner.go` 的分发表来执行写动作,会把 docgov/taskrun/workflow 等具体实现重新聚集到 coordinator,抵消已完成的 chatflow/stageflow/bizdev 解耦。
|
||||
|
||||
**整改:** 新增深模块 `internal/app/intentflow` 作为计划生命周期 owner,通过消费者拥有的窄端口调用动作属主;coordinator/chat 仅保留兼容入口,组合根唯一装配。
|
||||
|
||||
### P1:事件与 SSE 被混为一条通道
|
||||
|
||||
现有 Track E 只处理注册的 PG 事件,不会自动把任意 delivery 变成 SSE。若只发 SSE,刷新丢失;若只写 outbox,浏览器不会自动得到状态。
|
||||
|
||||
**整改:** 计划状态同步落库;outbox 只发布版本化状态事实并驱动消息/read model 投影;SSE 是提交后的提示。刷新总是 GET PlanView。事件先登记 YAML、StaticContracts 和 payload allowlist。
|
||||
|
||||
### P1:不确定分段会退回单意图执行
|
||||
|
||||
“置信下降/指代补全失败就合并回单意图”与“不确定必须澄清、未确认零副作用”矛盾,仍可能执行 TopIntent 并丢弃其余任务。
|
||||
|
||||
**整改:** 只有确定为完整单意图连动时才合并;低置信、指代失败或无法证明完整一律澄清,保留候选理解但不执行。
|
||||
|
||||
### P1:数据复制与步骤传递缺少信任边界
|
||||
|
||||
初稿可能把原文、槽位、结果复制到 JSONB、日志、事件、SSE,再把查询摘要直接注入 task brief,扩大敏感数据面和提示注入路径。
|
||||
|
||||
**整改:** 计划保存消息引用/digest/allowlist display snapshot;事件和日志仅传 scope、状态与安全摘要引用;步骤间使用带 provenance/type/digest/sensitivity 的 ResultReference。结果只能进入隔离材料区,不能修改 action、target、tool 或 capability。
|
||||
|
||||
### P1:灰度开关顺序错误
|
||||
|
||||
现有 MULTI_INTENT_ENABLED 默认 true;初稿到最后一阶段才新增 tier,会让中间合入的行为缺少默认关闭门。
|
||||
|
||||
**整改:** U1 先建立默认 legacy 的新 tier;U2 只 shadow;auto_read 先维持两个查询的当前上限;确认和每个动作 adapter 分档开放。回滚必须继续支持已有计划读取/取消/收口。
|
||||
|
||||
## 重要产品修订
|
||||
|
||||
- 无活动写计划时单意图生成行为保持不变;多意图 generate 的确认/tier/adapter 能力由 intentflow BatchActionPolicy 管理,静态风险仍引用 ActionRegistry;
|
||||
- 计划卡默认显示一句摘要和主动作,详细风险/步骤折叠展开,降低认知负担;
|
||||
- 自然语言“确认”只有在当前会话恰有一个活动可见计划时才绑定;多计划或混入新任务时澄清;
|
||||
- 聚合澄清不承诺一次自由文本必然填满所有槽位;只接受可唯一映射值,槽位依赖/冲突继续追问;
|
||||
- 部分确认默认是分批批准,未选项保留待确认;只有显式排除才取消,部分完成提供重试/继续/关闭;
|
||||
- 单意图生成兼容承诺只适用于当前没有活动写计划;有活动计划时统一冲突视图,避免双任务;
|
||||
- 多意图价值必须用采用率、确认放弃率和拆单回退率证明;价值不足时停止写动作扩面,但保留“不静默丢任务”的安全改进。
|
||||
- 批量确认、tier 和 adapter 策略归 intentflow 的 BatchActionPolicy;ActionRegistry 只保留动作身份与静态风险,避免编排政策回灌 L1;
|
||||
- 计划卡折叠态仍显示目标、最高风险、不可撤销副作用和非原子语义;技术元数据才可折叠;
|
||||
|
||||
## 并发与权限检查表
|
||||
|
||||
- 同 turn 同 digest 返回原计划;同 turn 异 digest 冲突;
|
||||
- decision 带 expected revision、nonce 与 digest;
|
||||
- plan/step CAS 与单调 fencing;
|
||||
- fencing 和幂等占位必须进入动作属主事务,只锁计划行不足以阻止旧 worker 副作用;
|
||||
- confirm/cancel/expiry/edit 只有一个胜者;
|
||||
- 部分确认必须依赖闭包;
|
||||
- 双标签、双实例、worker 接管最多一次副作用;
|
||||
- 跨 user/project/session 不可读、不可确认且不泄露存在性;
|
||||
- 确认后成员/职责/资源状态变化仍会拒绝执行;
|
||||
- SSE 重复、乱序、缺失由 GET reconcile;
|
||||
- CSRF/Origin 沿用服务端认证策略,nonce 不冒充 CSRF。
|
||||
- active-plan discovery 是刷新必需入口,不能依赖消息投影中恰好保存 plan_id。
|
||||
|
||||
## 范围与任务修订
|
||||
|
||||
原 T1–T5 被重拆为核心 U1–U8、可选实验 U9 和属主扩面 U10–U12:契约门禁、纯规则 shadow、持久计划、事件投影、决策/授权、Web、只读执行、task generate 首版、LLM adapter、mutate/docgov/workflow-run 分项扩面。每个单元有独立依赖、文件范围、测试、停走门与真实 mutex。总览不长期占用 `intent`;每个 action 仍需独立 short-term。
|
||||
|
||||
## 评审覆盖
|
||||
|
||||
- 本地视角:coherence、feasibility、security、scope、product、design、adversarial;
|
||||
- 独立 cross-model:Claude Opus 5/high 的 security、product、adversarial 与 whole-document sweep;
|
||||
- cross-model 审的是初稿,其关于 LLM 输入、plan ACL、结果传递、幂等、产品价值和确认负担的有效意见已纳入修订;其余由当前代码与边界事实校正。
|
||||
|
||||
## 关联整改
|
||||
|
||||
- System design: [2026-09-15-multi-intent-hitl-plan.md](../system-design/2026-09-15-multi-intent-hitl-plan.md)
|
||||
- Short-term: [2026-09-15-multi-intent-hitl.md](../ops/short-term/2026-09-15-multi-intent-hitl.md)
|
||||
|
||||
## 证据
|
||||
|
||||
- `internal/intent/plan_builder.go`:首连接词、两段、写意图返回 nil;
|
||||
- `internal/coordinator/action_planner.go`:pending confirm 仅文字提示;
|
||||
- `internal/intent/registry.go`:task.run/adhoc 为 medium 且当前不全局 RequiresConfirm;
|
||||
- `internal/intent/flags.go`:MULTI_INTENT_ENABLED 默认 true;
|
||||
- `.doc/system-design/module-boundaries.yaml`:intent 只依赖 maturity,Track E/table owners 已登记;
|
||||
- `internal/events/registry.go`:事件须静态注册;
|
||||
- `internal/app/uow/uow.go`:不透明 TxScope;
|
||||
- `web/src/App.tsx`:现有 card action 含前端本地业务状态路径。
|
||||
|
||||
## 开放问题
|
||||
|
||||
无阻塞性架构问题。各放量阈值必须在 U2 shadow 基线形成后预注册;这属于实施期量化,不授权跳过停走门。
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: "BUG-11 410 兼容策略冻结"
|
||||
created: 2026-09-16
|
||||
status: done
|
||||
---
|
||||
|
||||
# BUG-11:旧 WORKFLOW_SWITCH API 410 策略
|
||||
|
||||
## 决定(2026-09-16 产品/工程冻结)
|
||||
|
||||
**保留** 治理可用时返回 `410 Gone` + `WORKFLOW_SWITCH_API_RETIRED`;治理不可用环境仍允许旧路径。
|
||||
|
||||
- 不视为能力缺口;不强制本轮删除路由。
|
||||
- 遥测若证明零流量,可另开退役任务。
|
||||
|
||||
## 证据
|
||||
|
||||
- `internal/server/project_handlers.go` Gone 分支
|
||||
- gap-matrix BUG-11 → PASS(策略冻结)
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
title: Demo/测试数据污染系统性审计
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor-Auto
|
||||
---
|
||||
|
||||
# Demo / 测试数据污染系统性审计
|
||||
|
||||
## 前序
|
||||
|
||||
本审计在 [2026-09-15 mock 交付物污染真实项目](./2026-09-15-mock-deliverables-pollute-real-projects.md)(及对应 [整改](../remediation/2026-09-15-mock-deliverables-pollution-remediation.md))之上收敛为全栈系统性排查:前端门控、goose 演示项目/会话、stub API。
|
||||
|
||||
## 背景
|
||||
|
||||
空项目展示「终审已生效」受控文档 + 伪造三级职责人。初判怀疑 docgov 隔离失败;实锤为前端 mock/seed 与 DB goose 演示种子污染。
|
||||
|
||||
## 结论
|
||||
|
||||
| 面 | 判定 | 说明 |
|
||||
|----|------|------|
|
||||
| 服务端 `document_records` / project_docs | **正常** | 按 `project_id` 隔离;空项目台账为 0 |
|
||||
| 前端 `ALL_INITIAL_DELIVERABLES` / mockDocuments | **critical** | 无门控进生产包;projectId 1/2/3 撞车 |
|
||||
| 前端 DEFAULT_PROJECTS / sessions / MOCK_USERS | **critical/high** | NeuroPulse 5201、CUSA id=3、6001–6010 |
|
||||
| `deliverableSync` 空清单 `return prev` | **critical** | 权威空列表不回收本地 mock |
|
||||
| `isLegacyLocalMockDocId` 覆盖不全 | **critical** | 未覆盖 neuropulse / ten-projects |
|
||||
| Goose `00011`/`00012` | **critical** | 全环境写入 6001–6010 + 聊天 |
|
||||
| API `backend=stub` | **high** | main 仍可请求 stub |
|
||||
| `BootstrapDevSeedUsers` | **OK** | 已有 env 门控 |
|
||||
|
||||
## 证据路径
|
||||
|
||||
- `web/src/App.tsx`(整改前 INITIAL_*)
|
||||
- `web/src/data/mockDocuments.ts` / `neuropulseDemo.ts` / `tenProjectsDemo.ts`
|
||||
- `web/src/lib/deliverableSync.ts`
|
||||
- `deploy/postgres/goose/00011_*.sql` / `00012_*.sql`
|
||||
- `internal/taskrun/backend.go`
|
||||
- 产物扫描:`scripts/check-prod-bundle.sh`
|
||||
|
||||
## 整改回链
|
||||
|
||||
- [remediation](../remediation/2026-09-16-demo-seed-pollution-remediation.md)
|
||||
- [test-report](../test-reports/2026-09-16-demo-seed-pollution-test-report.md)
|
||||
@@ -1,110 +0,0 @@
|
||||
---
|
||||
title: "FEATURE-MATRIX production-ready 连续性审计"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
---
|
||||
|
||||
# FEATURE-MATRIX production-ready 连续性审计
|
||||
|
||||
## 结论
|
||||
|
||||
排除“纯软件项目自举”后,当前证据没有显示新的发布 blocker。`CURRENT.md`、`gap-matrix.md` 与 B1–B4 报告一致记录 `production_ready=yes`,dev/test/main 均为 schema 47。
|
||||
|
||||
`FEATURE-MATRIX.md` 仍需整改,但问题主要是状态语义混杂和证据漂移:同一个 `partial` 同时表示补证、首发后增强、实验、刻意关闭和真正的能力缺口。矩阵不能仅凭这些 `partial` 把 production-ready 回退,也不能据此宣称所有能力完整。
|
||||
|
||||
本轮只读核对文档和源码,没有运行测试、改业务代码、切换 feature flag 或操作共享环境。运行态事实仍以现有测试报告为准;后续状态提升必须重新验证。
|
||||
|
||||
## 审计边界
|
||||
|
||||
- 包含:除“纯软件项目自举”外的 `partial` 行、与这些行直接相关的 done/deferred 边界、发布门禁和证据链。
|
||||
- 不包含:纯软件项目自举的实现方案、FAV 的实现审计、业务代码整改、部署或环境晋升。
|
||||
- 权威关系:`FEATURE-MATRIX.md` 描述能力成熟度;`gap-matrix.md` 描述发布 blocker;`CURRENT.md` 描述当前协作与环境快照。
|
||||
|
||||
## 已确认事实
|
||||
|
||||
1. 发布门禁 B1–B4 已签,三环境 schema 为 47;U9–U12、FAV、完整 PI change-report 叙事和软件自举明确不挡当前首发。
|
||||
2. 对话刷新、重登、重启和跨用户拒绝已有真实 PI/运行态证据。
|
||||
3. 可靠事件 notify、workflow advance、projection 已 live,生产闭包 hook 已退出;FAV 仍保持 off。
|
||||
4. 多意图 U1–U8 已合入默认 `legacy` 的安全基线,但 U8 真实 PI generate 在其报告中是 SKIP,不能写成真实生成闭环已签。
|
||||
5. 工作流治理的设置页、DutyMode、动作级鉴权和三工作流真实 PI E2E 已签;full/none 文档长链的页面证据仍未完整覆盖。
|
||||
6. 文档版本账本、人工修订、比较、通知和运行时 UI 已通过;change report 仍是明确标识的 deterministic fallback,不是完整 PI 叙事。
|
||||
|
||||
## 逐行核对
|
||||
|
||||
| 模块 | 当前判定 | 剩余工作 | 发布关系 |
|
||||
|---|---|---|---|
|
||||
| 意图识别 L1 | 当前行范围已具备改为 `done` 的条件 | 把 U9–U12 移出 L1 行;L1 只保留 18 类、三分支、读写分流和纯依赖边界 | 文档校准,不是 blocker |
|
||||
| 多意图持久计划 | `partial` 合理 | 先补 U8 真实 PI + PG + browser + restart + 撤权证据;U9 独立实验;U10–U12 逐 action 扩面 | 默认 `legacy`,不挡首发 |
|
||||
| 对话 / ctxmgr baseline | 当前冻结范围可改为 `done` | 语义摘要是 backlog D3,不是 D5;拆成独立 deferred/partial 行 | 文档校准,不是 blocker |
|
||||
| 对话安全治理 D7 | `deferred` 独立行 | 数据分类,数据库/备份/日志控制盘点,留存删除口径和加密边界;若确认当前基线违规则升级 blocker | 待合规口径,不得无限期隐藏在普通 backlog |
|
||||
| 工作流治理 | `partial` 合理 | full 文档真实 PI 人工审批长链;none 文档真实 PI 生成、免审批、账本持久化和阶段不阻塞长链 | 补证优先,不预设改代码 |
|
||||
| IAM / 鉴权 | 现有缺口文字过时,模块仍应暂保 `partial` | 历史读取统一 owner/阶段授权已闭环;改为全路由 inventory、PG fail-closed、管理员例外、缓存失效和 410 退役决策 | 若发现现行旁路则升级 blocker |
|
||||
| 文档版本与修改认知 baseline | 当前冻结范围可改为 `done` | 账本、人工修订、真实 diff+lineage 和 UI 已签;完整 PI narrative 拆成独立 deferred/partial 行 | 文档校准,不是 blocker |
|
||||
| 前端工作台 | 当前行范围可改为 `done` | 其他 409 消费方复用信封解析应另列 hardening,不能让当前能力永久 `partial` | 文档校准,不是 blocker |
|
||||
| CI / E2E | `partial` 合理 | 夜间 `RUN_PI_E2E=1`、失败分类与证据归档;修复全仓 race 的 TempDir 异步收口 flake | 阻止下一次晋升,不自动否定已发布版本 |
|
||||
| Artifact promotion | `partial/deferred` 独立行 | 现状只证明同 commit 与各环境 digest 可追溯;要声明 same-image promotion,需一次构建、按 digest 晋升和可执行 receipt | 发布加固,不反向否定已签版本 |
|
||||
| 模块解耦与可靠事件 | 当前核心范围可改为 `done` | 将 FAV 拆成独立 `deferred` 行;选择性后续解耦按收益触发 | FAV 保持 off,不挡首发 |
|
||||
|
||||
## 文档漂移
|
||||
|
||||
1. 多意图行仍写“共享环境 schema 45 待晋升”,与三环境 schema 47 冲突。
|
||||
2. 对话行将语义摘要标成 D5;`chat-agent-p6-backlog.md` 中语义摘要实际为 D3,D5 是共享 KB 环境隔离评估。
|
||||
3. IAM 行仍把已经闭环的历史读取 owner/阶段授权写成待办。
|
||||
4. 前端行的“缺口/后续”没有未完成项,但状态仍是 `partial`。
|
||||
5. 模块解耦行把已完成的事件核心和故意关闭的 FAV 混在同一状态中。
|
||||
6. `2026-09-15-multi-intent-hitl-plan.md`、Phase 2 解耦方案、HTTP 信封方案和相关历史研究的头部状态或叙事已被后续报告部分或全部取代。
|
||||
|
||||
历史文档不得删除。应在原文增加 implemented/superseded 指针,或更新仍作为活方案的状态与证据链接。
|
||||
|
||||
## 风险发现
|
||||
|
||||
### IAM fail-open 潜在路径
|
||||
|
||||
`internal/auth/store_factory.go` 在 pool 为空或 IAM 表未就绪时回退 `MemoryStore`,没有按环境显式拒绝。当前 main schema 47 使该分支未被证实正在触发,因此本审计不直接翻转 production-ready;后续必须先只读核对部署实际选择,再把 fallback 改成仅 dev/test 加显式 opt-in 可用,空值、未知环境和 main/prod 一律 fail closed,并覆盖既有 session 的授权依赖中断负例。
|
||||
|
||||
### 状态提升越级
|
||||
|
||||
U8 的代码合入、默认 legacy 安全和真实 PI 放量是三件不同的事。矩阵若只写“U1–U8 完成”,会掩盖真实 PI stop-gate,并可能误导后续把 tier 升到 `confirm/full`。
|
||||
|
||||
### `none` 语义误写
|
||||
|
||||
`none` 表示不需要人工三权审批,不是“none 文档审批长链”。验收应证明真实 PI 生成、版本账本、审批动作不适用和阶段不阻塞。
|
||||
|
||||
### 证据失效
|
||||
|
||||
测试报告只证明其 commit、schema、镜像、runner/model/protocol 和环境。代码、迁移、compose、flag、runner 协议变化或环境晋升后,历史 PASS 不能单独证明新部署。
|
||||
|
||||
## 推荐状态模型
|
||||
|
||||
能力状态与发布状态必须正交:
|
||||
|
||||
- `done`:本行声明的能力边界已完成并有相应层级证据;不表示该领域永无后续。
|
||||
- `partial`:已交付可用子集,行内列出尚未满足的关闭条件。
|
||||
- `planned`:方案已存在但尚未实施。
|
||||
- `deferred`:明确不进入当前路线,且不是发布 blocker。
|
||||
- `blocked`:该行目标无法继续,必须给出 blocker 和恢复条件。
|
||||
- `production_ready`:只由 `gap-matrix.md` 的发布门禁决定,不由所有能力行必须 `done` 推导。
|
||||
|
||||
## 重验触发器
|
||||
|
||||
发生以下任一变化时,受影响行必须重新验证,不能沿用旧 PASS:
|
||||
|
||||
- 授权谓词、owner port、会话或阶段作用域变化;
|
||||
- schema、迁移、compose、镜像或环境晋升;
|
||||
- feature flag/tier 从 off、legacy 或 shadow 升级;
|
||||
- PI Runner URL、模型、typed-result 协议或 prompt/schema 变化;
|
||||
- event consumer writer、lease、receipt、replay 或回滚路径变化;
|
||||
- 浏览器用户流、SSE 恢复或持久化边界变化。
|
||||
|
||||
## 相关证据
|
||||
|
||||
- 能力矩阵:`status/FEATURE-MATRIX.md`
|
||||
- 发布缺口:`remediation/gap-matrix.md`
|
||||
- 当前环境:`ops/CURRENT.md`
|
||||
- 发布门禁任务:`archive/ops/short-term/2026-09-16-production-ready-gates.md`
|
||||
- 多意图设计与 U8:`system-design/2026-09-15-multi-intent-hitl-plan.md`、`test-reports/2026-09-16-multi-intent-u8-task-generate-test-report.md`
|
||||
- 对话门禁:`test-reports/2026-09-16-chat-refresh-gate-test-report.md`
|
||||
- 工作流 full/none 证据边界:`test-reports/2026-09-14-workflow-plan-409-frozen-and-optional-duties-test-report.md`
|
||||
- 文档版本:`test-reports/2026-09-14-document-revision-runtime-ui-test-report.md`
|
||||
- 事件与解耦:`test-reports/2026-09-15-phase2-closeout-test-report.md`、`ops/research/2026-09-15-track-e-retrospective.md`
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "R13 数据安全清单(nightly / real-PI)"
|
||||
created: 2026-09-16
|
||||
status: done
|
||||
---
|
||||
|
||||
# R13 数据安全清单
|
||||
|
||||
用于真实 PI / nightly / 扩面验收的出站与留存门禁。
|
||||
|
||||
| # | 控制项 | 状态 | 证据/路径 |
|
||||
|---|--------|------|-----------|
|
||||
| 1 | 隔离合成 project/session,禁止生产真实 PII | PASS | nightly `agent_wave2_pi` + 合成 fixture |
|
||||
| 2 | 凭证不入库;secrets 仅 Gitea Actions / `~/.secrets` | PASS | handoff gitea-nightly-secrets |
|
||||
| 3 | evidence_refs 脱敏;日志无 token/密码 | PASS | `promotion-receipt-*` + run script |
|
||||
| 4 | PI 最小字段 allowlist / typed-result-v1 | PASS | deploy/pi-agent typed-result |
|
||||
| 5 | 跨项目/跨用户负例拒绝 | PASS | Wave2 / authz 套件 |
|
||||
| 6 | 产物保留期有限(本地 tar / Actions) | PASS | workflow archive step |
|
||||
| 7 | KB 出站失败降级不泄漏凭证 | PASS | pi-agent runner health 无 key |
|
||||
|
||||
## 开放增强
|
||||
|
||||
- 完整红队注入矩阵可另开 audit;不挡本清单基线勾选。
|
||||
+2
-36
@@ -13,45 +13,11 @@
|
||||
|
||||
## 核心文档(按阅读顺序推荐)
|
||||
|
||||
### FEATURE-MATRIX production-ready 连续性审计(2026-09-16)
|
||||
|
||||
**文件**: [2026-09-16-feature-matrix-production-readiness-audit.md](./2026-09-16-feature-matrix-production-readiness-audit.md)
|
||||
|
||||
**结论**: 排除纯软件项目自举后没有新增发布 blocker;矩阵需要拆分能力成熟度、发布关系、补证、增强和 deferred 状态,并修复 schema、D3/D5、IAM、前端与 FAV 叙事漂移。
|
||||
|
||||
**整改**: [FEATURE-MATRIX Production-Ready Continuity - Plan](../remediation/2026-09-16-feature-matrix-production-readiness-plan.md)
|
||||
|
||||
### 多意图与 HITL 方案复核(2026-09-15)
|
||||
|
||||
**文件**: [2026-09-15-multi-intent-hitl-plan-review.md](./2026-09-15-multi-intent-hitl-plan-review.md)
|
||||
|
||||
**结论**: 多意图方向可行,但必须以 `app/intentflow` 深模块、PG 权威状态机、逐动作即时授权和分波 mutex 防止 intent/coordinator 再耦合;确认、卡片和 SSE 均不能替代授权或权威状态。
|
||||
|
||||
**设计/计划**: [多意图持久计划与 HITL](../system-design/2026-09-15-multi-intent-hitl-plan.md) · [核心 U1–U8 与扩面 U9–U12](../ops/short-term/2026-09-15-multi-intent-hitl.md)
|
||||
|
||||
|
||||
### 模块解耦 Phase 2 方案复核(2026-09-15)
|
||||
|
||||
**文件**: [2026-09-15-module-decoupling-phase2-plan-review.md](./2026-09-15-module-decoupling-phase2-plan-review.md)
|
||||
|
||||
**结论**: PG delivery 尚未形成生产闭环;原计划把事件、结构和协议三轨绑成一次交付,并误判 docgov/docrevision 依赖方向。修订版先完成事件生产与历史数据门,再以 PG dispatcher、逐消费者 shadow 和真实刷新/重启恢复收口。
|
||||
|
||||
**整改**: [Phase 2 持久事件交付与后续解耦路线](../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md)
|
||||
|
||||
|
||||
### arch-check U1 可重放基线(2026-09-14)
|
||||
### 模块边界 arch-check Wave 0 基线(2026-09-14)
|
||||
|
||||
**文件**: [2026-09-14-arch-check-baseline.md](./2026-09-14-arch-check-baseline.md)
|
||||
|
||||
**结论**: 四类规则(production import / SQL write / path / event)可重放。import=0,sql_write=5,path=17,event=0。Goose 与测试不计生产写者。新违规与过期例外立即 block。
|
||||
|
||||
### 模块解耦方案复核(2026-09-14)
|
||||
|
||||
**文件**: [2026-09-14-module-decoupling-plan-review.md](./2026-09-14-module-decoupling-plan-review.md)
|
||||
|
||||
**结论**: 模块化单体方向成立,但原横向 Wave 缺少跨属主事务、可靠事件、多副本互斥、逐动作授权和 FAV 边界;应先完成受控文档可靠性纵向试点,再按证据扩面。
|
||||
|
||||
**整改**: [模块解耦与文档可靠性重构计划](../remediation/2026-09-14-module-decoupling-refactor-plan.md)
|
||||
**结论**: import 相对现状 allowlist 无新边;表/路径目标属主扫描 21 条 warn,作为 Wave 1+ 收口清单,不在本轮转 block。
|
||||
|
||||
### 项目 143 workflow-plan 409 与三权全有或全无(2026-09-14)
|
||||
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
---
|
||||
title: "Authorization matrix v3 — full route inventory"
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
status: done
|
||||
---
|
||||
|
||||
# Authorization matrix v3 — full route inventory
|
||||
|
||||
Generated from `mux.HandleFunc` registrations under `internal/server/`.
|
||||
AuthN column is **heuristic**; negative-test pointers filled where known.
|
||||
|
||||
| Method | Path | Handler | File | AuthN (heuristic) | Neg test |
|
||||
|--------|------|---------|------|-------------------|----------|
|
||||
| GET | `/` | `s.serveSPA` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/admin/config` | `s.handleAdminConfig` | `server.go` | admin+project? | see suite |
|
||||
| PUT | `/api/v1/admin/config` | `s.handleAdminConfig` | `server.go` | admin+project? | see suite |
|
||||
| GET | `/api/v1/admin/permissions` | `s.handleAdminPermissions` | `server.go` | admin+project? | see suite |
|
||||
| GET | `/api/v1/admin/roles` | `s.handleAdminRoles` | `server.go` | admin+project? | see suite |
|
||||
| POST | `/api/v1/admin/roles` | `s.handleAdminRoles` | `server.go` | admin+project? | see suite |
|
||||
| DELETE | `/api/v1/admin/roles/{id}` | `s.handleAdminRoleByID` | `server.go` | admin+project? | see suite |
|
||||
| PATCH | `/api/v1/admin/roles/{id}` | `s.handleAdminRoleByID` | `server.go` | admin+project? | see suite |
|
||||
| GET | `/api/v1/admin/templates` | `s.handleAdminTemplates` | `server.go` | admin+project? | see suite |
|
||||
| POST | `/api/v1/admin/templates` | `s.handleAdminTemplates` | `server.go` | admin+project? | see suite |
|
||||
| GET | `/api/v1/admin/templates/{key}/versions` | `s.handleAdminTemplateVersions` | `server.go` | admin+project? | see suite |
|
||||
| GET | `/api/v1/admin/users` | `s.handleAdminUsers` | `server.go` | admin+project? | see suite |
|
||||
| POST | `/api/v1/admin/users` | `s.handleAdminUsers` | `server.go` | admin+project? | see suite |
|
||||
| PUT | `/api/v1/admin/users/{id}/role` | `s.handleAdminUpdateRole` | `server.go` | admin+project? | see suite |
|
||||
| PUT | `/api/v1/admin/users/{id}/status` | `s.handleAdminUpdateStatus` | `server.go` | admin+project? | see suite |
|
||||
| GET | `/api/v1/admin/workflows` | `s.handleAdminWorkflows` | `server.go` | admin+project? | see suite |
|
||||
| POST | `/api/v1/admin/workflows` | `s.handleAdminWorkflows` | `server.go` | admin+project? | see suite |
|
||||
| GET | `/api/v1/admin/workflows/{id}` | `s.handleAdminWorkflowByID` | `server.go` | admin+project? | see suite |
|
||||
| PATCH | `/api/v1/admin/workflows/{id}/versions/{version}` | `s.handleAdminWorkflowVersion` | `server.go` | admin+project? | see suite |
|
||||
| POST | `/api/v1/admin/workflows/{id}/versions/{version}/publish` | `s.handleAdminWorkflowPublish` | `server.go` | admin+project? | see suite |
|
||||
| POST | `/api/v1/admin/workflows/{id}/versions/{version}/retire` | `s.handleAdminWorkflowRetire` | `server.go` | admin+project? | see suite |
|
||||
| POST | `/api/v1/admin/workflows/{id}/versions/{version}/validate` | `s.handleAdminWorkflowValidate` | `server.go` | admin+project? | see suite |
|
||||
| POST | `/api/v1/admin/workspaces/reconcile` | `s.handleReconcileWorkspace` | `server.go` | admin+project? | see suite |
|
||||
| POST | `/api/v1/auth/change-password` | `s.handleAuthChangePassword` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/auth/login` | `s.handleAuthLogin` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/auth/logout` | `s.handleAuthLogout` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/auth/me` | `s.handleAuthMe` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/auth/public-config` | `s.handleAuthPublicConfig` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/auth/register` | `s.handleAuthRegister` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/auth/sessions` | `s.handleAuthSessions` | `server.go` | handler | see suite |
|
||||
| DELETE | `/api/v1/auth/sessions/{id}` | `s.handleAuthSessionByID` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/chat` | `s.handleChat` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/categories` | `s.handleListChatCategories` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/dates` | `s.handleListChatDates` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/digests` | `s.handleListDailyDigests` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/chat/digests/generate` | `s.handleGenerateDailyDigest` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/export/messages` | `s.handleChatExportMessages` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/messages` | `s.handleGetChatMessages` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/messages/day` | `s.handleGetChatDayMessages` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/chat/messages/import` | `s.handleImportChatMessages` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/messages/window` | `s.handleGetChatWindow` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/messages/{message_id}/export-capability` | `s.handleGetExportCapability` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/messages/{message_id}/export-source` | `s.handleGetExportSource` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/chat/read` | `s.handleChatRead` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/chat/recategorize` | `s.handleChatRecategorize` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/search` | `s.handleChatSearch` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/sessions` | `s.handleListChatSessions` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/chat/sessions` | `s.handleUpsertChatSession` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/stream` | `s.handleChatStream` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/chat/stream` | `s.handleChatStream` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/turns/{client_turn_id}` | `s.handleGetChatTurn` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/chat/unread` | `s.handleChatUnread` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/context/cases/recommend` | `s.handleRecommendCases` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/context/project` | `s.handleGetProjectContext` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/context/user` | `s.handleGetUserContext` | `server.go` | handler | see suite |
|
||||
| PUT | `/api/v1/context/user/preference` | `s.handleUpdateUserPreference` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/docgov/approver-decision` | `s.handleDocGovApproverDecision` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/docgov/audit-logs` | `s.handleDocGovListAuditLogs` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/docgov/claim` | `s.handleDocGovClaim` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/docgov/comments` | `s.handleDocGovListComments` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/docgov/comments` | `s.handleDocGovAddComment` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/docgov/content` | `s.handleDocGovSaveContent` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/docgov/document` | `s.handleDocGovGetDocument` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/docgov/documents/{doc_id}/content` | `s.handleDocGovGetDocumentContent` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/docgov/lease/acquire` | `s.handleDocGovAcquireLease` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/docgov/lease/heartbeat` | `s.handleDocGovHeartbeatLease` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/docgov/lease/release` | `s.handleDocGovReleaseLease` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/docgov/proposal/decide` | `s.handleDocGovDecideProposal` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/docgov/review-decision` | `s.handleDocGovReviewDecision` | `server.go` | handler | see suite |
|
||||
| POST | `/api/v1/docgov/submit-review` | `s.handleDocGovSubmitReview` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/documents/{doc_id}/agent-candidates/{candidate_id}` | `s.handleDocRevisionGetCandidate` | `document_revision_handlers.go` | session+project | see suite |
|
||||
| POST | `/api/v1/documents/{doc_id}/agent-candidates/{candidate_id}/decision` | `s.handleDocRevisionCandidateDecision` | `document_revision_handlers.go` | session+project | see suite |
|
||||
| GET | `/api/v1/documents/{doc_id}/change-reports/{report_id}` | `s.handleDocRevisionGetReport` | `document_revision_handlers.go` | session+project | see suite |
|
||||
| PATCH | `/api/v1/documents/{doc_id}/content` | `s.handleDocRevisionPatchContent` | `document_revision_handlers.go` | session+project | see suite |
|
||||
| GET | `/api/v1/documents/{doc_id}/diff` | `s.handleDocRevisionDiff` | `document_revision_handlers.go` | session+project | see suite |
|
||||
| GET | `/api/v1/documents/{doc_id}/manual-overlay` | `s.handleDocRevisionManualOverlay` | `document_revision_handlers.go` | session+project | see suite |
|
||||
| GET | `/api/v1/documents/{doc_id}/revision-state` | `s.handleDocRevisionState` | `document_revision_handlers.go` | session+project | see suite |
|
||||
| GET | `/api/v1/documents/{doc_id}/versions` | `s.handleDocRevisionListVersions` | `document_revision_handlers.go` | session+project | see suite |
|
||||
| GET | `/api/v1/documents/{doc_id}/versions/{version_no}` | `s.handleDocRevisionGetVersion` | `document_revision_handlers.go` | session+project | see suite |
|
||||
| GET | `/api/v1/freeform-documents` | `s.handleListFreeformDocs` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/freeform-documents` | `s.handleCreateFreeformDoc` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/freeform-documents/from-message` | `s.handleCreateFreeformDocFromMessage` | `server.go` | session+project | see suite |
|
||||
| DELETE | `/api/v1/freeform-documents/{doc_id}` | `s.handleDeleteFreeformDoc` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/freeform-documents/{doc_id}` | `s.handleGetFreeformDoc` | `server.go` | session+project | see suite |
|
||||
| PUT | `/api/v1/freeform-documents/{doc_id}` | `s.handleUpdateFreeformDoc` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/freeform-documents/{doc_id}/share` | `s.handleShareFreeformDoc` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/freeform-documents/{doc_id}/unshare` | `s.handleUnshareFreeformDoc` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/health` | `s.handleHealth` | `server.go` | public | see suite |
|
||||
| GET | `/api/v1/me/preferences` | `s.handleMePreferences` | `server.go` | handler | see suite |
|
||||
| PUT | `/api/v1/me/preferences` | `s.handleMePreferences` | `server.go` | handler | see suite |
|
||||
| GET | `/api/v1/me/profile` | `s.handleMeProfile` | `server.go` | handler | see suite |
|
||||
| PATCH | `/api/v1/me/profile` | `s.handleMeProfile` | `server.go` | handler | see suite |
|
||||
| PATCH | `/api/v1/notifications/{id}` | `s.handlePatchNotification` | `document_revision_handlers.go` | handler | see suite |
|
||||
| GET | `/api/v1/projects` | `s.handleListProjects` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/projects` | `s.handleCreateProject` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}` | `s.handleGetProjectByID` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/projects/{id}/activation-preview` | `s.handleActivationPreview` | `server.go` | session+project | see suite |
|
||||
| PUT | `/api/v1/projects/{id}/active-workflow` | `s.handleActivateWorkflow` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}/assets` | `s.handleListProjectAssets` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/projects/{id}/assets` | `s.handleUploadProjectAsset` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}/documents` | `s.handleListProjectWorkflowDocuments` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}/lineage` | `s.handleGetProjectLineage` | `server.go` | session+project | see suite |
|
||||
| DELETE | `/api/v1/projects/{id}/members` | `s.handleProjectMembers` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}/members` | `s.handleProjectMembers` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/projects/{id}/members` | `s.handleProjectMembers` | `server.go` | session+project | see suite |
|
||||
| PUT | `/api/v1/projects/{id}/members` | `s.handleProjectMembers` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}/notifications` | `s.handleListProjectNotifications` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}/settings` | `s.handleGetProjectSettings` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/projects/{id}/workflow-instances/activate` | `s.handleActivateWorkflowInstance` | `server.go` | session+project | see suite |
|
||||
| PUT | `/api/v1/projects/{id}/workflow-plan` | `s.handleSaveWorkflowPlan` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}/workflow-plan/default` | `s.handleGetDefaultWorkflowPlan` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}/workflows` | `s.handleListProjectWorkflows` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/projects/{id}/workflows/{workflow_key}/run` | `s.handleRunProjectWorkflow` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/projects/{id}/workflows/{workflow_key}/runs` | `s.handleListProjectWorkflowRuns` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/ready` | `s.handleReadiness` | `server.go` | public | see suite |
|
||||
| POST | `/api/v1/tasks/run` | `s.handleRunTask` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/tasks/run/stream` | `s.handleRunTaskStream` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/tasks/run/stream` | `s.handleRunTaskStream` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/tasks/runs` | `s.handleCreateTaskRun` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/tasks/runs/{run_id}` | `s.handleGetTaskRun` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/tasks/runs/{run_id}/cancel` | `s.handleCancelTaskRun` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/tasks/runs/{run_id}/events` | `s.handleTaskRunEvents` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/tasks/runs/{run_id}/resume` | `s.handleResumeTaskRun` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/workflow-instances/{id}` | `s.handleGetWorkflowInstance` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/workflow-instances/{id}/stages/{stage}/advance` | `s.handleAdvanceStage` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/workflow-instances/{id}/stages/{stage}/readiness` | `s.handleGetStageReadiness` | `server.go` | session+project | see suite |
|
||||
| POST | `/api/v1/workflow-instances/{id}/terminate` | `s.handleTerminateWorkflowInstance` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/workflow-instances/{id}/termination-preview` | `s.handleTerminationPreview` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/workflows` | `s.handleListWorkflowDefinitions` | `server.go` | session+project | see suite |
|
||||
| GET | `/api/v1/workflows/catalog` | `s.handleWorkflowCatalog` | `server.go` | session+project | see suite |
|
||||
| GET | `/health` | `s.handleHealth` | `server.go` | public | see suite |
|
||||
| GET | `/ready` | `s.handleReadiness` | `server.go` | public | see suite |
|
||||
| * | `/sse` | `func(w http.ResponseWriter, r *http.Request` | `task_run_idempotent_sse_test.go` | handler | see suite |
|
||||
|
||||
**Total routes:** 133
|
||||
|
||||
## Session interrupt fail-closed
|
||||
|
||||
When IAM/auth store unavailable after session established, protected reads must reject (see `TestAuthStore_SessionInterruptFailClosed`).
|
||||
|
||||
## BUG-11 410 policy
|
||||
|
||||
Product decision 2026-09-16: **retain** `WORKFLOW_SWITCH_API_RETIRED` 410 when governance available; legacy path only when governance unavailable. Not a capability gap.
|
||||
+21
-94
@@ -1,57 +1,24 @@
|
||||
# 当前焦点
|
||||
|
||||
**更新**: 2026-09-16
|
||||
**production_ready**: yes(门禁 B1–B4 已签;dev/test/main `schema_version=47`。不把 fallback change report 写成完整 PI)
|
||||
**更新**: 2026-09-14
|
||||
**production_ready**: no(`CHAT-INTENT-STATE` 等无关 blocker 仍开放。文档账本运行时 UI Round20 **PASS**,不把 fallback change report 写成完整 PI,也不把本轮写成全仓可发布)
|
||||
|
||||
## 焦点
|
||||
|
||||
1. **全量 backlog 覆盖 no-go**:P0–P7 总控实施中([short-term](./short-term/2026-09-16-full-backlog-override.md))
|
||||
2. **运维**:Gitea nightly runner 已通;待 P1 对齐 `DATA_DIR=dev` 后冲 green receipt
|
||||
3. **红线**:禁止整支 merge FAV;不默认升 `MULTI_INTENT_PLAN_TIER=full`;项目 143 只读
|
||||
1. **WORKFLOW-PLAN**: [冻结 409 与文档职责可选治理](../audit/2026-09-14-workflow-plan-409-frozen-and-optional-duties.md)(Wave 1–4 已在 `fix/workflow-plan-409-frozen-and-optional-duties` 落地;Wave 5 占槽 e2e 进行中;后续治理原则见 [MVP 治理规则评审](../ops/research/2026-09-14-mvp-governance-rules-review.md))
|
||||
2. **CHAT-INTENT**: [对话意图运行时状态](../audit/2026-09-13-conversation-intent-runtime-state.md)(`fix/conversation-intent-state`;与文档账本运行时无关)
|
||||
3. **CHAT**: [对话历史刷新](../audit/2026-09-13-chat-history-refresh-disappears.md)(认领仍 `in_progress`;gap 行已 PASS,以代码/handoff 为准收敛)
|
||||
|
||||
## 并行认领
|
||||
|
||||
| owner | task | branch | worktree | mutex | status |
|
||||
|-------|------|--------|----------|-------|--------|
|
||||
| Cursor-Auto | 2026-09-16-software-project-bootstrap | feature/software-project-bootstrap | .worktrees/feature-software-project-bootstrap | workflow-design | done |
|
||||
| Cursor | 2026-09-16-full-backlog-override | docs/override-nogo-full-backlog | - | architecture-docs | in_progress |
|
||||
| Cursor | 2026-09-16-gitea-nightly-docker-datadir | fix/gitea-nightly-docker-datadir | - | ci | done |
|
||||
| Cursor | 2026-09-16-gitea-nightly-host-tools | fix/gitea-nightly-host-tools | - | ci | done |
|
||||
| Cursor | 2026-09-16-wave-leftovers | fix/wave-leftovers-n7-playwright-dod | - | ci | done |
|
||||
| Cursor | 2026-09-16-wave3-pu6-pu8-go-no-go | feature/wave3-pu6-pu8-go-no-go | - | architecture-docs | done |
|
||||
| Cursor | 2026-09-16-wave2c-same-image-digest | feature/wave2c-same-image-digest | - | infra | done |
|
||||
| Cursor | 2026-09-16-wave2b-nightly-promotion-receipt | feature/wave2b-nightly-promotion-receipt | - | ci | done |
|
||||
| Cursor | 2026-09-16-wave2-real-pi-evidence | feature/wave2-real-pi-evidence | - | intent-plan | done |
|
||||
| Cursor | 2026-09-16-wave1-race-tempdir-cleanup | fix/race-tempdir-cleanup | - | ci | done |
|
||||
| Cursor | 2026-09-16-wave1-iam-fail-closed | fix/iam-store-fail-closed | - | authz | done |
|
||||
| Cursor | 2026-09-16-feature-matrix-wave0-calibration | feature/feature-matrix-production-readiness-plan | .worktrees/feature-matrix-production-readiness-plan | architecture-docs | done |
|
||||
| Codex | 2026-09-16-feature-matrix-production-readiness-plan | feature/feature-matrix-production-readiness-plan | .worktrees/feature-matrix-production-readiness-plan | architecture-docs | done |
|
||||
| Cursor-Auto | 2026-09-16-matrix-deep-test-promote-test | feature/matrix-deep-test-promote-test | - | infra | done |
|
||||
| Cursor-Auto | 2026-09-16-production-ready-gates | docs/production-ready-flip | - | ci | done |
|
||||
| Cursor-Auto | 2026-09-16-demo-seed-pollution | fix/demo-data-pollution-web | - | web | done |
|
||||
| Cursor | 2026-09-16-multi-intent-u8-task-generate | feature/multi-intent-u8-task-generate | - | intent-plan | done |
|
||||
| Cursor | 2026-09-16-multi-intent-u7-auto-read | feature/multi-intent-u7-auto-read | - | intent-plan | done |
|
||||
| Cursor | 2026-09-16-multi-intent-u6-web-cards | feature/multi-intent-u6-web-cards | - | web | done |
|
||||
| Cursor | 2026-09-16-multi-intent-u5-decision-api | feature/multi-intent-u5-decision-api | - | intent-plan | done |
|
||||
| Cursor | 2026-09-16-multi-intent-u4-outbox-projection | feature/multi-intent-u4-outbox-projection | - | events | done |
|
||||
| Cursor | 2026-09-15-multi-intent-u3-intentflow-pg | feature/multi-intent-u3-intentflow-pg | - | intent-plan | done |
|
||||
| Cursor | 2026-09-15-multi-intent-u2-segmenter | feature/multi-intent-u2-segmenter | - | intent | done |
|
||||
| Cursor | 2026-09-15-multi-intent-u1-contracts | feature/multi-intent-u1-contracts | - | architecture-docs | done |
|
||||
| Cursor | app-composition-u11-u12 | feature/app-composition-u11-u12 | - | app | done |
|
||||
| Cursor | chatlog-contextasm-u10 | feature/chatlog-contextasm-u10 | - | chat | done |
|
||||
| Cursor | chat-history-refresh-remediation | fix/chat-history-refresh | - | chat | done |
|
||||
| Cursor | dataset-lifecycle-u9 | feature/dataset-lifecycle-u9 | - | dataset | done |
|
||||
| Cursor | taskrun-runmanifest-u8 | feature/taskrun-runmanifest | - | taskrun | done |
|
||||
| Cursor | document-reliability-m1-live-and-m2 | refactor/document-reliability-pilot | - | workspace | done |
|
||||
| Codex | module-decoupling-remediation-plan | feature/module-decoupling-remediation | - | architecture-docs | done |
|
||||
| Codex | module-decoupling-phase2-plan-review | docs/module-decoupling-ipc-assessment | - | architecture-docs | done |
|
||||
| Cursor | module-decoupling-phase2-docs | feature/module-decoupling-phase2-docs | - | architecture-docs | done |
|
||||
| verifier_antigravity | controlled-content-ui-acceptance | fix/controlled-content-ui-acceptance | - | document-content-ui-acceptance | done |
|
||||
| implementer_cursor | controlled-content-canonical-hash | fix/controlled-content-canonical-hash | - | docgov | done |
|
||||
| verifier_antigravity | controlled-content-ui-acceptance | fix/controlled-content-ui-acceptance | .worktrees/fix-controlled-content-ui-acceptance | document-content-ui-acceptance | done |
|
||||
| implementer_cursor | controlled-content-canonical-hash | fix/controlled-content-canonical-hash | .worktrees/fix-controlled-content-canonical-hash | docgov | done |
|
||||
| Codex | project143-controlled-content-404-diagnosis | fix/project143-controlled-content-404-diagnosis | - | docgov-content-diagnosis | done |
|
||||
| Codex | software-project-bootstrap-plan | feature/software-project-bootstrap-plan | - | workflow-design | done |
|
||||
| Codex | conversation-intent-runtime-state | fix/conversation-intent-state | - | intent | done |
|
||||
| Cursor | conversation-intent-runtime-state | docs/conversation-intent-dual-tab | - | intent | done |
|
||||
| Cursor | chat-history-refresh-remediation | fix/chat-history-refresh | - | chat | in_progress |
|
||||
| Codex | conversation-intent-runtime-state | fix/conversation-intent-state | .worktrees/fix-conversation-intent-state | intent | in_progress |
|
||||
| Cursor | document-revision-wave1-6-implementation | feature/document-revision-management | - | docgov | done |
|
||||
| Cursor-Auto | document-revision-runtime-ui03 | fix/document-revision-runtime-ui03 | - | docgov | done |
|
||||
| Cursor-Auto | document-revision-sse-idempotency | fix/document-revision-sse-idempotency | - | docgov | done |
|
||||
@@ -79,36 +46,21 @@
|
||||
| Cursor-Auto | document-revision-evidence-count | fix/document-revision-evidence-count | - | document-revision-evidence-count | done |
|
||||
| Cursor-Auto | document-revision-session-close | feature/document-revision-session-close | - | document-revision-session-close | done |
|
||||
| Cursor-Auto | vite-frp-allowed-hosts | fix/vite-frp-allowed-hosts | - | web-devserver | done |
|
||||
| implementer_cursor | workflow-plan-409-frozen-and-optional-duties | fix/workflow-plan-409-frozen-and-optional-duties | - | workflow | done |
|
||||
| implementer_cursor | governance-action-level-authz | fix/governance-action-level-authz | - | workflow | done |
|
||||
| Cursor | leftover-branch-cleanup | chore/leftover-branch-cleanup | - | ops | done |
|
||||
| Cursor | event-e0a-production-scope-contract | fix/event-production-scope-contract | - | events | done |
|
||||
| Cursor | event-e0b-dispatcher-pg | feature/events-dispatcher-pg | - | events | done |
|
||||
| Cursor | event-e1a-notify-cutover | fix/event-notify-cutover | - | events | done |
|
||||
| Cursor | event-e1b-workflow-advance | fix/event-workflow-advance | - | events | done |
|
||||
| Cursor | event-e1c-projection-cutover | fix/event-projection-cutover | - | events | done |
|
||||
| Cursor | event-e2-hook-guard | fix/event-e2-hook-guard | - | events | done |
|
||||
| Cursor | doccontent-canonical-boundary | fix/doccontent-canonical-boundary | - | docgov | done |
|
||||
| Cursor | intent-bizdev-boundary | fix/intent-bizdev-boundary | - | intent | done |
|
||||
| Cursor | stageflow-type-ownership | fix/stageflow-type-ownership | - | stageflow | done |
|
||||
| Cursor | bizdev-locator-removal | fix/bizdev-locator-removal | - | bizdev | done |
|
||||
| Cursor | chatflow-orchestration-boundary | fix/chatflow-orchestration-boundary | - | chat | done |
|
||||
| Cursor | phase2-closeout-inventories | feature/phase2-closeout-inventories | - | architecture-docs | done |
|
||||
| Cursor | event-shared-live-cutover | feature/event-shared-live-cutover | - | events | done |
|
||||
| Cursor | pi-typed-result | feature/pi-typed-result | - | pi-agent | done |
|
||||
| Cursor | promote-dev-to-test-2026-09-15 | feature/promote-dev-to-test-2026-09-15 | - | infra | done |
|
||||
| Cursor-Auto | remove-herdr-agent-settings | feature/remove-herdr-agent-settings | - | agent-collab-docs | done |
|
||||
| implementer_cursor | workflow-plan-409-frozen-and-optional-duties | fix/workflow-plan-409-frozen-and-optional-duties | .worktrees/fix-workflow-plan-409-frozen-and-optional-duties | workflow | in_progress |
|
||||
| Cline | governance-action-level-authz | fix/governance-action-level-authz | - | workflow | blocked |
|
||||
| Cursor | module-decoupling-wave0 | feature/remove-herdr-agent-settings | - | arch | done |
|
||||
|
||||
> 新任务开始前登记。`branch` 必须为 `feature/<slug>` 或 `fix/<slug>`,**禁止** `dev` / `test` / `main`。同一 `mutex` 同时仅一个 `in_progress`。
|
||||
|
||||
> workflow-plan 409 与治理鉴权 G1–G5 已收口(见 [test-report](../test-reports/2026-09-14-governance-action-level-authz-test-report.md))。禁止终止或改写项目 143。
|
||||
> `document-reliability-pilot` U11–U12 已合入 `dev@bf59cce` 并 rebuild。`CHAT-INTENT-STATE` 双标签 busy 已 PASS(项目 6275)。禁止 worktree 内 `env-service`。项目 143 只读,禁止终止。
|
||||
> 2026-09-15 旁支清理:[报告](../test-reports/2026-09-15-leftover-branch-cleanup-test-report.md)。已合入本地旁支 31 条已 `git branch -d`;7 个对应 worktree 已拆。extra worktree 仅余 `.worktrees/fix-dev-runtime-data-root-guard`(目录名是 guard,检出的是 `feature/final-artifact-vault`)。**故意不合入、不删**:`feature/final-artifact-vault`、`feature/remove-herdr-agent-settings`、`fix/project143-controlled-content-404-diagnosis`、`fix/dev-runtime-data-root-guard`、`dev-old-linear`。不删 `origin/*`。不整支 merge FAV;不启用 `FAV_DEGRADED_READ`。
|
||||
> `workflow-plan-409-frozen-and-optional-duties` 已由 implementer_cursor 接管:worktree 已创建,Wave 1–4 提交落地,Wave 5 占集成槽位(e2e)进行中。
|
||||
> `governance-action-level-authz` blocked 仅为等待同 mutex `workflow` 的 Wave 5 收敛;收敛后从最新 `dev` 创建 `fix/governance-action-level-authz` 并改 `in_progress`,不得在当前 `feature/remove-herdr-agent-settings` 工作区编码。
|
||||
|
||||
## 集成槽位
|
||||
|
||||
| holder | phase | since | scope | queue |
|
||||
|--------|-------|-------|-------|-------|
|
||||
| - | idle | - | - | - |
|
||||
| implementer_cursor | e2e | 2026-09-14 | workflow-plan 409 frozen + optional duties | governance-action-level-authz |
|
||||
|
||||
**phase**: `idle` | `merging` | `smoke` | `e2e`
|
||||
|
||||
@@ -118,49 +70,24 @@
|
||||
|
||||
| 环境 | 端口 | schema | 状态 |
|
||||
|------|------|--------|------|
|
||||
| dev | 8080 | **47** | healthy(`pi-agent` typed-result-v1;events worker `:8088`;notify/advance/projection live、fav off;health+ready PASS;demo 6001–6010 retired) |
|
||||
| test | 8081 | **47** | healthy(`rc-v1.0.0-beta.2`;pi-agent `:18866`;events `:8089`;notify/advance/projection live、fav off;health+ready PASS;矩阵深度测试 live 项目 3 PASS) |
|
||||
| main | 8000 | **47** | healthy(app + events + runner + DB;与 dev/test 对齐) |
|
||||
| dev | 8080 | **32** | healthy(产品代码部署为 `36e4bc3`;真实 UI 主链+restart PASS) |
|
||||
| test | 8081 | 25→27* | healthy |
|
||||
| main | 8000 | 25→27* | healthy(app + runner + DB) |
|
||||
|
||||
## SSOT
|
||||
|
||||
| 类型 | 路径 |
|
||||
|------|------|
|
||||
| 文档总地图 | [../README.md](../README.md) |
|
||||
| 模块完成度 | [FEATURE-MATRIX](../status/FEATURE-MATRIX.md)(Wave 0 已校准契约与冻结边界) |
|
||||
| 发布缺口 | [gap-matrix](../remediation/gap-matrix.md)(`production_ready=yes`;Wave 0 IAM 只读未发现旁路) |
|
||||
| 连续性审计/计划 | [audit](../audit/2026-09-16-feature-matrix-production-readiness-audit.md) · [remediation](../remediation/2026-09-16-feature-matrix-production-readiness-plan.md) · [Wave 0 任务](./short-term/2026-09-16-feature-matrix-wave0-calibration.md) |
|
||||
| 模块完成度 | [FEATURE-MATRIX](../status/FEATURE-MATRIX.md) |
|
||||
| 发布缺口 | [gap-matrix](../remediation/gap-matrix.md) |
|
||||
| 测试报告 | [test-reports/](../test-reports/) |
|
||||
| Agent 手册 | [AGENTS.md](../../AGENTS.md) |
|
||||
| 意图双标签 busy 交接 | [./handoffs/2026-09-15-conversation-intent-dual-tab.md](./handoffs/2026-09-15-conversation-intent-dual-tab.md) |
|
||||
| 受控正文 hash 漂移 W1–W6 | [../ops/handoffs/2026-09-14-controlled-content-canonical-hash.md](../ops/handoffs/2026-09-14-controlled-content-canonical-hash.md) |
|
||||
| DOCREV ADR | [../adr/2026-09-13-document-version-boundary.md](../adr/2026-09-13-document-version-boundary.md) |
|
||||
| DOCREV 管理测试 | [../test-reports/2026-09-13-document-revision-management-test-report.md](../test-reports/2026-09-13-document-revision-management-test-report.md) |
|
||||
| DOCREV 运行时 UI Round20 | [../test-reports/2026-09-14-document-revision-runtime-ui-test-report.md](../test-reports/2026-09-14-document-revision-runtime-ui-test-report.md) |
|
||||
| 纯软件项目自举设计 | [../system-design/2026-09-14-software-project-bootstrap-workflow.md](../system-design/2026-09-14-software-project-bootstrap-workflow.md) |
|
||||
| 模块化单体解耦架构 | [../system-design/2026-09-14-module-decoupling-architecture.md](../system-design/2026-09-14-module-decoupling-architecture.md) |
|
||||
| 模块解耦整改计划 | [../remediation/2026-09-14-module-decoupling-refactor-plan.md](../remediation/2026-09-14-module-decoupling-refactor-plan.md) |
|
||||
| Phase 2 方案审阅 | [../audit/2026-09-15-module-decoupling-phase2-plan-review.md](../audit/2026-09-15-module-decoupling-phase2-plan-review.md) |
|
||||
| Phase 2 修订计划 | [../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md](../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md) |
|
||||
| 多意图 HITL 复核方案 | [../system-design/2026-09-15-multi-intent-hitl-plan.md](../system-design/2026-09-15-multi-intent-hitl-plan.md) |
|
||||
| 多意图 HITL U1 契约 | [../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md](../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md) |
|
||||
| 多意图 HITL U2 分段 | [../test-reports/2026-09-15-multi-intent-u2-segmenter-test-report.md](../test-reports/2026-09-15-multi-intent-u2-segmenter-test-report.md) |
|
||||
| 多意图 HITL U3 PG | [../test-reports/2026-09-15-multi-intent-u3-intentflow-pg-test-report.md](../test-reports/2026-09-15-multi-intent-u3-intentflow-pg-test-report.md) |
|
||||
| 多意图 HITL U4 投影 | [../test-reports/2026-09-16-multi-intent-u4-outbox-projection-test-report.md](../test-reports/2026-09-16-multi-intent-u4-outbox-projection-test-report.md) |
|
||||
| 多意图 HITL U5 API | [../test-reports/2026-09-16-multi-intent-u5-decision-api-test-report.md](../test-reports/2026-09-16-multi-intent-u5-decision-api-test-report.md) |
|
||||
| 多意图 HITL U6 Web | [../test-reports/2026-09-16-multi-intent-u6-web-cards-test-report.md](../test-reports/2026-09-16-multi-intent-u6-web-cards-test-report.md) |
|
||||
| 多意图 HITL U8 generate | [../test-reports/2026-09-16-multi-intent-u8-task-generate-test-report.md](../test-reports/2026-09-16-multi-intent-u8-task-generate-test-report.md) |
|
||||
| 多意图 HITL U7 只读 | [../test-reports/2026-09-16-multi-intent-u7-auto-read-test-report.md](../test-reports/2026-09-16-multi-intent-u7-auto-read-test-report.md) |
|
||||
| 文档可靠性 M1 报告 | [../test-reports/2026-09-14-document-reliability-pilot-test-report.md](../test-reports/2026-09-14-document-reliability-pilot-test-report.md) |
|
||||
| 文档可靠性 M1 活验 | [../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md](../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md) |
|
||||
| 文档可靠性 M2 | [../test-reports/2026-09-14-document-reliability-m2-test-report.md](../test-reports/2026-09-14-document-reliability-m2-test-report.md) |
|
||||
| 文档可靠性 M3 U8 | [../test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md](../test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md) |
|
||||
| 文档可靠性 M3 U9 | [../test-reports/2026-09-15-dataset-lifecycle-u9-test-report.md](../test-reports/2026-09-15-dataset-lifecycle-u9-test-report.md) |
|
||||
| 文档可靠性 M4 U10 | [../test-reports/2026-09-15-chatlog-contextasm-u10-test-report.md](../test-reports/2026-09-15-chatlog-contextasm-u10-test-report.md) |
|
||||
| 文档可靠性 M5/M6 U11–U12 | [../test-reports/2026-09-15-app-composition-u11-u12-test-report.md](../test-reports/2026-09-15-app-composition-u11-u12-test-report.md) |
|
||||
| Track E E2 闭包守卫 | [../test-reports/2026-09-15-event-e2-hook-guard-test-report.md](../test-reports/2026-09-15-event-e2-hook-guard-test-report.md) |
|
||||
| Track E 复盘 | [./research/2026-09-15-track-e-retrospective.md](./research/2026-09-15-track-e-retrospective.md) |
|
||||
| 旁支清点收口 | [../test-reports/2026-09-15-leftover-branch-cleanup-test-report.md](../test-reports/2026-09-15-leftover-branch-cleanup-test-report.md) |
|
||||
| SSE/幂等审计 | [../audit/2026-09-13-document-revision-sse-idempotency.md](../audit/2026-09-13-document-revision-sse-idempotency.md) |
|
||||
| 质量门禁自污染审计 | [../audit/2026-09-13-document-revision-quality-gate-self-pollution.md](../audit/2026-09-13-document-revision-quality-gate-self-pollution.md) |
|
||||
| 当前文档路由审计 | [../audit/2026-09-13-document-revision-active-doc-routing.md](../audit/2026-09-13-document-revision-active-doc-routing.md) |
|
||||
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: "对话刷新恢复整改 Checklist"
|
||||
status: done
|
||||
status: in_progress
|
||||
created: 2026-09-13
|
||||
updated: 2026-09-15
|
||||
related_task: "../2026-09-13-chat-history-refresh-remediation.md"
|
||||
updated: 2026-09-13
|
||||
related_task: "../short-term/2026-09-13-chat-history-refresh-remediation.md"
|
||||
---
|
||||
|
||||
# 对话刷新恢复整改 Checklist
|
||||
@@ -36,10 +36,10 @@ related_task: "../2026-09-13-chat-history-refresh-remediation.md"
|
||||
## Wave 5 — 验收
|
||||
|
||||
- [x] `go test -short ./...` — 证据:本机执行输出
|
||||
- [x] 真实 PI 刷新 E2E(需 dev 容器 + pi-agent)— 证据:`.doc/test-reports/assets/2026-09-15-chat-history-refresh-live/live.json`(项目 6252 闲聊刷新同集 + guest 403;编制任务链未通过)
|
||||
- [ ] 真实 PI 刷新 E2E(需 dev 容器 + pi-agent)— 证据:待 test-report 补录
|
||||
- [x] 测试报告归档 — 证据:`.doc/test-reports/2026-09-13-chat-history-refresh-test-report.md`
|
||||
|
||||
## 完成定义
|
||||
|
||||
- [x] 全部勾选且有证据链接
|
||||
- [x] gap-matrix `CHAT-HISTORY-REFRESH` → PASS
|
||||
- [ ] 全部勾选且有证据链接
|
||||
- [ ] gap-matrix `CHAT-HISTORY-REFRESH` → PASS
|
||||
@@ -1,74 +0,0 @@
|
||||
---
|
||||
title: "模块解耦重构验收清单"
|
||||
status: in_progress
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
---
|
||||
|
||||
# 模块解耦重构验收清单
|
||||
|
||||
## M0 架构与基线
|
||||
|
||||
- [x] contracts 分类、事务 owner、表属主、锁顺序、事件信封、Principal 和 FAV 边界均有唯一规范来源。
|
||||
- [x] arch-check 分离 production import、SQL write、path 和 event registration;例外有 owner 与到期日。
|
||||
- [x] 当前违规基线可重复生成,新违规立即阻断。
|
||||
|
||||
## M1 文档可靠性
|
||||
|
||||
- [x] 人工编辑、agent commit、approve/reject 的跨表写入同事务(U3;隔离库双会话编辑已测)。
|
||||
- [x] fault injection 任一点失败均无部分提交(U2 隔离库)。
|
||||
- [x] 同 ETag 并发写只有一个赢家(内存 + 双会话)。
|
||||
- [x] 1、2、4 app replicas 结果一致。
|
||||
- [x] GET 服务端零写入 + typed consistency(U4 单测)。refresh/reload 真页面 PASS([活验报告](../../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md))。
|
||||
- [x] 项目 143 等价 hazard 与新项目真实页面刷新、重登、restart、rebuild PASS。
|
||||
- [x] 服务端负例 fail closed;浏览器跨用户 401/404 PASS。
|
||||
|
||||
## M2 事件与 FAV
|
||||
|
||||
- [x] 业务终态、staging 和 outbox 同事务。
|
||||
- [x] 每个 consumer 有独立 delivery/inbox/attempt/lease/dead-letter。
|
||||
- [x] 1、2、4 dispatcher 无重复可见副作用和永久饥饿。
|
||||
- [x] crash-before/after-side-effect/ack 全部可恢复。
|
||||
- [x] stale fencing、跨项目事件、错误 producer、坏 digest 均拒绝。
|
||||
- [x] FAV 中间结果、Prompt、工具轨迹和 secret 准入率为零。
|
||||
- [x] DB 授权成功后才允许 degraded read;授权图缺失 fail closed。
|
||||
- [x] tombstone/删除账本 union-deny PASS。
|
||||
|
||||
## M3 TaskRun、workspace 与数据生命周期
|
||||
|
||||
- [x] RunManifest 规范字节、SHA、成员和 storage identity 持久化。
|
||||
- [x] 重复 finalize、SSE 断线和 cancel race 不重复消息或 artifact。
|
||||
- [x] WorkspaceRef 无物理路径,路径遍历和链接逃逸负例 PASS。
|
||||
- [x] 旧 lease writer 被 fencing token 拒绝。
|
||||
- [x] workspace 清空后最终成果仍可定位和校验。
|
||||
- [x] backfill 可暂停、续跑和重放;异常进入 quarantine。
|
||||
- [x] 八条 migration/reload/recovery 轨道 PASS。
|
||||
- [x] 数据销毁前完整备份、corpus、FAV coverage 和人工批准全部满足。
|
||||
|
||||
## M4–M6 选择性扩展
|
||||
|
||||
- [x] 每个子切片在原包边界先获得行为收益,再决定物理搬包。
|
||||
- [x] chatlog/contextasm 保持授权可见集合和计数一致。
|
||||
- [x] app 是唯一组合根,subscriber 重复启动不重复注册。
|
||||
- [x] UserProjectContext 跨模块写路径走类型化 ContextUpdate + 版本 CAS(coordinator 作为 owner 仍可改 Project 字段)。
|
||||
- [ ] server 无 SQL、路径拼接和业务闭包。(OnOutbox 已迁出;生产 SQL 无新增;path 例外 `workspaces/` / `output.md` 未到期,未删)
|
||||
- [ ] 对应架构规则全部 block,过期例外和 flags 已删除。(`import`/`event` 已 block;sql_write/path 基线例外仍在)
|
||||
|
||||
## 证据分层
|
||||
|
||||
- [x] Unit/stub 证据。
|
||||
- [x] PostgreSQL integration 证据(隔离库,非共享 env 库)。
|
||||
- [x] race/concurrency 目标包证据(非全仓 race)。
|
||||
- [x] fault injection 证据(U2)。
|
||||
- [x] 真实 PI 证据。
|
||||
- [x] 真实浏览器证据。
|
||||
- [x] restart/rebuild 证据。
|
||||
- [x] cross-user/project authorization negative 服务端证据。
|
||||
- [x] scratch recovery 与完整 DB restore 证据。
|
||||
|
||||
## 关闭条件
|
||||
|
||||
- [x] test report 回链具体 U-ID、commit、环境 identity 和 fixture/dataset。([U11–U12 报告](../../test-reports/2026-09-15-app-composition-u11-u12-test-report.md);合入 `dev` 后补 rebuild 镜像)
|
||||
- [x] CURRENT、FEATURE-MATRIX、gap-matrix 与任务状态一致。
|
||||
- [x] 未实施后续仍为 planned/deferred,不用局部测试冒充全计划完成。
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U1 契约冻结 checklist"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
related_task: "2026-09-15-multi-intent-u1-contracts"
|
||||
---
|
||||
|
||||
# 多意图 HITL U1 契约冻结 checklist
|
||||
|
||||
## Wave 0
|
||||
|
||||
- [x] YAML `app/intentflow` allowlist + 三表 owner + unwrap_owners — 证据:`.doc/system-design/module-boundaries.yaml`
|
||||
- [x] 三条 `intent.plan.*` YAML ↔ StaticContracts parity — 证据:`go test ./internal/events -run RegistryParity`
|
||||
- [x] archtest 扫描 `intent.plan.*` — 证据:`go test ./internal/archtest`
|
||||
- [x] intentflow 状态/错误码/Service/政策/legacy tier — 证据:`go test ./internal/app/intentflow`
|
||||
- [x] CSRF/Bearer 结论落盘 — 证据:U1 short-term
|
||||
- [x] `go test -short ./...` — 证据:[U1 报告](../../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md)
|
||||
|
||||
## 完成定义
|
||||
|
||||
- [x] 全部勾选且有证据链接
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U2 规则分段 checklist"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
related_task: "2026-09-15-multi-intent-u2-segmenter"
|
||||
---
|
||||
|
||||
# 多意图 HITL U2 规则分段 checklist
|
||||
|
||||
## Wave 1
|
||||
|
||||
- [x] characterization 锁定 legacy IntentPlan — 证据:`internal/intent/plan_builder_test.go`;[报告 §5.1](../../test-reports/2026-09-15-multi-intent-u2-segmenter-test-report.md)
|
||||
- [x] 分段器 golden(连接词/句号/序号/先再最后) — 证据:[proposal-verbose.txt](../../test-reports/assets/2026-09-15-multi-intent-u2-segmenter/proposal-verbose.txt)
|
||||
- [x] 查询并总结不拆;写段进入提案;5 段拒绝;红线整体拒绝;指代澄清 — 证据:同上
|
||||
- [x] digest 稳定;shadow 不改 TopIntent — 证据:`TestPlanProposal_DigestStable` / `TestPlanProposal_WriteNotDroppedAndLegacyUnchanged`
|
||||
- [x] 反事实 auto_read 错误自动执行 = 0 — 证据:`plan-proposal eval denom=8 false_auto_execute=0`
|
||||
- [x] `go test -short ./internal/intent ./internal/coordinator ./internal/app/intentflow` — 证据:[unit.txt](../../test-reports/assets/2026-09-15-multi-intent-u2-segmenter/unit.txt);[short.txt](../../test-reports/assets/2026-09-15-multi-intent-u2-segmenter/short.txt)
|
||||
|
||||
## 完成定义
|
||||
|
||||
- [x] 全部勾选且有证据链接
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U3 intentflow PG checklist"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
related_task: "2026-09-15-multi-intent-u3-intentflow-pg"
|
||||
---
|
||||
|
||||
# 多意图 HITL U3 intentflow PG checklist
|
||||
|
||||
## Wave 2
|
||||
|
||||
- [x] Goose 00044 三表 + unique/CAS/lease 列 — 证据:`deploy/postgres/goose/00044_2026-09-15-intent-plans.sql`;`TestGooseU3_00044_HasUpAndDown`
|
||||
- [x] 创建幂等与同 turn 异 digest — 证据:[plans-verbose.txt](../../test-reports/assets/2026-09-15-multi-intent-u3-intentflow-pg/plans-verbose.txt)
|
||||
- [x] 决策 nonce / revision CAS / 过期 — 证据:同上
|
||||
- [x] 两 worker 无双 owner;租约接管;旧 fence 拒绝 — 证据:`TestTwoWorkersOneOwnerAndLeaseTakeover`
|
||||
- [x] receipt 对账不盲跑;环境隔离;legacy HandleTurn 不落盘 — 证据:`TestReceiptWritebackFailureDoesNotRerun` / `TestHandleTurnLegacyDoesNotPersist`
|
||||
- [x] Assemble 接线且 chat 不调用;arch-check 无新例外 — 证据:[short.txt](../../test-reports/assets/2026-09-15-multi-intent-u3-intentflow-pg/short.txt)
|
||||
|
||||
## 完成定义
|
||||
|
||||
- [x] 全部勾选且有证据链接
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U4 outbox checklist"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
related_task: "2026-09-16-multi-intent-u4-outbox-projection"
|
||||
---
|
||||
|
||||
# 多意图 HITL U4 outbox checklist
|
||||
|
||||
- [x] 同 UoW Append intent.plan.* — 证据:[emit-verbose.txt](../../test-reports/assets/2026-09-16-multi-intent-u4-outbox-projection/emit-verbose.txt)
|
||||
- [x] golden payload 无敏感字段 — 证据:`testdata/intent-plan-awaiting-v1.json`
|
||||
- [x] 重复/乱序/伪造 producer — 证据:`TestProjectionOnlyForwardAndForgedRejected`
|
||||
- [x] 投影只前进;跨用户隔离 — 证据:同上
|
||||
- [x] dispatcher 语义未改;arch-check 绿 — 证据:[short.txt](../../test-reports/assets/2026-09-16-multi-intent-u4-outbox-projection/short.txt)
|
||||
|
||||
## 完成定义
|
||||
|
||||
- [x] 全部勾选且有证据链接
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U5 decision API checklist"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
related_task: "2026-09-16-multi-intent-u5-decision-api"
|
||||
---
|
||||
|
||||
# 多意图 HITL U5 decision API checklist
|
||||
|
||||
- [x] 冻结 REST 路径挂到认证 mux — 证据:[http-verbose.txt](../../test-reports/assets/2026-09-16-multi-intent-u5-decision-api/http-verbose.txt)
|
||||
- [x] Principal 不从 body 复制 — 证据:`TestIntentPlanHTTP_IgnoresBodyPrincipalAndSameReceipt`
|
||||
- [x] 非成员/跨作用域/管理员负例 — 证据:`TestIntentPlanHTTP_ScopeNegatives` / `AdminDoesNotBypassMembership`
|
||||
- [x] StepAuthorizer 在 confirm 与 execute 前调用 — 证据:[authorize-verbose.txt](../../test-reports/assets/2026-09-16-multi-intent-u5-decision-api/authorize-verbose.txt)
|
||||
- [x] stale/nonce/edit/非法部分确认 — 证据:同上
|
||||
- [x] arch-check / short 绿 — 证据:[short.txt](../../test-reports/assets/2026-09-16-multi-intent-u5-decision-api/short.txt)
|
||||
|
||||
## 完成定义
|
||||
|
||||
- [x] 全部勾选且有证据链接
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U6 Web checklist"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
related_task: "2026-09-16-multi-intent-u6-web-cards"
|
||||
---
|
||||
|
||||
# 多意图 HITL U6 Web checklist
|
||||
|
||||
- [x] PLAN_CONFIRM 类型与 PlanView 映射 — 证据:`web/src/engine/planCard.test.ts`
|
||||
- [x] 决策走 REST,不改 AST — 证据:`planCardTouchesLocalAST` + App early-return
|
||||
- [x] 409/过期/submitting 状态 — 证据:同上
|
||||
- [x] App early-return — 证据:`web/src/App.tsx`
|
||||
- [x] 单元测试绿;Playwright 门控 skip — 证据:[npm-test.txt](../../test-reports/assets/2026-09-16-multi-intent-u6-web-cards/npm-test.txt)
|
||||
|
||||
## 完成定义
|
||||
|
||||
- [x] 全部勾选且有证据链接
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
title: "U7 auto_read checklist"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
related_task: "2026-09-16-multi-intent-u7-auto-read"
|
||||
---
|
||||
|
||||
# U7
|
||||
|
||||
- [x] legacy HandleTurn 不落盘
|
||||
- [x] auto_read 查询创建并执行
|
||||
- [x] 写话语不落盘
|
||||
- [x] QueryGuard 拒绝 task.run
|
||||
- [x] chat 调用 HandleTurn;arch 绿
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "U8 task generate checklist"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
related_task: "2026-09-16-multi-intent-u8-task-generate"
|
||||
---
|
||||
|
||||
# U8
|
||||
|
||||
- [x] confirm 话语落盘 awaiting,确认前不执行 — 证据:`TestHandleTurnConfirmPersistsAwaitingWithoutExecute`
|
||||
- [x] 第二活动写计划冲突 — 证据:`TestHandleTurnConfirmRejectsSecondActiveWritePlan`
|
||||
- [x] OwnerMux 路由 + nil Task fail closed — 证据:`TestOwnerMuxRoutesGenerateToTask` / `TestOwnerMuxNilTaskFailClosed`
|
||||
- [x] 确认后 generate 一次、重放不双跑 — 证据:`TestConfirmThenMuxExecutesGenerateOnce`
|
||||
- [x] adapter 幂等 / 拒查询 / 撤销 — 证据:`TestTaskRunAdapter*`
|
||||
- [x] LiveTaskStarter 同键重放 — 证据:`TestLiveTaskStarterReplaysIdempotencyKey`
|
||||
- [x] QueryGuard 仍拒 task.run;auto_read 写话语不落盘 — 证据:U7 回归 + `TestQueryGuardRejectsGenerate`
|
||||
- [x] 真实 PI stop-gate — 证据:`TestTaskGenerateRealPIStopGate` SKIP
|
||||
- [x] arch-check block 绿 — 证据:[报告](../../test-reports/2026-09-16-multi-intent-u8-task-generate-test-report.md)
|
||||
|
||||
## 完成定义
|
||||
|
||||
- [x] 全部勾选且有证据链接
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
title: "意图 mutex 从 Codex 转 Cursor:仅剩浏览器双标签门"
|
||||
created: 2026-09-15
|
||||
from: Codex
|
||||
to: Cursor
|
||||
status: closed
|
||||
---
|
||||
|
||||
# 交接:对话意图运行时状态 — 浏览器双标签门
|
||||
|
||||
## 目标(下一位 Agent 应完成什么)
|
||||
|
||||
在 U11–U12 已合入并 rebuild 的 `:8080` 上,用**新建项目**补齐真实 PI + 双标签 busy / 刷新恢复证据。通过则关 `CHAT-INTENT-STATE` 并 archive;失败则从最新 `dev` 新开 `fix/conversation-intent-dual-tab`,**不要**在已合入的 `fix/conversation-intent-state` 上追加。
|
||||
|
||||
## 已完成
|
||||
|
||||
- Wave 0–4 服务端/单测已在 `dev`(`fix/conversation-intent-state` 是祖先)。
|
||||
- 前端 5s 租约轮询:`web/src/App.tsx`。
|
||||
- `DOC_BUSY` 预检:`internal/server/task_run_handlers.go`(不创建第二 run,`error_info.actions=[]`)。
|
||||
- UI busy 文案:`BlockRenderer` / `DeckDrawer`「编辑中」。
|
||||
- 只读总结真实 PI(用例 H)已签;项目 143 诊断污染未删。
|
||||
|
||||
## 未完成
|
||||
|
||||
- 浏览器刷新恢复与双标签租约可见性(报告用例 E)。
|
||||
- 整改 Wave 3–4 未勾项:运行中刷新、busy 自动解除、并发写不新增 run 的**活验证据**。
|
||||
|
||||
## 认领 / 槽位状态
|
||||
|
||||
| 项 | 值 |
|
||||
|----|-----|
|
||||
| mutex 已释放 | no(`intent` 转 Cursor `in_progress`) |
|
||||
| 集成槽位 holder | idle(U11–U12 已释放;本门禁不占槽,除非要合入 UI 补丁) |
|
||||
| branch | 编码已在 `dev`;活验文档用 `docs/conversation-intent-dual-tab` |
|
||||
| worktree | `.worktrees/fix-conversation-intent-state` **禁止** `env-service` |
|
||||
|
||||
> 用户已要求关掉 CURRENT 两行 `in_progress`,授权 Cursor 接管剩余验收。不覆盖 Codex worktree 未合并代码。
|
||||
|
||||
## 关键文件
|
||||
|
||||
| 路径 | 说明 |
|
||||
|------|------|
|
||||
| `.doc/ops/short-term/2026-09-13-conversation-intent-runtime-state.md` | 任务文 |
|
||||
| `.doc/test-reports/2026-09-13-conversation-intent-runtime-state-test-report.md` | 用例 E 待补 |
|
||||
| `.doc/remediation/2026-09-13-conversation-intent-runtime-state-remediation.md` | Wave 3–4 |
|
||||
| `web/src/App.tsx` | 5s lease 轮询 |
|
||||
| `internal/server/task_run_handlers.go` | DOC_BUSY 预检 |
|
||||
|
||||
## 如何验证
|
||||
|
||||
```bash
|
||||
# 主仓已 rebuild 的 dev,禁止 worktree 内 env-service
|
||||
curl -sf http://127.0.0.1:8080/ready
|
||||
# 新建项目 + 隔离 session;禁止项目 143;禁止 sess-p143-u9 探针
|
||||
```
|
||||
|
||||
## 风险 / Blocker
|
||||
|
||||
- 项目 143 只读:不终止、不改写、不打探针。
|
||||
- 客户端在 lease 已投影后会本地拦截写请求(不发 POST);HTTP 409 须在轮询窗口内或走 API 第二通道取证。
|
||||
- 诊断污染消息仍不擅自删除。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- CURRENT: [CURRENT.md](../CURRENT.md)
|
||||
- Task: [../short-term/2026-09-13-conversation-intent-runtime-state.md](../short-term/2026-09-13-conversation-intent-runtime-state.md)
|
||||
- Test report: [../../test-reports/2026-09-13-conversation-intent-runtime-state-test-report.md](../../test-reports/2026-09-13-conversation-intent-runtime-state-test-report.md)
|
||||
@@ -1,66 +0,0 @@
|
||||
---
|
||||
title: "Wave 0 FEATURE-MATRIX 校准完成 → 待合 dev / Wave 1"
|
||||
created: 2026-09-16
|
||||
from: Cursor
|
||||
to: next-agent
|
||||
status: done
|
||||
---
|
||||
|
||||
# 交接:FEATURE-MATRIX Wave 0 完成后
|
||||
|
||||
## 目标(下一位 Agent 应完成什么)
|
||||
|
||||
1. 开启 **Wave 1**:PU3 IAM fail-closed + PU5A TempDir race flake(独立 `fix/*` / `feature/*`,分 mutex `authz` / `ci`)。
|
||||
2. 勿把 Wave 0 的 `done` 行当作真实 PI 补证已完成;U8 / full-none 仍归 Wave 2。
|
||||
|
||||
## 已完成
|
||||
|
||||
- PU1:FEATURE-MATRIX 状态契约、行模板、status README
|
||||
- PU2:按冻结边界收口 L1 / Chat baseline / DocRev baseline / 前端 / 可靠事件;拆出 D3、D7、PI 叙事、U9–U12、FAV、artifact promotion
|
||||
- 修正漂移:schema 47、D3≠D5、IAM 历史缺口文案、事件与 FAV 拆行
|
||||
- 历史指针:multi-intent 设计、Phase2 remediation、HTTP envelope、Track E 复盘
|
||||
- IAM 只读核验:dev/test/main schema 47、IAM 表齐全、`ALLOW_IN_MEMORY=false`;**未**证实 MemoryStore 旁路 → **保持** `production_ready=yes`,未新增 gap-matrix blocker
|
||||
- 文档已 `--no-ff` 合入 `dev`;**未** push
|
||||
|
||||
## 未完成
|
||||
|
||||
- Wave 1+(IAM 代码 fail-closed、race、真实 PI 补证、nightly/receipt)
|
||||
|
||||
## 认领 / 槽位状态
|
||||
|
||||
| 项 | 值 |
|
||||
|----|-----|
|
||||
| mutex 已释放 | yes |
|
||||
| 集成槽位 holder | idle(合入后已释放) |
|
||||
| branch | 已合入 `dev`(merge commit) |
|
||||
| worktree | `.worktrees/feature-matrix-production-readiness-plan`(可移除) |
|
||||
|
||||
## 关键文件
|
||||
|
||||
| 路径 | 说明 |
|
||||
|------|------|
|
||||
| `.doc/status/FEATURE-MATRIX.md` | 校准后能力矩阵 |
|
||||
| `.doc/ops/short-term/2026-09-16-feature-matrix-wave0-calibration.md` | Wave 0 任务与 IAM 证据 |
|
||||
| `.doc/remediation/2026-09-16-feature-matrix-production-readiness-plan.md` | 五波总计划 |
|
||||
| `.doc/audit/2026-09-16-feature-matrix-production-readiness-audit.md` | 审计 |
|
||||
| `.doc/remediation/gap-matrix.md` | 仅增加 Wave 0 核验注记;`production_ready=yes` |
|
||||
|
||||
## 如何验证
|
||||
|
||||
```bash
|
||||
# 在 worktree
|
||||
git diff --check
|
||||
# 人工对账 FEATURE-MATRIX / CURRENT / gap-matrix 叙事一致
|
||||
# IAM 只读证据见 short-term「证据 / 备注」
|
||||
```
|
||||
|
||||
## 风险 / Blocker
|
||||
|
||||
- `store_factory.go` 仍可能在缺表时 silent MemoryStore → Wave 1 必须 fail-closed;当前部署未触发。
|
||||
- 合入前确认主仓 CURRENT 与 worktree 无冲突(主仓可能另有 matrix-deep-test 认领行)。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- CURRENT: [CURRENT.md](../CURRENT.md)
|
||||
- Task: [../short-term/2026-09-16-feature-matrix-wave0-calibration.md](../short-term/2026-09-16-feature-matrix-wave0-calibration.md)
|
||||
- Remediation: [../../remediation/2026-09-16-feature-matrix-production-readiness-plan.md](../../remediation/2026-09-16-feature-matrix-production-readiness-plan.md)
|
||||
@@ -1,41 +0,0 @@
|
||||
---
|
||||
title: "Gitea nightly secrets 已本机配置"
|
||||
created: 2026-09-16
|
||||
from: Cursor
|
||||
to: any
|
||||
blocker: false
|
||||
---
|
||||
|
||||
# Gitea nightly secrets 已本机配置
|
||||
|
||||
## 已配置(weichen/Agent-System)
|
||||
|
||||
**Secrets**(API,值不入库):
|
||||
|
||||
- `RUNNER_AUTH_TOKEN` ← `configs/.env.dev`
|
||||
- `NIGHTLY_TEST_DATABASE_URL` → `127.0.0.1:5434/agent_wave2_pi`
|
||||
|
||||
**Variables**:
|
||||
|
||||
- `PI_AGENT_RUNNER_URL=http://127.0.0.1:18865`
|
||||
- `PI_AGENT_MODEL` ← `.env.dev` MINIMAX_MODEL_ID
|
||||
|
||||
## Runner(本机 `/home/weichen/gitea`)
|
||||
|
||||
- label:`nightly:host`(写入 `runner/data/.runner`,勿只改 compose)
|
||||
- `network_mode: host` + `address=http://127.0.0.1:3000`(PI 只绑 `127.0.0.1:18865`,bridge 不可达)
|
||||
- 挂载 brew + 宿主机 glibc + `/usr/bin/docker` + `/host-agent-data`(仓库 `data/`)
|
||||
- workflow:`DATA_DIR=/host-agent-data/test`;artifact 用本地 tar(Gitea 不支持 upload-artifact@v4)
|
||||
- `run-nightly-real-pi.sh`:全 SKIP / 镜像构建失败 → `infra_fail` receipt(不再 silent exit 127)
|
||||
|
||||
## 验证
|
||||
|
||||
- run#15:缺 node → FAIL
|
||||
- run#17:checkout/setup-go PASS;curl 缺失 → `infra_fail`;upload-artifact@v4 → GHESNotSupported
|
||||
- run#19:curl/PI OK;缺 docker + 无 DATA_DIR → SKIP 后 exit 127、无 receipt
|
||||
- run#21:DATA_DIR+docker OK;用例真实执行;receipt=`product_fail`;archive/summarize PASS
|
||||
(产品失败属套件本身,非 runner/secrets 配置问题)
|
||||
|
||||
## 触发
|
||||
|
||||
Gitea Actions → Nightly Real PI → Run workflow;或 schedule UTC 16:00。
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
title: "Phase 3 遗留清点收口"
|
||||
created: 2026-09-16
|
||||
from: Cursor
|
||||
to: any
|
||||
blocker: false
|
||||
---
|
||||
|
||||
# Phase 3 遗留清点收口
|
||||
|
||||
## 已关闭本轮
|
||||
|
||||
| 项 | 处置 |
|
||||
|----|------|
|
||||
| N7 U8 `quality_failed` 偶发 | `run-nightly-real-pi.sh` 对 quality_failed 全文重试一次;仍失败则 `product_fail`(非 PASS)。根因:模型质量门,非 secret/runner。 |
|
||||
| Playwright intent-plan 双标签 | 正式长期 gated + long-term 契约;矩阵关闭条件写死 |
|
||||
| Wave3 PU6–PU8 | 已 no-go(Phase 2) |
|
||||
| Artifact same-image | Wave2C done |
|
||||
|
||||
## 保留开放(需产品/另任务,不假装 done)
|
||||
|
||||
| 项 | 说明 |
|
||||
|----|------|
|
||||
| IAM 全路由 inventory | 仍开放;fail-closed 核心已签 |
|
||||
| session 中断负例 / 410 退役 | 需产品拍板 |
|
||||
| R13 全量清单勾选 | nightly 脱敏证据路径已有;完整 R13 矩阵另开 audit |
|
||||
| deterministic/B1–B4 持续回归 | 合入冒烟覆盖 short;全量门禁保持现有 CI |
|
||||
| FAV / 旁支分支 | CURRENT 已声明故意不合入 |
|
||||
|
||||
## 下一步
|
||||
|
||||
- 配置 Actions `RUNNER_AUTH_TOKEN` + `NIGHTLY_TEST_DATABASE_URL` 使 nightly 真跑
|
||||
- 获批后按 long-term 契约开 PU6–PU8 / Playwright 实现任务
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
title: "选择性模块解耦 M4–M6"
|
||||
status: planned
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
owner: TBD
|
||||
mutex: architecture
|
||||
review_cycle: milestone
|
||||
---
|
||||
|
||||
# 选择性模块解耦 M4–M6
|
||||
|
||||
## 目标
|
||||
|
||||
在文档可靠性、可靠事件和 FAV 已证明收益后,按 U10–U12 分别收敛 chatlog/contextasm、应用组合根、共享上下文和传输层。
|
||||
|
||||
## 为什么是长期任务
|
||||
|
||||
这些改动不直接修复当前受控正文事实源问题,且会触及仍在进行的 chat/intent 工作。
|
||||
M1–M3 未通过前执行会扩大冲突面,并提前冻结未经真实消费者验证的契约。
|
||||
|
||||
## 触发条件
|
||||
|
||||
- M1–M3 的 test report 全部 PASS。
|
||||
- 同类缺陷触达文件数和运行故障率表明继续解耦具有收益。
|
||||
- `chat`、`intent`、`bizdev/coordinator`、`server/stream` mutex 按子切片释放。
|
||||
- 每个子切片有独立 owner、回滚点和行为验收,不批准一个巨型 Wave。
|
||||
|
||||
## 候选子任务
|
||||
|
||||
1. U10 chatlog/contextasm 原地端口化。
|
||||
2. U11a 唯一 app composition root。
|
||||
3. U11b 按事件逐个替换闭包桥。
|
||||
4. U11c 逐 use case 迁移 ExecuteTask/executeStageInternal。
|
||||
5. U11d UserProjectContext snapshot/update 收权。
|
||||
6. U12 server/SSE 边界和架构门禁收口。
|
||||
|
||||
## 不包含
|
||||
|
||||
- 错误信封统一。
|
||||
- PI Runner result.json 协议。
|
||||
- 微服务拆分。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- [模块解耦整改与重构计划](../../remediation/2026-09-14-module-decoupling-refactor-plan.md)
|
||||
- [模块化单体解耦架构](../../system-design/2026-09-14-module-decoupling-architecture.md)
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: "纯软件项目自举工作流实施"
|
||||
status: in_progress
|
||||
status: planned
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-16
|
||||
updated: 2026-09-14
|
||||
---
|
||||
|
||||
# 纯软件项目自举工作流实施
|
||||
@@ -22,19 +22,6 @@ updated: 2026-09-16
|
||||
- 真实 PI 和 Ubuntu 无头浏览器黄金项目验收通过;
|
||||
- 未实现受控代码执行前,系统不会直接修改项目仓库。
|
||||
|
||||
## 实施进度(2026-09-16)
|
||||
|
||||
| Epic | 状态 | 说明 |
|
||||
|------|------|------|
|
||||
| SWBOOT-00 | done(契约) | ADR `.doc/adr/2026-09-16-software-project-bootstrap-keys.md` |
|
||||
| SWBOOT-01 | done(迁移) | goose `00048` additive;活验待集成槽 |
|
||||
| SWBOOT-02..04 | done(L1) | manifests + catalog 五 key;医疗三门禁保留 |
|
||||
| SWBOOT-05..08 | partial | 后端 catalog/creation-preview/create 字段;七步 UI / 对话路由未做 |
|
||||
| SWBOOT-09 | partial | L1 单测报告已出;真实 PI/UI NOT RUN |
|
||||
| SWBOOT-10 | stub only | allowlist + fail-closed;无真实 patch/merge |
|
||||
|
||||
分支:`feature/software-project-bootstrap`(**未合 dev**)。
|
||||
|
||||
## 实施拆分
|
||||
|
||||
| Epic | 范围 | 依赖 | 验收 |
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
title: "Playwright intent-plan 双标签 — 长期 gated"
|
||||
status: planned
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: TBD
|
||||
branch: feature/intent-plan-cards-playwright
|
||||
mutex: web
|
||||
---
|
||||
|
||||
# Playwright intent-plan 双标签 — 长期 gated
|
||||
|
||||
## 现状
|
||||
|
||||
- `web/e2e/intent-plan-cards.spec.ts`:`test.skip` unless `RUN_UI_ACCEPTANCE=1`;仅 body visible 骨架。
|
||||
- Conversation-intent 双标签已有 live 证据(项目 6275);**不等于** intent-plan confirm 双标签。
|
||||
- Wave2 明确不宣称 UI 双标签已绿。
|
||||
|
||||
## 关闭条件
|
||||
|
||||
1. 独立 short-term + `RUN_UI_ACCEPTANCE=1` 真浏览器:双标签 confirm 不同时本地成功
|
||||
2. 刷新/重登后与 PG plan 一致
|
||||
3. 报告归档 `.doc/test-reports/`;不升 MULTI_INTENT tier
|
||||
|
||||
## 非目标
|
||||
|
||||
- 用 stub/SKIP 冒充 PASS
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
title: "PU6 语义摘要 D3 — 获批后任务契约"
|
||||
status: planned
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: TBD
|
||||
branch: feature/pu6-semantic-summary
|
||||
mutex: chat
|
||||
go_no_go: go
|
||||
---
|
||||
|
||||
# PU6 语义摘要 D3 — 获批后任务契约
|
||||
|
||||
**go/no-go**:no-go(见 `.doc/ops/research/2026-09-16-wave3-pu6-pu8-go-no-go.md`)。已授权 GO;按 short-term 总控实施(默认 flag off)。
|
||||
|
||||
## 目标(获批后)
|
||||
|
||||
在授权可见集合上 shadow 语义摘要,可解释 fallback;通过后方可考虑替换 deterministic。
|
||||
|
||||
## 预注册门
|
||||
|
||||
- flag:`SEMANTIC_SUMMARY_SHADOW` → 可选 `SEMANTIC_SUMMARY_REPLACE`
|
||||
- 输入:authorized view only;无工具权限摘要器;R13 出站门
|
||||
- 失败:保留旧摘要/deterministic;标注 freshness
|
||||
- 负例:撤权消息不入摘要;injection 不能改权限
|
||||
|
||||
## 路径提示
|
||||
|
||||
`internal/ctxmgr/summarizer.go`、`internal/app/chatflow/`、`internal/server/chat_digest_api.go`、web 摘要消费组件
|
||||
|
||||
## 回滚
|
||||
|
||||
关 flag;读路径回 deterministic;保留历史证据指针
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
title: "PU7 PI change-report 叙事 — 获批后任务契约"
|
||||
status: planned
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: TBD
|
||||
branch: feature/pu7-pi-narrative
|
||||
mutex: docgov
|
||||
go_no_go: go
|
||||
---
|
||||
|
||||
# PU7 PI change-report 叙事 — 获批后任务契约
|
||||
|
||||
**go/no-go**:no-go。未获批禁止实现。
|
||||
|
||||
## 目标(获批后)
|
||||
|
||||
只读消费 immutable diff+lineage+risk floor 的 PI 叙事;任意 schema/超时/注入 → 全量 fallback。
|
||||
|
||||
## 预注册门
|
||||
|
||||
- flag:`PI_CHANGE_REPORT_NARRATIVE`
|
||||
- 禁止覆盖服务端风险/审批结论
|
||||
- typed schema + 文档版本 + input digest 绑定
|
||||
- UI 明确区分 narrative vs 事实字段
|
||||
|
||||
## 路径提示
|
||||
|
||||
`internal/docrevision/`、`deploy/pi-agent/` typed result、`ChangeReportPanel.tsx`
|
||||
|
||||
## 回滚
|
||||
|
||||
关 flag;仅 deterministic fallback;无第二份 candidate
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: "PU8-U10 mutate — 获批后任务契约"
|
||||
status: planned
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: TBD
|
||||
branch: feature/pu8-u10-mutate
|
||||
mutex: intent-plan
|
||||
go_no_go: go
|
||||
flag: MULTI_INTENT_U10_MUTATE
|
||||
---
|
||||
|
||||
# PU8-U10 mutate
|
||||
|
||||
**go/no-go**:no-go。独立 flag;高风险动作绑定 expected revision + 显式确认 + 执行前再授权;不依赖 U9。
|
||||
|
||||
## 负例
|
||||
|
||||
未确认、越权、stale revision、重复提交 → 零越界副作用。
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
title: "PU8-U11 docgov action — 获批后任务契约"
|
||||
status: planned
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: TBD
|
||||
branch: feature/pu8-u11-docgov
|
||||
mutex: docgov
|
||||
go_no_go: go
|
||||
flag: MULTI_INTENT_U11_DOCGOV
|
||||
---
|
||||
|
||||
# PU8-U11 docgov
|
||||
|
||||
**go/no-go**:no-go。独立 flag/mutex;按钮与自然语言同一 owner command;项目 143 只读纪律不变。
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
title: "PU8-U12 workflow/run-control — 获批后任务契约"
|
||||
status: planned
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: TBD
|
||||
branch: feature/pu8-u12-workflow-run-control
|
||||
mutex: workflow
|
||||
go_no_go: go
|
||||
flag: MULTI_INTENT_U12_RUN_CONTROL
|
||||
---
|
||||
|
||||
# PU8-U12 workflow/run-control
|
||||
|
||||
**go/no-go**:no-go。独立 flag;双标签确认/取消仅一成功;投影停机时权威 GET 仍正确;回滚后计划可读/取消/finalize。
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
title: "PU8-U9 segment proposal — 获批后任务契约"
|
||||
status: planned
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: TBD
|
||||
branch: feature/pu8-u9-segment-proposal
|
||||
mutex: intent-plan
|
||||
go_no_go: go
|
||||
flag: MULTI_INTENT_U9_SEGMENT
|
||||
---
|
||||
|
||||
# PU8-U9 segment proposal
|
||||
|
||||
**go/no-go**:no-go。规则无法判断时才出 segment proposal;超时/越界 fail closed;非 U10–U12 默认前置。
|
||||
|
||||
## 安全 stop gate
|
||||
|
||||
授权旁路 / 跨用户泄漏 / B1–B4 回归 → 停全部扩面并写 gap-matrix。
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
title: "H0 HTTP/SSE 公开错误信封盘点"
|
||||
created: 2026-09-15
|
||||
status: done
|
||||
confidence: high
|
||||
---
|
||||
|
||||
# 调研:H0 HTTP/SSE 公开错误信封盘点
|
||||
|
||||
## 结论
|
||||
|
||||
`Server.Routes()` 现有 **122** 条公开路由。错误响应至少三种并存:纯文本 `http.Error`、`{"error","message"}` JSON、以及 SSE `error_info`(`user_message/code/class/request_id`)。前端设置页已按 `error` code 分支,聊天流走 `error_info`;大量文档/任务路由仍回传 `err.Error()`,H1 必须 additive 统一,不能先改状态码。
|
||||
|
||||
## 证据
|
||||
|
||||
| 项 | 路径/命令 | 结果 |
|
||||
|----|-----------|------|
|
||||
| 路由清单 | `internal/server/server.go` `Routes()` | 122 条 `mux.HandleFunc` |
|
||||
| 纯文本/拼接 error | `handlers.go`、`task_run_handlers.go`、`asset_handlers.go`、`sse.go` | `http.Error(w, err.Error(), …)` 会泄露内部原因 |
|
||||
| JSON `{error,message}` | `project_settings_handlers.go`、`project_members_handlers.go`、`auth_helpers.go`、`chatflow_http.go` | 已有 `ERR_*` / `PLAN_FROZEN` 等稳定 code |
|
||||
| SSE | `internal/stream/types.go` `ErrorInfo`;`classify.go` 固定 `UserMessage` | 有 `request_id`;`error` 字符串与 `error_info.user_message` 并存 |
|
||||
| 前端 code 分支 | `web/src/api/projectSettingsError.ts` | `PLAN_FROZEN` / `PLAN_REVISION_CONFLICT` / `ERR_CONCURRENT_SWITCH` |
|
||||
| 前端文案匹配 | `web/src/App.tsx` `detail.includes('无权访问该项目')` | 未知 code 仍靠 substring |
|
||||
|
||||
## 兼容风险
|
||||
|
||||
| 家族 | 代表路由 | 现状 | H1 风险 |
|
||||
|------|----------|------|---------|
|
||||
| 纯文本 | `POST /api/v1/chat`、`POST /api/v1/tasks/runs` | `Content-Type` 非 JSON,正文即 message | 前端若按 JSON 解析会失败;须 additive 保留旧正文或双写 |
|
||||
| JSON error+message | 设置/成员/鉴权 | `error` 当 code | 与目标 `code` 字段同义;H1 应同时输出 `code` 与 `error` |
|
||||
| SSE error_info | `/api/v1/chat/stream`、task stream | 已有 code/class/request_id | 与 HTTP 信封字段名不完全对齐(`user_message` vs `message`) |
|
||||
| 授权拒绝 | `ERR_UNAUTHENTICATED` / `ERR_FORBIDDEN` | 部分 JSON、部分纯文本 | 统一后仍须不泄露资源存在性 |
|
||||
|
||||
## 建议映射(领域 → 目标 wire code)
|
||||
|
||||
| 领域情况 | 目标 code | 备注 |
|
||||
|----------|-----------|------|
|
||||
| 未登录 | `AUTHZ` | 不区分用户是否存在 |
|
||||
| 项目/文档无权 | `AUTHZ` | 与 404 策略保持现有授权选择 |
|
||||
| 参数/校验 | `VALIDATION` | details 只允许公开字段名 |
|
||||
| 版本/修订冲突 | `VERSION_CONFLICT` | 现 `PLAN_REVISION_CONFLICT` 映射 |
|
||||
| 幂等/重复提交 | `IDEMPOTENCY_CONFLICT` | 任务 run 已有 idempotency |
|
||||
| 规划冻结 | `VALIDATION` 或保留 `PLAN_FROZEN` | H3 前不得改状态码 |
|
||||
| 内部错误 | `INTERNAL` | 仅 `request_id`;禁止 SQL/路径/凭证 |
|
||||
|
||||
## 开放问题
|
||||
|
||||
- H1 是否把 SSE `user_message` 与 HTTP `message` 做成别名双写,需实施时定,不阻塞立项。
|
||||
- 状态码 breaking 必须另写 ADR(H3)。
|
||||
|
||||
## 建议动作
|
||||
|
||||
- H1:envelope registry + request ID 中间件;旧 `error` 字段 additive 保留。
|
||||
- 负例:XSS、路径、SQL、token、prompt、跨租户 ID 不得进入 `message`/`details`。
|
||||
- 实施见 [HTTP 信封整改](../../remediation/2026-09-15-http-error-envelope-remediation.md)。
|
||||
@@ -1,149 +0,0 @@
|
||||
---
|
||||
title: "模块解耦与 IPC/RPC 交互现状评估(复核修订版)"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
author: Cline
|
||||
confidence: high
|
||||
---
|
||||
|
||||
# 调研:模块解耦与 IPC/RPC 交互现状评估
|
||||
|
||||
## 结论
|
||||
|
||||
1. 系统采用模块化单体,不应把所有模块调用改成 IPC/RPC。当前已运行的外部传输边界有两条:Web 与 server 的 HTTP/SSE、Go server 与 PI Agent Runner 的 HTTP。`cmd/events` 和 FAV worker 是计划中的独立进程,不是已运行事实。
|
||||
2. 端口、组合根、事件信封、RunManifest、幂等键和 arch-check 提供了可执行的边界基础;`import=0/event=0` 只表示没有超出现有 allowlist/baseline 的新违规,不能证明语义解耦已经完成。
|
||||
3. 首要可靠性缺口是事件“部分生产、没有生产级消费闭环”。`internal/events/pg.go` 尚无原子 lease、ack/fail、retry/dead-letter 的完整实现;现有 dispatcher 测试覆盖 MemoryBus,不是 PostgreSQL 运行证据。
|
||||
4. 最大结构扩散源仍是 bizdev service locator。另有 `docgov → docrevision` 单向 canonical/hash 工具依赖、chat/coordinator 扇出和 `intent → bizdev` 依赖。此前“docgov↔docrevision 双向 import”的结论不成立。
|
||||
5. HTTP 错误信封与 PI Runner typed result 是独立协议债,不应阻塞持久事件链关闭。FAV 分支也不应成为 notify/projection 交付的前置条件。
|
||||
|
||||
## 1. 通信边界
|
||||
|
||||
| 边界 | 机制 | 当前状态 |
|
||||
|---|---|---|
|
||||
| Web ↔ server | `/api/v1/*` HTTP + SSE | 已运行;错误信封仍未统一 |
|
||||
| Go ↔ PI Agent Runner | HTTP + Bearer;health/run/cancel/search | 已运行;结果仍依赖 legacy stdout/result.json 路径 |
|
||||
| 单体内模块 | 消费者端口 + `internal/app` 组合根 | 已运行;bizdev locator 和部分直依赖仍扩大改动面 |
|
||||
| 领域事件 | PG envelope/delivery schema | 写侧部分存在;生产 dispatcher 未闭环 |
|
||||
| `cmd/events` | 计划中的独立 worker | 尚未实现/部署 |
|
||||
| FAV worker | 独立审计轨道 | 分支未整支合入;不得作为本轮验收前置 |
|
||||
|
||||
不建议把单体内端口改成 RPC。那会增加序列化、延迟、部分失败与运维成本,却不消除当前 locator、授权、幂等和事件消费缺口。
|
||||
|
||||
## 2. 已有契约与真实边界
|
||||
|
||||
### 已有且可校验
|
||||
|
||||
- `.doc/system-design/module-boundaries.yaml` 与 `internal/archtest` 管理 import、SQL write、path 和 event 规则。
|
||||
- `events.Envelope` schema 1 包含 event/aggregate/correlation/causation/idempotency/digest/producer 等字段,并校验 digest 与敏感字段。
|
||||
- `taskrun.RunManifest` schema 1 使用 canonical JSON 与 SHA-256。
|
||||
- TaskRun 同 idempotency key 异 request digest 返回冲突;文档写使用 expected head/ETag。
|
||||
- backend 选择由服务端 allowlist 控制,出站数据经过 secret stripping。
|
||||
- `module-boundaries.yaml` 已有 `event_producers` 与 `event_consumers` 段。后续工作是补全并校验 runtime registry parity,不是新建段落。
|
||||
|
||||
### 尚未闭合
|
||||
|
||||
- `PGSink.Append`/`InsertEnvelope` 已存在,但 `ClaimIDs` 仍是 SELECT-only claim;没有生产级 lease 获取、heartbeat、fenced ack/fail、retry、dead-letter 和 immutable attempt audit 闭环。
|
||||
- `event_deliveries` 每个 event/consumer 一行,只保存当前状态和累计 attempt;无法还原每次 lease/attempt 历史。
|
||||
- `internal/events/replay.go` 只检查 dry-run 与 consumer/operator/reason 等基础字段,尚未形成带认证主体、env/project/event scope、plan digest 和 apply 审计的应用用例。
|
||||
- `docflow` envelope 仍存在 `Environment:"dev"`、`ProjectID:0`,且 `Fav.StageAgentCommit(ctx, 0, ...)` 使用错误项目作用域。
|
||||
- 部分 server 路径临时构造 `docflow.Commands`,没有稳定注入 EventSink/UoW;不能假设 candidate-ready、downstream-impact、approved 三条链已经产生可供 shadow 的事件。
|
||||
- 闭包 hook 没有版本、重试、delivery 或 replay 记录。
|
||||
|
||||
## 3. 耦合点
|
||||
|
||||
### 3.1 bizdev service locator
|
||||
|
||||
`bizdev.Service` 暴露 `Pool()/CAS()/DocGov()/DocRevision()/ProjectWorkflow()/FreeformDoc()/KB()/ContextManager()`。调用方可以绕过端口取得数据库池和其他模块实现,令签名或构造变化向多包扩散。
|
||||
|
||||
整改应先加 no-new-callers 门禁,再逐调用方迁移,最后在一个 contract 提交删除 8 个 getter。门禁应禁止领域/用例 API 暴露或转发 pool/tx,同时允许 app/cmd 组合根向表属主构造器注入 pool,并允许登记属主从 opaque TxScope 解出 tx。
|
||||
|
||||
### 3.2 docgov 到 docrevision 的单向工具依赖
|
||||
|
||||
生产依赖方向是 `docgov → docrevision`。直接用途集中在 Markdown canonicalization 与 SHA helper;`docrevision` 不生产 import `docgov`。
|
||||
|
||||
目标不是“破双向环”,而是把 canonical Markdown + digest 提取为有行为、内聚、带 golden vectors 的共享模块,例如 `internal/doccontent`。它不应进入只放无行为值对象的 vocabulary。
|
||||
|
||||
### 3.3 chat、coordinator 与 intent
|
||||
|
||||
- coordinator 仍以 `bizdev.TaskRunRequest/Result` 为词汇。
|
||||
- chat 编排跨多个模块,需按用例逐批迁入 chatflow。
|
||||
- intent 与 bizdev 的解绑是较小且独立的迁移,不应和 chat 大迁移绑成一个分支。
|
||||
|
||||
### 3.4 闭包桥与未接线事件
|
||||
|
||||
当前批准后的推进与通知仍可通过 `docrevision.OnOutbox`、`docgov.AddOnApprovedHook` 及组合根闭包执行。闭包在提交后的进程内调用不能提供 durable delivery、重试、dead-letter、replay 或 attempt audit。
|
||||
|
||||
不能直接删除闭包。正确顺序是:
|
||||
|
||||
1. 证明生产入口在同一 UoW 写入领域变化、envelope 和目标 delivery。
|
||||
2. 对历史事件做 dry-run inventory,隔离 scope/schema/sequence 异常。
|
||||
3. 完成真实 PG dispatcher。
|
||||
4. shadow 只计算 intended outcome,不执行业务副作用。
|
||||
5. 以时间、样本和状态分支覆盖作为切换门。
|
||||
6. 按 notify、workflow advance、projection 独立切换和回滚。
|
||||
|
||||
## 4. 并发、数据与权限风险
|
||||
|
||||
### 并发
|
||||
|
||||
- `FOR UPDATE SKIP LOCKED` 只有在 claim 事务同时更新 lease owner/token/until 并 RETURNING 时才完成所有权转移;当前 SELECT-only `ClaimIDs` 不够。
|
||||
- Fencing 不能只保护 ack。token 必须进入 consumer command,并在数据库副作用或 projection marker 的最终提交点校验。heartbeat 失败应取消 handler。
|
||||
- 同一 consumer/aggregate 最多一个 inflight;不同 aggregate 并行。领域版本可能稀疏,不能直接当无缺口事件序号。
|
||||
- at-least-once delivery 通过 inbox/唯一键/CAS/no-replace 得到 exactly-one visible outcome;不能声称 delivery 本身 exactly once。
|
||||
|
||||
### 历史数据
|
||||
|
||||
旧记录可能含 project 0、错误 environment、未知 consumer、未知 payload schema 或稀疏 aggregate version。启用 live claim 前必须生成 manifest,并分类 safe/repair/quarantine/expire。任何修复保留 old/new digest、operator、reason、approval;本计划不删历史数据。
|
||||
|
||||
### 权限
|
||||
|
||||
后台 consumer 使用按 env/consumer/action 约束的 service principal。处理事件时按 ProjectID/DocID 重读资源归属、成员/duty、workflow config revision、活动 stage 和当前状态。事件 actor 只用于审计,不能把历史用户权限带到延迟执行时。
|
||||
|
||||
Replay 必须是应用用例:管理员 capability、精确范围、reason/approval、dry-run plan digest、apply exact digest 和不可变审计。多项目或批量 apply 需要操作者与批准人分离。
|
||||
|
||||
日志、dead-letter 和 reconciliation 只能保存 ID、digest、typed error code 与字段 allowlist 生成的摘要,不能保存原始 payload、正文、SQL error、绝对路径、token 或 prompt。
|
||||
|
||||
## 5. 优先级建议
|
||||
|
||||
### P0:Track E 持久事件交付
|
||||
|
||||
1. 修正 docflow 生产入口、env/project 作用域和 UoW 原子写。
|
||||
2. 补全既有 event allowlist 与 runtime registry parity。
|
||||
3. 审计历史事件、sequence/checkpoint 模型和现有唯一约束。
|
||||
4. 实现 `cmd/events` 的 PG lease/heartbeat/fencing/attempt/dead-letter。
|
||||
5. notify、workflow advance、projection 逐个 shadow、live、回滚。
|
||||
6. 用真实 browser + PG + worker restart 证明刷新后正文恢复,无 projection-missing。
|
||||
|
||||
### P1:Track S 结构解耦
|
||||
|
||||
- D4:bizdev locator 调用方迁移与最终 getter 原子删除。
|
||||
- D5:stageflow 自有 use-case 类型,coordinator 解绑 bizdev DTO。
|
||||
- D6:提取 doccontent canonical 行为模块,移除单向工具依赖。
|
||||
- D7a:intent 单独解绑 bizdev。
|
||||
- D7b:chat 按用例迁入 chatflow。
|
||||
|
||||
这些单元分别 go/no-go,不作为事件可靠性 blocker 的关闭条件。
|
||||
|
||||
### P2:Track P 独立协议
|
||||
|
||||
- HTTP/SSE 错误信封另立 remediation;公开 details 必须按 code allowlist 并脱敏。
|
||||
- PI Runner 任务命名为 typed-result-v1 rollout,不混称“协议 v2”。typed 字段存在但无效时 fail closed;只有字段缺失且握手声明旧 Runner 时才允许 legacy。
|
||||
|
||||
## 6. 证据索引
|
||||
|
||||
| 事实 | 证据 |
|
||||
|---|---|
|
||||
| 模块化单体决策 | `.doc/adr/2026-09-14-modular-monolith-decoupling.md` |
|
||||
| PG delivery 当前实现 | `internal/events/pg.go`、`deploy/postgres/goose/00035_2026-09-14-durable-event-delivery.sql` |
|
||||
| MemoryBus 测试边界 | `internal/events/dispatcher_test.go`、`internal/events/bus.go` |
|
||||
| replay 当前校验 | `internal/events/replay.go` |
|
||||
| 事件字段硬编码 | `internal/app/docflow/commands.go` |
|
||||
| 闭包桥 | `internal/app/docnotify/subscriber.go`、`internal/docgov/engine.go`、`internal/app/app.go` |
|
||||
| bizdev locator | `internal/bizdev/service.go:229-260` |
|
||||
| 单向 canonical 依赖 | `internal/docgov/lease.go`、`internal/docrevision` canonical helper |
|
||||
| allowlist 已存在 | `.doc/system-design/module-boundaries.yaml` |
|
||||
|
||||
## 建议动作
|
||||
|
||||
下一项只立 Track E 的 E0A:事件生产、契约与历史数据门。Dispatcher 必须保持 off,直到 PG 测试证明事件源和旧数据分类正确。完整执行计划见 [Phase 2 持久事件交付与后续解耦路线](../../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md)。
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
title: "P0 PI Runner typed-result 兼容矩阵"
|
||||
created: 2026-09-15
|
||||
status: done
|
||||
confidence: high
|
||||
---
|
||||
|
||||
# 调研:P0 PI Runner typed-result 兼容矩阵
|
||||
|
||||
## 结论
|
||||
|
||||
当前 `/v1/run` 远程响应与本地 bridge stdout **都不是** `result_v1`。Go 只解析 `ok/fallback_reason/stderr/retryable/patches[]`;成功路径再 `MaterializeTargets`。仓库里没有 `configs/schemas/pi-run-result-v1.json`。typed 字段一旦出现但非法必须 fail closed;本盘点确认 legacy 窗口仍是默认路径。
|
||||
|
||||
## 证据
|
||||
|
||||
| 项 | 路径/命令 | 结果 |
|
||||
|----|-----------|------|
|
||||
| 远程调用 | `internal/agent/piagent.go` `executeRemote` | `POST {runnerURL}/v1/run`;Bearer via `ApplyRunnerAuth` |
|
||||
| 远程解码 | 同上 `remoteResp` | `ok`, `fallback_reason`, `stderr`, `retryable`, `patches[].rel_path/content` |
|
||||
| 本地 bridge | `PiAgentBackend.Execute` | stdin JSON payload;stdout **最后一行** JSON;失败把 `stderr` 拼进 `ErrorReason` |
|
||||
| 产物 | `MaterializeTargets(workDir, req.Targets, incoming)` | 默认 target `output.md` |
|
||||
| 既有 schema | `configs/schemas/` | 仅 `change-report-v1.json`,无 run-result |
|
||||
| 取消/超时 | `CommandContext` + `http.Client{Timeout}` | 超时进 `ErrorReason`;无单调终态结构体 |
|
||||
| Handshake | 无 | 未声明 typed capability,故今日全部算旧 Runner |
|
||||
|
||||
## 兼容矩阵
|
||||
|
||||
| Runner 形态 | 成功输出 | 失败输出 | Go 行为 | P1/P2 约束 |
|
||||
|-------------|----------|----------|---------|------------|
|
||||
| 远程 HTTP `/v1/run` | `ok=true` + patches | `ok=false` + fallback/stderr | 解码失败即失败;不读 `result_v1` | P1 additive 加 `result_v1`;P2 typed-present-invalid 禁止 fallback |
|
||||
| 本地 bridge 二进制 | stdout 末行 `{ok}` | `ok=false` 或进程 err | 整段 stdout 进 `Logs` | Logs 不得含 prompt/token;P1 后 Logs 只留 digest |
|
||||
| stub | 内存产物 | 分类失败 | 测试夹具 | 不作为真实 PI 证据 |
|
||||
| 未知 major / 缺 schema | — | — | 今日不会发生 | P2 fail closed |
|
||||
|
||||
## 体积与路径风险
|
||||
|
||||
- patches `Content` 无 body/member 上限;P1 必须在分配前限制。
|
||||
- `RelPath` 未在 adapter 层拒绝 `..` / 绝对路径(依赖 `MaterializeTargets`);P1 负例要覆盖 symlink escape。
|
||||
- `ErrorReason` 拼接 `stderr`,可能带模型/路径;公开日志禁止原样落盘。
|
||||
|
||||
## 取消与竞争
|
||||
|
||||
- HTTP client timeout 与 context cancel 共用;无独立 cancel token 与 result 的 CAS。
|
||||
- P3 真实 PI E2E 必须覆盖:成功、typed error、取消、超时、未知 schema。
|
||||
|
||||
## 开放问题
|
||||
|
||||
- 真实容器内 Runner 镜像版本与是否已能吐 `result_v1` 需 P1 时对一下 pi-agent 镜像,不阻塞立项。
|
||||
|
||||
## 建议动作
|
||||
|
||||
- P1:共享 JSON Schema `configs/schemas/pi-run-result-v1.json`;Runner additive 输出。
|
||||
- P2:Go typed-first parser;handshake 声明旧 Runner 才允许 legacy。
|
||||
- 实施见 [PI typed-result-v1](../../remediation/2026-09-15-pi-typed-result-v1-remediation.md)。
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: "Track E 持久事件交付复盘"
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-16
|
||||
status: done
|
||||
confidence: high
|
||||
---
|
||||
|
||||
# 调研:Track E 持久事件交付复盘
|
||||
|
||||
> **Superseded 指针(2026-09-16)**:共享 notify/advance/projection 已 live;生产闭包 hook 已退出;`DOC-RELIABILITY-PILOT` 在 gap-matrix 为 PASS。可靠事件核心见 [FEATURE-MATRIX](../../status/FEATURE-MATRIX.md) `done`;FAV 仍 `deferred`。下文「共享 off / OPEN」为复盘当时快照,勿作 live status。
|
||||
|
||||
## 结论
|
||||
|
||||
E0A–E1C 已在隔离库证明:领域变化、envelope、delivery 同 UoW;PG dispatcher 原子 lease/fencing;notify / workflow_advance / projection 各自 exactly-one visible outcome。共享集群消费者保持 **off**,HTTP 闭包仍是唯一真实写者。E2 已部署兼容守卫:消费者 `live` 时闭包停写,`off`/`shadow` 时闭包继续写。删除 `OnOutbox` / `AddOnApprovedHook` 必须等 live 发布窗口;当前删除会让 notify/advance 停写。`DOC-RELIABILITY-PILOT` 保持 OPEN。FAV 保持 disabled。
|
||||
|
||||
## 证据
|
||||
|
||||
| 项 | 路径/命令 | 结果 |
|
||||
|----|-----------|------|
|
||||
| E0A | [E0A 报告](../../test-reports/2026-09-15-event-e0a-production-scope-contract-test-report.md) | PASS;dispatcher off;FAV 不写入 |
|
||||
| E0B | [E0B 报告](../../test-reports/2026-09-15-event-e0b-dispatcher-pg-test-report.md) | PASS;1/2/4 worker;旧 token 失败 |
|
||||
| E1A | [E1A 报告](../../test-reports/2026-09-15-event-e1a-notify-cutover-test-report.md) | 隔离库 unique notify PASS;共享 off |
|
||||
| E1B | [E1B 报告](../../test-reports/2026-09-15-event-e1b-workflow-advance-test-report.md) | 隔离库 unique stage-ready PASS;共享 off |
|
||||
| E1C | [E1C 报告](../../test-reports/2026-09-15-event-e1c-projection-test-report.md) | no-replace PASS;共享 off |
|
||||
| E2 | [E2 报告](../../test-reports/2026-09-15-event-e2-hook-guard-test-report.md) | live 停写;off/shadow 仍写;API 保留 |
|
||||
| Shared live(后续) | [notify](../../test-reports/2026-09-15-event-notify-shared-live-test-report.md) · [advance](../../test-reports/2026-09-15-event-workflow-advance-shared-live-test-report.md) · [projection](../../test-reports/2026-09-15-event-projection-shared-live-test-report.md) | 共享 live PASS(后于本复盘) |
|
||||
|
||||
## 开放问题(复盘当时;2026-09-16 状态)
|
||||
|
||||
- ~~共享环境尚未做 live~~ → **已关闭**(shared live 报告)。
|
||||
- 历史 inventory 的 repair/quarantine 真实批量审批未在共享库演练(仍开放,非发布 blocker)。
|
||||
- FAV 仍只预留 disabled 契约(FEATURE-MATRIX `deferred`)。
|
||||
|
||||
## 建议动作
|
||||
|
||||
- 下一窗口:按消费者独立 shadow coverage → drain → live,闭包因 E2 守卫自动停写;确认 backlog 与 receipt 后再删 hook API。
|
||||
- Track S 从 D6(`internal/doccontent`)开始,不占用 events mutex。
|
||||
- Track P 保持独立 remediation,不阻塞事件交付。
|
||||
@@ -1,57 +0,0 @@
|
||||
---
|
||||
title: "Wave 3 PU6–PU8 产品 go/no-go"
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
status: done
|
||||
confidence: high
|
||||
---
|
||||
|
||||
# 调研:Wave 3 PU6–PU8 产品 go/no-go
|
||||
|
||||
## 结论
|
||||
|
||||
**2026-09-16 用户授权覆盖**:选择全量 backlog 范围 **3(A+B)**,**PU6 / PU7 / PU8 / Playwright 双标签 / 软件自举 / FAV 增量 一律 GO(进入实施)**。
|
||||
|
||||
- 仍 **不** 默认升 `MULTI_INTENT_PLAN_TIER=full`;升 tier 另开任务。
|
||||
- 新能力默认 **flag off / shadow**;获证据后再独立开 flag。
|
||||
- 样本门槛豁免:用隔离合成会话替代 ≥20 痛点样本(owner=工程执行方 Cursor,授权记录见 short-term 总控)。
|
||||
|
||||
历史 no-go 记录保留于本文「历史结论」;实施以本节为准。
|
||||
|
||||
## 冻结字段(覆盖后)
|
||||
|
||||
| 字段 | 本轮取值 |
|
||||
|------|----------|
|
||||
| 用户信号 | **覆盖授权**:产品明确要求全量实施 |
|
||||
| 预期收益 | 体验增强 + 工程闭环;非 gap-matrix 首发 blocker |
|
||||
| 维护成本 | 高(真实 PI、R13、shadow、泄漏负例、回滚) |
|
||||
| owner | Cursor(工程)+ 用户授权 |
|
||||
| 最小样本 | **豁免**:隔离合成会话 + 负例矩阵 |
|
||||
| 晋级阈值 | 各契约预注册;未达则保持 shadow/off |
|
||||
| 零容忍失败 | 授权旁路、跨用户泄漏、双 writer、B1–B4 回归、敏感出站 |
|
||||
|
||||
## 分项决定
|
||||
|
||||
### PU6 语义摘要(D3)— **GO / planned**
|
||||
|
||||
- 契约:`.doc/ops/long-term/2026-09-16-pu6-semantic-summary-contract.md`
|
||||
- Flag:`SEMANTIC_SUMMARY_SHADOW`(默认 off)
|
||||
|
||||
### PU7 PI change-report 叙事 — **GO / planned**
|
||||
|
||||
- 契约:`.doc/ops/long-term/2026-09-16-pu7-pi-narrative-contract.md`
|
||||
- Flag:`PI_CHANGE_REPORT_NARRATIVE`(默认 off)
|
||||
|
||||
### PU8 多意图扩面(U9 / U10–U12)— **GO / planned(分项独立 flag)**
|
||||
|
||||
- 禁止共用一个开关批量上线;顺序 U9→U10→U11→U12。
|
||||
- 契约见 long-term `pu8-u9`…`pu8-u12`。
|
||||
|
||||
## 历史结论(2026-09-16 初版,已覆盖)
|
||||
|
||||
初版在缺少痛点样本与 owner 签字下为 **no-go / deferred**。已被本节用户授权覆盖;勿回退为实施禁令。
|
||||
|
||||
## 建议动作
|
||||
|
||||
- [x] 产品 go/no-go(覆盖授权)
|
||||
- [ ] 按 short-term `2026-09-16-full-backlog-override.md` 实施 P1–P7
|
||||
+3
-4
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: "修复对话刷新恢复与授权统计不一致"
|
||||
status: done
|
||||
status: in_progress
|
||||
created: 2026-09-13
|
||||
updated: 2026-09-15
|
||||
updated: 2026-09-13
|
||||
owner: Cursor
|
||||
branch: fix/chat-history-refresh
|
||||
worktree: ".worktrees/fix-chat-history-refresh"
|
||||
@@ -37,7 +37,7 @@ mutex: chat
|
||||
3. [x] 实现统一会话/消息授权查询及统计同集
|
||||
4. [x] 实现历史 dry-run/backfill 与对账
|
||||
5. [x] 完善前端恢复状态及用户隔离缓存
|
||||
6. [x] 执行全量门禁、真实 PI 闲聊刷新 E2E 和双用户负例(编制任务激活链 save 400 未纳入本轮)
|
||||
6. [ ] 执行全量门禁、真实 PI 刷新 E2E 和双用户负例(PG/单测已完成;PI 待 dev 容器)
|
||||
|
||||
## 验收标准
|
||||
|
||||
@@ -55,4 +55,3 @@ mutex: chat
|
||||
|
||||
- Audit: [../../audit/2026-09-13-chat-history-refresh-disappears.md](../../audit/2026-09-13-chat-history-refresh-disappears.md)
|
||||
- Remediation: [../../remediation/2026-09-13-chat-history-refresh-remediation.md](../../remediation/2026-09-13-chat-history-refresh-remediation.md)
|
||||
- Live: [../../test-reports/assets/2026-09-15-chat-history-refresh-live/live.json](../../test-reports/assets/2026-09-15-chat-history-refresh-live/live.json)(项目 6252,window=categories=2,guest 403)
|
||||
+11
-13
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "修复查询误触发写任务与任务状态刷新退化"
|
||||
status: done
|
||||
status: in_progress
|
||||
created: 2026-09-13
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: docs/conversation-intent-dual-tab
|
||||
worktree: "-"
|
||||
updated: 2026-09-13
|
||||
owner: Codex
|
||||
branch: fix/conversation-intent-state
|
||||
worktree: ".worktrees/fix-conversation-intent-state"
|
||||
mutex: intent
|
||||
---
|
||||
|
||||
@@ -34,26 +34,24 @@ mutex: intent
|
||||
3. [x] 收紧写任务动作识别并修复 busy 错误分型
|
||||
4. [x] 实现任务/租约状态刷新恢复与统一提示
|
||||
5. [x] 实现命名文档的服务端鉴权只读总结(“总结”不止是不写入)
|
||||
6. [x] 执行前端、Go、PG 与真实 PI 双标签页验收
|
||||
6. [ ] 执行前端、Go、PG 与真实 PI 双标签页验收
|
||||
- [x] Go、前端、构建、dev 重建与真实 PI 只读总结
|
||||
- [x] 服务端 busy 预检不创建 run,并持久化无重试状态卡
|
||||
- [x] 浏览器刷新恢复与双标签页 busy 可见性(项目 6275;禁止项目 143)
|
||||
- [ ] 浏览器刷新恢复与双标签页 busy 可见性
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] [整改方案](../../remediation/2026-09-13-conversation-intent-runtime-state-remediation.md) 全部验收项有证据
|
||||
- [x] `CHAT-INTENT-STATE` 由 FAIL 更新为 PASS
|
||||
- [x] test-report 归档并回链
|
||||
- [ ] [整改方案](../../remediation/2026-09-13-conversation-intent-runtime-state-remediation.md) 全部验收项有证据
|
||||
- [ ] `CHAT-INTENT-STATE` 由 FAIL 更新为 PASS
|
||||
- [ ] test-report 归档并回链
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: 本任务验收标准
|
||||
- Handoff: [../../ops/handoffs/2026-09-15-conversation-intent-dual-tab.md](../../ops/handoffs/2026-09-15-conversation-intent-dual-tab.md)
|
||||
- Handoff: 与 `fix/chat-history-refresh` 合并前复核 `App.tsx/chatWindow.ts`
|
||||
- Test report: [../../test-reports/2026-09-13-conversation-intent-runtime-state-test-report.md](../../test-reports/2026-09-13-conversation-intent-runtime-state-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- Audit: [../../audit/2026-09-13-conversation-intent-runtime-state.md](../../audit/2026-09-13-conversation-intent-runtime-state.md)
|
||||
- Remediation: [../../remediation/2026-09-13-conversation-intent-runtime-state-remediation.md](../../remediation/2026-09-13-conversation-intent-runtime-state-remediation.md)
|
||||
- 双标签活验:项目 **6275** / `sess-p6275-u10` / `run_1789452602295343365`;产物 `.doc/test-reports/assets/2026-09-15-conversation-intent-dual-tab/`
|
||||
- 未改写项目 143,未删除 `sess-p143-u9` 探针
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
title: "文档可靠性 M1 活验签字与条件 M2"
|
||||
status: done
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
owner: Cursor
|
||||
branch: refactor/document-reliability-pilot
|
||||
worktree: .worktrees/refactor-document-reliability-pilot
|
||||
mutex: workspace
|
||||
---
|
||||
|
||||
# 文档可靠性 M1 活验签字与条件 M2
|
||||
|
||||
## 目标
|
||||
|
||||
占集成槽把试点合入本地 `dev` 并 rebuild,补齐真实 PI / 浏览器 / 跨用户 / 多会话签字。仅当新报告最后一句为「继续 M2」时开工 U5–U7。
|
||||
|
||||
## 范围
|
||||
|
||||
- A1 占槽、合入、rebuild、health/ready
|
||||
- A2 143 只读 + 新建项目页面 + fail-closed
|
||||
- A3 真实 pi-agent 编制后刷新
|
||||
- A4 隔离库双 pool / 4 会话
|
||||
- A5 活验 go/no-go
|
||||
- B 仅 go 后:U5–U7
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不终止项目 143
|
||||
- 未 go 不开 outbox/FAV
|
||||
- 不拆 chat/squad
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 占集成槽并合入本地 dev rebuild
|
||||
2. [x] 浏览器 + 跨用户
|
||||
3. [x] 真实 PI
|
||||
4. [x] 双 pool/4 会话
|
||||
5. [x] 活验报告(最后一句:继续 M2)
|
||||
6. [x] 条件 M2(U5–U7)
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] health + ready 来自本分支镜像
|
||||
- [x] 143/新项目刷新 404/409/projection-missing = 0 或报告停止扩面
|
||||
- [x] 报告最后一句只能是继续 M2 或停止扩面
|
||||
- [x] M2 报告最后一句只能是继续 M3 或停止扩面
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: [../checklists/2026-09-14-module-decoupling-refactor-acceptance.md](../checklists/2026-09-14-module-decoupling-refactor-acceptance.md)
|
||||
- Prior report: [../../test-reports/2026-09-14-document-reliability-pilot-test-report.md](../../test-reports/2026-09-14-document-reliability-pilot-test-report.md)
|
||||
- Live report: [../../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md](../../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md)
|
||||
- M2 report: [../../test-reports/2026-09-14-document-reliability-m2-test-report.md](../../test-reports/2026-09-14-document-reliability-m2-test-report.md)
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
title: "文档可靠性纵向试点 M0–M1"
|
||||
status: blocked
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
owner: Cursor
|
||||
branch: refactor/document-reliability-pilot
|
||||
worktree: .worktrees/refactor-document-reliability-pilot
|
||||
mutex: docgov
|
||||
---
|
||||
|
||||
# 文档可靠性纵向试点 M0–M1
|
||||
|
||||
## 目标
|
||||
|
||||
在不横向搬包的前提下,完成 U1–U4,使受控文档在并发提交、页面刷新、重登、restart、rebuild 和 projection 缺失后仍从数据库账本返回唯一授权正文。
|
||||
|
||||
## 范围
|
||||
|
||||
- U1 架构基线与 production writer/path 门禁。
|
||||
- U2 应用 UnitOfWork 和跨属主事务能力。
|
||||
- U3 人工编辑、agent commit、批准/驳回事务化。
|
||||
- U4 授权后的文档统一读模型。
|
||||
- 项目 143 等价脱敏 hazard 与新项目真实 PI/UI 验收。
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不启用 FAV degraded read。
|
||||
- 不拆 chatlog/contextasm/squadrun 包。
|
||||
- 不统一错误信封,不修改 PI Runner 协议。
|
||||
- 不清理历史 dev 数据。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 从最新 `dev`(`a8f9451`)创建实现分支,登记 CURRENT 并确认 `docgov` mutex 已释放。
|
||||
2. [x] U1:四类规则 arch-check + archtest + 可重放基线(新违规 block)。
|
||||
3. [x] 实现 U2,验证任意属主写入/commit 故障整体回滚。
|
||||
4. [x] 实现 U3,删除提交后 outbox 正确性回调。
|
||||
5. [x] 实现 U4,保证 GET 零写入和 projection 缺失不再伪装成 404。
|
||||
6. [x] 隔离库 PG + 目标包 race 已跑;真实 PI / 浏览器 / rebuild **未**签字(未占槽)。
|
||||
7. [x] 写 test report:结论 **停止扩面**。更新验收清单、FEATURE-MATRIX、CURRENT 和 gap-matrix。
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 同一 ETag 并发编辑只有一个合法赢家(内存 8 协程 + 隔离库双会话)。
|
||||
- [x] 任一事务故障点不会留下部分提交(U2 隔离库)。
|
||||
- [ ] 项目 143 等价 hazard 和新项目刷新/重启目标 404/409/projection missing 为 0(真实页面未测)。
|
||||
- [x] 服务端匿名/未知文档/跨项目/错误责任人 fail closed;浏览器跨登录未测。
|
||||
- [ ] 1、2、4 个 app 实例的最终状态一致(仅到双会话)。
|
||||
- [x] M1 test report 结论:**停止扩面**。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: [../checklists/2026-09-14-module-decoupling-refactor-acceptance.md](../checklists/2026-09-14-module-decoupling-refactor-acceptance.md)
|
||||
- Test report: [../../test-reports/2026-09-14-document-reliability-pilot-test-report.md](../../test-reports/2026-09-14-document-reliability-pilot-test-report.md)
|
||||
- Plan: [../../remediation/2026-09-14-module-decoupling-refactor-plan.md](../../remediation/2026-09-14-module-decoupling-refactor-plan.md)
|
||||
|
||||
## M2+ 门(不开工)
|
||||
|
||||
U5 WorkspaceRef、U6 outbox、U7 按文件摘 FAV 需要独立审批,且仅当 M1 报告最后一句为「继续 M2」。当前是「停止扩面」,禁止实现 U5–U12。
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
隔离库与目标包 race 见 test-report assets。未占槽、未 rebuild。只有真实 PI/浏览器/rebuild 补测并把报告改为「继续 M2」后,才允许启动 durable event/FAV。
|
||||
+18
-19
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "治理鉴权升级:职责-动作严格对应 + 未激活拦截 + 关闭创建直通"
|
||||
status: done
|
||||
status: blocked
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
owner: implementer_cursor
|
||||
owner: Cline
|
||||
branch: fix/governance-action-level-authz
|
||||
worktree: ".worktrees/fix-governance-action-level-authz"
|
||||
worktree: "-"
|
||||
mutex: workflow
|
||||
---
|
||||
|
||||
@@ -52,30 +52,29 @@ mutex: workflow
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 评审落盘 + 决策 A–D 收敛 + 本任务登记(Wave 5 已合入本地 `dev@19f6df5`,G0 已开工)
|
||||
2. [x] G1 后端:`CheckDocTaskAccess` 动作-职责映射 + creator 例外移除(保留 none 生成触发)+ gov==nil 未激活拦截(202 契约保留);重写受影响单测
|
||||
3. [x] G2 关闭 `initial_workflow_key` 直通 + 前后端字段废弃 + E2E legacy 用例更新
|
||||
4. [x] G3 前端:chat 治理拦截自然语言提示、按钮级职责禁用、激活确认页冻结提示补强
|
||||
5. [x] G4 dev 库 planning+with_wf 异态审计分类(只读报告,现测 83 条均为测试夹具)
|
||||
6. [x] G5 集成验证 + 测试报告归档(新项目全链路:零治理创建→对话→配置→激活→职责动作负例)
|
||||
1. [x] 评审落盘 + 决策 A–D 收敛 + 本任务登记(blocked 等待 Wave 5 收敛、mutex `workflow` 空闲)
|
||||
2. [ ] G1 后端:`CheckDocTaskAccess` 动作-职责映射 + creator 例外移除(保留 none 生成触发)+ gov==nil 未激活拦截(202 契约保留);重写受影响单测
|
||||
3. [ ] G2 关闭 `initial_workflow_key` 直通 + 前后端字段废弃 + E2E legacy 用例更新
|
||||
4. [ ] G3 前端:chat 治理拦截自然语言提示、按钮级职责禁用、激活确认页冻结提示补强
|
||||
5. [ ] G4 dev 库 81 个 planning+with_wf 异态审计分类(只读报告)
|
||||
6. [ ] G5 集成验证 + 测试报告归档(新项目全链路:零治理创建→对话→配置→激活→职责动作负例)
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] full 文档 API 负例:author 不可 review/approve;reviewer 不可 run/edit/submit;approver 不可 run/edit/review;creator 不可任一审批动作(view 除外)
|
||||
- [x] none 文档:创建者可触发生成;submit/review/approve 全拒
|
||||
- [x] 未激活项目编制类输入:消息正常显示、run 202 且 blocked、无小队/租约、chat 内明确治理提示文案(页面用「请编制用户初始需求收集表」命中任务 API)
|
||||
- [x] `POST /projects` 带 `initial_workflow_key`:不再置 active,工作流目录仍自动挂载
|
||||
- [x] `go vet ./...`、`go test -short ./...`、`cd web && npm test && npm run build` 全绿
|
||||
- [x] 异态审计报告与测试报告归档并回链
|
||||
- [ ] full 文档 API 负例:author 不可 review/approve;reviewer 不可 run/edit/submit;approver 不可 run/edit/review;creator 不可任一审批动作(view 除外)
|
||||
- [ ] none 文档:创建者可触发生成;submit/review/approve 全拒
|
||||
- [ ] 未激活项目 chat 输入「帮我生成立项文档」:消息正常显示、run 202 且 blocked、无小队/租约、chat 内明确治理提示文案
|
||||
- [ ] `POST /projects` 带 `initial_workflow_key`:不再置 active,工作流目录仍自动挂载
|
||||
- [ ] `go vet ./...`、`go test -short ./...`、`cd web && npm test && npm run build` 全绿
|
||||
- [ ] 异态审计报告与测试报告归档并回链
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Research(评审与决策记录): [2026-09-14-mvp-governance-rules-review.md](../../ops/research/2026-09-14-mvp-governance-rules-review.md)
|
||||
- Research(评审与决策记录): [2026-09-14-mvp-governance-rules-review.md](../research/2026-09-14-mvp-governance-rules-review.md)
|
||||
- 前序 Remediation(已实施 Wave 1–4): [2026-09-14-workflow-plan-409-frozen-and-optional-duties-remediation.md](../../remediation/2026-09-14-workflow-plan-409-frozen-and-optional-duties-remediation.md)
|
||||
- 202 契约来源: [2026-09-13-workflow-access-chat-members-ui01-02.md](../../audit/2026-09-13-workflow-access-chat-members-ui01-02.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- Wave 5 已合入本地 `dev@19f6df5`;本任务 worktree 已从该 `dev` 创建,mutex `workflow` 进入 `in_progress`。
|
||||
- G4 只读复测:141 active / 209 planning;**83** 个 planning 带非空 `active_workflow_key`,全部为 `PROJ_MGR_*`/`TEST_PROJ_*` 夹具。见 [audit](../../audit/2026-09-14-planning-with-workflow-key-anomaly.md)。
|
||||
- G5 验收:[2026-09-14-governance-action-level-authz-test-report.md](../../test-reports/2026-09-14-governance-action-level-authz-test-report.md)。
|
||||
- Wave 5 占槽现状(2026-09-14 实测):`implementer_cursor` phase=e2e,worktree 存在未提交 e2e 产物;本任务排在集成槽位 queue。
|
||||
- dev 库:133 active / 204 planning;81 个 planning 项目带非空 `active_workflow_key`(待 G4 审计分类)。
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
title: "模块解耦 Wave 0:契约包骨架 + 架构门禁基线"
|
||||
status: done
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
owner: Cursor
|
||||
branch: feature/remove-herdr-agent-settings
|
||||
worktree: "-"
|
||||
mutex: arch
|
||||
---
|
||||
|
||||
# 模块解耦 Wave 0:契约包骨架 + 架构门禁基线
|
||||
|
||||
> 总方案:[../../system-design/2026-09-14-module-decoupling-architecture.md](../../system-design/2026-09-14-module-decoupling-architecture.md)
|
||||
> ADR:[../../adr/2026-09-14-modular-monolith-decoupling.md](../../adr/2026-09-14-modular-monolith-decoupling.md)
|
||||
|
||||
## 目标
|
||||
|
||||
建立 `internal/contracts` 骨架与 `scripts/arch-check.sh` 依赖门禁(warn 基线),使模块边界从此可度量、可执行,为 Wave 1–6 提供验收对照。
|
||||
|
||||
## 范围
|
||||
|
||||
- `internal/contracts/`:vocabulary.go(MaturityStage 等共享枚举占位)、errors.go(错误码表)、events.go(首批事件类型定义,纯定义零实现)
|
||||
- `scripts/arch-check.sh` + `.doc/system-design/module-boundaries.yaml`(以现状生成 allowlist,不收紧)
|
||||
- 基线违规报告存 `.doc/audit/2026-09-14-arch-check-baseline.md`
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不改任何业务行为、不迁移任何包(属 Wave 1+)
|
||||
- 不收紧任何依赖规则(block 转换在两周 warn 期后)
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 用户确认 ADR → 状态转「已接受」
|
||||
2. [x] 建 contracts 骨架(纯定义,`go test ./internal/contracts` 绿)
|
||||
3. [x] 写 arch-check.sh(import allowlist / 表属主 / 路径字面量三类检查,支持 --mode warn|block)
|
||||
4. [x] 运行 warn 模式,基线报告落 `.doc/audit/`
|
||||
5. [ ] 合 `dev` 占槽冒烟(本轮不占槽;集成槽仍由 workflow-plan Wave 5 持有)
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] `./scripts/arch-check.sh --mode warn` 可运行并产出基线报告
|
||||
- [x] `go vet ./... && go test -short ./...` 全绿(2026-09-14 本工作区;`internal/server` 9.823s)
|
||||
- [x] ADR 状态「已接受」;本文件 status → done
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: -
|
||||
- Handoff: -
|
||||
- Test report: -
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- 依赖图实测(2026-09-14):server 25 内部包 / 17,007 行;bizdev 16 包;详见总方案 §1.1
|
||||
+17
-18
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "workflow-plan 409 冻结态守卫 + 文档职责可选治理"
|
||||
status: done
|
||||
status: in_progress
|
||||
created: 2026-09-14
|
||||
updated: 2026-09-14
|
||||
owner: implementer_cursor
|
||||
@@ -37,30 +37,29 @@ mutex: workflow
|
||||
|
||||
1. [x] 定位项目 143 的 409 `PLAN_FROZEN` 根因并落盘 audit。
|
||||
2. [x] 完成方案审核:补齐定义优先、零治理拦截、成员有效性、权限、快照清理和真实 UI 边界。
|
||||
2b. [x] 用户批准最终方案,开工登记(Wave 0)
|
||||
3. [x] Wave 1:typed API error + frozen 独立只读视图 + sticky/可访问错误 + 两标签竞态恢复。
|
||||
4. [x] Wave 2:DutyMode、强制/可选任务策略、partial/成员/零治理校验、服务端规范化。
|
||||
5. [x] Wave 3:门禁、readiness、阶段/文档访问、运行时和预览统计统一。
|
||||
6. [x] Wave 4:前端逐文档“纳入人工审批”开关及 full/none/partial 交互测试。
|
||||
7. [x] Wave 5:合 dev、rebuild、真实浏览器设置页矩阵;项目 143 只读回归;归档 test report。真实 PI 生成/审批长链路未跑,见报告。
|
||||
3. [ ] Wave 1:typed API error + frozen 独立只读视图 + sticky/可访问错误 + 两标签竞态恢复。
|
||||
4. [ ] Wave 2:DutyMode、强制/可选任务策略、partial/成员/零治理校验、服务端规范化。
|
||||
5. [ ] Wave 3:门禁、readiness、阶段/文档访问、运行时和预览统计统一。
|
||||
6. [ ] Wave 4:前端逐文档“纳入人工审批”开关及 full/none/partial 交互测试。
|
||||
7. [ ] Wave 5:合 dev、rebuild、真实浏览器新项目全链路;项目 143 只读回归;归档 test report。
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] active 项目设置无编辑控件,页面显示冻结原因、工作流/阶段/职责快照和受控终止影响入口。
|
||||
- [x] 允许裁剪的非必需文档 full/none 均合法;partial 精确拒绝。
|
||||
- [x] 必需/阻断/不可裁剪文档全空被服务端拒绝(单测 + 定义优先)。
|
||||
- [x] 保存和激活均拒绝非 active project member;预览后成员退出也 fail closed(单测)。
|
||||
- [x] 所有文档 none 时可走预览拒绝「至少一份纳入人工审批」(页面 C)。
|
||||
- [ ] none 文档仍生成和入账本、项目成员只读可见、创建者可生成/编辑,但无 review/approve 且不阻塞阶段(**本轮未跑真实 PI,单测已覆盖门禁/权限**)。
|
||||
- [x] disabled/none 的冻结快照、plan hash 和 assignment rows 不残留旧职责(Wave 3 单测)。
|
||||
- [x] 两标签陈旧保存的 409 在当前视口可见、草稿保留并转 frozen。
|
||||
- [x] 设置页真实 UI 用例有截图证据并回链;生成/审批长链路另立项。
|
||||
- [ ] active 项目设置无编辑控件,页面显示冻结原因、工作流/阶段/职责快照和受控终止影响入口。
|
||||
- [ ] 允许裁剪的非必需文档 full/none 均合法;partial 精确拒绝。
|
||||
- [ ] 必需/阻断/不可裁剪文档全空被服务端拒绝。
|
||||
- [ ] 保存和激活均拒绝非 active project member;预览后成员退出也 fail closed。
|
||||
- [ ] 所有文档 none 时可保存草稿但不能激活。
|
||||
- [ ] none 文档仍生成和入账本、项目成员只读可见、创建者可生成/编辑,但无 review/approve 且不阻塞阶段。
|
||||
- [ ] disabled/none 的冻结快照、plan hash 和 assignment rows 不残留旧职责。
|
||||
- [ ] 两标签陈旧保存的 409 在当前视口可见、草稿保留并转 frozen。
|
||||
- [ ] 工程门禁与整改方案中的真实 UI 用例全部有证据;报告回链。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Audit: [2026-09-14-workflow-plan-409-frozen-and-optional-duties.md](../../audit/2026-09-14-workflow-plan-409-frozen-and-optional-duties.md)
|
||||
- Remediation: [2026-09-14-workflow-plan-409-frozen-and-optional-duties-remediation.md](../../remediation/2026-09-14-workflow-plan-409-frozen-and-optional-duties-remediation.md)
|
||||
- Test report: [2026-09-14-workflow-plan-409-frozen-and-optional-duties-test-report.md](../../test-reports/2026-09-14-workflow-plan-409-frozen-and-optional-duties-test-report.md)
|
||||
- Test report: (Wave 5 归档至 `.doc/test-reports/`)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
@@ -68,4 +67,4 @@ mutex: workflow
|
||||
- 当前 `parseError` 已读取后端 message;前端改造重点是 typed error、冻结态切换和视口内呈现。
|
||||
- 当前职责校验只检查正数/互异,数据库只外键到 users;项目成员有效性必须补服务端校验。
|
||||
- 当前终止实现会取消运行任务、关闭实例并退回 planning;关闭实例访问 fail closed,因此项目 143 不能作为终止测试对象。
|
||||
- 方案已迁移至基于最新 dev 的 `fix/workflow-plan-409-frozen-and-optional-duties` 独立 worktree;用户已批准实施。
|
||||
- 开始编码前必须先把本任务从当前误置的 `feature/remove-herdr-agent-settings` 工作区迁移至声明的 `fix/workflow-plan-409-frozen-and-optional-duties` 分支/worktree,禁止污染无关分支。
|
||||
@@ -1,105 +0,0 @@
|
||||
---
|
||||
title: "多意图持久计划与 HITL(核心 U1–U8,扩面 U9–U12)"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: "-"
|
||||
worktree: "-"
|
||||
mutex: "-"
|
||||
---
|
||||
|
||||
# 多意图持久计划与 HITL(核心 U1–U8,扩面 U9–U12)
|
||||
|
||||
## 目标
|
||||
|
||||
不回退现有模块解耦、单意图行为和权限边界,交付可持久、可恢复、可并发裁决的 2–4 步计划;所有批量生成/写入/控制确认前零副作用,执行前逐动作重新授权。
|
||||
|
||||
## 权威文档
|
||||
|
||||
- [详细设计与计划](../../system-design/2026-09-15-multi-intent-hitl-plan.md)
|
||||
- [复核审计](../../audit/2026-09-15-multi-intent-hitl-plan-review.md)
|
||||
- [模块边界 SSOT](../../system-design/module-boundaries.yaml)
|
||||
|
||||
## 强制约束
|
||||
|
||||
- `internal/intent` 继续只依赖 `maturity`;新生命周期归 `internal/app/intentflow`;
|
||||
- 确认不是授权;每步由动作 owner 按当前主体、状态和版本重新鉴权;
|
||||
- PG plan state 权威,卡片/SSE 仅投影;
|
||||
- 每步一个业务事务,不做跨模块长事务;
|
||||
- 中间结果不进 FAV;
|
||||
- 新行为从 legacy/shadow 开始,回滚不丢已有计划。
|
||||
|
||||
## 波次
|
||||
|
||||
| 波次 | 单元 | 交付 | 依赖 | 主 mutex | go/no-go |
|
||||
|------|------|------|------|----------|----------|
|
||||
| W0 | U1 | 模块/API/状态/事件契约 | 无 | `intent`,`events` | arch/event/table owner 全绿 |
|
||||
| W1 | U2 | 纯规则提案 shadow | U1 | `intent` | 不改路由,安全错误为 0 |
|
||||
| W2 | U3 | intentflow + PG/CAS/lease | U1,U2 | `intent-plan` | 两 worker 无双 owner/执行 |
|
||||
| W2 | U4 | outbox + 投影 | U3 | `events` | projection diff=0 |
|
||||
| W3 | U5 | decision API + 授权端口 | U3 | `intent-plan`,`server/authz` | 权限负例全绿 |
|
||||
| W3 | U6 | Web 卡片/刷新/a11y | U4,U5 | `web` | 双标签/reload 无假成功 |
|
||||
| W4 | U7 | 低风险只读执行 | U4-U6 | `intent-plan`,`chat` | legacy 无回归 |
|
||||
| W4 | U8 | task generate adapter | U7 | `taskrun`,`intent-plan` | 首版 real PI 闭环 |
|
||||
| W5 | U9 | 可选 LLM adapter 实验 | U2,U7 | `intent-plan`,`pi-agent` | 不阻塞首版;达阈值才启用 |
|
||||
| W5+ | U10 | low mutate 逐 action 扩面 | U8 | 实际 owner | 单 action 签署 |
|
||||
| W5+ | U11 | docgov 逐 action 扩面 | U8 | `docgov`,`intent-plan` | 单 action 签署 |
|
||||
| W5+ | U12 | workflow/run-control 分项扩面 | U8 | `workflow`/`taskrun` | 分项签署 |
|
||||
|
||||
> 本文件仅是总览,不长期占用一个 mutex。实施时每个 U-ID 新建独立 short-term、分支和认领;U10–U12 还必须按 action 拆分。核心首版为 U1–U8,U9 与后续 owner 扩面不阻塞首版关闭。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] U1 冻结边界、状态机、批量策略、错误码、事件和默认 legacy tier([独立任务](./2026-09-15-multi-intent-u1-contracts.md);[报告](../../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md));
|
||||
2. [x] U2 characterization-first 建 golden/hard-negative 与 shadow 基线([独立任务](./2026-09-15-multi-intent-u2-segmenter.md);[报告](../../test-reports/2026-09-15-multi-intent-u2-segmenter-test-report.md));
|
||||
3. [x] U3 建 intentflow owner、PG schema、CAS/lease/fencing/retention([独立任务](./2026-09-15-multi-intent-u3-intentflow-pg.md);[报告](../../test-reports/2026-09-15-multi-intent-u3-intentflow-pg-test-report.md));
|
||||
4. [x] U4 接 Track E outbox/dispatcher,只投影状态事实([独立任务](./2026-09-16-multi-intent-u4-outbox-projection.md);[报告](../../test-reports/2026-09-16-multi-intent-u4-outbox-projection-test-report.md));
|
||||
5. [x] U5 建统一 decision command 与动作 owner 授权端口([独立任务](./2026-09-16-multi-intent-u5-decision-api.md);[报告](../../test-reports/2026-09-16-multi-intent-u5-decision-api-test-report.md));
|
||||
6. [x] U6 取消计划动作的前端本地成功路径,以 PlanView 恢复([独立任务](./2026-09-16-multi-intent-u6-web-cards.md);[报告](../../test-reports/2026-09-16-multi-intent-u6-web-cards-test-report.md));
|
||||
7. [x] U7 只开放独立低风险查询([独立任务](./2026-09-16-multi-intent-u7-auto-read.md);[报告](../../test-reports/2026-09-16-multi-intent-u7-auto-read-test-report.md));
|
||||
8. [x] U8 只接 task generate,完成首版闭环(真实 PI 环境缺失记 stop-gate)([独立任务](./2026-09-16-multi-intent-u8-task-generate.md);[报告](../../test-reports/2026-09-16-multi-intent-u8-task-generate-test-report.md));
|
||||
9. [ ] U9 作为独立可选实验接语义分段;
|
||||
10. [ ] U10–U12 分别按 mutate/docgov/workflow/run-control owner 扩面。
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [ ] 含写/生成/控制时,确认前相关表、任务、文档和工作流零变化;
|
||||
- [ ] 两标签确认/取消只产生一个决策和至多一次动作;
|
||||
- [ ] 服务/worker 重启后 PG 恢复,成功步骤不重跑;
|
||||
- [ ] 确认后权限或资源版本变化时 fail closed;
|
||||
- [ ] 跨用户/项目/会话读取和决策被隐藏;
|
||||
- [ ] 按钮与自然语言确认得到同一服务端 receipt;
|
||||
- [ ] intent 边界、单一写者、UoW、事件静态契约和组合根无回退;
|
||||
- [ ] 无活动计划时单意图生成保持;有活动计划时不创建第二任务;多意图生成需确认;
|
||||
- [ ] 部分确认可稍后处理未选项,只有显式排除才取消;部分完成可重试、继续或关闭;
|
||||
- [ ] 双标签/刷新/重开/SSE 重连真实页面通过;
|
||||
- [ ] 适用的真实 PI E2E 通过,stub 不冒充验收。
|
||||
|
||||
## 非目标
|
||||
|
||||
- >4 步、并行 DAG、多活动写计划自动合并;
|
||||
- 跨步骤 ACID/自动补偿;
|
||||
- coordinator/chat 全量重构;
|
||||
- FAV 启用或中间产物归档;
|
||||
- 改变单意图生成策略。
|
||||
|
||||
## 交付纪律
|
||||
|
||||
- 每单元记录精确边界影响、适用测试、go/no-go、回滚、branch/commit/merge/push 状态;
|
||||
- 每单元独立 test report、CURRENT 认领/集成槽和 FEATURE-MATRIX 回链;
|
||||
- 安全、越权、双执行或刷新差异任一出现,停止当前 tier;dispatcher 故障只停投影;LLM 故障进入澄清。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Checklist: [U1](../checklists/2026-09-15-multi-intent-u1-contracts.md);[U2](../checklists/2026-09-15-multi-intent-u2-segmenter.md);[U3](../checklists/2026-09-15-multi-intent-u3-intentflow-pg.md);[U8](../checklists/2026-09-16-multi-intent-u8-task-generate.md)
|
||||
- Handoff: 每个 U-ID 独立建立
|
||||
- Test report: [U1](../../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md);[U2](../../test-reports/2026-09-15-multi-intent-u2-segmenter-test-report.md);[U3](../../test-reports/2026-09-15-multi-intent-u3-intentflow-pg-test-report.md);[U4](../../test-reports/2026-09-16-multi-intent-u4-outbox-projection-test-report.md);[U5](../../test-reports/2026-09-16-multi-intent-u5-decision-api-test-report.md);[U6](../../test-reports/2026-09-16-multi-intent-u6-web-cards-test-report.md);[U7](../../test-reports/2026-09-16-multi-intent-u7-auto-read-test-report.md);[U8](../../test-reports/2026-09-16-multi-intent-u8-task-generate-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- 当前 `plan_builder.go` 最多两段且写意图返回 nil;`action_planner.go` 的确认仍是文字提示。
|
||||
- 当前 `module-boundaries.yaml` 中 intent 仅依赖 maturity;Track E live,FAV off。
|
||||
- U1 已冻结 intentflow 契约、事件与 BatchActionPolicy,默认 `MULTI_INTENT_PLAN_TIER=legacy`。
|
||||
- U2 已落地规则分段与 shadow `PlanProposal`;生产 TopIntent / IntentPlan 不变;反事实 `false_auto_execute=0`。
|
||||
- U8 已落地 confirm 落盘与 `task.run` adapter;默认 legacy 不落盘。U9–U12 不阻塞核心首版。共享环境 schema 45 待晋升窗口。
|
||||
@@ -1,76 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U1:契约冻结"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/multi-intent-u1-contracts
|
||||
worktree: "-"
|
||||
mutex: architecture-docs
|
||||
---
|
||||
|
||||
# 多意图 HITL U1:契约冻结
|
||||
|
||||
## 目标
|
||||
|
||||
冻结 `app/intentflow` 边界、状态机、BatchActionPolicy、错误码、事件契约与默认 `legacy` tier;不改识别路由、不建表、不接 HTTP。
|
||||
|
||||
## 范围
|
||||
|
||||
- `module-boundaries.yaml`:`app/intentflow` allowlist、三表 owner、`unwrap_owners`、三条 `intent.plan.*` 事件
|
||||
- `events.StaticContracts` 与 YAML 对等;archtest 扫描 `intent.plan.*`
|
||||
- `internal/app/intentflow` 骨架:状态、错误码、Service 端口、政策、tier 开关
|
||||
- CSRF/认证结论:现有 Bearer + CORS 对 U5 足够,不是 blocker
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不修改 `internal/intent` 业务类型或 `MULTI_INTENT_ENABLED`
|
||||
- 不建 Goose 表、不接线 `app.Assemble`、不改 chat/coordinator/Web
|
||||
- 不 Append 事件、不实施 U2–U12
|
||||
|
||||
## REST(U5 再挂路由)
|
||||
|
||||
- `GET /api/v1/intent-plans/active`
|
||||
- `GET /api/v1/intent-plans/{plan_id}`
|
||||
- `POST /api/v1/intent-plans/{plan_id}/decisions`
|
||||
- body:`expected_revision`、`decision_nonce`、`decision_digest`、`kind`、步骤选择
|
||||
|
||||
## CSRF / 认证(U5 前置结论,非 blocker)
|
||||
|
||||
现有认证是 `Authorization: Bearer` 或 `X-Session-Token` 请求头(`internal/server/auth_handlers.go`),无 cookie 会话,无独立 CSRF 中间件;另有 Origin allowlist CORS。
|
||||
|
||||
- 自定义头不会被浏览器跨站表单自动带上,现有模式对 U5 足够
|
||||
- `decision_nonce` / 幂等键只防重放与并发,**不替代** CSRF 或身份认证
|
||||
- U5 必须 `requireAuthenticatedUser` + 四元作用域(environment/project/session/user)
|
||||
- **禁止**为计划 API 改成 cookie 自动提交
|
||||
- 若未来改 cookie 认证,另立 auth 任务,不得在 intent-plan 端点发明弱 CSRF
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 从最新 `dev` 检出 `feature/multi-intent-u1-contracts` 并认领 CURRENT
|
||||
2. [x] 登记边界 YAML、事件契约、archtest regex
|
||||
3. [x] 落地 intentflow 骨架与 BatchActionPolicy
|
||||
4. [x] arch/parity/short 测试与 U1 报告
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] `intent -> maturity` 保持;server/chat 不直写计划表
|
||||
- [x] YAML ↔ StaticContracts parity 绿
|
||||
- [x] 未知 action/policy key fail closed;ActionRegistry 无 batch/tier 字段
|
||||
- [x] 默认 `MULTI_INTENT_PLAN_TIER=legacy`
|
||||
- [x] 单意图生成策略不变(本单元无运行时改动)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- 总览: [2026-09-15-multi-intent-hitl.md](./2026-09-15-multi-intent-hitl.md)
|
||||
- 设计: [../../system-design/2026-09-15-multi-intent-hitl-plan.md](../../system-design/2026-09-15-multi-intent-hitl-plan.md)
|
||||
- Checklist: [../checklists/2026-09-15-multi-intent-u1-contracts.md](../checklists/2026-09-15-multi-intent-u1-contracts.md)
|
||||
- Test report: [../../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md](../../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- 事件登记窗口同时占用 `events` mutex;U1 不改 intent 代码。
|
||||
- 生产者含 `events`:StaticContracts 字面量落在 `internal/events/registry.go`,与现有 document.* 先例一致。
|
||||
- CSRF:Bearer / `X-Session-Token` + CORS allowlist,U5 非 blocker。
|
||||
- 冒烟:`go vet ./...`、`go test -short ./...`、`./scripts/arch-check.sh --mode block` PASS。U1 无 schema/容器变更,集成槽位保持 idle。
|
||||
- 提交:`bdccb4d` docs(ops);`aefb1e4` feat(events);`9364da4` feat(intentflow);随后 docs(status)。
|
||||
@@ -1,63 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U2:规则分段与 shadow 提案"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/multi-intent-u2-segmenter
|
||||
worktree: "-"
|
||||
mutex: intent
|
||||
---
|
||||
|
||||
# 多意图 HITL U2:规则分段与 shadow 提案
|
||||
|
||||
## 目标
|
||||
|
||||
在不改变生产路由(TopIntent / 现有 IntentPlan)的前提下,用纯规则分段器生成 2–4 步 `PlanProposal` 与 shadow 指标;写段不再在提案层被静默丢弃。
|
||||
|
||||
## 范围
|
||||
|
||||
- `internal/intent/segmenter.go`:连接词/句号/分号/换行/序号/先再最后,上限 4
|
||||
- `PlanProposal` L1 值对象:span、证据、缺槽、依赖建议、稳定 digest
|
||||
- Recognize 附加提案与 shadow;**不**改 coordinator 执行路径
|
||||
- golden / hard-negative / 反事实(若处于 auto_read 会如何)
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不建 PG、不接 HTTP、不改 Web
|
||||
- 不把 HITL/tier 回灌 ActionRegistry
|
||||
- 不启用 LLM 分段(U9)
|
||||
- 不把 shadow 提案当作生产 IntentPlan
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 认领 CURRENT,characterization 锁定现有 IntentPlan
|
||||
2. [x] 分段器 + PlanProposal + digest
|
||||
3. [x] 接入 Recognize(leaf 识别防递归)
|
||||
4. [x] golden/hard-negative/反事实与报告
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 「查风险,然后查法规」现有 IntentPlan 仍为 2 步 query
|
||||
- [x] 「查法规然后生成报价单」生产 IntentPlan 仍为 nil(路由不变),提案含写段且 ComboHint=needs_confirm
|
||||
- [x] 「查询并总结」不拆
|
||||
- [x] 指代失败 → needs_clarify
|
||||
- [x] 红线混入 → rejected
|
||||
- [x] 5 段 → rejected_batch_size
|
||||
- [x] 同输入 digest 稳定
|
||||
- [x] 反事实错误自动执行 = 0
|
||||
- [x] `intent -> maturity` 保持
|
||||
|
||||
## 相关链接
|
||||
|
||||
- 总览: [2026-09-15-multi-intent-hitl.md](./2026-09-15-multi-intent-hitl.md)
|
||||
- 设计: [../../system-design/2026-09-15-multi-intent-hitl-plan.md](../../system-design/2026-09-15-multi-intent-hitl-plan.md)
|
||||
- Checklist: [../checklists/2026-09-15-multi-intent-u2-segmenter.md](../checklists/2026-09-15-multi-intent-u2-segmenter.md)
|
||||
- Test report: [../../test-reports/2026-09-15-multi-intent-u2-segmenter-test-report.md](../../test-reports/2026-09-15-multi-intent-u2-segmenter-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- L1 不 import intentflow;`ComboHint` 只是结构提示,不是授权。
|
||||
- 单段复用 primary frame,避免二次 Recognize。
|
||||
- 冒烟:`go vet ./...`、`go test -short ./...`、`./scripts/arch-check.sh --mode block` PASS。U2 无 schema/容器变更。
|
||||
- 提交:`4751348` docs(ops) 认领;`9005766` test(intent) characterization;`932ba87` feat(intent) 分段器与 shadow 提案。
|
||||
@@ -1,68 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U3:intentflow PG/CAS/lease"
|
||||
status: done
|
||||
created: 2026-09-15
|
||||
updated: 2026-09-15
|
||||
owner: Cursor
|
||||
branch: feature/multi-intent-u3-intentflow-pg
|
||||
worktree: "-"
|
||||
mutex: intent-plan
|
||||
---
|
||||
|
||||
# 多意图 HITL U3:intentflow PG/CAS/lease
|
||||
|
||||
## 目标
|
||||
|
||||
建立持久计划/步骤/决策与并发协议(CAS revision、decision nonce、lease/fencing、创建幂等、retention);不接真实写动作,不改 chat/coordinator 生产路由。
|
||||
|
||||
## 范围
|
||||
|
||||
- Goose `00044`:`intent_plans` / `intent_plan_steps` / `intent_plan_decisions`
|
||||
- `app/intentflow` owner repository + UoW;owner 可 unwrap pgx
|
||||
- 创建幂等 `(environment, session_id, client_turn_id)`;同 turn 异 digest 冲突
|
||||
- 决策 CAS + nonce 同/异 digest;确认/取消/过期竞态
|
||||
- 步骤 lease + 单调 fencing;两 worker 只一个 owner
|
||||
- 业务成功但 receipt 写回失败时按幂等键对账,不盲跑
|
||||
- 环境隔离;关闭计划 retention 由 owner 删除
|
||||
- `app.Assemble` 装配 `*intentflow.Plans`,chat 仍不调用
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不接 HTTP(U5)、不 Append 事件(U4)、不接真实 action adapter(U7/U8)
|
||||
- 不把 HITL/tier 回灌 ActionRegistry
|
||||
- 不改 `internal/intent` 生产 TopIntent / IntentPlan
|
||||
- 不 rebuild 共享 `:8080`(schema 44 仅隔离库/后续晋升窗口应用)
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 认领 CURRENT(mutex `intent-plan`)
|
||||
2. [x] Goose 00044 + migrate gate
|
||||
3. [x] Store/Engine:Create/Decide/Claim/Receipt/Expire/Purge
|
||||
4. [x] 内存并发 + 可选 PG 测试;Assemble 接线
|
||||
5. [x] 报告并合回本地 dev
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 双创建同 digest 返回同一 plan;异 digest 冲突
|
||||
- [x] nonce 同 digest 返回 receipt;异 digest 冲突
|
||||
- [x] 确认/取消/过期只一个 CAS 胜出
|
||||
- [x] 两 worker 抢 eligible 步骤无双 owner
|
||||
- [x] 租约过期可接管;旧 fencing token 被动作属主拒绝
|
||||
- [x] 重启后 succeeded 不重跑;receipt 写回失败按幂等键恢复
|
||||
- [x] 跨 environment 隐藏
|
||||
- [x] 默认 legacy 时 HandleTurn 不落盘
|
||||
- [x] `go test -short ./internal/app/intentflow ./internal/app ./internal/archtest ./internal/db` 绿
|
||||
|
||||
## 相关链接
|
||||
|
||||
- 总览: [2026-09-15-multi-intent-hitl.md](./2026-09-15-multi-intent-hitl.md)
|
||||
- 设计: [../../system-design/2026-09-15-multi-intent-hitl-plan.md](../../system-design/2026-09-15-multi-intent-hitl-plan.md)
|
||||
- Checklist: [../checklists/2026-09-15-multi-intent-u3-intentflow-pg.md](../checklists/2026-09-15-multi-intent-u3-intentflow-pg.md)
|
||||
- Test report: [../../test-reports/2026-09-15-multi-intent-u3-intentflow-pg-test-report.md](../../test-reports/2026-09-15-multi-intent-u3-intentflow-pg-test-report.md)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- HandleTurn 在默认 legacy 下不落盘;CreatePlan 是 U3 测试与后续 U7 入口。
|
||||
- 动作属主端口仅 FakeActionOwner;真实 adapter 从 U7/U8 按 key 接入。
|
||||
- PG 活验需隔离 `TEST_DATABASE_URL`;本机 short 门禁跳过。共享 `:8080` 仍 schema 43。
|
||||
- 提交:`a75aa45` docs(ops) 认领;`7dfd6d6` feat(db);`da0b3d8` feat(intentflow);`1385002` feat(app)。
|
||||
@@ -1,51 +0,0 @@
|
||||
---
|
||||
title: Demo/测试数据污染全面整改
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor-Auto
|
||||
branch: fix/demo-data-pollution-web
|
||||
worktree: "-"
|
||||
mutex: web
|
||||
---
|
||||
|
||||
# Demo / 测试数据污染全面整改
|
||||
|
||||
## 目标
|
||||
|
||||
消除前端 mock/seed 与 DB 演示项目对真实项目清单的污染;生产包无演示文案;main 拒 stub。
|
||||
|
||||
## 范围
|
||||
|
||||
- Wave 0–5 代码 + Wave 6 文档(本分支合并实现)
|
||||
|
||||
## 非目标
|
||||
|
||||
- 删除合法 `*.test.ts` fixture
|
||||
- 改写工作流模板骨架
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] Wave 0 止血
|
||||
2. [x] Wave 1 门控
|
||||
3. [x] Wave 2 localStorage 迁移
|
||||
4. [x] Wave 3 UI 语义
|
||||
5. [x] Wave 4 DB retire
|
||||
6. [x] Wave 5 stub gate
|
||||
7. [x] Wave 6 文档
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] `check-prod-bundle.sh` PASS
|
||||
- [x] deliverableSync / demoSeedIds / ResolveBackend 单测 PASS
|
||||
- [x] `cd web && npm test` 全绿(审核 P0)
|
||||
- [x] 00046/00047 retire + ListChatSessions 过滤(审核 P1)
|
||||
- [x] 合入后共享环境 migrate + 人工空项目/会话抽检(dev schema 47;项目 6357 docs=0;列表无 6001–6010 / sess-wangjing)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Audit: [.doc/audit/2026-09-16-demo-seed-pollution-systemic.md](../audit/2026-09-16-demo-seed-pollution-systemic.md)
|
||||
- 前序 Audit: [.doc/audit/2026-09-15-mock-deliverables-pollute-real-projects.md](../audit/2026-09-15-mock-deliverables-pollute-real-projects.md)
|
||||
- Remediation: [.doc/remediation/2026-09-16-demo-seed-pollution-remediation.md](../remediation/2026-09-16-demo-seed-pollution-remediation.md)
|
||||
- Test report: [.doc/test-reports/2026-09-16-demo-seed-pollution-test-report.md](../test-reports/2026-09-16-demo-seed-pollution-test-report.md)
|
||||
- 挑拣:`a91a031` `SEED_DEMO_USERS=false`(自 `fix/clean-test-env-baseline`)
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
title: "FAV U7 增量合入(非整支 merge)"
|
||||
status: planned
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: feature/fav-u7-publisher
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# FAV U7 增量合入
|
||||
|
||||
## 目标
|
||||
|
||||
从 `feature/final-artifact-vault` **手工移植**经审计切片到 `dev`;consumer 默认 off;禁止整支 merge;禁止默认开 `FAV_DEGRADED_READ`。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [ ] cherry-pick / 移植 cmd/artifact-vault + vault HTTP + publisher 订阅
|
||||
2. [ ] 隔离库负例 + 默认 off 冒烟
|
||||
3. [ ] 独立 go/no-go 报告
|
||||
|
||||
## 非目标
|
||||
|
||||
- 整支 merge `feature/final-artifact-vault`
|
||||
- 未审计启用 degraded read
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
title: "FEATURE-MATRIX production-ready 连续性审计与完善计划"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Codex
|
||||
branch: feature/feature-matrix-production-readiness-plan
|
||||
worktree: ".worktrees/feature-matrix-production-readiness-plan"
|
||||
mutex: architecture-docs
|
||||
---
|
||||
|
||||
# FEATURE-MATRIX production-ready 连续性审计与完善计划
|
||||
|
||||
## 目标
|
||||
|
||||
核对 `FEATURE-MATRIX.md` 中除“纯软件项目自举”外的未完成项,形成不回退当前 `production_ready=yes` 基线的详细整改与验收计划。
|
||||
|
||||
## 范围
|
||||
|
||||
- 交叉核对 FEATURE-MATRIX、gap-matrix、CURRENT、相关设计、测试报告与当前源码。
|
||||
- 区分发布 blocker、补证、首发后增强、刻意关闭能力和文档漂移。
|
||||
- 输出 audit 与 remediation 文档,不修改业务代码或运行发布测试。
|
||||
|
||||
## 非目标
|
||||
|
||||
- 实施任何业务功能、启用 feature flag、部署或合并到 `dev`。
|
||||
- 重新规划“纯软件项目自举”。
|
||||
- 将 U9–U12、FAV、完整 PI change-report 叙事改列为当前发布 blocker。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 完成启动协议与 SSOT 基线读取。
|
||||
2. [x] 逐项核对非自举 `partial` 行及证据漂移。
|
||||
3. [x] 写入 audit 与 remediation 方案。
|
||||
4. [x] 完成文档复核并更新本任务状态。
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 明确回答当前是否仍有 production-ready blocker。
|
||||
- [x] 每个未完成项都有范围、依赖、关闭标准、验证层级和回滚边界。
|
||||
- [x] 方案明确保护 B1–B4、三环境 schema 47、默认 off/legacy/shadow 和真实 PI/UI 证据边界。
|
||||
- [x] 文档遵循 `.doc/` taxonomy,且未修改业务代码。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Audit: `../../audit/2026-09-16-feature-matrix-production-readiness-audit.md`
|
||||
- Remediation: `../../remediation/2026-09-16-feature-matrix-production-readiness-plan.md`
|
||||
- Test report: 不适用(本任务仅审计与规划)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
当前基线来自 `CURRENT.md`、`gap-matrix.md`、B1–B4 测试报告及三环境 schema 47 记录;历史报告仅作为定位线索,计划要求实施阶段重新验证。
|
||||
|
||||
本轮未运行测试,因为没有业务代码变更,且 `ce-plan` 阶段只做研究与规划。
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
title: "FEATURE-MATRIX Wave 0 校准与 IAM 只读核验"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: feature/feature-matrix-production-readiness-plan
|
||||
worktree: ".worktrees/feature-matrix-production-readiness-plan"
|
||||
mutex: architecture-docs
|
||||
---
|
||||
|
||||
# FEATURE-MATRIX Wave 0 校准与 IAM 只读核验
|
||||
|
||||
## 目标
|
||||
|
||||
校准 `FEATURE-MATRIX.md` 契约与行状态,只读核验三环境 IAM 部署事实,保持 `production_ready=yes` 不被无证据回退。
|
||||
|
||||
## 范围
|
||||
|
||||
- PU1:矩阵契约、行模板、status README
|
||||
- PU2:按冻结边界收口/拆行;修正 schema/D3/IAM/FAV 漂移;历史指针
|
||||
- IAM 只读核验(health/ready、IAM 表、PG store);仅真实旁路时改 gap-matrix
|
||||
- 文档提交于本 feature 分支;不合 `dev`、不改业务代码
|
||||
|
||||
## 非目标
|
||||
|
||||
- Wave 1+(IAM fail-closed 代码、race、真实 PI 补证、夜间 CI)
|
||||
- merge `dev` / push / 共享容器 rebuild
|
||||
- 重新运行生产验收冒充补证
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] CURRENT 登记认领 `architecture-docs` in_progress
|
||||
2. [x] PU1 扩展契约与模板
|
||||
3. [x] IAM 只读核验并落盘结论
|
||||
4. [x] PU2 收口矩阵行与历史指针
|
||||
5. [x] `git diff --check` + docs 提交 + handoff
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 矩阵可区分完成边界 / 发布关系 / 关闭条件 / 证据
|
||||
- [x] L1、Chat baseline、DocRev baseline、前端、可靠事件按冻结范围 `done`;增强拆行
|
||||
- [x] schema 45、D3/D5、IAM 过时缺口、事件+FAV 混行已纠正
|
||||
- [x] IAM 只读结论落盘;无证实旁路则不改 `production_ready`
|
||||
- [x] handoff 标明合 `dev` 与 Wave 1 入口待审
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Audit: `../../audit/2026-09-16-feature-matrix-production-readiness-audit.md`
|
||||
- Remediation: `../../remediation/2026-09-16-feature-matrix-production-readiness-plan.md`
|
||||
- Plan short-term (done): `./2026-09-16-feature-matrix-production-readiness-plan.md`
|
||||
- Handoff: `../handoffs/2026-09-16-feature-matrix-wave0-calibration.md`
|
||||
- Test report: 不适用(本波仅文档 + 只读核验)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
### IAM 只读核验(2026-09-16,只读;未 restart / 未改代码)
|
||||
|
||||
| 环境 | health/ready | schema_version | goose max | `user_credentials` | IAM 相关表 | `ALLOW_IN_MEMORY` | ENV | 判定 |
|
||||
|------|--------------|----------------|-----------|--------------------|------------|-------------------|-----|------|
|
||||
| dev `:8080` | ok / ok | 47 | 47 | 147 rows | users, auth_sessions, system_roles, user_role_bindings, iam_system_config 等齐全 | false | dev | PG store 可达;fallback 未触发 |
|
||||
| test `:8081` | ok / ok | 47 | 47 | 4 rows | 同上 | false | test | 同上 |
|
||||
| main `:8000` | ok / ok | 47 | 47 | 1 row | 同上 | false | prod | 同上;`auth_sessions=0` 仅表示无活跃会话,不表示 MemoryStore |
|
||||
|
||||
`IAMTablesReady` 口径(`user_credentials` EXISTS)三环境均为 true。近期 app 日志无 MemoryStore / in-memory auth 命中。
|
||||
|
||||
**结论**:未发现当前 main/prod 正在触发 MemoryStore 旁路;**不**将 `production_ready` 回退;**不**新增 gap-matrix blocker。代码层 `NewStores` 在表缺失时仍可能 silent fallback → 归 Wave 1 PU3 fail-closed 加固。
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
title: "全量 backlog 覆盖 no-go 总控"
|
||||
status: in_progress
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: docs/override-nogo-full-backlog
|
||||
worktree: "-"
|
||||
mutex: architecture-docs
|
||||
---
|
||||
|
||||
# 全量 backlog 覆盖 no-go 总控
|
||||
|
||||
## 目标
|
||||
|
||||
按计划 P0–P7 收口工程残留并实施曾 no-go 的能力;默认 flag off;不升 `MULTI_INTENT_PLAN_TIER=full`;禁止整支 merge FAV。
|
||||
|
||||
## 授权
|
||||
|
||||
用户 2026-09-16 选择范围 **3(A+B 全开)**。
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] P0 SSOT 翻转
|
||||
2. [ ] P1 nightly DATA_DIR 对齐 + green receipt
|
||||
3. [ ] P2 IAM inventory + 410 + R13
|
||||
4. [ ] P3 Playwright intent-plan 双标签
|
||||
5. [ ] P4 PU6 + PU7
|
||||
6. [ ] P5 PU8 U9→U12
|
||||
7. [ ] P6 SWBOOT-00…09(10 stub)
|
||||
8. [ ] P7 FAV 增量
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [ ] 各波 short-term / test-report 回链
|
||||
- [ ] FEATURE-MATRIX 对应行更新
|
||||
- [ ] CURRENT 焦点与认领同步
|
||||
|
||||
## 相关链接
|
||||
|
||||
- Plan: full backlog override(Cursor plan)
|
||||
- go/no-go: [../research/2026-09-16-wave3-pu6-pu8-go-no-go.md](../research/2026-09-16-wave3-pu6-pu8-go-no-go.md)
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: "Gitea nightly host tools / network"
|
||||
created: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: fix/gitea-nightly-host-tools
|
||||
mutex: ci
|
||||
status: done
|
||||
---
|
||||
|
||||
# Gitea nightly host tools / network
|
||||
|
||||
## Goal
|
||||
|
||||
Make local Gitea `nightly:host` jobs able to run `actions/*` (node), health-check PI (`curl` → `127.0.0.1:18865`), and archive receipts without `upload-artifact@v4`.
|
||||
|
||||
## Done when
|
||||
|
||||
- [x] Runner host network + brew PATH (node/go/curl) + glibc mounts
|
||||
- [x] Workflow: replace upload-artifact@v4 with tar archive
|
||||
- [x] Nightly dispatch past infra curl; receipt not infra_fail due to missing tools
|
||||
@@ -1,51 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U4:outbox 与计划投影"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: feature/multi-intent-u4-outbox-projection
|
||||
worktree: "-"
|
||||
mutex: events
|
||||
---
|
||||
|
||||
# 多意图 HITL U4:outbox 与计划投影
|
||||
|
||||
## 目标
|
||||
|
||||
权威计划在同一 UoW 写入 outbox;投影只应用状态事实;消息/SSE 丢失时 GET PlanView 仍能恢复。不改 dispatcher claim/lease/retry 语义。
|
||||
|
||||
## 范围
|
||||
|
||||
- Create/Decide/Receipt 同事务 Append `intent.plan.*`
|
||||
- 最小 payload + golden;伪造 producer 拒绝
|
||||
- projection consumer 幂等、只前进 revision;跨用户不可见
|
||||
- ctxmgr 只经 CardProjector 端口(接口在 intentflow,实现可 no-op)
|
||||
- 复用 Track E LiveConsumers
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不改通用 dispatcher
|
||||
- 不挂 HTTP(U5)、不改 Web(U6)、不执行动作(U7)
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 认领 CURRENT(mutex `events`)
|
||||
2. [x] emit + golden + 投影只前进
|
||||
3. [x] cmd/events 接入 multiplex;goose shadow
|
||||
4. [x] 报告并合回本地 dev
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] 创建计划产生 awaiting_input;payload 无 prompt/slots
|
||||
- [x] 重复 event_id 不双写投影
|
||||
- [x] 乱序低 revision 不覆盖高 revision
|
||||
- [x] 伪造 producer 拒绝
|
||||
- [x] GET PlanView 不依赖投影成功
|
||||
- [x] arch-check / short 绿
|
||||
|
||||
## 相关链接
|
||||
|
||||
- 总览: [2026-09-15-multi-intent-hitl.md](./2026-09-15-multi-intent-hitl.md)
|
||||
- Checklist: [../checklists/2026-09-16-multi-intent-u4-outbox-projection.md](../checklists/2026-09-16-multi-intent-u4-outbox-projection.md)
|
||||
- Test report: [../../test-reports/2026-09-16-multi-intent-u4-outbox-projection-test-report.md](../../test-reports/2026-09-16-multi-intent-u4-outbox-projection-test-report.md)
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
title: "多意图 HITL U5:决策 API 与授权端口"
|
||||
status: done
|
||||
created: 2026-09-16
|
||||
updated: 2026-09-16
|
||||
owner: Cursor
|
||||
branch: feature/multi-intent-u5-decision-api
|
||||
worktree: "-"
|
||||
mutex: intent-plan
|
||||
---
|
||||
|
||||
# 多意图 HITL U5:决策 API 与授权端口
|
||||
|
||||
## 目标
|
||||
|
||||
按钮与自然语言走同一 `DecidePlan` 命令;GET 发现活动计划不依赖投影;执行前由动作属主重新授权。确认不是授权。
|
||||
|
||||
## 范围
|
||||
|
||||
- 冻结路径:`GET /api/v1/intent-plans/active`、`GET /api/v1/intent-plans/{plan_id}`、`POST /api/v1/intent-plans/{plan_id}/decisions`
|
||||
- Principal 只从认证会话 + query 的 project/session 组装,忽略 body 中的 user/project/session
|
||||
- 四元作用域;非成员 403;跨 session/user 隐藏为 404
|
||||
- 系统管理员不得绕过项目成员检查
|
||||
- `StepAuthorizer` 端口 + Fake/dry-run;确认与执行前鉴权
|
||||
- expected revision、nonce、依赖闭包、edit 升 revision
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不接真实业务属主 adapter(U7/U8)
|
||||
- 不改 Web(U6)、不改默认 legacy HandleTurn
|
||||
- 不 rebuild 共享 `:8080`
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 认领 CURRENT(mutex `intent-plan`)
|
||||
2. [x] 授权端口与 confirm/execute 即时鉴权
|
||||
3. [x] HTTP handlers + 权限负例
|
||||
4. [x] 报告并合回本地 dev
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [ ] 投影缺失仍能 GET active
|
||||
- [ ] 未登录 401;非成员 403;跨项目/会话/用户隐藏
|
||||
- [ ] stale revision 409;重复 nonce 同 digest 同 receipt
|
||||
- [ ] 非法部分确认拒绝;edit 使旧 revision 失效
|
||||
- [ ] 确认前零副作用;权限撤销/资源版本 fail closed
|
||||
- [ ] 无系统身份绕过
|
||||
- [ ] `go test -short` 绿
|
||||
|
||||
## 相关链接
|
||||
|
||||
- 总览: [2026-09-15-multi-intent-hitl.md](./2026-09-15-multi-intent-hitl.md)
|
||||
- 设计: [../../system-design/2026-09-15-multi-intent-hitl-plan.md](../../system-design/2026-09-15-multi-intent-hitl-plan.md)
|
||||
- Checklist: [../checklists/2026-09-16-multi-intent-u5-decision-api.md](../checklists/2026-09-16-multi-intent-u5-decision-api.md)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user