bbsbot 2026-03-08
Ship upgrades with stardock detection, anti-collapse state persistence, intervention system wired, and broad test expansion
222 files · 13,376+ · 771-

Ship upgrades with stardock detection

3 files changed
  • upgrades.py Stardock detection added; UPGRADE loop sector bounce fixed; BANK loop navigation and failure cooldowns added
  • loop_action_selection.py Action selection updated for upgrade/bank loop fixes
  • loop_guards.py No-trade guard UPGRADE loop fixes
  • Added stardock sector detection to enable automatic ship upgrades when near a stardock instantiate behavioral
    1 file
    • upgrades.py
  • Temporarily disabled upgrade execution, then re-enabled once detection was confirmed working baseline internal
    1 file
    • upgrades.py
  • Fixed UPGRADE loop sector bounce in no-trade guard remediate internal
    1 file
    • loop_guards.py
  • Fixed BANK loop to add proper navigation and failure cooldowns remediate internal
    1 file
    • upgrades.py
  • Fixed BANK/UPGRADE cooldown for stardock-unknown case (don’t retry without position info) remediate internal
    1 file
    • upgrades.py

Anti-collapse state persistence

3 files changed
  • state_persistence.py Anti-collapse state now persists to disk across manager restarts; scoped by game_key
  • strategy.py Strategy updated to use persistent anti-collapse state
  • status.py game_key and anti-collapse state age exposed in status/dashboard endpoints
  • state/ directory: anti-collapse state now persists to disk across manager restarts decouple internal
    1 file
    • state_persistence.py
  • State file defaults to default_data_dir()/state when no data_dir configured decouple internal
    1 file
    • state_persistence.py
  • Anti-collapse state scoped by game_key to prevent cross-game contamination decouple internal
    1 file
    • state_persistence.py
  • Exposed game_key and anti-collapse state age in status/dashboard endpoints decouple behavioral
    1 file
    • status.py

Intervention system wired in

4 files changed
  • advisor.py Intervention system connected to navigator and profitable_pairs strategy modules
  • trigger.py Intervention trigger module
  • mcp_tools_intervention.py Intervention MCP tools
  • settings.py desired_bots/swarm_paused/bust_respawn settings persisted across manager restarts
  • Intervention system connected to navigator and profitable_pairs strategy modules decouple internal
    2 files
    • advisor.py
    • trigger.py
  • desired_bots/swarm_paused/bust_respawn settings now persisted across manager restarts baseline internal
    1 file
    • settings.py
  • desired_bots auto-set when spawning a batch; synced to dashboard display streamline behavioral
    1 file
    • swarm_manager.py

Trading and navigation bug fixes

9 files changed
  • game_loop.py Depleted-port flapping fixed; login-prompt recovery loop fixed; crash on mid-orientation disconnect fixed
  • guard_decision.py No_interaction failures now feed market-intel reset detector
  • guard_logic.py Anti-collapse response silently skipping when bot holds cargo — fixed
  • guard_routing.py Guard routing updates
  • anti_collapse.py Anti-collapse strategy fixes
  • commodity_helpers.py Port price capture and LLM JSON parsing fixes
  • sequence.py Login retry timing fixed
  • phases.py Login phase fixes; rules.json validation error fixed
  • models.py Dashboard active count and state breakdown display fixed
  • Fixed depleted-port flapping and login-prompt recovery loop remediate behavioral
    1 file
    • game_loop.py
  • Fixed anti-collapse responses silently skipping when bot holds cargo remediate internal
    1 file
    • anti_collapse.py
  • Fixed no_interaction failures not feeding market-intel reset detector remediate internal
    1 file
    • guard_decision.py
  • Fixed port price capture, LLM JSON parsing, and no_interaction backoff remediate internal
    1 file
    • commodity_helpers.py
  • Fixed crash when session disconnects mid-orientation remediate internal
    1 file
    • game_loop.py
  • Fixed dashboard active count and state breakdown display (recovering+blocked bots counted as active) remediate behavioral
    1 file
    • models.py
  • Fixed login retry timing and dashboard desired count remediate behavioral
    1 file
    • sequence.py
  • Fixed rules.json validation error and bootstrap login race condition remediate internal
    1 file
    • phases.py

Security and code quality

5 files changed
  • ops.py Security hardening across account pool filtering; _get_active_bot wrapper removed
  • mcp_context.py MCP context updates
  • parsing.py WARP game menu input fixed; duplicate prompt entry removed
  • session.py Session guard hardened
  • TW2002_MCP_OPERATIONS.md Stale snapshot claim removed; obsolete tw2002_assume_bot removed
  • Security hardening and bug fixes across account pool filtering remediate internal
    1 file
    • ops.py
  • Concurrency fixes and code quality improvements remediate internal
    1 file
    • session.py
  • Fixed WARP game menu input, removed duplicate prompt entry, hardened session guard remediate behavioral
    2 files
    • parsing.py
    • session.py
  • Removed _get_active_bot wrapper; use list_accounts_safe in API interface behavioral
    1 file
    • ops.py
  • Updated docs: removed stale snapshot claim, removed obsolete tw2002_assume_bot specify internal
    1 file
    • TW2002_MCP_OPERATIONS.md

Inspector and dashboard redesign

2 files changed
  • dashboard.html Inspector metrics panel redesigned with grouped sections and 2-column layout; intervention controls exposed
  • dashboard.js Dashboard JS for redesigned inspector
  • Redesigned inspector metrics panel with grouped sections and 2-column layout decouple architectural
    1 file
    • dashboard.html
  • Bumped to 0.2.2; exposed intervention controls in dashboard decouple behavioral
    2 files
    • dashboard.html
    • pyproject.toml

Test additions

8 files changed
  • test_executor_trade.py Executor trade tests added
  • test_loop_guards.py Loop guard tests added
  • test_action_helpers.py Action helper tests added
  • test_anti_collapse_state.py Anti-collapse state tests added
  • test_pair_discovery.py Pair discovery tests added
  • test_trade_phases.py Trade phase tests added
  • test_guard_decision.py Guard decision tests added
  • test_guard_logic.py Guard logic tests added
  • tests/: added tests for strategy_manager, banking, upgrades, colonization, action_helpers, loop_guards, trade_phases, executor_trade, guard_decision, pair_discovery, token_auth_middleware, knowledge_path_validation qualify internal
    8 files
    • test_executor_trade.py
    • test_loop_guards.py
    • test_action_helpers.py
    • test_anti_collapse_state.py
    • test_pair_discovery.py
    • test_trade_phases.py
    • test_guard_decision.py
    • test_guard_logic.py