docs: P8 batch-1 complete — server 921443a 0.14.0, crearte 70ba10c 0.20.0; six-leg green, dual review PASS (note pinned by ee5b960 before merge)

This commit is contained in:
2026-10-01 02:07:36 +08:00
parent 77f4695fbe
commit 88163fdbcb
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -6,6 +6,13 @@ All notable changes to this repository should be documented in this file.
The format loosely follows Keep a Changelog and can be adapted to the team's habits. The format loosely follows Keep a Changelog and can be adapted to the team's habits.
本文档参考了 Keep a Changelog 的思路,也可以根据团队习惯调整。 本文档参考了 Keep a Changelog 的思路,也可以根据团队习惯调整。
## [0.2.8] - 2026-10-01
### Done / 完成
- P8 batch-1 (triage + copy + feature-switch UI) delivered: crearte-server `921443a` (0.14.0 — `games.Detail` 400 messages split into `user: invalid format` / `slug: invalid format` with user precedence pinned by assertion (status/error codes unchanged); four admin work routes (unpublish/republish/features/revoke) validate :user/:slug at handler entry via shared `validWorkParams`, malformed ids now 400 `invalid work id` instead of a misleading 404 (`adminWorkID` untouched); new gated concurrency test `TestApproveSameWorkIDConcurrent` — two same-work_id new_work approvals, exactly one winner, loser gets ErrWorkIDTaken/ErrSubmissionConflict, one row; CHANGELOG header de-templatized) and crearte `70ba10c` (0.20.0 — CSP editing UI opened to the full seven-key set: inlineStyle/wasm/coop/fullscreen/gamepad added to EditableFeatures/EMPTY_FEATURES/FEATURE_ITEMS/collectFeatures/featuresToForm/hasAnyFeature with Chinese label+hint per switch (risk + scenario spelled out); all three surfaces stay driven by the single FEATURE_ITEMS list — submission form, AdminView expanded row, AdminSubmissionView read-only; payload always carries seven keys preserving the missing-key-keeps-stored-value semantics; features/SubmitFormView/AdminSubmissionView tests rewritten and added; CHANGELOG header de-templatized). Zero deploy changes, zero migrations, zero new deps; runtime flag consumers untouched. Acceptance: server container four-green + fresh-empty-DB -count=1 integration (race test ran, skip-guard grep 0) + `-race` leg PASS (two concurrency tests, no data races — needed the Debian golang:1.24 image, alpine lacks gcc for cgo); curl smoke on a live branch build: detail 400s distinguished, both-bad → user wins, all four admin routes 400 on malformed slug/user, legal-but-missing id still 404; FE vitest 499 / typecheck / admin-flow 7 / main suite 70+1skip (first main-suite decrypt failure was a stale serve-runtime process left by a dead subagent — killed it, rerun green). Dual independent review: crearte PASS (notes: gamepad hint leans on its label for the “what is loosened” clause, accepted); server PASS with notes (only note — user-precedence not pinned by test — fixed as `ee5b960` before merge). Lesson landed: reviewers briefed with an explicit “spec §1–§3 full-text, not just the task brief” clause (P6 D-D gap). Task-2 implementer died mid-run; its uncommitted worktree was verified against spec, pinned as `54b1f82` with a full-message commit rather than redispatched. Roadmap: P8 second batch (③ account deletion awaiting product call, ④ static fallback dir on-demand) remains.
- P8 第一批(triage 小项 + 文案 + 权限开关 UI)交付:crearte-server `921443a`(0.14.0——`games.Detail` 400 文案拆为 `user: invalid format` / `slug: invalid format`,双非法 user 优先已用断言钉桩(状态码/错误码不变);四条 admin 作品路由(unpublish/republish/features/revoke)handler 入口经共享 `validWorkParams` 校验 :user/:slug,非法 id 改返 400 `invalid work id` 不再误导成 404(`adminWorkID` 未动);新增门控并发测试 `TestApproveSameWorkIDConcurrent`——同 work_id 两份 new_work 并发审批,恰一条成功、败者 ErrWorkIDTaken/ErrSubmissionConflict、库中恰一行;CHANGELOG 头部去模板腔)与 crearte `70ba10c`(0.20.0——CSP 编辑 UI 开放七键全集:inlineStyle/wasm/coop/fullscreen/gamepad 入 EditableFeatures/EMPTY_FEATURES/FEATURE_ITEMS/collectFeatures/featuresToForm/hasAnyFeature,每开关中文 label+hint 写清风险与适用场景;三处界面仍由单一 FEATURE_ITEMS 驱动——投稿表单、AdminView 展开行、AdminSubmissionView 只读;载荷恒含七键,保住「缺键→保留原值」语义;三套测试改写/新增;CHANGELOG 头部去模板腔)。deploy 零改动、零迁移、零新依赖,运行时 flag 消费端未碰。验收:server 容器四连绿 + 空库 -count=1 集成全绿(竞态测试实跑,skip 守卫 grep 0)+ `-race` 腿 PASS(两并发测试零数据竞争;alpine 无 gcc 需换 Debian golang:1.24 镜像);分支真产物 curl 冒烟全中:detail 400 可区分、双非法 user 赢、admin 四路非法 slug/user 全 400、合法格式不存在仍 404;FE vitest 499 / typecheck / admin-flow 7 / 主套件 70+1skip(首轮 decrypt 一腿失败系夭折子代理残留的旧 serve-runtime 进程污染环境,杀进程复跑绿)。双路独立审查:crearte PASS(注:gamepad hint 的「放宽了什么」靠 label 承载,可接受);server PASS with notes——唯一 note(user 优先缺钉桩)已以 `ee5b960` 在合主前补齐。教训落地:审查员任务书显式要求「对照 spec §1–§3 全文而非仅任务书」(P6 D-D 漏项的根治)。Task2 实现者中途夭折——其未提交工作树经逐条对 spec 核验后以完整提交信息钉成 `54b1f82`,未盲重跑。路线图:P8 第二批(③账号注销待产品决策、④静态兜底目录按需)仍待启动。
## [0.2.7] - 2026-09-30 ## [0.2.7] - 2026-09-30
### Done / 完成 ### Done / 完成
+2 -2
View File
@@ -33,7 +33,7 @@
| # | 子项目 | 内容 | 状态 | | # | 子项目 | 内容 | 状态 |
|---|--------|------|------| |---|--------|------|------|
| P7 | 管理后台增强 | 用户列表 / 角色管理 UI(替代 CLI `user set-role`)+ 审计日志 | **完成**(server `ca24805` 0.12.0 / crearte `900f13a` 0.18.0,2026-09-30 合并推送。audit_log 表 0010 + 组中间件统一记录(owner 定稿:admin 路由收敛为组,Full-Path 模板入史,GET 也记,失败尝试照记,未遂 401/403 不记);用户列表/PATCH 角色/审计查询三端点;唯一 admin 降级 409 护栏 CLI/API 双覆盖;前端 /admin/users + /admin/audit 两页,降级确认双要点文案;本机六腿验收全绿:容器四连+fresh-DB `-count=1` 10 ok 零 FAIL 零 skip、废 token 端到端 401、护栏矩阵(非唯一降 OK/唯一降 CLI 拒+API 409)、审计流水含 409 失败尝试、真栈 full-loop 分支后端 1 passed×2、vitest 488/typecheck/admin-flow 6/主套件 68) | | P7 | 管理后台增强 | 用户列表 / 角色管理 UI(替代 CLI `user set-role`)+ 审计日志 | **完成**(server `ca24805` 0.12.0 / crearte `900f13a` 0.18.0,2026-09-30 合并推送。audit_log 表 0010 + 组中间件统一记录(owner 定稿:admin 路由收敛为组,Full-Path 模板入史,GET 也记,失败尝试照记,未遂 401/403 不记);用户列表/PATCH 角色/审计查询三端点;唯一 admin 降级 409 护栏 CLI/API 双覆盖;前端 /admin/users + /admin/audit 两页,降级确认双要点文案;本机六腿验收全绿:容器四连+fresh-DB `-count=1` 10 ok 零 FAIL 零 skip、废 token 端到端 401、护栏矩阵(非唯一降 OK/唯一降 CLI 拒+API 409)、审计流水含 409 失败尝试、真栈 full-loop 分支后端 1 passed×2、vitest 488/typecheck/admin-flow 6/主套件 68) |
| P8 | 长尾打包 | 权限开关 UI 全量(`inlineStyle/wasm/coop/fullscreen/gamepad`)、后端 triage 小项(`games.Detail` 400 细分、admin 路由 slug 校验、approve 同名竞态测试)、账号注销、静态兜底目录、CHANGELOG 模板文案 | **分批进行中**(第一批=②⑤①,2026-10-01 开工:server 0.14.0 / crearte 0.20.0;③账号注销为新功能待产品决策、④静态兜底按需,均不入第一批) | | P8 | 长尾打包 | 权限开关 UI 全量(`inlineStyle/wasm/coop/fullscreen/gamepad`)、后端 triage 小项(`games.Detail` 400 细分、admin 路由 slug 校验、approve 同名竞态测试)、账号注销、静态兜底目录、CHANGELOG 模板文案 | **第一批完成**(②⑤①,2026-10-01 合并推送:server `921443a` 0.14.0 / crearte `70ba10c` 0.20.0。容器四连+空库 `-count=1` 集成全绿(新竞态测试含,skip 守卫 0)+`-race` 竞态腿 PASS;curl 冒烟全中:detail 400 细分 user:/slug: 且双非法 user 优先、admin 四路非法 400 `invalid work id`、合法格式不存在仍 404;FE vitest 499/typecheck/admin-flow 7/主套件 70+1skip;双审 PASS(server PASS with notes—唯一 note 双非法优先级缺钉桩,已以 `ee5b960` 测试断言补上);deploy 零改动。**第二批余下=③账号注销(待产品决策)、④静态兜底目录(按需)**,CHANGELOG 头部去模板腔两仓已随第一批完成、wrapper 头部不在 spec 范围 |
## 排序理由 ## 排序理由
@@ -58,4 +58,4 @@
| P2 CI+测试基线 | `docs/specs/2026-09-30-ci-test-baseline-design.md` | `docs/plans/2026-09-30-ci-test-baseline.md`(已执行,2026-09-30) | | P2 CI+测试基线 | `docs/specs/2026-09-30-ci-test-baseline-design.md` | `docs/plans/2026-09-30-ci-test-baseline.md`(已执行,2026-09-30) |
| P3 备份+可观测 | `docs/specs/2026-09-30-backup-observability-design.md` | `docs/plans/2026-09-30-backup-observability.md` | | P3 备份+可观测 | `docs/specs/2026-09-30-backup-observability-design.md` | `docs/plans/2026-09-30-backup-observability.md` |
| P7 管理后台增强 | `docs/specs/2026-09-30-admin-console-design.md` | `docs/plans/2026-09-30-admin-console.md`(已执行,2026-09-30) | | P7 管理后台增强 | `docs/specs/2026-09-30-admin-console-design.md` | `docs/plans/2026-09-30-admin-console.md`(已执行,2026-09-30) |
| P8 长尾打包(第一批:②⑤①) | `docs/specs/2026-10-01-p8-long-tail-design.md` | `docs/plans/2026-10-01-p8-long-tail.md`(执行中,2026-10-01) | | P8 长尾打包(第一批:②⑤①) | `docs/specs/2026-10-01-p8-long-tail-design.md` | `docs/plans/2026-10-01-p8-long-tail.md`(第一批已执行,2026-10-01;第二批③④待启动) |