Repository navigation
bump submodules for the frame-size ceiling, and give the mirror its first real guard - #27
Merged
Merged
Conversation
…irst real guard ArduinoLibs bc56ddc (#12) -- getFramingErrorCount() plus the 57/58 boundary group that demonstrates the ceiling instead of asserting arithmetic about it. WLED 2e7634b3 (#16) -- RS485B_TX_SLOT_LEN derived from the receive budget minus the socket header, so a full payload can no longer exceed what a receiver can hold. This bump also carries ArduinoLibs #11 (the test-command doc fix), which was held back at the time to avoid deepening a gitlink conflict in the mesh PRs. That conflict is resolved and merged, so it rides along here. The substantive part is the probe change. RS485_RECV_BUFFER lives in ArduinoLibs and RS485B_RECV_BUFFER_LEN mirrors it in the usermod, because rs485_bridge_protocol.h has to stay free of Arduino.h for the host test to build. The static_assert tying them together compiles only under [env:ampworks], and no CI workflow builds that env -- so until now the mirror had NO automated guard at all. Drift it and the transmit ceiling silently stops matching what a receiver can hold, which is the 71-vs-64 bug this whole task exists to remove. tools/rs485_bridge_probe.py --self-test now scrapes both constants and fails if they disagree, and separately fails if RS485B_TX_SLOT_LEN stops being derived -- because re-hardcoding it is exactly how the original defect happened. I said in the WLED PR that the probe already did this; it did not, and this is the commit where that becomes true. Verified, including both negative controls: drifting the mirror to 96 is caught, and replacing the derived slot with a literal 57 -- the right VALUE, still the wrong shape -- is caught too. make test green across all suites, ampworks builds with libdeps cleared. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013HqzdRdTRnreSvevaQGQSJ
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.
Pointer bump for the frame-size ceiling fix, plus the guard I said already existed and didn't.
bc56ddc—getFramingErrorCount()and the 57/58 boundary group2e7634b3—RS485B_TX_SLOT_LENderived from the receive budget minus the socket headerAlso carries ArduinoLibs#11 (the test-command doc fix), held back at the time to avoid deepening a gitlink conflict in the mesh PRs. That's resolved and merged, so it rides along.
The substantive part is the probe change
RS485_RECV_BUFFERlives in ArduinoLibs;RS485B_RECV_BUFFER_LENmirrors it in the usermod, becausers485_bridge_protocol.hhas to stay free ofArduino.hfor the host test to build. Thestatic_asserttying them together compiles only under[env:ampworks], and no CI workflow builds that env — so until this commit the mirror had no automated guard at all. Drift it and the transmit ceiling silently stops matching what a receiver can hold, which is the 71-vs-64 bug this whole task exists to remove.--self-testnow scrapes both constants and fails if they disagree, and separately fails ifRS485B_TX_SLOT_LENstops being derived — because re-hardcoding it is exactly how the original defect happened.I claimed in WLED#16 that the probe already did this. It didn't. This is the commit where that becomes true.
Verification
Both negative controls fire:
RS485B_RECV_BUFFER_LEN (96) does not match ArduinoLibs' RS485_RECV_BUFFER (64)57— right value, wrong shapeRS485B_TX_SLOT_LEN is no longer derived from the buffer minus the headerPlus
make testgreen across all suites, andpio run -e ampworksSUCCESS with.pio/libdepscleared first.🤖 Generated with Claude Code
https://claude.ai/code/session_013HqzdRdTRnreSvevaQGQSJ