fix strategy state persistence corrections

This commit is contained in:
Hermes Agent
2026-08-29 16:11:02 +09:00
parent 4699de61cc
commit 3854aabd0d
11 changed files with 190 additions and 85 deletions
+3 -4
View File
@@ -182,13 +182,12 @@ class Daemon:
# Persistence + services
self.slot_repo = PostgreSQLSlotRepository(config.dsn)
self.intent_store = PostgreSQLIntentStore(config.dsn)
# dcy-028 / REQ-079·081 (BAT-042): opaque strategy-state store. Injected
# into the slot service so close (→INACTIVE) deletes the slot's state.
# dcy-028 / REQ-079·081 (BAT-042): opaque strategy-state store persists
# independently of slot occupancy and is shared by both RPC handlers.
self.strategy_state_store = PgStrategyStateStore(config.dsn)
self.slot_service = SlotService(
self.slot_repo,
instance_key=config.instance_key,
strategy_state_store=self.strategy_state_store,
)
self.outbox = PostgreSQLLedgerOutbox(config.dsn)
@@ -458,7 +457,7 @@ class Daemon:
topology.slots_queue(self.config.instance_key), handler, self.stop)
def _strategy_state_set_loop(self) -> None:
# dcy-028 / REQ-080: opaque strategy-state write RPC (occupancy_seq+version CAS).
# dcy-028 / REQ-080: opaque strategy-state write RPC (entry-version CAS).
transport = _build_transport(self.config)
self._transports.append(transport)
try: