Skip to content

bump submodules for the frame-size ceiling, and give the mirror its first real guard - #27

Merged
aphelps-claude-bot merged 1 commit into
mainfrom
rs485-frame-ceiling-pointers
Jul 30, 2026
Merged

aphelps-claude-bot merged 1 commit into
mainfrom
rs485-frame-ceiling-pointers

Conversation

@aphelps-claude-bot

Copy link
Copy Markdown
Collaborator

Pointer bump for the frame-size ceiling fix, plus the guard I said already existed and didn't.

Also 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_BUFFER lives in ArduinoLibs; 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 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-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 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:

broken thing caught
mirror drifted to 96 RS485B_RECV_BUFFER_LEN (96) does not match ArduinoLibs' RS485_RECV_BUFFER (64)
slot replaced with a literal 57 — right value, wrong shape RS485B_TX_SLOT_LEN is no longer derived from the buffer minus the header

Plus make test green across all suites, and pio run -e ampworks SUCCESS with .pio/libdeps cleared first.

🤖 Generated with Claude Code

https://claude.ai/code/session_013HqzdRdTRnreSvevaQGQSJ

…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
@aphelps-claude-bot
aphelps-claude-bot merged commit 3bff588 into main Jul 30, 2026
@aphelps-claude-bot
aphelps-claude-bot deleted the rs485-frame-ceiling-pointers branch July 30, 2026 08:47
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.

1 participant