bbsbot
2026-03-21
Extract DetectionEngine to undef-terminal, rewrite LearningEngine as wrapper, and fix 160 ruff lint errors
231 files · 20,394+ · 14,196-
Extract DetectionEngine to undef.terminal.detection
7 files changed
engine.pyLearningEngine rewritten as thin wrapper around DetectionEnginedetector.pyRemoved — moved to undef.terminal.detectionextractor.pyRemoved — moved to undef.terminal.detectionpattern_loader.pyUpdated for new DetectionEngine APIrules.pyUpdated for new detection package2026-03-21-detection-engine-extraction-design.mdDesign spec for the extraction2026-03-21-detection-engine-extraction.mdImplementation plan for the extraction
- The detection/learning engine that matched game prompts has been extracted from bbsbot into the undef.terminal.detection package in undef-terminal
decouple
architectural
2 files
engine.pydetector.py
- Added design spec and implementation plan documents for the extraction
specify
internal
2 files
2026-03-21-detection-engine-extraction-design.md2026-03-21-detection-engine-extraction.md
- Removed learning source files that were moved to undef.terminal.detection
decouple
internal
2 files
detector.pyextractor.py
Rewrite LearningEngine as DetectionEngine wrapper
5 files changed
engine.pyThin backward-compatibility wrapper around DetectionEnginesession.pyRenamed enable_learning to enable_detectionsession_manager.pyUpdated for enable_detection renamebot.pyUpdated for enable_detection renamebot_core.pyUpdated for enable_detection rename
- LearningEngine is now a thin backward-compatibility wrapper around DetectionEngine from undef-terminal
decouple
internal
1 file
engine.py
- Renamed enable_learning to enable_detection in all callers and session initialization
decouple
internal
2 files
session.pybot.py
- Removed stale enable_learning/disable_learning aliases
decouple
internal
1 file
engine.py
- Removed dead BotStatusBase backward-compat alias
decouple
internal
1 file
models.py
- Removed unused trade_interaction_seen parameter
deprecate
internal
1 file
game_loop.py
MCP and debug tools updated for new detection API
4 files changed
bbs_debug.pyUpdated to use detection_engine.detector and undef.terminal.detection importsbbs_tools.pyUpdated for detection APIserver.pyMCP server updates for detectionpyproject.tomlUpdated undef-terminal dependency to include detection package
Tests and code quality
6 files changed
test_term_hijack_api.pyFixed for inline control stream protocoltest_term_routes.pyFixed for inline control stream protocolcheck_spdx_headers.pySPDX header check scriptcheck_max_loc.pyMax LOC check scripttradewars.pyGuarded module-level setup_telemetry callsdefaults.pyUpdated defaults
- Fixed hijack/term tests for the inline control stream protocol
qualify
internal
2 files
test_term_hijack_api.pytest_term_routes.py
- Fixed all 160 ruff lint errors (160 to 0)
remediate
errata
2 files
bot.pyconnection.py
- Fixed SPDX headers, max-LOC file splits, and bandit suppression annotations
specify
internal
2 files
check_spdx_headers.pycheck_max_loc.py
- Guarded module-level setup_telemetry calls to prevent double-init crashes
harden
internal
1 file
tradewars.py
- Removed unused pexpect dependency
deprecate
internal
1 file
pyproject.toml