fix(reconcile): symbol을 슬롯 생성 시 함께 저장 + NULL 슬롯 backfill
reconcile_universe 시그니처를 set[str] → dict[str, str] (portfolio_id→symbol)로 변경. 기존 symbol=NULL 슬롯은 다음 reconcile 실행 시 자동 backfill. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ def _seed(dsn):
|
||||
"""Create asset slots + drive one into holding so there are rows to wipe."""
|
||||
repo = PostgreSQLSlotRepository(dsn)
|
||||
svc = SlotService(repo, instance_key=INST)
|
||||
repo.reconcile_universe(INST, {"pf-a", "pf-b"})
|
||||
repo.reconcile_universe(INST, {"pf-a": "SYM", "pf-b": "SYM"})
|
||||
s = repo.find_slot_by_portfolio(INST, "pf-a")
|
||||
svc.transit_slot(s.slot_id, SlotState.INACTIVE, SlotState.PENDING_BUY,
|
||||
reason="r", actor="t", symbol="005930", qty=10)
|
||||
@@ -70,7 +70,7 @@ def test_reset_usable_for_admission_after_wipe(pg_clean):
|
||||
run_reset(pg_clean, dry_run=False)
|
||||
repo = PostgreSQLSlotRepository(pg_clean)
|
||||
svc = SlotService(repo, instance_key=INST)
|
||||
repo.reconcile_universe(INST, {"pf-x"})
|
||||
repo.reconcile_universe(INST, {"pf-x": "SYM"})
|
||||
s = repo.find_slot_by_portfolio(INST, "pf-x")
|
||||
assert s.status is SlotState.INACTIVE
|
||||
svc.transit_slot(s.slot_id, SlotState.INACTIVE, SlotState.PENDING_BUY,
|
||||
|
||||
Reference in New Issue
Block a user