Safety tests: cover angle rate limits around zero - #3734
Closed
joedlai wants to merge 1 commit into
Closed
Conversation
Contributor
Car behavior reportReplays driving segments through this PR and compares the behavior to master. ✅ No changes detected |
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.
Superseded by #3740 to submit this work from khchen428. The code and commits are unchanged. Please continue review on the replacement PR.
The existing angle-command tests advance in five-degree increments and miss the asymmetric rate limits at zero and one CAN unit. Add a shared test that transmits a previous command of -1, 0, or +1 CAN units, then checks acceptance at each rate boundary and rejection one unit beyond it. This catches both overly permissive windup and overly restrictive unwind limits.
Remove the two corresponding mutation survivors from the allowlist. The equivalent
250000Uto250001Uinterval mutation remains. No production safety behavior changes.Validation on Apple Silicon macOS:
./test.shpasses: 3,981 tests run, 3,275 passed and 706 skipped; Ruff, ty, codespell, cpplint, and MISRA checks pass.git diff --checkpasses.Related to commaai/openpilot#32425. This is a focused boundary-coverage contribution, not the complete route-based TX fuzzer. The surviving-mutant gap was noted in #3723; the boundary test and mutation verification here were implemented independently.