修正供應鏈風險資料處理:分析狀態、去重、排程與保存一致性 - #16
Draft
wweyuiop1205-lgtm wants to merge 5 commits into
Draft
wweyuiop1205-lgtm wants to merge 5 commits into
wweyuiop1205-lgtm wants to merge 5 commits into
Conversation
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI 分析失敗原本可能被保存成「相關、延遲 7 天」,重複新聞與不一致的地區判斷也會影響熱圖與後續分析。本 PR 分離原始新聞與分析狀態,讓失敗、未知與零值各自保留正確意義,並統一分析、審核及保存流程。
此 PR 維持 Draft,等待組員 L1~L3 成果比對與整合,暫不合併或部署。
修改範圍
另加入隔離啟動與一次性真實新聞驗收入口,修正 GNews 搜尋條件及小寫國家代碼。原始新聞、測試資料庫、金鑰與本機驗收快照不包含於 PR。
驗證
b258d44,Windows/Python 3.12.3:完整 pytest 388 passed in 27.41s;其後此批新增為文件整理。git diff --check通過。ERP_DB_PATH,封鎖後續外部連線,不呼叫付費模型、不發送真實通知、不啟動正式背景排程。7538a41,Ubuntu/Python 3.11):388 passed in 13.75s,pytest CI 通過,包含 POSIX 環境的鎖定測試。資料與行為注意事項
legacy_unverified。舊資料曾被覆寫的原文無法自動還原,正式資料遷移尚未驗收。scripts/accept_live_news.py --source gnews --env-file <本機設定路徑>,每次建立獨立驗收資料夾。審查入口
主要審查檔案:
backend/news_store.py、risk_validation.py、region_matching.py、scheduler.py、supply_chain_news.py、supply_chain_risk.py,以及frontend/components/risk_dashboard.py、supply_map.py。