新增市場情報 AI summary persistence writer preflight
All checks were successful
CD Pipeline / deploy (push) Successful in 1m3s

This commit is contained in:
OoO
2026-05-19 23:39:35 +08:00
parent 91601da3f8
commit 809bcbbf67
11 changed files with 1059 additions and 101 deletions

View File

@@ -210,6 +210,7 @@ EwoooC 目前已有 MOMO EDM / 節慶活動資料、`promo_products`、PChome
- 2026-05-19 追加 candidate queue review AI summary output receipt`services.market_intel.candidate_queue_review_ai_summary_output_receipt``/api/market_intel/manual_sample_review/candidate_queue_review_ai_summary_output_receipt` 在 run package 後驗收人工 Ollama 摘要輸出的 schema、`evidence_refs``model_route`。此 receipt gate 不產生 AI 摘要API/UI 不呼叫 LLM、不派送 Telegram、不寫檔、不讀 approval token、不執行 CLI、不更新 `review_state`、不寫 DB、不 commit、不掛 scheduler摘要持久化與 Telegram 派送必須另開後續 gate。
- 2026-05-19 追加 candidate queue review AI summary persistence preflight`services.market_intel.candidate_queue_review_ai_summary_persistence_preflight``/api/market_intel/manual_sample_review/candidate_queue_review_ai_summary_persistence_preflight` 在 output receipt 後整理未來 CLI-only `market_alert_review_queue.metadata_json.ai_summary_review` persistence contract、payload hash 與 metadata patch preview。此 preflight 不產生 transaction、不寫 summary record、不寫 `metadata_json`、不呼叫 LLM、不派送 Telegram、不讀 approval token、不執行 CLI、不更新 `review_state`、不寫 DB、不 commit、不掛 scheduler真正持久化與 Telegram dispatch 必須另開後續 gate。
- 2026-05-19 追加 candidate queue review AI summary persistence transaction`services.market_intel.candidate_queue_review_ai_summary_persistence_transaction``/api/market_intel/manual_sample_review/candidate_queue_review_ai_summary_persistence_transaction` 在 persistence preflight 後產生未來 CLI-only `metadata_json` UPDATE statement preview、parameter preview 與 rollback plan。此 transaction gate 不開 DB、不執行 SQL、不寫 transaction、不寫 summary record、不寫 `metadata_json`、不讀 approval token、不執行 CLI、不更新 `review_state`、不派送 Telegram、不呼叫 LLM、不 commit、不掛 scheduler真正寫入必須另開 CLI writer gate 與 post-write smoke。
- 2026-05-19 追加 candidate queue review AI summary persistence writer preflight`services.market_intel.candidate_queue_review_ai_summary_persistence_writer_preflight``/api/market_intel/manual_sample_review/candidate_queue_review_ai_summary_persistence_writer_preflight` 在 transaction preview 後檢查 CLI-only writer contract、`metadata_json` backup requirement、post-write smoke requirement 與 artifact path gate。此 writer preflight 不開 DB、不執行 SQL、不寫 preflight、不寫 summary record、不寫 `metadata_json`、不讀 approval token、不執行 CLI、不更新 `review_state`、不派送 Telegram、不呼叫 LLM、不 commit、不掛 scheduler真正寫入必須另開 CLI run package、operator readiness、receipt 與 post-write smoke。
### Phase 4Coupang / Shopee Adapter

View File

@@ -16,6 +16,7 @@
- 2026-05-19 追記:同步背景 V10.276 ElephantAlpha 更新後的 `services/elephant_alpha_autonomous_engine.py` 行數;此處只更新 inventory不變更 AI engine 行為。
- 2026-05-19 追記:同步背景 V10.281/V10.282 dashboard 與 Code Review pipeline 更新後的行數;此處只更新 inventory不變更 dashboard 或 code review 行為。
- 2026-05-19 追記:同步背景 PChome identity 價格刷新與競品風險查詢更新後的 `services/competitor_price_feeder.py` 行數;此處只更新 inventory不變更 feeder 行為。
- 2026-05-19 追記:同步背景 Telegram 模板擴充後的 `services/telegram_templates.py` 行數;此處只更新 inventory不變更 Telegram 格式化行為。
## 達到或超過 800 行檔案清單
@@ -40,6 +41,7 @@
| 966 | `services/trend_crawler.py` | P2 crawler service | source adapters / parser / persistence |
| 942 | `services/learning_pipeline.py` | P2 RAG learning pipeline | distiller / promotion gate / persistence / telemetry |
| 940 | `services/import_service.py` | P2 import service | validators / import writers / report builders |
| 933 | `services/telegram_templates.py` | P2 Telegram templates | alert template groups / channel-specific formatting / reusable render helpers |
| 867 | `services/token_report_service.py` | P2 token report service | query / aggregation / chart payload / notification formatting |
| 865 | `routes/daily_sales_routes.py` | P2 Daily Sales Blueprint | route glue / export helpers / daily query and formatting service |
| 844 | `services/ollama_service.py` | P2 Ollama client | host health / request client / fallback policy / response parsing |