fix: preserve sell event routing owner

This commit is contained in:
Hermes Agent
2026-09-20 20:34:00 +09:00
parent 3f6a967aa1
commit c66acf6e47
20 changed files with 766 additions and 32 deletions
+2 -1
View File
@@ -34,7 +34,7 @@ def _holding_slot(service, repo):
slot = _inactive_slot(repo)
pending = service.transit_slot(
slot.slot_id, SlotState.INACTIVE, SlotState.PENDING_BUY,
reason="buy", actor="test", symbol="005930",
reason="buy", actor="test", symbol="005930", strategy_id="BUY-A",
)
return service.transit_slot(
pending.slot_id, SlotState.PENDING_BUY, SlotState.HOLDING,
@@ -49,6 +49,7 @@ class TestSell:
service.sell(holding.slot_id, actor="safety-sell", reason="stop_loss")
updated = repo.fetch_slot(holding.slot_id)
assert updated.status is SlotState.PENDING_SELL
assert updated.sell_strategy_id == "BUY-A"
def test_sell_records_transition_log(self, service, repo):
"""sell() appends a transition log entry."""