rewrite(phase6): batch 6 — E2E/LIFECYCLE catalog re-derivation - #159
Merged
Conversation
Part of the v3.0.0 ground-up rewrite (cpp-RCP #129, ROADMAP.md Phase 17), branch rewrite/v3-from-c-rcp. Phase 6 (requirement catalog), batch 6 of 13 -- both safety-mechanism files (E2E CRC/sequence guard, LIFECYCLE state machine/access control). ## Scope e2e.hpp's REQ-E2E-* (c-RCP has 47 entries) and lifecycle.hpp's REQ-LIFECYCLE-* (c-RCP has 39 entries), 86 c-RCP entries total. ## Major finding: a pre-existing id-numbering collision, unique to this batch Unlike every prior batch, cpp-RCP's pre-existing REQ-E2E-001..014 and REQ-LIFECYCLE-001..007 entries were numbered independently (sequential-by-file-order) before this rewrite's later convention of reusing c-RCP's exact ids took hold -- they collide head-on with c-RCP's own ids 001-014/001-007, describing entirely different requirements (verified directly: cpp's REQ-E2E-004 is "verify_crc detects a mismatched or corrupted CRC"; c-RCP's REQ-E2E-004 is "rcp_e2e_length_with_crc() applies the length-accounting pre-adjustment" -- unrelated content, same id). Not renamed here (out of scope, no established rename plan for this specific collision unlike REQ-REGMAP-*/REQ-RMAP-*'s already-decided rename). Six c-RCP ids that are genuinely implemented but whose natural id is already taken (REQ-E2E-004-009) are filed to .fusa-reqs-pending.json as id-collision gaps -- a new gap category, distinct from a missing-tag or missing-behavior gap -- for a future renumbering-cleanup batch. ## New catalog entries (39) - E2E (13): 021, 028, 029, 030, 032, 035, 036, 037, 038, 040, 042, 045, 046. None carry severity:cybersecurity -- c-RCP's own catalog has zero severity fields anywhere (confirmed via grep of the whole file); cpp-RCP's existing 14 cybersecurity-marked E2E entries are this rewrite's own earlier independent judgment, not a c-RCP citation, so nothing new was copied. sec-tested count unchanged at exactly 72/583 -- no CI floor change needed. - LIFECYCLE (26): 013-022, 024-039 (023 excluded, see below). Two entries (022, 034) copied honestly as scope="tc18-gap"/ status="partial", matching c-RCP's own tracked findings and mirrored by cpp-RCP's own pre-existing LifecycleErrc::eps_not_idle doc comment. ## Real bug found and fixed: REQ-LIFECYCLE-023 tag was mislabeled The pre-existing orphan tag for REQ-LIFECYCLE-023 was attached to field_writable()'s GENERAL per-FieldKind tests (which actually match c-RCP's REQ-LIFECYCLE-018/019/020), not to c-RCP-023's actual narrow claim (EP_GEN_CFG/QUEUE_CFG mapped to HwGeneric's lock rule, per Figure 17). Retagged the four field_writable() tests to their correct ids (018/019/020, plus their real secondary associations 026/027/030/035/036/037). REQ-LIFECYCLE-023's actual claim confirmed NOT implemented anywhere -- regmap.hpp's own header comment explicitly defers the "EP0 address-routed dispatcher" carrying this decision -- filed to .fusa-reqs-pending.json as a genuine behavioral gap, not a tag issue. Independently spot-verified: confirmed cpp's REQ-E2E-004 content mismatch and the REQ-LIFECYCLE-023 tag removal directly against the diff. ## Other gaps filed (5 more, total 11 new pending entries this batch) REQ-E2E-033/039/041/047: genuinely implemented+tested in mock.hpp/ test_mock.cpp (out-of-scope files) with zero formal tags -- same REQ-WDG-010 pattern from batch 5, verified by reading the actual dispatch code. Filed for a future mock.hpp-scoped batch (13) to tag and migrate. ## New test added LifecycleErrc category/message distinctness (REQ-LIFECYCLE-021) -- was implemented but had zero test coverage. ## Duplicate/consolidation mappings (no action, largest area of the batch) E2E: c-RCP 001-020, 022-027, 031, 034, 043, 044 map onto existing/new cpp entries (043/044 subsumed into new StreamFaultTracker entry 021; 026/035 and 030/036 are literal duplicate pairs c-RCP itself acknowledges, both kept separately per c-RCP's own practice). LIFECYCLE: c-RCP 001-012 map onto cpp's existing 001-007 (e.g. 010+011 both subsumed by cpp-006's single unconditional-deconfigure statement). ## Out-of-scope finding, flagged only Pre-existing orphan tags REQ-RMAP-049/REQ-RMAP-055 in lifecycle.hpp's own manifest, untouched -- for whoever picks up the RMAP prefix (batch 11). ## Verification Independently re-verified (not just the porting agent's own report): semantic id-keyed diff confirms zero pre-existing catalog entries modified/deleted, exactly the 39 new ids added matching the report's per-prefix breakdown exactly. Confirmed no new entry carries severity:cybersecurity -- sec-tested count holds exactly at 72/583. Directly spot-checked the id-collision claim (cpp vs c-RCP REQ-E2E-004 content) and the REQ-LIFECYCLE-023 mislabel-and-retag against the real diff -- both check out. Confirmed e2e.hpp/lifecycle.hpp diffs are PURE tag-manifest additions/corrections with zero behavioral code changes -- appropriate caution for safety-mechanism files. Full tree rebuilt from scratch: 0 errors, 0 warnings, 58/58 ctest suites pass (100%). .fusa-reqs.json: 544 -> 583 entries (+39, 5203 -> 5663 lines). .fusa-reqs-pending.json: 20 -> 31 entries (+11, 202 -> 310 lines). include/rcp/e2e.hpp: +6 lines (tags only). tests/test_e2e.cpp: +8 lines net. include/rcp/lifecycle.hpp: +17 lines (tags only). tests/test_lifecycle.cpp: +52 lines net (retags + 1 new test). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
SoundMatt
added a commit
that referenced
this pull request
Aug 22, 2026
…160) Part of the v3.0.0 ground-up rewrite (cpp-RCP #129, ROADMAP.md Phase 17), branch rewrite/v3-from-c-rcp. Phase 6 (requirement catalog), batch 7 of 13. ## Scope can.hpp's REQ-CANEP-* (c-RCP: 42 entries), lin.hpp's REQ-LINEP-* (34), iseled.hpp's REQ-ISELED-* (42) -- 118 c-RCP entries total. Base bus/ frame-layer REQ-CAN-*/REQ-LIN-* prefixes explicitly out of scope. ## Major finding: can.hpp/lin.hpp/iseled.hpp were already far ahead of the catalog An earlier, untracked rewrite pass had already brought these three files close to c-RCP's real design -- most of the 118 requirements were already genuinely implemented and tested; the gap was almost entirely in the catalog/tags, not the code. iseled.hpp/test_iseled.cpp already carried complete file-level tags for essentially the whole c-RCP id range -- zero changes needed to either file. can.hpp/lin.hpp only had tags for their old, pre-rewrite low-numbered ids and needed 33/33 new tags respectively. ## Id-collision pattern (same class as batch 6/#159) cpp's pre-existing low ids (CANEP 001-009, LINEP 006, ISELED 001-007) were numbered independently before this rewrite's "reuse c-RCP's exact id" convention took hold, and collide with c-RCP's own same-numbered but content-unrelated requirements (verified directly: cpp's REQ-CANEP-001 is "CAN's ep_type id is 0x0B"; c-RCP's is "rcp_ep_can_frame_format_valid() accepts exactly the six FrameFormat values Table 57 defines" -- unrelated content, same id). Filed as 17 id-collision gaps to .fusa-reqs-pending.json (CANEP-001..009 x9, LINEP-006 x1, ISELED-001..007 x7) rather than corrupting catalog id uniqueness, for a future renumbering-cleanup batch. ## New catalog entries (98) - CANEP: 33 (010-028, 030-042; 029 included as an honest status:not-implemented spec-gap entry, matching c-RCP's own tracked defect -- not force-fit as implemented) - LINEP: 31 (007-039, excluding collision 006 and retired 023/026) - ISELED: 34 (008-027, 029-042, excluding collisions 001-007 and retired 028) ## Retired, no action (3) REQ-LINEP-023/026, REQ-ISELED-028 -- c-RCP itself retired these as near-duplicates; correctly not ported. ## Real test-coverage gaps found and closed (new TEST_CASEs added) can.hpp: CanErrc message distinctness; CanFunctionalConfig zero-init; full reject-taxonomy completions for decode_frame_request/ decode_frame_response/decode_frame_response_fragment/ decode_reassembled_frame_response (bad_msg_type/bad_frame_format/ bad_arbitration_id were previously never exercised, only wrong_bus/ short_frame/wrong_op/bad_evt were); a dedicated regression test for the ep_clear_req_storage wire-bit-4 fix (a wrong-but-self-consistent bit that round-trip tests alone can't catch); explicit byte-level right-alignment assertion; remote-frame-absence documentation test. lin.hpp: LinErrc message distinctness; decode_command_request bad_evt/bad_msg_type paths that were named in an existing test's title but never actually exercised; LinReconfigErrc message non-emptiness. Two initially-incorrect test constructions were caught and fixed before finalizing (a structurally-unreachable bad_msg_type-via-ACF_GBB path, a byte-index mislabel in the right-alignment test). ## Verification Independently re-verified (not just the porting agent's own report, which itself ran the real cpfusa v0.18.0 trace tool and reported Total 681/Annotated 681/Tested 681, 100% both metrics, secTested holding at 72): semantic id-keyed diff confirms zero pre-existing catalog entries modified/deleted, exactly 98 new ids matching the report's per-prefix breakdown exactly (CANEP 33, LINEP 31, ISELED 34), zero duplicate ids anywhere in the catalog. Confirmed no new entry carries severity:cybersecurity -- sec-tested count holds exactly at 72/681. Directly spot-checked the CANEP-001 id-collision claim against both catalogs' actual content -- confirmed real. Confirmed can.hpp/lin.hpp diffs are pure additions (zero deleted lines across all six touched files) -- tags and new tests only, no existing behavior touched. Full tree rebuilt from scratch: 0 errors, 0 warnings, 58/58 ctest suites pass (100%). .fusa-reqs.json: 583 -> 681 entries (+98, 5663 -> 6806 lines). .fusa-reqs-pending.json: 31 -> 48 entries (+17, 310 -> 517 lines). include/rcp/can.hpp: +33 lines (tags only). include/rcp/lin.hpp: +33 lines (tags only). tests/test_can.cpp: +335 lines. tests/test_lin.cpp: +101 lines. include/rcp/iseled.hpp, tests/test_iseled.cpp: unchanged. Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
10 tasks
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.
Part of the v3.0.0 ground-up rewrite (#129, ROADMAP.md Phase 17). Phase 6 (requirement catalog), batch 6 of 13 — both safety-mechanism files.
This batch: E2E (47 c-RCP entries) / LIFECYCLE (39 c-RCP entries)
REQ-E2E-001..014/REQ-LIFECYCLE-001..007were numbered independently before this rewrite's id-reuse convention took hold — they collide head-on with c-RCP's own same-numbered but unrelated requirements (verified directly: cpp'sREQ-E2E-004is aboutverify_crc(); c-RCP's is aboutlength_with_crc()'s pre-adjustment). 6 genuinely-implemented ids filed as a new "id-collision" gap category in.fusa-reqs-pending.jsonfor a future renumbering batch.REQ-LIFECYCLE-023's pre-existing orphan tag was mislabeled — attached to the wrong tests (field_writable()'s general per-FieldKind mechanism, which actually matches018/019/020). Retagged correctly;023's real, narrow claim (Figure 17's HwGeneric lock rule also governingEP_GEN_CFG/QUEUE_CFG) confirmed genuinely unimplemented and filed as a real behavioral gap.REQ-WDG-010), plus a rich set of duplicate/consolidation mappings recorded in the commit message.Verification
Independently re-verified: semantic id-keyed diff confirms zero pre-existing entries modified, exactly 39 new ids matching the report's breakdown exactly. Spot-checked both the id-collision and the
REQ-LIFECYCLE-023mislabel claims directly against the diff/catalogs — both check out. Confirmede2e.hpp/lifecycle.hppdiffs are pure tag-manifest changes with zero behavioral code changes — appropriate given these are safety-mechanism files. Confirmed no new entry carriesseverity: cybersecurity— sec-tested count holds at 72/583. Full tree rebuilt from scratch: 0 errors, 0 warnings, 58/58 ctest suites pass.🤖 Generated with Claude Code