Skip to content

fix: correct cs-bit polarity in compound-wait and chained request logic - #63

Open
SoundMatt wants to merge 1 commit into
mainfrom
fix/58-cs-bit-polarity
Open

fix: correct cs-bit polarity in compound-wait and chained request logic#63
SoundMatt wants to merge 1 commit into
mainfrom
fix/58-cs-bit-polarity

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

  • compound_wait_check_of() and should_execute_chained() in include/rcp/request.hpp had the cs bit's polarity backwards relative to the CompoundWaitCheck enum's own documented mapping and the field's "conditional-start" naming.
  • should_execute_chained() is reachable from a real public API path (RequestLedger::finalize() -> propagate_chain_completion()), so this was a live bug for chained requests.
  • Fixed both functions so cs=false maps to Immediate/always-execute and cs=true maps to AfterChangeOnly/abort-on-predecessor-error, matching the enum comments and the field semantics described in the OPEN Alliance TC18 Remote Control Protocol Specification v0.5.1_RC.
  • Updated the previously-inverted assertions in tests/test_request.cpp (including the two chained-successor propagation tests whose cs values encoded the old, wrong polarity) so the test suite now protects the correct behavior.

Closes #58

Test plan

  • cmake --build build --parallel (full build, no warnings introduced)
  • ctest --test-dir build -j4 — 53/53 tests pass, including rcp_request

compound_wait_check_of() and should_execute_chained() in
include/rcp/request.hpp had the cs bit's polarity inverted relative to
the CompoundWaitCheck enum's own documented mapping and the field's
"conditional-start" naming. cs=false now maps to Immediate / always-
execute, and cs=true maps to AfterChangeOnly / abort-on-predecessor-
error, matching the enum comments and the OPEN Alliance TC18 Remote
Control Protocol Specification v0.5.1_RC's field semantics.

Updates the affected assertions in tests/test_request.cpp, which
previously locked in the inverted behavior.

Closes #58

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
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.

cs-bit polarity inverted in compound_wait_check_of() and should_execute_chained()

1 participant