diff --git a/config.py b/config.py index 0b16188..932a7dd 100644 --- a/config.py +++ b/config.py @@ -402,7 +402,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '') # ========================================== # 系統版本與路徑 # ========================================== -SYSTEM_VERSION = "V10.777" +SYSTEM_VERSION = "V10.778" LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log') public_url = PUBLIC_URL # 用於模板顯示 diff --git a/docs/AI_INTELLIGENCE_MODULE_SOT.md b/docs/AI_INTELLIGENCE_MODULE_SOT.md index 9a5795d..210608d 100644 --- a/docs/AI_INTELLIGENCE_MODULE_SOT.md +++ b/docs/AI_INTELLIGENCE_MODULE_SOT.md @@ -2,7 +2,7 @@ > **最後更新**: 2026-07-11 (台北時間) > **狀態**: 🟠 Partial。四 Agent、PixelRAG、MCP/RAG registry、PChome controlled-preview families 與多項 smoke/readback 已建立;但 access control、database identity/RBAC、full asset reconciliation、software supply chain、same-run controlled apply、restore drill、internal RAG canary 與 MCP/RAG runtime closure 尚未全部完成。任何局部 receipt 不得代表整體閉環完成。 -> **適用版本**: V10.777 +> **適用版本**: V10.778 --- diff --git a/run_scheduler.py b/run_scheduler.py index 8d103b9..7328dfc 100644 --- a/run_scheduler.py +++ b/run_scheduler.py @@ -28,6 +28,7 @@ import schedule # 匯入全部排程任務函式 from scheduler import ( + _save_stats, run_momo_task, run_edm_task, run_festival_task, diff --git a/tests/test_codebase_modularization_performance_service.py b/tests/test_codebase_modularization_performance_service.py index 9ecbd9b..62f9973 100644 --- a/tests/test_codebase_modularization_performance_service.py +++ b/tests/test_codebase_modularization_performance_service.py @@ -59,3 +59,23 @@ def test_scheduler_owns_daily_inventory_runtime(): assert 'day.at("04:15").do(run_codebase_modularization_performance_task)' in source assert '_save_stats("codebase_modularization_performance", payload)' in source + + +def test_scheduler_inventory_task_persists_completed_terminal_status(monkeypatch, tmp_path): + import run_scheduler + + receipt_path = tmp_path / "latest.json" + saved = [] + monkeypatch.setenv("CODEBASE_INVENTORY_RECEIPT_PATH", str(receipt_path)) + monkeypatch.setattr( + run_scheduler, + "_save_stats", + lambda task_name, payload: saved.append((task_name, payload)), + ) + + result = run_scheduler.run_codebase_modularization_performance_task() + + assert result["status"] == "completed" + assert result["receipt_path"] == str(receipt_path) + assert saved == [("codebase_modularization_performance", result)] + assert receipt_path.exists()