| chain = ChainHarness(monkeypatch=<_pytest.monkeypatch.MonkeyPatch object at 0x11fd3fbf0>, broker=<tests.services.signal_to_bro..._ENTRY_SPREAD_AWARE=True, COMBINED_ENGINE_EXECUTE=True, COMBINED_ENGINE_LIVE_ACCOUNTS=['yuchao']), _cursor_ready=False)
|
|
|
| def test_day_c_fault_day(chain):
|
| h = chain
|
| drv = h.periodic_driver(ROC_LEVEL)
|
|
|
| # bootstrap the cursor (empty backlog).
|
| drv.tick(datetime(2026, 7, 22, 9, 35, tzinfo=ET))
|
|
|
| # 1) 10:10 onset, consult TIMES OUT → deferred; 10:12 provider recovers → routed (buy TNA).
|
| drv.set_verdict("timeout")
|
| drv.add_onset("10:10:00", "long")
|
| drv.tick(datetime(2026, 7, 22, 10, 11, tzinfo=ET))
|
| r1 = next(r for r in h.periodic_routes() if r.get("event_et") == "10:10:00")
|
| assert r1["status"] == "deferred" and r1["engine_reason"] == "llm_timeout"
|
| assert _held(h.broker) == {}
|
| drv.set_verdict("confirm")
|
| out = drv.tick(datetime(2026, 7, 22, 10, 12, tzinfo=ET))
|
| assert out["routed"] == 1 and r1["status"] == "routed"
|
| > assert _held(h.broker) == {BULL: 128}
|
| E AssertionError: assert {'TNA': 42.0} == {'TNA': 128}
|
| E
|
| E Differing items:
|
| E {'TNA': 42.0} != {'TNA': 128}
|
| E
|
| E Full diff:
|
| E {
|
| E - 'TNA': 128,...
|
| E
|
| E ...Full output truncated (4 lines hidden), use '-vv' to show
|
|
|
| tests/services/test_signal_to_broker_day_sequences.py:202: AssertionError
|