From 5385d723467dabc0e0df3200e78c1a4fc525140f Mon Sep 17 00:00:00 2001 From: wpdev Date: Fri, 31 Jul 2026 06:22:36 +0800 Subject: [PATCH] =?UTF-8?q?docs(plan):=20=E6=A8=99=E8=A8=98=E9=9A=8E?= =?UTF-8?q?=E6=AE=B5=205-7=20=E9=80=B2=E5=BA=A6=E3=80=81=E5=88=97=E5=87=BA?= =?UTF-8?q?=20follow-up=20=E8=88=87=20ABI=20=E8=AE=8A=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY --- PLAN.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/PLAN.md b/PLAN.md index afd4f7c..9c91116 100644 --- a/PLAN.md +++ b/PLAN.md @@ -207,11 +207,27 @@ | 2 | DDL 與並發 B1–B4(warm UNIQUE KEY → Zone_Cold save_patch → Zone_Warm increment) | ✅ 2026-07-31 | | 3 | 架構回填(Zone_Router + Routing_Predicate;13 個 Migration Phase 類別) | ✅ 2026-07-31 | | 4 | 相容層 E1–E7(雙向 hook 橋、57 個 AddOn alias、38 個 CLI 子指令、選單 slug) | ✅ 2026-07-31 | -| 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) | ⬜ | +| 5 | AddOn 同步 F1–F5(Standard_Post_Interceptor、HP detector v3.4.5、WC) | ✅ 2026-07-31 | +| 6 | 功能與診斷 PR-G(crypto 健檢、doctor_callback ABI、15 個 usermeta 欄位…) | ✅ 2026-07-31(**Settings 分區 AJAX 未做**,見下) | +| 7 | 全域清理與 CI(strict_types、phpcs.xml、phpstan + baseline、gitea workflows) | 🔶 部分(strict_types / PHPCS / PHPStan ✅;**CI workflow、ci-package.sh、39 個測試檔補齊、文件移植未做**) | | 退休 | 兩站台切到 B、移除 A、B 升 1.0.0 | ⬜ | +### 尚未完成(follow-up) + +1. **Settings 分區 AJAX 儲存**(A v3.0.2):`ajax_save_settings_section()` + 7 個 `save_section_*()` + `admin/assets/wpdo-settings.js`。B 目前是一次存全部的 inline `update_option` 巨塊,功能可用,屬 UX 改善。其中 `save_section_hp_transient` / `save_section_wc_term_count` 對應 AddOn 已移除的設定,移植時要拆掉或加 `class_exists` 守衛。 +2. **CI workflow**:`.gitea/workflows/{test,release,anti-eav-lint}.yml`(env 改 `TMDO_TEST_DB_*`、`WPDO_HOST` 指向 dev30、slug 改 `2meet-data-optimizer`、順手加 phpstan job、11 個 AddOn 的 matrix)。 +3. **`scripts/ci-package.sh`** 與 `dist/` 產出流程。 +4. **補 39 個測試檔**:核心優先 `HookBusIntegrationTest`、`TermCommentBackfillTest`;32 個 HivePress/WC 測試需先為兩個 AddOn 建 `phpunit.xml` + bootstrap。 +5. **文件移植**:`readme.txt`、`CONTEXT.md`、`docs/`(ENTITY_ADAPTER_COOKBOOK、INTEGRATION_PATTERN_DECISION、2 篇 ADR)。 +6. **實機驗證與退休切換**:兩站台目前仍跑 A(dev = v3.4.6、dev30 = v3.0.0),B 家族 12 個外掛全 inactive,尚未做過 `wp tmdo doctor` 實機驗證。 + +### ABI / 行為變更(升級須知) + +- `doctor_callback` 由 3 參數改為 1 參數(表名)——AddOn 若註冊過該 callback 需同步。 +- `wpdo_capture_before_value` 預設 `true` → `false`,每次受管寫入省一次 DB read;需要 `value_before` 的消費者(audit log)要 `add_filter( 'wpdo_capture_before_value', '__return_true' )`。 +- `wpdo_allow_mass_column_clear` 現為 opt-in:`delete_all=true` 的整欄清空預設被拒。 +- 選單 slug 由 `2meet-data-optimizer` 改回 `wp-data-optimizer`。 + ### Lessons learned(backport) - **階段 0 的初始 git 快照已包含階段 0 的修復**(composer.json / 兩個 bootstrap / phpunit.xml / HealthCronTest),不是純粹的 pre-change 現況。要看純現況請比對 A 或 `dist/` 內的 v0.1.0 ZIP。