Skip to content

Repo hygiene: split strategy_runner, remove dead code and unused banks - #145

Closed
isaac0804 wants to merge 14 commits into
mainfrom
cleanup/repo-hygiene
Closed

isaac0804 wants to merge 14 commits into
mainfrom
cleanup/repo-hygiene

Conversation

@isaac0804

Copy link
Copy Markdown
Contributor

Hygiene pass from the 2026-10-14 codebase audit. No behaviour change intended.

  • Split utama_core/run/strategy_runner.py into side_runtime.py, sim_recovery.py, vision_stream_status.py and live_status.py.
  • Move strategy_table into utama_core.analysis; share one git_revision helper between the benchmark and scenario-bench tools.
  • Remove unused code: defense, referee, rsim and obstacle helpers; commented-out class signatures and a stub; the duplicate referee GUI demo in the test tree; an unreferenced diagram; scenario banks v5 and v6 (about 211k lines of JSON).
  • vector.py's __main__ self-check becomes a unit assertion.
  • Tooling: pre-commit ruff v0.15.12 with lint keys under [lint]; drop a duplicate linux-64 pixi task and document build-planner; fix the real-robots work-area row in AGENTS.md.

Tests: full suite 12,682 passed locally; pixi run lint clean.

Note: the code changes alter the match-cache fingerprint, so the next round_robin.py --reuse reruns all cached matches. It should reproduce the baseline tournament_20261014_144456.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L4M4hMLtZTUGNu6jThP1gy

isaac0804 and others added 13 commits October 14, 2026 17:29
Match pixi.toml and the CI ruff-action pin, and move ignore/fixable
under [lint] so ruff 0.15 stops warning about top-level keys.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
motion_stats imported it from tools/evaluation/round_robin.py, but tools/
is not part of the installed package. The table now lives in
utama_core/analysis/strategy_table.py; round_robin.py imports it from
there, and the tournament summary test imports it from the new location.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Delete align_defenders, to_defense_parametric, find_likely_enemy_shooter,
velocity_to_orientation, and RSimVSS, is_our_command, to_polygons: each
was referenced only by its own definition (git grep -w). Also drop the
helpers only they used (predict_goal_y_location, clamp_to_parametric,
ccw, ang_between, step_curve, EPS) and the imports they orphaned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Only bank_v8 is loaded (tools/scenario_bench.py, bench_vs_standings.py,
docs). v5/v6 stay in git history; docs mentioning them as calibration
history are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-status modules

Pure move, no logic change: SideRuntime and the _turned/_mirrored frame
transforms go to run/side_runtime.py; the rsim teleport-settle, placement
and frozen-field recovery to run/sim_recovery.py (SimRecoveryMixin); the
browser vision stream and its commentary/roster to
run/vision_stream_status.py (VisionStreamStatusMixin); and the rich live
status panel to run/live_status.py (LiveStatusMixin). StrategyRunner
inherits the mixins, and the names tests import stay importable from
strategy_runner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…h tools

motion_planning_benchmark and scenario_bench each had an identical
_git_revision (short HEAD, None outside a checkout). Move it to
utama_core/global_utils/git_utils.py. The scenario_bench copy in
hand_authored_scenarios.py returns "unknown" instead of None, so it stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…essing path

The Doc column named a TODO and a bare data_processing/ path. Point it at
utama_core/team_controller/README.md (brief) and fix the path to
utama_core/data_processing/. CLAUDE.md is a symlink to AGENTS.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pixi.toml defined main = "python -m main" both at the root and again under
[target.linux-64.tasks] with the identical command, so the target entry
changed nothing and is removed. docs/tools.md's task table gains the
build-planner task.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The block printed values test_vector.py already asserts. The one check it
added, Vector2D.dot as a method, is now an assertion in
test_vector2d_operations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nothing references assets/images/pipeline.drawio.png; the README and
docs/pipeline_method.md use pipeline_new.drawio.png.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kalman.py had type-signature comments above three call sites, and
game.py had a stray '# def predict_/' stub. None of it is code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
utama_core/tests/referee/demo_referee_gui_rsim.py is an older copy of
examples/demo_referee_gui_rsim.py (WanderingTactic instead of tiki_taka_plus).
It is not a test (pytest would not collect it), nothing imports it, and
only its own docstring names it. wandering_strategy.py stays: other files
import it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@isaac0804 isaac0804 added the release:patch Fixes and small tweaks to main. label Oct 16, 2026
Keeps HEAD's wording; the other side still described the status labels
removed on 2026-10-10.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ECXiwf3VYxBTMmrLaexRQK
@isaac0804

Copy link
Copy Markdown
Contributor Author

Folded into the sim-realism session branch (sim-realism-20261016), which contains every commit here; it ships in that branch's PR instead of on its own.

@isaac0804 isaac0804 closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:patch Fixes and small tweaks to main.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant