Merge remote-tracking branch 'origin/main' into codex/p0-obs-002-20260715

# Conflicts:
#	apps/api/tests/test_asset_inventory_integrity_migration.py
This commit is contained in:
ogt
2026-07-15 02:51:22 +08:00
2 changed files with 11 additions and 5 deletions

View File

@@ -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

View File

@@ -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()