bbsbot 2026-03-20
Align with undef-terminal bot-to-agent rename, add memray stress tests, and extract decay strategy streaks
117 files · 4,698+ · 3,517-

Align with undef-terminal bot-to-agent rename

13 files changed
  • ops.py Swarm bot ops updated for agent rename
  • update.py Bot update endpoint renamed
  • spawn.py Spawn endpoint updated
  • status.py Status endpoint updated
  • hub.py Terminal hub updated
  • setup.py Terminal setup updated
  • cli.py CLI updated for agent rename
  • cli_swarm.py Swarm CLI updated
  • session.py Session module updated
  • session_manager.py Session manager updated
  • swarm_manager.py Swarm manager updated
  • models.py Manager models updated
  • term_bridge.py Terminal bridge updated
  • Updated 27 source files across all layers to use agent terminology from undef-terminal decouple internal
    3 files
    • ops.py
    • spawn.py
    • swarm_manager.py

Backward compatibility bot_id alias

1 file changed
  • models.py BotStatusTradeWars adds bot_id property aliasing agent_id
  • Bbsbot’s own domain classes (BotStatus, SwarmManager) retain their existing names — only the undef-terminal API layer is renamed decouple behavioral
    1 file
    • models.py
  • BotStatusTradeWars adds a bot_id property that aliases agent_id instantiate internal
    1 file
    • models.py
  • model_dump() injects bot_id alongside agent_id for clients that still use the old field name decouple internal
    1 file
    • models.py
  • model_dump_json() uses Pydantic’s Rust fast path (zero overhead) streamline internal
    1 file
    • models.py

Extract _decay_strategy_streaks helper

1 file changed
  • game_loop.py Extracted _decay_strategy_streaks into standalone function
  • Extracted _decay_strategy_streaks helper from game_loop.py into a standalone function for testability decouple internal
    1 file
    • game_loop.py

Memray stress tests

9 files changed
  • __init__.py Memray test package
  • baselines.json Stress test baselines
  • conftest.py Memray test fixtures
  • test_broadcast_stress.py Broadcast cycle stress test
  • test_status_serialization_stress.py Status serialization stress test
  • test_strategy_stress.py Strategy dict growth stress test
  • memray_broadcast_stress.py Broadcast stress script
  • memray_status_serialization_stress.py Status serialization stress script
  • memray_strategy_stress.py Strategy stress script
  • Added memray stress tests and baselines for three paths: broadcast cycle, status serialization, and strategy dict growth qualify internal
    3 files
    • test_broadcast_stress.py
    • test_status_serialization_stress.py
    • test_strategy_stress.py
  • Tests live in tests/memray/ with baselines in tests/memray/baselines.json qualify internal
    1 file
    • baselines.json
  • Added scripts/memray/ with stress scripts for each path instantiate internal
    2 files
    • memray_broadcast_stress.py
    • memray_status_serialization_stress.py

Profitable pairs tracking improvements

2 files changed
  • failure_tracking.py Failure tracking additions
  • state_persistence.py State persistence with bot_id backward compat
  • Added failure_tracking.py and state_persistence.py to the profitable pairs strategy instantiate internal
    2 files
    • failure_tracking.py
    • state_persistence.py
  • Added bot_id property to state_persistence for backward compat instantiate internal
    1 file
    • state_persistence.py