fix: fence ledger outbox claims by instance

This commit is contained in:
Hermes Agent
2026-09-13 09:41:51 +09:00
parent f801c53e0c
commit 762a953c95
15 changed files with 316 additions and 88 deletions
@@ -22,7 +22,7 @@ def _wire(transport):
svc = SlotService(repo)
intents = IntentService(svc, repo, InMemoryIntentStore(),
resolve_symbol=lambda pid: "005930")
outbox = InMemoryLedgerOutbox()
outbox = InMemoryLedgerOutbox(instance_key="test-instance")
ledger = InMemoryLedger()
writer = LedgerWriter(outbox, ledger)
repo.reconcile_universe("default", {"PF-1": "SYM"})
@@ -203,7 +203,7 @@ def test_sell_fill_dlq_sentinel_absent_when_strategy_id_set():
intents = IntentService(svc, repo, InMemoryIntentStore(),
resolve_symbol=lambda pid: "005930")
from trex_core.application.ledger_outbox import InMemoryLedgerOutbox
outbox = InMemoryLedgerOutbox()
outbox = InMemoryLedgerOutbox(instance_key="test-instance")
execution = ExecutionService(svc, repo, PaperBroker(fill_after_polls=0),
ledger_outbox=outbox, event_emitter=emitter)
repo.reconcile_universe("default", {"PF-1": "SYM"})