bbsbot
2026-02-27
Code quality infrastructure with strict lint rules, nine-round bug-fix session, 92–103 regression tests added
171 files · 7,219+ · 1,681-
Code quality infrastructure
2 files changed
.pre-commit-config.yamlStricter lint rules: S/T20 ruff rules, mypy strict, ty, codespell addedpyproject.tomlQuality tooling configuration updates
build: enable S/T20 ruff rules, add codespell, add throttle regression test— stricter lint rules enabled qualify errata1 file
.pre-commit-config.yaml
build: add mypy to pre-commit and enable strict ruff rulesspecify behavioral1 file
.pre-commit-config.yaml
build: add ty type-check to pre-commit hooksinstantiate internal1 file
.pre-commit-config.yaml
Orchestration refactor
3 files changed
game_loop.pyOrchestration FSM formalized with explicit state enum; DecisionPlan Pydantic model extractedguard_logic.pyFailureBudget unified from scattered failure trackersguard_decision.pyGuard decision updates for DecisionPlan model
refactor: formalize orchestration FSM with explicit state enum— bot lifecycle states made explicit decouple internal1 file
game_loop.py
refactor: unify FailureBudget from scattered failure trackers— failure tracking consolidated decouple internal1 file
guard_logic.py
refactor: extract DecisionPlan Pydantic model from _with_meta() dictdecouple internal1 file
guard_decision.py
- Added 4 orchestration contract tests
qualify
internal
1 file
test_orchestration_contracts.py
Bug fixes (9 review rounds)
15 files changed
cargo_ledger.pyCargo accounting bugs fixed; stale cargo fields zeroed when hold accounting proves emptyexecutor_trade.pyTrade executor concurrency and error handling fixesloop_guards.pyLoop guard concurrency and task safety fixessession_manager.pySession manager concurrency fixesbot_worker.pyWorker blocking I/O offloaded; task leak fixesadvisor.pyIntervention advisor wiring fixessequence.pyCredential lookup and login retry fixesphases.pyLogin phase fixesguard_core.pyGuard core fixesloop_context.pyLoop context fixesloop_state.pyLoop state fixes; stuck-repeat cooldown and LLM thrash fixesbot_process.pyBust respawn orphan bot fix; timeseries thread-safety fixswarm_manager.pyship_level type mismatch fix (was causing 422 on all status reports)dashboard.htmlTooltip descriptions added to all column headersdashboard.jsDashboard JS updates
fix: ninth-pass coverage — status telemetry, credential lookup, loop recovery error handlingqualify behavioral2 files
sequence.pyloop_state.py
fix: harden concurrency, credentials, and error recovery; add 103 testsqualify internal2 files
executor_trade.pyloop_guards.py
fix: data bug, concurrency races, error handling; extract constants; add 92 testsqualify internal2 files
cargo_ledger.pysession_manager.py
fix: address code review findings — bugs, types, and deduplicationremediate internal1 file
guard_core.py
- Round 4 review — bugs, concurrency, code quality, and new tests
qualify
internal
2 files
loop_guards.pyloop_state.py
fix: round 5 review — blocking I/O, task leak, super() anti-patternremediate internal1 file
bot_worker.py
fix: hardening, async offload, dashboard improvements, and regex pre-compileremediate behavioral2 files
dashboard.htmldashboard.js
fix: ship_level type mismatch causing 422 on all status reportsremediate internal1 file
swarm_manager.py
fix: eliminate thread-safety races in state save and timeseries counterremediate internal1 file
bot_process.py
fix: bust_respawn fails to kill orphan bots after manager restartremediate internal1 file
bot_process.py
Cargo accounting
1 file changed
cargo_ledger.py_reconcile_stale_cargo helper extracted; stale cargo fields zeroed when hold accounting proves empty
Dashboard and UX
1 file changed
dashboard.htmlTooltip descriptions added to all column headers
ux: add tooltip descriptions to all dashboard column headersinstantiate behavioral1 file
dashboard.html
Stuck-loop and recovery
2 files changed
loop_state.pyWarning throttle reset on recovery; stuck-repeat cooldown and LLM thrash loop fixedloop_guards.pyRound 6 critical bug fixes
fix: reset warning throttle on status report recoveryremediate internal1 file
loop_state.py
fix: stuck-repeat now forces immediate cooldown on first hitremediate internal1 file
loop_state.py
fix: stuck-repeat LLM thrash loop and guard metadata lossremediate internal2 files
loop_state.pyloop_guards.py
fix: round 6 critical bug fixesremediate internal1 file
loop_guards.py