From d01694b556b4a71375e8097c15f50713f3c55d41 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 17 Sep 2026 14:07:52 +0000 Subject: [PATCH] docs(ops): record author-only pilot and proposal-http task claim Archive CAS evidence for workflow.allow_author_only_approval on dev, mark proposal HTTP audit resolved, and claim the feature branch in CURRENT. Co-authored-by: Cursor --- ...7-docgov-modification-proposal-http-gap.md | 30 ++++-------- .../2026-09-17-author-only-pilot-toggle.md | 22 +++++++++ .doc/ops/CURRENT.md | 9 ++-- ...026-09-17-document-author-only-closeout.md | 19 +++++--- ...09-17-docgov-modification-proposal-http.md | 48 +++++++++++++++++++ .../after-enable.json | 6 +++ .../before-enable.json | 5 ++ .../put-enable.txt | 3 ++ 8 files changed, 110 insertions(+), 32 deletions(-) create mode 100644 .doc/ops/2026-09-17-author-only-pilot-toggle.md create mode 100644 .doc/ops/short-term/2026-09-17-docgov-modification-proposal-http.md create mode 100644 .doc/test-reports/assets/2026-09-17-author-only-pilot/after-enable.json create mode 100644 .doc/test-reports/assets/2026-09-17-author-only-pilot/before-enable.json create mode 100644 .doc/test-reports/assets/2026-09-17-author-only-pilot/put-enable.txt diff --git a/.doc/audit/2026-09-17-docgov-modification-proposal-http-gap.md b/.doc/audit/2026-09-17-docgov-modification-proposal-http-gap.md index 72cd75bd..915d6dc6 100644 --- a/.doc/audit/2026-09-17-docgov-modification-proposal-http-gap.md +++ b/.doc/audit/2026-09-17-docgov-modification-proposal-http-gap.md @@ -1,6 +1,6 @@ --- title: "docgov 变更提案缺少 HTTP 路由" -status: open +status: resolved created: 2026-09-17 updated: 2026-09-17 severity: medium @@ -10,35 +10,23 @@ severity: medium ## 现象 -引擎侧存在 `docgov.ProposeModification` / `DecideModificationProposal`,但 `internal/server/server.go` 未注册对应 HTTP 路由。前端 `App.tsx`「变更方案提议」(`pendingProposal`)仍为本地模拟,不写库、不审计。 - -该缺口与 `duty_policy=author_only` 无关,影响全部受控文档的变更提案闭环。 +引擎侧存在 `docgov.ProposeModification` / `DecideModificationProposal`,但服务端此前仅注册 `POST /api/v1/docgov/proposal/decide`;前端 `App.tsx`「变更方案提议」(`pendingProposal`)为本地模拟。 ## 根因分析 -U6 排查审批闭环时确认:生命周期三接口(submit-review / review-decision / approver-decision)与 claim 已注册并可真实调用;变更提案路径从未暴露为 HTTP,前后端契约缺失。 - -证据: - -- `rg "ProposeModification|DecideModification|/docgov/.*proposal"`(路由层无匹配) -- `App.tsx` pendingProposal 本地状态分支 +生命周期三接口与 claim 已注册;变更提案 **propose** 路径从未暴露为 HTTP。 ## 严重度 `medium` — 不阻塞编制→审核→批准主链;阻塞「认领后小队修改须提案确认」的真实治理。 -## 关联整改 +## 处置(resolved) -- 建议后续单独立项(不并入 author-only remediation U6) -- 相关:`.doc/remediation/2026-09-17-document-author-only-plan.md` 发现 3 +- 新增 `POST /api/v1/docgov/proposal` → `ProposeModification` +- 前端 `proposeModification` / `decideModificationProposal` + App 接线 +- 单测:`TestServer_DocGovProposeAndDecideHTTP`、`web/src/api/docgov.test.ts` +- 任务:`.doc/ops/short-term/2026-09-17-docgov-modification-proposal-http.md` ## 证据 -- U6 计划与测试报告中的「非目标」声明 -- 本笔记创建于 U6 实施期间 - -## 建议下一步 - -1. 设计 `POST /api/v1/docgov/propose-modification` 与 decide 路由及 ABAC; -2. 前端替换本地 `pendingProposal` 模拟; -3. 补真实 PI + 浏览器验收报告。 +- 合入后真实 HTTP 证据见 `.doc/test-reports/assets/2026-09-17-docgov-modification-proposal-http/` diff --git a/.doc/ops/2026-09-17-author-only-pilot-toggle.md b/.doc/ops/2026-09-17-author-only-pilot-toggle.md new file mode 100644 index 00000000..138ddbc8 --- /dev/null +++ b/.doc/ops/2026-09-17-author-only-pilot-toggle.md @@ -0,0 +1,22 @@ +--- +title: "dev 试点:开放编制人兼任总开关" +status: done +created: 2026-09-17 +updated: 2026-09-17 +--- + +# dev 试点:开放编制人兼任总开关 + +## 结论 + +在运行中的 `agent-dev`(`:8080`,schema 52)经 admin CAS 将 `workflow.allow_author_only_approval` 设为 `true`(revision `0 → 1`)。**未**改默认迁移值;**未**晋升 test/main;test/main 仍保持默认 off。 + +## 证据(脱敏) + +- [before-enable.json](../../test-reports/assets/2026-09-17-author-only-pilot/before-enable.json) +- [put-enable.txt](../../test-reports/assets/2026-09-17-author-only-pilot/put-enable.txt) +- [after-enable.json](../../test-reports/assets/2026-09-17-author-only-pilot/after-enable.json) + +## 关联 + +- author-only 收口:[../handoffs/2026-09-17-document-author-only-closeout.md](../handoffs/2026-09-17-document-author-only-closeout.md) diff --git a/.doc/ops/CURRENT.md b/.doc/ops/CURRENT.md index d437e48d..bbd971c1 100644 --- a/.doc/ops/CURRENT.md +++ b/.doc/ops/CURRENT.md @@ -5,14 +5,15 @@ ## 焦点 -1. **document-author-only**:U1–U6 **已合入 `dev`**(总开关默认 off;test/main 晋升与开放授权另授) -2. **partial/deferred 全量收口**:W1–W4 **done**;W5a **done**;W6 **shadow done**;W7 **盘点 done**。test 已至 `rc-v1.0.0-beta.4`(含 optional-duty null FK) +1. **document-author-only**:U1–U6 **已合入并推送 `origin/dev`**;dev 试点总开关 **on**;test/main 仍 off、未晋升 +2. **docgov 变更提案 HTTP**:`feature/docgov-modification-proposal-http`(mutex `docgov`)in_progress 3. **红线**:禁止整支 merge FAV;不默认升 `MULTI_INTENT_PLAN_TIER=full`;`SEMANTIC_SUMMARY_REPLACE` 不随 W2 开启;FAV live 观察窗证据驱动;`FAV_DEGRADED_READ=false`;项目 143 只读 ## 并行认领 | owner | task | branch | worktree | mutex | status | |-------|------|--------|----------|-------|--------| +| Cursor | 2026-09-17-docgov-modification-proposal-http | feature/docgov-modification-proposal-http | .worktrees/feature-docgov-modification-proposal-http | docgov | in_progress | | Cursor | 2026-09-17-document-author-only-closeout | feature/document-author-only-plan | .worktrees/feature-document-author-only-plan | document-duty-policy | done | | Cursor | 2026-09-17-rdev-template-depth-s1-continued | feature/rdev-template-depth-s1-continued | - | rdev-templates | planned | | Cursor | 2026-09-17-rdev-workflow-integration | feature/rdev-core | - | workflow-def | done | @@ -129,7 +130,7 @@ | holder | phase | since | scope | queue | |--------|-------|-------|-------|-------| -| - | idle | - | - | - | +| Cursor | idle | 2026-09-17 | docgov-modification-proposal-http(待合入) | - | **phase**: `idle` | `merging` | `smoke` | `e2e` @@ -139,7 +140,7 @@ | 环境 | 端口 | schema | 状态 | |------|------|--------|------| -| dev | 8080 | **52** | healthy(含 author_only goose 00050–00052;`pi-agent`;events `:8088`;总开关默认 off) | +| dev | 8080 | **52** | healthy(含 author_only goose 00050–00052;`pi-agent`;events `:8088`;**试点** `workflow.allow_author_only_approval=true`) | | test | 8081 | **48** | healthy(`rc-v1.0.0-beta.4`;pi-agent `:18866`;events `:8089`;notify/advance/projection live、fav off;health+ready PASS;goose 00048 已迁移) | | main | 8000 | **47** | healthy(app + events + runner + DB;与 dev/test 对齐) | diff --git a/.doc/ops/handoffs/2026-09-17-document-author-only-closeout.md b/.doc/ops/handoffs/2026-09-17-document-author-only-closeout.md index daaa0b3a..9c1fefd8 100644 --- a/.doc/ops/handoffs/2026-09-17-document-author-only-closeout.md +++ b/.doc/ops/handoffs/2026-09-17-document-author-only-closeout.md @@ -13,23 +13,28 @@ to: integrator 实现与验收任务已全部收口:U1–U6 short-term 已迁入 `archive/ops/`;FEATURE-MATRIX / remediation DoD(除发布末条)已更新;U6 报告已归档。 +**远端**:已 `git-push-dev.sh` 推送 `origin/dev`(含 author-only merge);**未**晋升 test/main。 + +**dev 试点**:`workflow.allow_author_only_approval=true`(revision 1);证据见 [pilot assets](../../test-reports/assets/2026-09-17-author-only-pilot/) 与 [ops 笔记](../2026-09-17-author-only-pilot-toggle.md)。 + ## 分支 -- `feature/document-author-only-plan`(worktree:`.worktrees/feature-document-author-only-plan`) -- 相对 `origin/dev` 约 78 commits(含 U1–U6) +- `feature/document-author-only-plan`(worktree:`.worktrees/feature-document-author-only-plan`)— 已合入,待清理 +- 续作:`feature/docgov-modification-proposal-http`(变更提案 HTTP) ## 合入 `dev`(已完成) -- `merge --no-ff feature/document-author-only-plan` → `dev@09a9921` +- `merge --no-ff feature/document-author-only-plan` → 后续推送至 `origin/dev@ba92a8b` 一带 - 冒烟:`go vet` / `go test -short` 相关包 PASS;`./scripts/env-service.sh dev rebuild`;`GET /health` → `schema_version=52`、`status=ok` -- 总开关默认 off;**未** push / 未晋升 test/main / 未开放授权 +- 总开关默认迁移值仍为 off;**dev 运行态**已 CAS 试点开启;**未**晋升 test/main -## 明确不在本期 +## 明确不在本期(已转入续作) -- 变更提案 HTTP 路由([audit](../../audit/2026-09-17-docgov-modification-proposal-http-gap.md)) -- test/main 晋升与试点开放总授权 +- ~~变更提案 HTTP 路由~~ → [short-term](../short-term/2026-09-17-docgov-modification-proposal-http.md) / [audit resolved](../../audit/2026-09-17-docgov-modification-proposal-http-gap.md) +- test/main 晋升仍另授 ## 证据 - [U6 报告](../../test-reports/2026-09-17-document-author-only-u6-test-report.md) - [方案 DoD](../../remediation/2026-09-17-document-author-only-plan.md) +- [pilot](../../test-reports/assets/2026-09-17-author-only-pilot/) diff --git a/.doc/ops/short-term/2026-09-17-docgov-modification-proposal-http.md b/.doc/ops/short-term/2026-09-17-docgov-modification-proposal-http.md new file mode 100644 index 00000000..34d2cd9e --- /dev/null +++ b/.doc/ops/short-term/2026-09-17-docgov-modification-proposal-http.md @@ -0,0 +1,48 @@ +--- +title: "docgov 变更提案 HTTP + 前端接线" +status: in_progress +created: 2026-09-17 +updated: 2026-09-17 +owner: Cursor +branch: feature/docgov-modification-proposal-http +worktree: .worktrees/feature-docgov-modification-proposal-http +mutex: docgov +--- + +# docgov 变更提案 HTTP + 前端接线 + +## 目标 + +暴露 `POST /api/v1/docgov/proposal`,前端「修改」快捷分支与 `ProposalConfirmCard` 走真实 propose/decide,不再本地假装成功。 + +## 范围 + +- API:`ProposeModification` 路由;decide 补 404/403 映射 +- 前端:`docgov.ts` + `App.tsx` 接线 +- 单测 + 真实 HTTP 证据 +- 关闭 audit 缺口;dev 试点总开关证据归档 + +## 非目标 + +- 晋升 test/main +- 变更提案自动改写受控正文(批准后仍为 UI 演示增补) + +## 步骤 + +1. [x] 实现 propose handler + 路由 +2. [x] 前端 client + App 接线 +3. [x] handler/client 单测 +4. [ ] 合入 dev + rebuild + 真实 HTTP +5. [ ] push origin/dev;清理 author-only worktree + +## 验收标准 + +- [x] `POST /api/v1/docgov/proposal` 可写库(单测) +- [ ] 真实 HTTP claim → propose → decide PASS +- [ ] audit 缺口 resolved;CURRENT 认领收敛 + +## 相关链接 + +- Audit: [../../audit/2026-09-17-docgov-modification-proposal-http-gap.md](../../audit/2026-09-17-docgov-modification-proposal-http-gap.md) +- Pilot: [../../test-reports/assets/2026-09-17-author-only-pilot/](../../test-reports/assets/2026-09-17-author-only-pilot/) +- Closeout: [../handoffs/2026-09-17-document-author-only-closeout.md](../handoffs/2026-09-17-document-author-only-closeout.md) diff --git a/.doc/test-reports/assets/2026-09-17-author-only-pilot/after-enable.json b/.doc/test-reports/assets/2026-09-17-author-only-pilot/after-enable.json new file mode 100644 index 00000000..44b22b2c --- /dev/null +++ b/.doc/test-reports/assets/2026-09-17-author-only-pilot/after-enable.json @@ -0,0 +1,6 @@ +{ + "key": "workflow.allow_author_only_approval", + "value": true, + "revision": 1, + "note": "dev pilot enabled; test/main not promoted" +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-17-author-only-pilot/before-enable.json b/.doc/test-reports/assets/2026-09-17-author-only-pilot/before-enable.json new file mode 100644 index 00000000..0ad538f1 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-17-author-only-pilot/before-enable.json @@ -0,0 +1,5 @@ +{ + "key": "workflow.allow_author_only_approval", + "value": false, + "revision": 0 +} \ No newline at end of file diff --git a/.doc/test-reports/assets/2026-09-17-author-only-pilot/put-enable.txt b/.doc/test-reports/assets/2026-09-17-author-only-pilot/put-enable.txt new file mode 100644 index 00000000..105af092 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-17-author-only-pilot/put-enable.txt @@ -0,0 +1,3 @@ +{"key":"workflow.allow_author_only_approval","label":"允许编制人兼任审核批准","group":"workflow","type":"bool","value":true,"default":false,"writable":true,"requiresRestart":false,"description":"授权新配置:开启后项目创建者可在激活前为文档启用编制人兼任。关闭后禁止新启用/激活兼任规划;已激活实例按冻结职责继续执行,不作为紧急熔断。","revision":1,"updatedAt":"2026-09-17T14:03:22.990984Z","updatedBy":9} + +HTTP 200