docs(plan): 標記階段 1-2 完成並記錄 lessons learned
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
@@ -203,8 +203,8 @@
|
|||||||
| 階段 | 內容 | 狀態 |
|
| 階段 | 內容 | 狀態 |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| 0 | 回歸網:composer dev 依賴、test bootstrap FSM guard、`failOnWarning=true`、12 個 repo `git init` | ✅ 2026-07-31(unit 379 / integration 398 全綠) |
|
| 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…) | ⬜ |
|
| 1 | 安全與正確性 A1–A14(13 個 admin GET→POST、REST allowlist、DDL 白名單、Logger 3-arity fatal…) | ✅ 2026-07-31 |
|
||||||
| 2 | DDL 與並發 B1–B4(warm UNIQUE KEY → Zone_Cold save_patch → Zone_Warm increment) | ⬜ |
|
| 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 類別) | ⬜ |
|
| 3 | 架構回填(Zone_Router + Routing_Predicate;13 個 Migration Phase 類別) | ⬜ |
|
||||||
| 4 | 相容層 E1–E7(雙向 hook 橋、67 個 AddOn alias、38 個 CLI 子指令、選單 slug redirect) | ⬜ |
|
| 4 | 相容層 E1–E7(雙向 hook 橋、67 個 AddOn alias、38 個 CLI 子指令、選單 slug redirect) | ⬜ |
|
||||||
| 5 | AddOn 同步 F1–F5(Standard_Post_Interceptor、HP detector v3.4.5、WC) | ⬜ |
|
| 5 | AddOn 同步 F1–F5(Standard_Post_Interceptor、HP detector v3.4.5、WC) | ⬜ |
|
||||||
@@ -218,6 +218,11 @@
|
|||||||
- `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 要刪掉重複的那一份。
|
- `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 踩過同一個坑)。
|
- `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`。
|
- integration 測試需要 `TMDO_TEST_DB_PASS`(或 `WPDO_TEST_DB_PASS`)環境變數,DB 為本機 `wp_wpdo_test`。
|
||||||
|
- **A 不是照抄對象,有兩處自身缺陷不可照搬**:
|
||||||
|
1. `A/includes/engine/class-wpdo-hook-bus.php:511,522` 傳 3 個 string 給 `Logger::warning( string $event, array $context )` → A 有 `strict_types`,mass-clear 路徑必炸。B 用正確簽章。
|
||||||
|
2. `A/admin/class-wpdo-dashboard-widget.php:191` 的 `wpdo_postmeta_cleanup` 仍是 `wp_nonce_url` GET 連結,但其 handler 已只收 POST → 該按鈕在 A 是壞的。B 改成 form。
|
||||||
|
- B 有 7 處 `Logger::error( 'event', array(...) )` 兩參數呼叫(4 個 stress tester、auto-promoter、conflict-detector、hook-bus),全部是 array→string 的 TypeError。用 token 掃描器(`scan_logger.php`)找出來的,肉眼與 grep 都容易漏。
|
||||||
|
- `Zone_Warm::set()` 改 upsert 後,**測試表也要有 `UNIQUE KEY ui_post_meta`**,否則 integration 會出現「set 沒覆蓋舊值」的假失敗。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user