Repository navigation
fix(test): answer the OTA peer run's apply criterion in its success-path mock - #4399
Merged
Merged
Conversation
…ath mock #4318 gave the peer-OTA run a final criterion: ask the RP whether it actually applied the image, because the C6 having served it only proves a download happened (#3956). It did not update this test, whose `primary_after` mock answers every method with a blanket `{"success": True}` -- which `ota_applied_ok` reads as not proven, correctly, since neither `attempted` nor `succeeded` is present. master has been red on `test_ota_peer_stages_artifact_without_a_host_wifi_manager` since that merge. The mock now dispatches on method and answers `rpOtaUpdateStatus` the way a board that applied the image would. Verified load-bearing: flipping `succeeded` to False fails the test. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe OTA test’s post-update primary-board mock now returns explicit success status data for ChangesOTA test behavior
Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
masteris red:ci/tests/test_autoresearch_net.py::test_ota_peer_stages_artifact_without_a_host_wifi_managerhas failed on every push since #4318 merged.Cause
#4318 added the run's final criterion — ask the RP whether it applied the image, because the C6 having served it only proves a download happened (#3956):
It did not update this test. The
primary_aftermock answers every method with a blanket{"success": True}, andota_applied_okrequiresattempted is True and succeeded is True— neither is present, so it reads "not proven" and fails. Which is the criterion working as designed; the fixture simply never answered the new question.Note the shape: a mock that says yes to everything is exactly what #4318 exists to stop counting as proof, so the right fix is to make it dispatch on method rather than to loosen the criterion.
Fix
primary_after_sendnow dispatches, answeringrpOtaUpdateStatusthe way a board that applied the image would, and keeping the blanket success for the other calls.Verification
uv run pytest ci/tests/test_autoresearch_net.py— 25 passed (was 24 passed, 1 failed).succeededtoFalsein the new mock fails the test, so it still exercises the criterion rather than papering over it.bash lintclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
Summary by CodeRabbit