新增市場情報 DB catalog 判讀
All checks were successful
CD Pipeline / deploy (push) Successful in 1m4s

This commit is contained in:
OoO
2026-05-18 20:18:03 +08:00
parent 9a88b32e90
commit 36e20216ed
9 changed files with 684 additions and 25 deletions

View File

@@ -169,6 +169,7 @@ EwoooC 目前已有 MOMO EDM / 節慶活動資料、`promo_products`、PChome
- 2026-05-18 追加 alert review queue contract`/api/market_intel/opportunity_alert_plan` 補上 `market_alert_review_queue` 的 preview contract、required / audit / forbidden fields、priority lanes 與索引規劃。此階段只定義資料契約,不建立 review table、不寫 queue contract、不執行審核、不派送 Telegram、不呼叫 LLM。
- 2026-05-18 追加 alert review queue migration blueprint`market_alert_review_queue` 納入 `database/market_intel_models.py``migrations/032_market_intel_core_schema.sql` 與 migration blueprint補齊 additive CREATE TABLE / index / grant / rollback draft。此階段仍不執行 migration、不連 DB、不建立 review queue、不寫入審核資料。
- 2026-05-18 追加 migration apply drill preview`services.market_intel.migration_drill``/api/market_intel/migration_apply_drill` 集中正式 migration 前的只讀 schema probe、platform seed diff、人工套用清單、post-apply smoke、回滾演練與風險清單。預設 `execute=false` 不連 DB人工 smoke 可用 `execute=true` 觸發只讀 catalog / seed diff probe但仍不執行 psql、不跑 rollback、不寫 DB、不重啟容器、不掛 scheduler。
- 2026-05-18 追加 migration catalog review preview`services.market_intel.migration_catalog_review``/api/market_intel/migration_catalog_review` 將 schema_db_probe 與 platform_seed_db_diff 的只讀結果歸納為 `planned_no_probe` / `not_applied` / `partial_schema` / `already_applied` / `probe_error`,並輸出 risk level、apply path、finding 與下一步。預設 `execute=false` 不連 DB`execute=true` 仍只查 catalog / seed diff不執行 psql、不寫 DB、不跑 rollback、不掛 scheduler。
### Phase 4Coupang / Shopee Adapter