Skip to content

Reconcile module naming with RELAY spec v1.14 §13.7.2 - #88

Merged
SoundMatt merged 2 commits into
mainfrom
naming-reconciliation-issue-87
Jul 28, 2026
Merged

Reconcile module naming with RELAY spec v1.14 §13.7.2#88
SoundMatt merged 2 commits into
mainfrom
naming-reconciliation-issue-87

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Addresses #87.

Summary

Reconciles this repo's TC18-replacement module naming with the standard
module-name registry RELAY spec v1.14 added to §13.7.2, per the deltas
identified in #87 (independently re-verified against the current code
before acting on each one):

  • avtp.h, acf.h, discovery.h, regmap.h — already correctly
    named. Confirmed, no change.
  • safept.h/safept.c merged into e2e.h/e2e.c, replacing the old
    ad-hoc CRC-16 + sequence-counter + replay-guard wrapper outright, matching
    the equivalent merges already shipped in cpp-RCP's e2e.hpp and
    rust-RCP's e2e.rs (both confirmed via their public source: full content
    replacement, no legacy shim, since nothing else in either tree depended
    on the old CRC-16 API — true here too). Renamed rcp_safept_*/
    RCP_SAFEPT_* to rcp_e2e_*/RCP_E2E_*. Renumbered the surviving 27
    requirements in .fusa-reqs.json as REQ-E2E-001..027, mirroring
    cpp-RCP's own precedent of renumbering a merged module's requirement ids
    under the new module name; removed the 12 old CRC-16-era REQ-E2E-*
    entries whose implementation no longer exists.
  • server.h/server.c split: the RC Server lifecycle state machine
    (registry's lifecycle concern) moved to new lifecycle.h/lifecycle.c
    with an rcp_lifecycle_* prefix, matching cpp-RCP's own
    REQ-LIFECYCLE-* requirement-id precedent for the equivalent module. The
    per-endpoint ep_enable pre-load-then-drain queue mechanism — a
    distinct, registry-unconstrained concern neither cpp-RCP nor rust-RCP
    have an equivalent module for yet — stayed under the original server.h
    name. test_server.c split into test_lifecycle.c + a reduced
    test_server.c the same way. REQ-SRV-001..020,024REQ-LIFECYCLE- 001..021; REQ-SRV-021..023 (queue-only) → REQ-SRV-001..003.
  • Conditional-request taxonomy grouped under a common request_
    prefix
    : request_cancel.h, request_chained.h, request_compound.h,
    request_timed.h, request_triggered.h, request_sequencer.h — the
    registry's request entry names "compound, compound-wait, triggered,
    chained, timed... and sequencers" explicitly. This matches the codebase's
    own existing ep_*.h grouping idiom for "one registry name, several
    per-language files." scheduler.h stays unrenamed: it's a distinct
    execution-priority concern the registry doesn't name (and which
    safept.h's own file header already called out as "a separate,
    unduplicated concern" from the request taxonomy) — the original issue's
    bullet lumped it in with the other six, but the registry text itself
    doesn't. Internal function/type prefixes (rcp_cancel_*,
    rcp_compound_*, ...) are unchanged; only file grouping changed, per the
    issue's own "packaging is idiomatic per language" framing.
  • fragment: no dedicated module exists yet — Phase 20
    fragmentation/reassembly is unimplemented (acf.h's
    read_size_or_segment_num is round-tripped only). Nothing to rename;
    noted in e2e.h's file header for when Phase 20 lands it.
  • canbr/linbr ADAPT-vs-DEPRECATE: left untouched, exactly as the
    issue flagged. For the record: this repo's own ROADMAP.md already
    independently commits to ADAPT (narrowed role) for both, matching
    go-RCP and diverging from cpp-RCP's DEPRECATE — that's a pre-existing
    decision this PR doesn't touch or resolve.

Scope

Renames, a merge, and a split only — no protocol behavior changed.

Verification

  • Full build: 0 warnings under -Wall -Wextra -Wpedantic (both the
    library and the -DRELAY_BUILD_CLI=ON CLI target)
  • Full test suite: 61/61 passing
  • relay conform --strict against the built CLI: PASS
  • cfusa check/lint/analyze/cyber/trace --req-coverage 100/verify/qualify/ vuln: all pass, except cfusa check's pre-existing HARA002/HARA003
    findings against .fusa-hara.json — confirmed identical (same 20
    errors) on an unmodified main checkout, so unrelated to this PR.
  • .fusa-reqs.json requirement catalog stays in exact bidirectional sync
    with every //cfusa:req///cfusa:test tag in the tree (804/804 both
    directions).

Known, out-of-scope gap

tara.md/CYBERSECURITY.md/SAFETY_PLAN.md/FORMAL_VERIFICATION.md
still reference the old REQ-E2E-004..012 ids (replay-guard/CRC threat
mitigations) that no longer exist post-merge. cpp-RCP's shipped docs have
the identical latent gap after its own equivalent merge. Updating
threat-model documentation to reflect the CRC32-only mechanism is a
security-review judgment call, not a naming fix, so it's left for a
dedicated follow-up rather than folded into this PR — noted directly in
e2e.h's file header for visibility.

Brings this repo's RCP protocol-core module names in line with the
standard module-name registry RELAY v1.14 added to §13.7.2:

- avtp.h, acf.h, discovery.h, regmap.h already matched the registry
  exactly; verified, no change needed.
- Merged safept.h/safept.c (the CRC32 safe-points mechanism) back into
  e2e.h/e2e.c, replacing the old ad-hoc CRC-16 + sequence-counter +
  replay-guard wrapper outright rather than keeping both names, matching
  the equivalent merges already shipped in cpp-RCP's e2e.hpp and
  rust-RCP's e2e.rs. Renamed rcp_safept_*/RCP_SAFEPT_* to
  rcp_e2e_*/RCP_E2E_*; renumbered the surviving 27 requirements as
  REQ-E2E-001..027 in .fusa-reqs.json (matching cpp-RCP's own
  REQ-LIFECYCLE-style renumbering precedent), removing the 12 old
  CRC-16-era REQ-E2E entries whose implementation no longer exists.
- Split server.h/server.c: the RC Server lifecycle state machine (the
  registry's `lifecycle` concern) moved to new lifecycle.h/lifecycle.c
  with an rcp_lifecycle_* prefix, matching cpp-RCP's own REQ-LIFECYCLE-*
  precedent; the per-endpoint ep_enable pre-load-then-drain queue
  mechanism (a distinct, registry-unconstrained concern) stayed under
  the original server.h name. Renumbered REQ-SRV-001..020,024 to
  REQ-LIFECYCLE-001..021 and REQ-SRV-021..023 to REQ-SRV-001..003.
  test_server.c split into test_lifecycle.c + a reduced test_server.c
  the same way.
- Grouped the conditional-request taxonomy under a common request_
  prefix (request_cancel.h, request_chained.h, request_compound.h,
  request_timed.h, request_triggered.h, request_sequencer.h) matching
  the registry's `request` entry ("compound, compound-wait, triggered,
  chained, timed... and sequencers") and this codebase's own existing
  ep_*.h grouping idiom; scheduler.h stays unrenamed since request
  execution-priority ordering is a separate concern the registry does
  not name. Internal function/type prefixes (rcp_cancel_*, rcp_compound_*,
  ...) are unchanged -- only the file grouping changed.
- No dedicated `fragment` module exists yet (Phase 20 fragmentation/
  reassembly is unimplemented; acf.h's read_size_or_segment_num is
  round-tripped only) -- nothing to rename there yet; noted in e2e.h for
  when Phase 20 lands it.
- canbr/linbr's ADAPT-vs-DEPRECATE architectural question is left
  untouched, as flagged in the issue -- this repo's own ROADMAP.md
  already independently commits to ADAPT (narrowed role), matching
  go-RCP and diverging from cpp-RCP's DEPRECATE; not resolved here.

All renames/splits/merges only -- no protocol behavior changed. Full
build (0 warnings under -Wall -Wextra -Wpedantic), full test suite
(61/61), RELAY conformance gate (`relay conform --strict`), and
c-FuSa's check/lint/analyze/cyber/trace --req-coverage 100/verify/
qualify/vuln commands all pass locally.

Addresses #87.

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
Reconciles the module-naming reconciliation (#87) with the CAN
controller, ISELED, and MDIO endpoint milestones (v0.72.0-v0.74.0)
that landed on main after this branch diverged.

CMakeLists.txt / tests/CMakeLists.txt: kept both sides' additions --
the new ep_can.c/ep_iseled.c/ep_mdio.c library sources and
test_ep_can.c/test_ep_iseled.c/test_ep_mdio.c test targets from main,
alongside this branch's src/request_*.c renames and src/lifecycle.c
addition.

include/rcp/ep_can.h, include/rcp/ep_iseled.h, include/rcp/ep_mdio.h
(and their .c/test_*.c files): these three endpoints were written
against the pre-split server.h (rcp_server_lifecycle_t,
rcp_server_writer_ctx_t, rcp_server_field_writable(),
RCP_SERVER_FIELD_FUNCTIONAL_W, RCP_SERVER_LIFECYCLE_*) since they
landed on main before this branch's server.h/lifecycle.h split existed.
Updated all of it to the new lifecycle.h names
(rcp_lifecycle_state_t, rcp_lifecycle_writer_ctx_t,
rcp_lifecycle_field_writable(), RCP_LIFECYCLE_FIELD_FUNCTIONAL_W,
RCP_LIFECYCLE_*) and #include "rcp/lifecycle.h", including the
matching file-header prose in each endpoint's documentation comment.
None of the three endpoints used server.h's still-unrenamed
per-endpoint ep_enable queue API, so nothing in them still needs
server.h at all.

.fusa-reqs.json merged cleanly (no duplicate ids; REQ-CANEP/REQ-ISELED/
REQ-MDIO from main and REQ-E2E/REQ-LIFECYCLE/REQ-SRV renumbering from
this branch coexist). All other generated safety artifacts
(fmea.json/.csv, sci.json, sbom.json, report.json/.html, etc.) took
main's side untouched, since this branch never modified them.

Verified post-merge: full build (0 warnings, -Wall -Wextra -Wpedantic),
full test suite (64/64), relay conform --strict (PASS), and cfusa
check/lint/analyze/cyber/trace --req-coverage 100/verify/vuln (all
clean) against c-FuSa v0.5.46 (the version main now pins).

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit b85c351 into main Jul 28, 2026
20 checks passed
@SoundMatt
SoundMatt deleted the naming-reconciliation-issue-87 branch July 28, 2026 22:22
SoundMatt added a commit that referenced this pull request Jul 28, 2026
…stone 75) (#93)

Adds include/rcp/power.h + src/power.c as new, additive protocol-core
surface for the RC Server power-mode state machine (extraction sect3.3-3.4):
Normal/StandBy/Sleep/Unpowered modes, the general hot/cold-start transition
table, and the four-step hot-start-from-Sleep handshake (network-interface
re-enable, repeated WakeUp attempts until echoed or a repeat-limit is hit,
ack-queue resume, and the network-level TC14/TC10 wake bypass) as an
explicit, directly-testable state machine. Cross-references lifecycle.h
(not server.h) for lifecycle-state concerns, per the #87/#88 module-naming
split. Uses its own REQ-PWRMODE-* requirement prefix, verified not to
collide with the pre-existing REQ-PWR-* group already used by the legacy
powerstate.c satellite (untouched here; its own REPLACE work is Satellite
Rework v0.79.0).

Adds include/rcp/ep_wakeup.h + src/ep_wakeup.c as the dedicated
power-management endpoint (ep_type=0x01): wake-source pin
configuration/monitoring, the fixed SleepCMD (0xA5) request kind encoded
entirely outside the general request_type taxonomy, and dedicated
WakeUp-message emission in place of the generic per-endpoint
trigger-signal mechanism. SleepCMD entry requests are gated by power.h's
rcp_pwrmode_check_entry(), the direct protocol-core replacement for
powerstate.c's ad-hoc Active/Sleeping/BusOff model.

tests/test_power.c (32 cases) and tests/test_ep_wakeup.c (28 cases) pass,
alongside the full existing ctest suite (66/66, ASan/UBSan-clean).

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.

1 participant