Skip to content

Team controller branch - #1

Closed
LH-and-FPGA wants to merge 6 commits into
mainfrom
team_controller_branch
Closed

LH-and-FPGA wants to merge 6 commits into
mainfrom
team_controller_branch

Conversation

@LH-and-FPGA

Copy link
Copy Markdown
Member

No description provided.

isaac0804 added a commit that referenced this pull request Aug 25, 2026
… audit

docs/testing_gaps.md gaps #1 (rules only unit-tested in isolation, never
through CustomReferee.step() itself), #2 (no end-to-end foul-counter/
yellow-card test), and #3 (no test for the stopping/non-stopping scan-order
interaction) were documented but not acted on when originally found. Built
via 3 parallel agents on disjoint new test files:

- test_referee_rules_integration.py: one integration-shaped test per
  remaining §8.4 rule (Pushing already covered separately) — Crashing,
  KeeperHeldBall, ExcessiveDribbling, RobotStopSpeed,
  BallPlacementInterference, DefenseAreaStoppage — each driven through the
  real CustomReferee.step() call path with realistic profile thresholds.
  Surfaced two real (non-bug) wiring behaviors along the way, documented in
  the test file: KeeperHeldBallRule's foul auto-advances
  STOP -> BALL_PLACEMENT_BLUE within the same tick when no robot keeps the
  "all clear" gate pending, and RobotStopSpeedRule's grace clock starts from
  the first step() call that observes STOP, not force_command's timestamp.

- test_foul_counter_end_to_end.py: drives real fouls through
  GameStateMachine.step() in sequence for both teams, confirms the 3rd/6th
  foul awards a 2nd card (not a one-shot special case for exactly 3),
  confirms counts_toward_foul_counter=False and offending_teams=() both
  correctly charge nobody, and confirms a non-stopping foul still applies
  its foul-counter side effect without touching command. Also surfaced that
  non-stopping fouls never consume the 0.3s transition cooldown (they never
  update _last_transition_time) — not a bug, just a real asymmetry worth
  knowing.

- test_referee_scan_order.py: confirms a lone non-stopping violation
  (real CrashingRule) is recorded without changing referee_command;
  confirms the first stopping rule in priority order wins and a
  call-counting wrapper proves the next rule is never even consulted that
  tick; and — since the real rule set's command-gating can't currently
  produce a non-stopping violation earlier in list order than a same-tick
  stopping one — exercises that specific ordering via two minimal stub
  BaseRules, proving the earlier non-stopping violation doesn't suppress or
  pre-empt the later stopping one.

Gap #6 (least-validated rules) partially closed too: pushing's traced
ball-contest-deadlock scenario is now field-realistic-tested (see the
preceding commit), leaving only keeper_held_ball/ball_placement_interference
as genuinely never-fired-live. Gaps #4 (static type checking) and #5
(game_frame=None convention) remain open as tooling/design decisions, not
test-writing tasks — documented as such rather than acted on here.

Full suite: 799 passed, 0 failed (16 new tests).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants