Reconcile module naming with RELAY spec v1.14 §13.7.2 - #88
Merged
Conversation
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>
This was referenced Jul 28, 2026
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>
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.
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 correctlynamed. Confirmed, no change.
safept.h/safept.cmerged intoe2e.h/e2e.c, replacing the oldad-hoc CRC-16 + sequence-counter + replay-guard wrapper outright, matching
the equivalent merges already shipped in cpp-RCP's
e2e.hppandrust-RCP's
e2e.rs(both confirmed via their public source: full contentreplacement, no legacy shim, since nothing else in either tree depended
on the old CRC-16 API — true here too). Renamed
rcp_safept_*/RCP_SAFEPT_*torcp_e2e_*/RCP_E2E_*. Renumbered the surviving 27requirements in
.fusa-reqs.jsonasREQ-E2E-001..027, mirroringcpp-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.csplit: the RC Server lifecycle state machine(registry's
lifecycleconcern) moved to newlifecycle.h/lifecycle.cwith an
rcp_lifecycle_*prefix, matching cpp-RCP's ownREQ-LIFECYCLE-*requirement-id precedent for the equivalent module. Theper-endpoint
ep_enablepre-load-then-drain queue mechanism — adistinct, registry-unconstrained concern neither cpp-RCP nor rust-RCP
have an equivalent module for yet — stayed under the original
server.hname.
test_server.csplit intotest_lifecycle.c+ a reducedtest_server.cthe same way.REQ-SRV-001..020,024→REQ-LIFECYCLE- 001..021;REQ-SRV-021..023(queue-only) →REQ-SRV-001..003.request_prefix:
request_cancel.h,request_chained.h,request_compound.h,request_timed.h,request_triggered.h,request_sequencer.h— theregistry's
requestentry names "compound, compound-wait, triggered,chained, timed... and sequencers" explicitly. This matches the codebase's
own existing
ep_*.hgrouping idiom for "one registry name, severalper-language files."
scheduler.hstays unrenamed: it's a distinctexecution-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 theissue's own "packaging is idiomatic per language" framing.
fragment: no dedicated module exists yet — Phase 20fragmentation/reassembly is unimplemented (
acf.h'sread_size_or_segment_numis round-tripped only). Nothing to rename;noted in
e2e.h's file header for when Phase 20 lands it.canbr/linbrADAPT-vs-DEPRECATE: left untouched, exactly as theissue flagged. For the record: this repo's own
ROADMAP.mdalreadyindependently 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
-Wall -Wextra -Wpedantic(both thelibrary and the
-DRELAY_BUILD_CLI=ONCLI target)relay conform --strictagainst the built CLI: PASScfusa check/lint/analyze/cyber/trace --req-coverage 100/verify/qualify/ vuln: all pass, exceptcfusa check's pre-existingHARA002/HARA003findings against
.fusa-hara.json— confirmed identical (same 20errors) on an unmodified
maincheckout, so unrelated to this PR..fusa-reqs.jsonrequirement catalog stays in exact bidirectional syncwith every
//cfusa:req///cfusa:testtag in the tree (804/804 bothdirections).
Known, out-of-scope gap
tara.md/CYBERSECURITY.md/SAFETY_PLAN.md/FORMAL_VERIFICATION.mdstill reference the old
REQ-E2E-004..012ids (replay-guard/CRC threatmitigations) 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.