Repository navigation
fix: backlog sweep — send protocol-flags form, TARA/tara collision, subscribe race, spec v1.11 - #35
Merged
Merged
Conversation
…ubscribe race, spec v1.11 - send: implement the §11.2 protocol-flags form (--zone/--type/--payload) for RCP alongside the existing streaming JSON sink, dispatching to the same in-process mock registry. Adds hex_decode and cmd_type_from_string helpers. (Closes #28) - Rename the hand-authored TARA.md to TARA-ANALYSIS.md so it no longer case-collides with the auto-generated tara.md on case-insensitive filesystems (macOS/Windows), which silently dropped one file's content on checkout. Update AUDIT_PACK.md and ROADMAP.md references. (Closes #29) - mock::Controller::subscribe(): hold mu_ across the closed_ check and the subs_ append (matching close()'s critical section) to close a TOCTOU race where a subscribe() concurrent with close() could return success instead of ErrClosed. Add a concurrent regression test. (Closes #30) - capabilities_json(): emit protocol/protocol_int, matching version_json() and the spec §12.2 single-protocol-implementation convention. (Closes #31) - command_latency_test: drop the CI-env-var-gated threshold (an unreliable proxy for "noisy scheduler") in favour of a single generous threshold applied uniformly, fixing a spurious failure observed on a non-CI sandboxed run. (Closes #32) - Bump kRelaySpecVersion 1.10 -> 1.11 (no behavioural changes needed; cpp-RCP already shipped a CLI target ahead of the v1.11 waiver removal). (Closes #33) - README: expand the Headers table from 2 to all ~43 public headers, grouped by concern per spec §13.7.2. (Closes #34) kVersion/PROJECT_VERSION -> 1.2.0 (new spec-conformance capability: the send protocol-flags form). 41/41 ctest suites pass; relay conform --strict PASS at spec 1.11. Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
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.
Summary
Fixes the entire open-issue backlog on this repo (#28–#34), all P1/P2 findings from the 2026-07-27 RELAY ecosystem audit, plus leaves the one architectural-decision issue (#23) open with an explanation.
Fixed
sendwas declared incapabilitiesbut only implemented the streaming NDJSON sink; the §11.2 protocol-flags form (--zone <name> --type <cmdtype> [--payload <hex>]) was rejected as invalid args. Implementedsend_one()alongside the existingsend_stream(), dispatching to the same in-process mock registry. Addedhex_decode()andcmd_type_from_string()helpers and 6 new test cases intests/test_cli.cpp.TARA.md(hand-authored ISO 21434 narrative) andtara.md(cpfusa-generated summary) case-collide on case-insensitive filesystems (macOS/Windows default), silently dropping one file's content on checkout — reproduced during this very session's clone. Renamed the hand-authored file toTARA-ANALYSIS.md(the one under this repo's control;tara.md's name is emitted by the externalcpfusa taracommand) and updated the two references inAUDIT_PACK.mdandROADMAP.md.mock::Controller::subscribe()checkedclosed_and appended tosubs_under separate critical sections, so asubscribe()racing aclose()could return success instead ofErrClosed(RELAY spec §6.2/6.3/6.6). Both operations now sharemu_withclose(). Added a 200-iteration concurrent regression test (tests/test_mock.cpp) that asserts, with no sleep, that any channel a successfulsubscribe()returns is closed by the time a concurrentclose()has joined — deterministic with the fix, and was not with the original code.capabilities_json()omittedprotocol/protocol_int, inconsistent withversion_json()and the spec §12.2 single-protocol-implementation convention. Added both fields.command_latency_test.cpp's non-CI 10 ms max-latency gate was flaky under scheduler noise on any host withoutCIset (a sandboxed run observed a real 15 ms outlier). Replaced theCI-env-var-gated thresholds with a single generous threshold (P99 < 500 ms, Max < 2 s) applied uniformly, sinceCIwas never a reliable proxy for "noisy scheduler."kRelaySpecVersionwas pinned to RELAY spec v1.10; current spec is v1.11. Bumped the constant and the corresponding test/README assertions. No behavioral changes needed (cpp-RCP already ships a CLI target ahead of the v1.11 §17.7 waiver removal).adapt.hpp(the RELAY §10.3 entry point) and all safety/bridge/control-plane modules. Expanded to a full, concern-grouped index (Core/RELAY integration, Protocol bridges, RCP control-plane concerns, Transports) matching the spec §13.7.2 module-name registry categories.Left open (no code change here)
Version
kVersion/PROJECT_VERSIONbumped 1.1.0 → 1.2.0 (MINOR — #28 adds a new spec-conformance capability; the rest are bug/doc fixes).Test plan
cmake -B build -DCMAKE_BUILD_TYPE=Release -DRELAY_BUILD_CLI=ON -G Ninja && cmake --build build --parallel— clean buildctest --test-dir build --output-on-failure -j1— 41/41 suites pass (including the new concurrency regression test and the previously-flaky latency test)relay conform --strict build/cpp-rcp(built fromSoundMatt/RELAYmain) — PASS on all three §12 schemassend --zone/--type/--payloadform (text and JSON) and its error paths (missing flags, unknown type, unknown zone, bad hex)