diff --git a/docs/memory/claude_inventory_validation_20260513.md b/docs/memory/claude_inventory_validation_20260513.md index e286f63..67e862e 100644 --- a/docs/memory/claude_inventory_validation_20260513.md +++ b/docs/memory/claude_inventory_validation_20260513.md @@ -50,6 +50,7 @@ - `mcp_calls.status` CHECK 已接受 `ok/error/timeout/rate_limited/cache_only`,與 `services/mcp_router.py` 的細分狀態一致。 - DB migration / ORM 覆蓋已有 `tests/test_migration_metadata_coverage.py` 守門,`Base.metadata.tables - migrations CREATE TABLE` 必須為空;`tests/test_ai_observability_models.py` 也鎖住 v5 observability ORM stub。 - V2 BLOCKED migration 守門已補:`031-037` 必須存在且 group/world-readable,`database/momo.db` / `momo_data.db` / `momo_database.db` 迷惑檔不得回來。 +- `host_health_probes.chk_host_label_029` 不一致已有 migration 033 修補並補測試:必須重建 CHECK,且接受 `GCP-SSD`、`GCP-SSD-2`、`111 備援` 與兩個 110 Nginx proxy runtime labels。 - `incidents` 雙欄相容與 `action_plans` source/status guardrails 已在 migration 036/037 與 `tests/test_auto_heal_safety.py` 覆蓋。 - `services/agent_actions.py` 不是死碼:`services/event_router.py` 透過 `SAFE_ACTIONS` registry 動態執行 ADR-012 L2 actions,`tests/test_agent_actions.py` 與 `tests/test_event_router.py` 已覆蓋並通過。 diff --git a/tests/test_migration_metadata_coverage.py b/tests/test_migration_metadata_coverage.py index 6ddb0fc..3aa35ee 100644 --- a/tests/test_migration_metadata_coverage.py +++ b/tests/test_migration_metadata_coverage.py @@ -47,6 +47,24 @@ def test_v2_blocker_migrations_exist_and_are_runner_readable(): assert mode & stat.S_IROTH, f"{filename} is not world-readable" +def test_host_health_probe_label_check_accepts_runtime_labels(): + migration = (ROOT / "migrations" / "033_fix_host_health_probe_labels.sql").read_text(encoding="utf-8") + + assert "DROP CONSTRAINT IF EXISTS chk_host_label_029" in migration + assert "ADD CONSTRAINT chk_host_label_029" in migration + assert "NOT VALID" in migration + + expected_runtime_labels = [ + "GCP-SSD", + "GCP-SSD-2", + "111 備援", + "GCP-SSD(via Nginx 110)", + "GCP-SSD-2(via Nginx 110)", + ] + for label in expected_runtime_labels: + assert f"'{label}'" in migration + + def test_legacy_zero_byte_database_decoys_do_not_return(): for filename in ["momo.db", "momo_data.db", "momo_database.db"]: assert not (ROOT / "database" / filename).exists()