From acb443e949933a9e2cf172f4c144eee382e5ad98 Mon Sep 17 00:00:00 2001 From: weichen Date: Tue, 15 Sep 2026 11:13:17 +0000 Subject: [PATCH] docs(test): record D5 stageflow type ownership and chatflow first batch Co-authored-by: Cursor --- .doc/ops/CURRENT.md | 7 +-- .../2026-09-15-stageflow-type-ownership.md | 40 ++++++++++++++ .doc/status/FEATURE-MATRIX.md | 2 +- ...15-stageflow-type-ownership-test-report.md | 52 +++++++++++++++++++ 4 files changed, 97 insertions(+), 4 deletions(-) create mode 100644 .doc/ops/short-term/2026-09-15-stageflow-type-ownership.md create mode 100644 .doc/test-reports/2026-09-15-stageflow-type-ownership-test-report.md diff --git a/.doc/ops/CURRENT.md b/.doc/ops/CURRENT.md index 18e4118e..8bb9875a 100644 --- a/.doc/ops/CURRENT.md +++ b/.doc/ops/CURRENT.md @@ -5,7 +5,7 @@ ## 焦点 -1. **TRACK-S**: [D7a intent 解绑](./short-term/2026-09-15-intent-bizdev-boundary.md)(D6 已合入。下一波 D5/D4/D7b) +1. **TRACK-S**: [D5 stageflow](./short-term/2026-09-15-stageflow-type-ownership.md)(D6/D7a 已合入。D4 getter 仍开放) 2. **CHAT-INTENT**: [对话意图运行时状态](../test-reports/2026-09-13-conversation-intent-runtime-state-test-report.md)(双标签 busy 已签:项目 **6275** / `DOC_BUSY` 单 run;不删 `sess-p143-u9` 探针) 3. **CHAT**: [对话历史刷新活验已补](../test-reports/2026-09-13-chat-history-refresh-test-report.md)(项目 6252 闲聊刷新同集 + guest 403;编制任务链仍开放) @@ -65,7 +65,8 @@ | 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 | in_progress | +| Cursor | intent-bizdev-boundary | fix/intent-bizdev-boundary | - | intent | done | +| Cursor | stageflow-type-ownership | fix/stageflow-type-ownership | - | stageflow | in_progress | > 新任务开始前登记。`branch` 必须为 `feature/` 或 `fix/`,**禁止** `dev` / `test` / `main`。同一 `mutex` 同时仅一个 `in_progress`。 @@ -77,7 +78,7 @@ | holder | phase | since | scope | queue | |--------|-------|-------|-------|-------| -| Cursor | merging | 2026-09-15 | D6 doccontent canonical;mode=off | - | +| Cursor | merging | 2026-09-15 | D5 stageflow types;mode=off | - | **phase**: `idle` | `merging` | `smoke` | `e2e` diff --git a/.doc/ops/short-term/2026-09-15-stageflow-type-ownership.md b/.doc/ops/short-term/2026-09-15-stageflow-type-ownership.md new file mode 100644 index 00000000..4f3a141c --- /dev/null +++ b/.doc/ops/short-term/2026-09-15-stageflow-type-ownership.md @@ -0,0 +1,40 @@ +--- +title: "D5 stageflow 类型归属与 D7b chatflow 首批" +status: in_progress +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) diff --git a/.doc/status/FEATURE-MATRIX.md b/.doc/status/FEATURE-MATRIX.md index 9520bd0a..c0ec8ac4 100644 --- a/.doc/status/FEATURE-MATRIX.md +++ b/.doc/status/FEATURE-MATRIX.md @@ -27,7 +27,7 @@ | PI Runner / 配置链 | pi-agent + MiniMax 真实链路 | done | [test piagent](../test-reports/2026-09-13-codex-audit-p0-remediation-test-report.md);[container-env](../test-reports/2026-09-13-container-env-configuration-test-report.md) | — | `pi-agent` | | 三环境运维 | dev/test/main + 共享 KB | done | [PROJECT.md](../../PROJECT.md) §4;四环境 healthy | — | `infra` | | CI / E2E | PG 集成 + 真实 PI E2E | partial | [gap-matrix BUG-08](../remediation/gap-matrix.md);[test pg-ci](../test-reports/2026-09-12-pg-ci-soak-e2e-test-report.md);[运行时 UI Round20](../test-reports/2026-09-14-document-revision-runtime-ui-test-report.md) | CI `TEST_DATABASE_URL` 隔离库仍缺;文档运行时真实 UI 已按 UI_PHASE 分文件且 post-restart 断言最终 A1 正文。`-race` 全包并行 TempDir flake 为基建残留 | `ci` | -| 模块解耦与可靠事件 | 文档可靠性纵向试点、PG 持久事件交付与选择性模块化 | partial | [架构](../system-design/2026-09-14-module-decoupling-architecture.md);[ADR](../adr/2026-09-14-modular-monolith-decoupling.md);[Phase 1](../remediation/2026-09-14-module-decoupling-refactor-plan.md);[Phase 2 审阅](../audit/2026-09-15-module-decoupling-phase2-plan-review.md);[Phase 2 修订计划](../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md);[E0A](../test-reports/2026-09-15-event-e0a-production-scope-contract-test-report.md);[E0B](../test-reports/2026-09-15-event-e0b-dispatcher-pg-test-report.md);[E1A](../test-reports/2026-09-15-event-e1a-notify-cutover-test-report.md);[E1B](../test-reports/2026-09-15-event-e1b-workflow-advance-test-report.md);[E1C](../test-reports/2026-09-15-event-e1c-projection-test-report.md);[E2](../test-reports/2026-09-15-event-e2-hook-guard-test-report.md);[复盘](../ops/research/2026-09-15-track-e-retrospective.md);[D6](../test-reports/2026-09-15-doccontent-canonical-boundary-test-report.md) | E0A–E2 隔离库已过;dispatcher 默认 off。删除闭包 API 须等 live。D6 canonical 已抽出。Track S 其余与 Track P/FAV 另列 | `architecture-docs` | +| 模块解耦与可靠事件 | 文档可靠性纵向试点、PG 持久事件交付与选择性模块化 | partial | [架构](../system-design/2026-09-14-module-decoupling-architecture.md);[ADR](../adr/2026-09-14-modular-monolith-decoupling.md);[Phase 1](../remediation/2026-09-14-module-decoupling-refactor-plan.md);[Phase 2 审阅](../audit/2026-09-15-module-decoupling-phase2-plan-review.md);[Phase 2 修订计划](../remediation/2026-09-15-module-decoupling-ipc-phase2-remediation-plan.md);[E0A](../test-reports/2026-09-15-event-e0a-production-scope-contract-test-report.md);[E0B](../test-reports/2026-09-15-event-e0b-dispatcher-pg-test-report.md);[E1A](../test-reports/2026-09-15-event-e1a-notify-cutover-test-report.md);[E1B](../test-reports/2026-09-15-event-e1b-workflow-advance-test-report.md);[E1C](../test-reports/2026-09-15-event-e1c-projection-test-report.md);[E2](../test-reports/2026-09-15-event-e2-hook-guard-test-report.md);[复盘](../ops/research/2026-09-15-track-e-retrospective.md);[D6](../test-reports/2026-09-15-doccontent-canonical-boundary-test-report.md);[D7a](../test-reports/2026-09-15-intent-bizdev-boundary-test-report.md);[D5](../test-reports/2026-09-15-stageflow-type-ownership-test-report.md) | E0A–E2 隔离库已过;dispatcher 默认 off。D5/D6/D7a/D7b-chatflow 已合入。删除闭包 API 须等 live。D4 getter 原子删除与 Track P 实现、FAV 另列。HTTP/PI 已有独立 remediation(Phase 2 只立项) | `architecture-docs` | --- diff --git a/.doc/test-reports/2026-09-15-stageflow-type-ownership-test-report.md b/.doc/test-reports/2026-09-15-stageflow-type-ownership-test-report.md new file mode 100644 index 00000000..cd7e2d3a --- /dev/null +++ b/.doc/test-reports/2026-09-15-stageflow-type-ownership-test-report.md @@ -0,0 +1,52 @@ +# D5 stageflow 类型归属与 D7b chatflow 首批测试报告 + +## 一、 测试背景 (Background) + +coordinator 通过 bizdev DTO 与 locator 调用编排根。D5 要求 use-case 请求/结果归 stageflow,coordinator 最终不 import bizdev。D7b 允许按用例收紧 import;本批只迁 `app/chatflow` assembler 的阶段常量。 + +## 二、 测试目标 (Test Objectives) + +- coordinator 生产包 import 无 bizdev。 +- StageTaskRunner / UseCase 使用 stageflow 类型;token `failed` / `pending_author_confirmation` 不变。 +- chatflow assembler 使用 `maturity.StageV01_Triage`。 +- 顾问案例推荐仍能通过注入的 ContextManager 填充。 + +## 三、 测试方案与环境 (Test Plan & Environment) + +| 项 | 值 | +|----|-----| +| OS | Linux 7.0.0-31-generic | +| Go | go1.27.1 linux/amd64 | +| 分支 | `fix/stageflow-type-ownership` | +| 层级 | 表征/短测 + arch-check | + +## 四、 预期结果 (Expected Results) + +既有 ADVANCE_STAGE / pending confirmation / chat session 表征仍过;arch-check 收紧 coordinator 与 chatflow allowlist。 + +## 五、 实际测试结果与判定 (Actual Results & Evaluation) + +### 5.1 表征 + +- **测试输入 (Input)**:`go test -short -count=1 ./internal/coordinator ./internal/app/stageflow ./internal/app/chatflow ./internal/app ./internal/chat ./internal/bizdev ./internal/archtest ./cmd/bizdev-cli` +- **实际输出 (Actual Output)**:上述包全部 `ok`(cli 2.3s,其余 <0.15s) +- **评价判定 (Evaluation / Verdict)**:**PASS** +- **性能与耗时 (Duration & Latency)**:约 3.6s + +### 5.2 arch-check + +- **测试输入 (Input)**:`./scripts/arch-check.sh --mode block` +- **实际输出 (Actual Output)**:`arch-check block: production gate passed` +- **评价判定 (Evaluation / Verdict)**:**PASS** +- **性能与耗时 (Duration & Latency)**:~0.12s + +## 六、 自动化测试套件汇总 (Test Suite Execution) + +| 命令 | 结果 | +|------|------| +| coordinator/stageflow/chatflow/app/chat/bizdev/cli | PASS | +| arch-check | PASS | + +## 七、 测试结论与后续优化建议 (Conclusion & Next Steps) + +D5 与 D7b **首批 PASS**。类型仍是 bizdev 结构的别名,未机械复制方法。D4 八个 getter 仍在;`internal/chat` 仍 import bizdev 跑任务。下一步:no-new-callers 门禁后原子删除 getter。