You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reporter: Claude (automated continuous reviewer) — retrospective finding on merged code.
Summary
The console-dedup gates merged in #983 (order-wave summaries) and #984 (account-state summaries) call self._live_event_console_available() directly inside Passivbot logging helpers. Several pre-existing tests in tests/test_exchange_config_updates.py drive these code paths through duck-typed FakeBot stubs that borrow the bound methods but do not define _live_event_console_available, so they now fail with:
src/passivbot.py:4504: AttributeError: 'FakeBot' object has no attribute '_live_event_console_available'
The module's other failures (hedge-mode/exchange-config parametrized tests) fail at c7a89c9c too — pre-existing environment-class failures, not part of this finding.
PR Project low-balance create skips to event console #985 (563075a4, open) already fixes one of the seven (allows_cancellations_when_balance_too_low) by updating its stub, and its executor-side gate demonstrates the defensive pattern (getattr(passivbot_cls, "_live_event_console_available", None) + callable check).
Impact
Production is unaffected — real Passivbot instances always have the helper (it's a class method). This is a test-suite breakage on the v8 tip: seven previously-green tests covering the order-execution plan path now fail, reducing regression coverage for exactly the paths the dedup wave touches.
Suggested fix (either works)
Tests: add _live_event_console_available = lambda self: False (or the real helper) to the FakeBot stubs in tests/test_exchange_config_updates.py — the Project low-balance create skips to event console #985 approach, applied to the remaining six; or
Code: make the passivbot.py gates defensive like Project low-balance create skips to event console #985's executor gate (getattr(self, "_live_event_console_available", None)), so duck-typed callers degrade to the legacy logging path.
Option 1 keeps production code simplest; option 2 makes the helper contract robust for all borrowed-method callers.
Reporter: Claude (automated continuous reviewer) — retrospective finding on merged code.
Summary
The console-dedup gates merged in #983 (order-wave summaries) and #984 (account-state summaries) call
self._live_event_console_available()directly insidePassivbotlogging helpers. Several pre-existing tests intests/test_exchange_config_updates.pydrive these code paths through duck-typedFakeBotstubs that borrow the bound methods but do not define_live_event_console_available, so they now fail with:Evidence (local, clean /tmp worktrees)
c7a89c9c(pre-Dedupe order wave console summaries #983, Clarify flat coin HSL cooldown severity #982 merge):pytest tests/test_exchange_config_updates.py -k "execute_to_exchange or execute_order_plan"→ 8 passed.f6700c5c(Dedupe order wave console summaries #983 merge) andb15da359(Dedupe account state console summaries #984 merge, current tip): 7 of those tests fail with the AttributeError above:test_execute_to_exchange_allows_cancellations_when_balance_too_lowtest_execute_to_exchange_allows_reduce_only_create_when_balance_too_lowtest_execute_to_exchange_configures_only_symbols_with_creationstest_execute_to_exchange_emits_recent_execution_deferred_eventtest_execute_to_exchange_emits_state_change_skipped_eventtest_execute_order_plan_posts_replacement_matching_cancel_same_cycletest_execute_to_exchange_skips_creations_pending_exchange_configc7a89c9ctoo — pre-existing environment-class failures, not part of this finding.563075a4, open) already fixes one of the seven (allows_cancellations_when_balance_too_low) by updating its stub, and its executor-side gate demonstrates the defensive pattern (getattr(passivbot_cls, "_live_event_console_available", None)+ callable check).Impact
Production is unaffected — real
Passivbotinstances always have the helper (it's a class method). This is a test-suite breakage on the v8 tip: seven previously-green tests covering the order-execution plan path now fail, reducing regression coverage for exactly the paths the dedup wave touches.Suggested fix (either works)
_live_event_console_available = lambda self: False(or the real helper) to theFakeBotstubs intests/test_exchange_config_updates.py— the Project low-balance create skips to event console #985 approach, applied to the remaining six; orgetattr(self, "_live_event_console_available", None)), so duck-typed callers degrade to the legacy logging path.Option 1 keeps production code simplest; option 2 makes the helper contract robust for all borrowed-method callers.