diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml index 4d22dd70d..d1c042925 100644 --- a/.gitea/workflows/cd.yaml +++ b/.gitea/workflows/cd.yaml @@ -2265,6 +2265,8 @@ jobs: asyncio.run(main()) PY + # 2026-03-31 ogt: 移除中間通知 + # MCP version discovery must have a durable receipt store before the # signal worker starts its first six-hour lifecycle run. Apply the # additive RLS schema, then verify both schema policy and runtime-role @@ -2385,8 +2387,6 @@ jobs: asyncio.run(main()) PY - # 2026-03-31 ogt: 移除中間通知 - # 2026-03-31 ogt: P0-1 Secrets 自動注入 (ADR-035 強制) # 2026-03-31 ogt: 加入 AI API Keys (修復 mock_fallback 問題) - name: Inject K8s Secrets diff --git a/apps/api/tests/test_ai_agent_autonomous_runtime_control.py b/apps/api/tests/test_ai_agent_autonomous_runtime_control.py index e2baa3fc1..6d3b970d1 100644 --- a/apps/api/tests/test_ai_agent_autonomous_runtime_control.py +++ b/apps/api/tests/test_ai_agent_autonomous_runtime_control.py @@ -1073,11 +1073,14 @@ async def test_live_runtime_receipt_readback_uses_last_verified_cache_when_db_de try: first = await runtime_control_module.load_ai_agent_autonomous_runtime_receipt_readback() cache_key = ("awoooi", 24, 20) + cache_expiry_age_seconds = ( + runtime_control_module._RUNTIME_RECEIPT_READBACK_CACHE_TTL_SECONDS + 1.0 + ) stored_at, cached_readback = ( runtime_control_module._runtime_receipt_readback_cache[cache_key] ) runtime_control_module._runtime_receipt_readback_cache[cache_key] = ( - stored_at - 21.0, + stored_at - cache_expiry_age_seconds, cached_readback, ) second = await runtime_control_module.load_ai_agent_autonomous_runtime_receipt_readback() @@ -1094,7 +1097,7 @@ async def test_live_runtime_receipt_readback_uses_last_verified_cache_when_db_de assert fallback["reason"] == "live_runtime_receipt_readback_degraded" assert fallback["live_db_read_status"] == "unavailable" assert fallback["live_error_type"] == "RuntimeReceiptDbContextTimeout" - assert fallback["cache_age_seconds"] >= 21.0 + assert fallback["cache_age_seconds"] >= cache_expiry_age_seconds assert fallback["max_stale_seconds"] == 300.0 assert fallback["source"] == "in_process_last_verified_db_receipt_readback" assert fallback["durable_receipts_reused"] is True @@ -1154,11 +1157,14 @@ async def test_live_runtime_receipt_preserves_identity_partial_when_db_unavailab try: first = await runtime_control_module.load_ai_agent_autonomous_runtime_receipt_readback() cache_key = ("awoooi", 24, 20) + cache_expiry_age_seconds = ( + runtime_control_module._RUNTIME_RECEIPT_READBACK_CACHE_TTL_SECONDS + 1.0 + ) stored_at, cached_readback = ( runtime_control_module._runtime_receipt_readback_cache[cache_key] ) runtime_control_module._runtime_receipt_readback_cache[cache_key] = ( - stored_at - 21.0, + stored_at - cache_expiry_age_seconds, cached_readback, ) second = await runtime_control_module.load_ai_agent_autonomous_runtime_receipt_readback()