fix(api): fallback log dispatch ledger operation
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 23s
CD Pipeline / build-and-deploy (push) Successful in 8m52s
CD Pipeline / post-deploy-checks (push) Successful in 1m0s

This commit is contained in:
Your Name
2026-06-30 01:09:48 +08:00
parent 88145ea07c
commit 6d0d9641bd
4 changed files with 114 additions and 27 deletions

View File

@@ -55,6 +55,16 @@ def _assert_log_controlled_writeback_executor(payload: dict):
def test_runtime_receipt_auxiliary_sql_keeps_source_family_counts_schema_safe():
from src.services.ai_agent_autonomous_runtime_control import (
_RUNTIME_OPERATION_COUNTS_SQL,
_RUNTIME_OPERATION_LATEST_SQL,
)
assert "semantic_operation_type" in _RUNTIME_OPERATION_COUNTS_SQL
assert "km_linked" in _RUNTIME_OPERATION_COUNTS_SQL
assert "log_controlled_writeback_dispatched" in _RUNTIME_OPERATION_COUNTS_SQL
assert "semantic_operation_type" in _RUNTIME_OPERATION_LATEST_SQL
assert "km_linked" in _RUNTIME_OPERATION_LATEST_SQL
assert "GROUP BY coalesce(status, 'unknown')" in _RUNTIME_TIMELINE_COUNTS_SQL
assert "FROM timeline_events" in _RUNTIME_TIMELINE_COUNTS_SQL
assert "count(*) AS total" in _RUNTIME_PLAYBOOK_TRUST_COUNTS_FALLBACK_SQL