Repository navigation
feat: v2.6.0 — E2E CRC Safe Points & Safety-Request Variants (§Phase 13 milestone 50) - #43
Merged
Merged
Conversation
…13 milestone 50) Replaces rcp/e2e.hpp in full, per the Satellite Package Disposition table's entry for this file: the pre-replacement CRC-16/CCITT-FALSE + sequence-counter + replay-window wrapper around rcp.hpp's Controller is discarded, not adapted. Nothing else in the tree depended on that old API, so no legacy_e2e.hpp split was needed the way legacy_wire.hpp was at v2.0.0. - crc32/detail::crc32_update implement the specification's actual end-to-end CRC (32-bit, polynomial 0xF4ACFB13, init 0xFFFFFFFF, final XOR 0xFFFFFFFF, both input and output reflected) via the standard table-less right-shifting construction for a RefIn=true/RefOut=true CRC. - coverage_buffer/compute_crc assemble and hash exactly stream_id + avtp_timestamp (zero-filled under NTSCF) + the full ACF shared header + payload; apply_acf_length_adjustment/apply_frame_length_adjustment implement the +1 quadlet / +4 octet trailing-CRC length pre-adjustment, layered on top of rcp/wire.hpp's existing ACF codec without changing its core framing. - crc_required gates CRC checking per message role off regmap::EndpointGenericConfig's new ep_req_crc_enable/ ep_ack_crc_enable/ep_response_crc_enable toggles; E2eErrc::crc_error is the CRC_ERROR failure path. - RxStreamGuard implements rx_enforce_e2e's per-request-drop-vs-whole- stream-latch choice; RxSequenceGuard implements rx_enforce_seq's monotonic check, orthogonal to the watchdog; RxWatchdog implements rx_wd_enable/rx_wd_timeout_interval overflow detection, the safe-state latch, and rx_wd_info_enable's repeating-notification flag. - apply_watchdog_overflow/apply_queue_overflow implement the purge-normal/retain-safety queue rule for their respective triggers by calling rcp::sequencer::RequestLedger::cancel_all(true) directly — that call already existed from v2.5.0's clear-non-safestate support. - endpoint_in_configured_safe_state implements both rx_safety_measure strategies (ForceHighImpedance vs. RunSafeSequencer); may_execute_now is the load-bearing safe-state gate for safety-tagged requests. rcp/regmap.hpp's RequestStreamConfig is expanded from its three placeholder fields to the full eleven-field watchdog/safe-state register set (plus the new RxSafetyMeasure enum); EndpointGenericConfig gains the three CRC toggles above. rcp/sequencer.hpp gains the three MSB-set safety-tagged opcodes — CompoundSafety (0x8F), CompoundWaitSafety (0x8B), TriggeredSafety (0x8E) — accepted by decode_request_type and mapped by category_of onto their base opcode's existing priority category; is_safety_variant is the single source of truth for which opcodes are safety-tagged, and the new request_record_for factory derives RequestRecord::is_safety from it automatically. New/updated coverage: tests/test_e2e.cpp (REQ-E2E-001..014, entirely rewritten), tests/test_sequencer.cpp (REQ-SEQ-010..012, added), tests/test_regmap.cpp (REQ-REGMAP-009 rewritten, REQ-REGMAP-015 added), traced in .fusa-reqs.json (100% requirement coverage verified locally via cpfusa trace --req-coverage 100). Bumps kVersion/project version to 2.6.0. Updates ROADMAP.md with a Done (v2.6.0) summary for milestone 50. 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.
Summary
Implements ROADMAP.md milestone 50, "E2E CRC Safe Points & Safety-Request Variants (v2.6.0)" — the Phase 13 milestone the roadmap's own introduction names as "the point at which the mandatory baseline plus safe-points exist."
rcp/e2e.hppREPLACED in full (per the Satellite Package Disposition table): the pre-replacement CRC-16/CCITT-FALSE + sequence-counter + replay-window wrapper aroundrcp.hpp'sControlleris discarded, not adapted. Nothing else in the tree depended on that old API (only its own test did), so nolegacy_e2e.hppsplit was needed.crc32implements the actual TC18 end-to-end CRC (32-bit, polynomial0xF4ACFB13, init0xFFFFFFFF, final XOR0xFFFFFFFF, both input/output reflected) via the standard table-less right-shifting construction.coverage_buffer/compute_crchash exactlystream_id+avtp_timestamp(zero-filled under NTSCF) + the ACF shared header + payload;apply_acf_length_adjustment/apply_frame_length_adjustmentimplement the +1 quadlet / +4 octet trailing-CRC length pre-adjustment on top ofrcp/wire.hpp's existing codec, unmodified.crc_requiredgates CRC checking per message role offregmap::EndpointGenericConfig's newep_req_crc_enable/ep_ack_crc_enable/ep_response_crc_enabletoggles;E2eErrc::crc_erroris theCRC_ERRORfailure path.RxStreamGuard(rx_enforce_e2edrop-vs-latch),RxSequenceGuard(rx_enforce_seqmonotonic check),RxWatchdog(rx_wd_enable/rx_wd_timeout_intervaloverflow + safe-state latch +rx_wd_info_enable).apply_watchdog_overflow/apply_queue_overflowimplement the purge-normal/retain-safety queue rule by callingsequencer::RequestLedger::cancel_all(true)directly — reusing v2.5.0's clear-non-safestate mechanism rather than reimplementing it.endpoint_in_configured_safe_state/may_execute_nowimplement the load-bearing safe-state gate: a safety-tagged request only executes once its endpoint is in its configured safe state.rcp/regmap.hpp:RequestStreamConfigexpanded from three placeholder fields to the full eleven-field watchdog/safe-state register set (rx_wd_timeout_interval,rx_wd_enable,rx_wd_safestate_enable,rx_enforce_e2e,rx_enforce_seq,rx_seq_safestate_enable,rx_ovrflw_safestate_enable,rx_safety_measure,rx_safestate_sequencer,rx_safe_sequencer_state,rx_wd_info_enable) plus the newRxSafetyMeasureenum;EndpointGenericConfiggains the three CRC toggles.rcp/sequencer.hpp: adds the three MSB-set safety-tagged opcodes —CompoundSafety(0x8F),CompoundWaitSafety(0x8B),TriggeredSafety(0x8E) — accepted bydecode_request_typeand mapped bycategory_ofonto their base opcode's existing priority category;is_safety_variantand the newrequest_record_forfactory giveRequestRecord::is_safetya single, automatic source of truth.New/updated coverage:
tests/test_e2e.cpp(REQ-E2E-001..014, entirely rewritten),tests/test_sequencer.cpp(REQ-SEQ-010..012, added),tests/test_regmap.cpp(REQ-REGMAP-009 rewritten for the expanded field set, REQ-REGMAP-015 added), traced in.fusa-reqs.json. BumpskVersion/project version to 2.6.0.ROADMAP.mdgets a**Done (v2.6.0):**summary for milestone 50.Test plan
All run locally against this branch (AppleClang 21; the repo's alire/gnat g++ 16.1.0 toolchain hits a pre-existing, unrelated
sim.hppbuild failure reproducible on unmodifiedmain— not something this PR touches or introduces):cmake --build build --parallel— full project builds cleanctest --test-dir build -j1— 53/53 tests passcpfusa check— 0 errorscpfusa lint— 0 errors (against a clean checkout, matching CI's no-prior-build environment)cpfusa cyber— 0 errorscpfusa trace --req-coverage 100— 438/438 requirements annotated and tested (100%/100%)cpfusa verify— 53/53 tests pass, evidence generatedrelay conform --strict build/cpp-rcp) — PASS (§12.1–12.3)