AC-0023: filter C-case quantity mismatch slots from strategy RPC, fail-closed on warn_store failure, symbol-aggregate verify clear

Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-08-25 13:17:06 +00:00
committed by GitHub
co-authored by genichin
parent d9205fe151
commit 1179bdfe23
8 changed files with 666 additions and 13 deletions
@@ -68,6 +68,16 @@ class PostgreSQLReconcileWarningStore:
cur.execute("SELECT slot_id FROM slot_reconcile_warning")
return {row[0] for row in cur.fetchall()}
def list_c_case_warned(self) -> set[str]:
"""Return slot_id strings with an active case_code='C' warning (AC-0023)."""
with self._psycopg.connect(self._dsn) as conn:
with conn.cursor() as cur:
cur.execute(
"SELECT slot_id FROM slot_reconcile_warning WHERE case_code = %s",
("C",),
)
return {row[0] for row in cur.fetchall()}
def get_warning_info(self, slot_id: str) -> dict | None:
"""Return {"portfolio_id", "case_code", "actor", "reason"} or None (REQ-105/106)."""
with self._psycopg.connect(self._dsn) as conn: