Repository navigation
Harden FTMS control point, restructure tests, refresh README and project docs - #3
Merged
Merged
Conversation
added 2 commits
October 10, 2026 12:44
…art/Resume - Guard the Control Point transaction state shared by loop() and the NimBLE host task with a portMUX; BLE and Serial calls stay outside the lock. - Enter WAITING_RESPONSE before writing to the trainer, so a response that arrives before writeValue returns is no longer dropped (then timed out). - Forward Start/Resume to the trainer from loop(); apps still get the immediate local response. - Restructure host tests into named cases with a CHECK macro that survives NDEBUG; add a Makefile (make check/test/compile/upload) and split CI into sanitized host tests and the firmware compile. Claude-Session: https://claude.ai/code/session_01Dgkv5W86Zhd8Rv27uCE3rj
antomanc
marked this pull request as ready for review
October 10, 2026 10:47
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.
Follow-up hardening plus a README and project-docs refresh in the style of agbox/aginit.
Firmware
cpTxState/pendingCpare shared byloop()and the NimBLE host task; they are now read and changed only inside aportMUXcritical section, with BLE/Serial calls made after leaving it.writeValuereturned was dropped, and the command then timed out.loop()(apps still get the immediate local response, as before).Tests, CI, tooling
tests/firmware_test.cppsplit into 22 named tests with aCHECKmacro (survives NDEBUG, prints the failing test). New: Start forwarding, response-before-write-returns. Both verified to fail on the previous firmware.tests/run.sh:-Werror,SANITIZE=1for ASan + UBSan (leak checks included).Makefile:check,test,sanitize,deps,compile,upload,monitor.ci.yml: separate sanitized host-test and firmware-compile jobs,actions/checkout@v7, push runs only on main (no duplicate PR runs).Docs
docs/how-it-works.md;tests/VALIDATION.md→docs/testing.mdwith coverage and the hardware checklist.AGENTS.md,CONTRIBUTING.md,CHANGELOG.md.Validation
make sanitize: PASS (22 tests). CI: host tests + firmware compile pass, no warnings. Flash 628,308 B (47%), RAM 37,188 B (11%).https://claude.ai/code/session_01Dgkv5W86Zhd8Rv27uCE3rj