From e8987fafa81eaa76051d6f6ce4d55680fe125f84 Mon Sep 17 00:00:00 2001 From: wpdev Date: Fri, 31 Jul 2026 05:07:58 +0800 Subject: [PATCH] =?UTF-8?q?docs(plan):=20=E8=A8=98=E9=8C=84=20backport=20v?= =?UTF-8?q?3.0.1-v3.4.6=20=E7=9A=84=208=20=E9=9A=8E=E6=AE=B5=E8=A6=8F?= =?UTF-8?q?=E5=8A=83=E8=88=87=E9=9A=8E=E6=AE=B5=200=20=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 階段 0(回歸網)已完成:composer dev 依賴齊備、兩個 test bootstrap 補 TMDO_FSM_GUARD_DISABLED、phpunit.xml failOnWarning=true、HealthCronTest 的 SHOW TABLES/INFORMATION_SCHEMA mock 對齊 A v3.2.0。 unit 379 tests / 778 assertions GREEN integration 398 tests / 1139 assertions GREEN Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY --- PLAN.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/PLAN.md b/PLAN.md index 1c4eeb3..0cd9e18 100644 --- a/PLAN.md +++ b/PLAN.md @@ -194,6 +194,33 @@ --- +## Backport wp-data-optimizer v3.0.1–v3.4.6(2026-07-31 起) + +完整計畫:`~/.claude/plans/a-data-www-studio-wp-local-dev-wp-conten-imperative-wind.md` + +背景:B 分叉自 A **v3.0.0**(2026-05-15 11:40),A 其後又走了 92 個 commit 到 v3.4.6,無一回流。目標是全量對齊後讓 `wp-data-optimizer` 退休。 + +| 階段 | 內容 | 狀態 | +|---|---|---| +| 0 | 回歸網:composer dev 依賴、test bootstrap FSM guard、`failOnWarning=true`、12 個 repo `git init` | ✅ 2026-07-31(unit 379 / integration 398 全綠) | +| 1 | 安全與正確性 A1–A14(13 個 admin GET→POST、REST allowlist、DDL 白名單、Logger 3-arity fatal…) | ⬜ | +| 2 | DDL 與並發 B1–B4(warm UNIQUE KEY → Zone_Cold save_patch → Zone_Warm increment) | ⬜ | +| 3 | 架構回填(Zone_Router + Routing_Predicate;13 個 Migration Phase 類別) | ⬜ | +| 4 | 相容層 E1–E7(雙向 hook 橋、67 個 AddOn alias、38 個 CLI 子指令、選單 slug redirect) | ⬜ | +| 5 | AddOn 同步 F1–F5(Standard_Post_Interceptor、HP detector v3.4.5、WC) | ⬜ | +| 6 | 功能與診斷 PR-G(crypto 健檢、doctor_callback ABI、15 個 usermeta 欄位…) | ⬜ | +| 7 | 全域清理與 CI(strict_types、phpcs.xml、phpstan + baseline、gitea workflows) | ⬜ | +| 退休 | 兩站台切到 B、移除 A、B 升 1.0.0 | ⬜ | + +### Lessons learned(backport) + +- **階段 0 的初始 git 快照已包含階段 0 的修復**(composer.json / 兩個 bootstrap / phpunit.xml / HealthCronTest),不是純粹的 pre-change 現況。要看純現況請比對 A 或 `dist/` 內的 v0.1.0 ZIP。 +- `composer update` 後 autoload 出現 `WPDO_Entity_Adapter_Interface` 三重宣告警告(`includes/adapters/interface-entity-adapter.php`、`back-compat/interface-wpdo-entity-adapter-alias.php`、`back-compat/trait-wpdo-anti-eav-aware-alias.php`)→ 階段 4 E2 要刪掉重複的那一份。 +- `TMDO_FSM_GUARD_DISABLED` 兩個 test bootstrap 原本都沒 define,但 `class-tmdo-feature-flags.php:128` 會檢查它 → 強制 FSM 轉換的測試會被 guard 擋掉(A 在 v3.4.6 踩過同一個坑)。 +- integration 測試需要 `TMDO_TEST_DB_PASS`(或 `WPDO_TEST_DB_PASS`)環境變數,DB 為本機 `wp_wpdo_test`。 + +--- + ## Git tag plan - `v0.1.0` — 本 release(Phase 0-4 完成)