rewrite(phase8): batch B — content-parity audit (tsn/powerstate/faultinject/ratelimit/mdns/authz/relay/bridges) - #170
Merged
Conversation
…inject/ratelimit/mdns/authz/relay/bridges) Part of the v3.0.0 ground-up rewrite (cpp-RCP #129, ROADMAP.md Phase 17), branch rewrite/v3-from-c-rcp. Phase 8 (remaining modules), batch B of 2: tsn, powerstate, faultinject, ratelimit, mdns, authz, relay/relay.hpp, restbridge/grpcbridge -- all already fully implemented+tested from an earlier untracked pass; this batch is a content-parity audit against c-RCP, not a rewrite. ## Findings, per module - tsn.hpp: already equivalent within a documented architectural divergence (c-RCP wraps a full AVTP transport + raw-frame priority classifier; cpp-RCP exposes a primitive apply_priority() called with an already-known RequestCategory) -- pre-documented in-header, no action. Catalog observation only (c-RCP's REQ-TSN-007/008 have no cpp-RCP analog, by design) -- left untouched, Phase 6 is closed. - powerstate.hpp: no new findings beyond the 8 already-filed pending gaps from Phase 6 batch 13 (REQ-PWRMODE-004/012/017/019/021/022/ 026/027) -- confirmed NOT re-litigated. Confirmed wakeup.hpp (not powerstate.hpp) carries the actual SleepCMD/WakeUp wire codec equivalent to c-RCP's ep_wakeup.h -- a layering difference, not a missing capability. No changes. - faultinject.hpp: capability-equivalent (Drop/Slow/Error/Timeout, count-limited rules). Notably its pick_rule() already fixes a real use-after-free/data-race an earlier revision had, documented in-file as cpp-RCP-D6 -- arguably more correct than c-RCP's own mechanism. No action. - ratelimit.hpp: capability-equivalent (token bucket, safety-tag exemption, per-domain keying). Bootstrap/refill semantics match exactly. No action. - mdns.hpp: capability-equivalent (Discoverer/Announcer, StaticDiscoverer, make_instance_name). One cosmetic-only divergence (hex case, service type string) -- not a wire-interop requirement since mDNS records are self-contained. No action. - authz.hpp: genuine capability-granularity gap found, documented in-file rather than ported -- c-RCP keys policy entries on an opaque request_type byte (letting a policy distinguish read vs write within one request kind); cpp-RCP's RequestCategory taxonomy is coarser and cannot express that distinction. Pre-existing since v2.11.0, already justified at length in the header's own comment, and changing it would break the already-tested PolicyEntry/permit() contract -- out of this batch's authority. Documented as a known granularity gap for a possible future targeted fix, not force-fit here. - relay/relay.hpp: confirmed structurally distinct from adapt.hpp (relay.hpp is the protocol-agnostic Channel<T>/Context/Node abstraction; adapt.hpp is the RCP-specific wiring on top, already covered by Phase 6 batch 12). c-RCP's own relay.h header states outright it is "a pure-C port of the same subset cpp-RCP's include/relay/relay.hpp exposes... not a full RELAY binding" -- cpp-RCP's version is the reference here, confirmed full parity (superset, even -- templated Channel<T> vs one concrete type). No action. - restbridge.hpp/grpcbridge.hpp: both compile-time interface stubs on both sides (no backend linked, every call returns not-supported). c-RCP's own header comments confirm they mirror cpp-RCP's stub behavior. Config shapes and defaults match exactly. No action. ## Verification Independently re-verified: confirmed the c-RCP relay.h "pure-C port of cpp-RCP's own relay.hpp" claim, the restbridge.h "mirrors cpp-RCP's own stub" claim, and the faultinject.hpp cpp-RCP-D6 use-after-free-fix comment all directly against source -- all accurate. Full tree rebuilt from scratch: 0 errors, 0 warnings, 58/58 ctest suites pass (100%). include/rcp/authz.hpp: +17 lines (comment only, zero behavior change). No other files touched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
This was referenced Aug 22, 2026
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.
rewrite(phase8): batch B — content-parity audit (tsn/powerstate/faultinject/ratelimit/mdns/authz/relay/bridges)
Part of the v3.0.0 ground-up rewrite (cpp-RCP #129, ROADMAP.md Phase 17),
branch rewrite/v3-from-c-rcp. Phase 8 (remaining modules), batch B of 2:
tsn, powerstate, faultinject, ratelimit, mdns, authz, relay/relay.hpp,
restbridge/grpcbridge -- all already fully implemented+tested from an
earlier untracked pass; this batch is a content-parity audit against
c-RCP, not a rewrite.
Findings, per module
divergence (c-RCP wraps a full AVTP transport + raw-frame priority
classifier; cpp-RCP exposes a primitive apply_priority() called with
an already-known RequestCategory) -- pre-documented in-header, no
action. Catalog observation only (c-RCP's REQ-TSN-007/008 have no
cpp-RCP analog, by design) -- left untouched, Phase 6 is closed.
gaps from Phase 6 batch 13 (REQ-PWRMODE-004/012/017/019/021/022/
026/027) -- confirmed NOT re-litigated. Confirmed wakeup.hpp (not
powerstate.hpp) carries the actual SleepCMD/WakeUp wire codec
equivalent to c-RCP's ep_wakeup.h -- a layering difference, not a
missing capability. No changes.
count-limited rules). Notably its pick_rule() already fixes a real
use-after-free/data-race an earlier revision had, documented in-file
as cpp-RCP-D6 -- arguably more correct than c-RCP's own mechanism.
No action.
exemption, per-domain keying). Bootstrap/refill semantics match
exactly. No action.
make_instance_name). One cosmetic-only divergence (hex case, service
type string) -- not a wire-interop requirement since mDNS records are
self-contained. No action.
in-file rather than ported -- c-RCP keys policy entries on an opaque
request_type byte (letting a policy distinguish read vs write within
one request kind); cpp-RCP's RequestCategory taxonomy is coarser and
cannot express that distinction. Pre-existing since v2.11.0, already
justified at length in the header's own comment, and changing it
would break the already-tested PolicyEntry/permit() contract -- out
of this batch's authority. Documented as a known granularity gap for
a possible future targeted fix, not force-fit here.
(relay.hpp is the protocol-agnostic Channel/Context/Node
abstraction; adapt.hpp is the RCP-specific wiring on top, already
covered by Phase 6 batch 12). c-RCP's own relay.h header states
outright it is "a pure-C port of the same subset cpp-RCP's
include/relay/relay.hpp exposes... not a full RELAY binding" --
cpp-RCP's version is the reference here, confirmed full parity
(superset, even -- templated Channel vs one concrete type). No
action.
both sides (no backend linked, every call returns not-supported).
c-RCP's own header comments confirm they mirror cpp-RCP's stub
behavior. Config shapes and defaults match exactly. No action.
Verification
Independently re-verified: confirmed the c-RCP relay.h "pure-C port of
cpp-RCP's own relay.hpp" claim, the restbridge.h "mirrors cpp-RCP's own
stub" claim, and the faultinject.hpp cpp-RCP-D6 use-after-free-fix
comment all directly against source -- all accurate. Full tree rebuilt
from scratch: 0 errors, 0 warnings, 58/58 ctest suites pass (100%).
include/rcp/authz.hpp: +17 lines (comment only, zero behavior change).
No other files touched.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com