fix(ai): keep verifier readback within query budget
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 1m5s
CD Pipeline / build-and-deploy (push) Successful in 6m36s
CD Pipeline / post-deploy-checks (push) Successful in 1m46s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 1s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 49s

This commit is contained in:
ogt
2026-07-11 06:55:20 +08:00
parent 355467c431
commit 653e58179e
2 changed files with 9 additions and 2 deletions

View File

@@ -7178,7 +7178,9 @@ _RUNTIME_VERIFIER_LATEST_SQL = """
evidence.collected_at
FROM incident_evidence evidence
LEFT JOIN automation_operation_log apply
ON apply.op_id::text = evidence.post_execution_state ->> 'apply_op_id'
ON apply.op_id = CAST(
evidence.post_execution_state ->> 'apply_op_id' AS uuid
)
WHERE evidence.post_execution_state ->> 'apply_op_id' IS NOT NULL
ORDER BY evidence.collected_at DESC
LIMIT :limit
@@ -7221,7 +7223,9 @@ _RUNTIME_VERIFIER_LATEST_DIRECT_SQL = """
evidence.collected_at
FROM incident_evidence evidence
LEFT JOIN automation_operation_log apply
ON apply.op_id::text = evidence.post_execution_state ->> 'apply_op_id'
ON apply.op_id = CAST(
evidence.post_execution_state ->> 'apply_op_id' AS uuid
)
WHERE evidence.post_execution_state ->> 'apply_op_id' IS NOT NULL
ORDER BY evidence.collected_at DESC
LIMIT $1

View File

@@ -1102,6 +1102,9 @@ def test_runtime_receipt_auxiliary_sql_keeps_source_family_counts_schema_safe():
assert "raw_output_stored" in sql
assert "independent_post_verifier_passed" in sql
assert "LEFT JOIN automation_operation_log apply" in sql
assert "apply.op_id::text" not in sql
assert "apply.op_id = CAST(" in sql
assert "AS uuid" in sql
assert "automation_run_id" in runtime_control_module._RUNTIME_KM_LATEST_SQL
assert "automation_run_id" in _RUNTIME_TELEGRAM_LATEST_SQL
for operation_type in (