Team controller branch - #1
Closed
LH-and-FPGA wants to merge 6 commits into
Closed
LH-and-FPGA wants to merge 6 commits into
LH-and-FPGA wants to merge 6 commits into
Conversation
…all detection for sim)
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.