Files
watchman/docs/tasks/M04.md
T
unknownandCursor 21cc721fcc feat(queries): 完成 M04 查询定义与版本激活
交付不可变查询版本、保存即生效与激活(D26),并带控制台列表筛选排序与试跑预览;补 RLS 下 current_version_no 回填迁移。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-18 18:32:24 +08:00

30 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# M04 查询定义与采集模块
一个会话聚焦本模块。范围见 `.task/2026-11-18/m04-queries/requirement.md`(D24)与 `.task/2026-11-18/m04-version-activate/`(D26)。
## 内部步骤(主 Agent 根据现有代码安排)
- [x] 明确边界、依赖和复用方案(intake/requirement/plan/context-pack)。
- [x] S1 模型、迁移与不可变版本约束(含 0007 库级禁止 UPDATE/DELETE)。
- [x] S2 只读执行器(绑定、限制、三分语义、usable;SQL Server 试跑拒绝)。
- [x] S3 API、权限、引用回填。
- [x] S4 HTML 原型。
- [x] S5 前端与接口联调。
- [x] S6 模块整体独立 review、修复复审、正式测试与证据。
- [x] D26:去掉草稿/发布;`current_version_no`;保存出版本;激活;列表切换版本(S1–S4)。
- [x] 用户最终确认后主 Agent 标 DONE_LOCAL/交接。
## 目标与边界
- 已确认:D14、D19、D22、D23、D24、D25、D26。
- 已交付:参数化 SQL、不可变版本、`current_version_no` 激活、保存即生效、只读预览(PG/MySQL)、配套 UI(无草稿/发布两步)。
- 明确不做:场景 Cron 正式采集;映射/规则/报警/企微;任意脚本;SQL Server 查询试跑(连接测试仍可用);本轮不物理删除 `draft_*` 列。
## 证据与结论
- 任务产物:`.task/2026-11-18/m04-queries/`;增补 `.task/2026-11-18/m04-version-activate/`
- 审查:`reviews/review-s1.md` … `review-s5.md`;`review-module-m04.md`(初审 FAIL)→ 修复后 `review-module-m04-recheck.md` **PASS**
- 测试(D26 回归):query* pytest 201;console unit queries 52;e2e queries 16
- UI 证据:`docs/evidence/M04/ui/`
- 最终状态:**DONE_LOCAL**