Skip to content

rewrite(phase8): batch B — content-parity audit (tsn/powerstate/faultinject/ratelimit/mdns/authz/relay/bridges) - #170

Merged
SoundMatt merged 1 commit into
rewrite/v3-from-c-rcpfrom
phase8/batch-b-network
Aug 22, 2026
Merged

rewrite(phase8): batch B — content-parity audit (tsn/powerstate/faultinject/ratelimit/mdns/authz/relay/bridges)#170
SoundMatt merged 1 commit into
rewrite/v3-from-c-rcpfrom
phase8/batch-b-network

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

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

  • 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/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.
  • 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

…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>
@SoundMatt
SoundMatt merged commit 0d49e85 into rewrite/v3-from-c-rcp Aug 22, 2026
25 checks passed
@SoundMatt
SoundMatt deleted the phase8/batch-b-network branch August 22, 2026 21:20
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