Merge remote-tracking branch 'origin/main' into copilot/feat-reconcile-unmanaged-position-durable-lifecycl
# Conflicts: # .proofline/criteria/ac-0029.md # .proofline/identities.json # tests/adapters/persistence/test_migration_and_drift.py Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
@@ -961,7 +961,15 @@ def _cmd_verify(args, cfg) -> int:
|
||||
c_slots: list[str] = []
|
||||
for sid in warn_store.list_warned():
|
||||
info = warn_store.get_warning_info(sid)
|
||||
if info and info.get("case_code") == "C":
|
||||
if not info:
|
||||
continue
|
||||
raw_codes = info.get("case_codes")
|
||||
if isinstance(raw_codes, list):
|
||||
case_codes = {str(code) for code in raw_codes if code}
|
||||
else:
|
||||
case_code = str(info.get("case_code", ""))
|
||||
case_codes = {case_code} if case_code else set()
|
||||
if "C" in case_codes:
|
||||
c_slots.append(info.get("portfolio_id", ""))
|
||||
target_pids = [p for p in c_slots if p]
|
||||
|
||||
@@ -1487,7 +1495,7 @@ def _cmd_ledger_backfill(args, cfg, confirm) -> int:
|
||||
_emit_pretty_json(report)
|
||||
return 1
|
||||
|
||||
outbox = PostgreSQLLedgerOutbox(cfg.dsn)
|
||||
outbox = PostgreSQLLedgerOutbox(cfg.dsn, instance_key=instance)
|
||||
if not cfg.portfolio_hub or not cfg.portfolio_hub.base_url:
|
||||
report["result"] = {"status": "rejected", "reason": "portfolio-hub ledger adapter is not configured"}
|
||||
report["audit_path"] = _write_ledger_backfill_audit(args, report)
|
||||
|
||||
@@ -192,7 +192,7 @@ class Daemon:
|
||||
instance_key=config.instance_key,
|
||||
)
|
||||
|
||||
self.outbox = PostgreSQLLedgerOutbox(config.dsn)
|
||||
self.outbox = PostgreSQLLedgerOutbox(config.dsn, instance_key=config.instance_key)
|
||||
self.ledger_skip_store = PostgreSQLLedgerSkipStore(config.dsn)
|
||||
# BAT-008: portfolio-hub read + snapshot store + durable pause + scheduler.
|
||||
# (Created before the ledger writer so option-D write-back can target it.)
|
||||
@@ -200,7 +200,7 @@ class Daemon:
|
||||
# BAT-010/011: per-slot watchdog (snapshot RPC writer, safety-sell reader).
|
||||
self.watchdog = WatchdogStore()
|
||||
self.pause_store = PostgreSQLPauseStore(config.dsn)
|
||||
# BAT-050 / REQ-102: durable reconcile-warning store (slot_id PK).
|
||||
# BAT-050 / REQ-102: durable reconcile-warning store ((slot_id, case_code) PK).
|
||||
self.warn_store = PostgreSQLReconcileWarningStore(config.dsn)
|
||||
# req-0007 / ac-0024: durable reconcile notification deduplication store.
|
||||
self.notification_store = PostgreSQLReconcileNotificationStore(config.dsn)
|
||||
|
||||
Reference in New Issue
Block a user