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.
本文档参考了 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
### Done / 完成