Repository navigation
Commit 4ac8eae
committed
rewrite(phase6): batch 1 — ACF/AVTP/WIREERR catalog re-derivation
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 1 of 13.
## Background
cpp-RCP's .fusa-reqs.json (412 entries) is missing hundreds of
requirement entries the code was already ported to implement in
Phases 1-5, and cpp-RCP's code already references 1015 distinct REQ-*
ids via //fusa:req/[REQ-XXX] tags against only 412 defined entries --
603 orphaned citations left behind by porting agents as unresolved
"ported from c-RCP REQ-XXX, see file.c:NNN" provenance notes. Phase 6
walks these existing citations prefix-by-prefix and turns each into a
real catalog entry (or a documented gap), rather than re-deriving
requirements from scratch.
## Prefix-scheme decision
Kept REQ-ACF-*/REQ-AVTP-*/REQ-WIREERR-* as their own prefixes reusing
c-RCP's exact id numbers 1:1, rather than folding into cpp-RCP's
existing REQ-WIRE-*/REQ-ACF-*/REQ-ERR-* buckets -- the code already
had orphaned citations using c-RCP's exact numbering (REQ-ACF-044,
REQ-AVTP-014/021/022/023), signaling that was the intended scheme all
along. Existing REQ-WIRE-*/REQ-ACF-*/REQ-ERR-* entries are untouched;
duplicate-coverage mappings recorded below for anyone reconciling the
two schemes later.
## New catalog entries (36)
- REQ-ACF-{001,004,012,013,014,017,019,021,023,024,025-031,032,033,
038,044,047-053} (28 entries)
- REQ-AVTP-{013,014,015,021,022,023,031} (7 entries)
- REQ-WIREERR-001 (WireErrorCode enum matches TC18 Table 27/30 numbering)
Each has a real //fusa:req tag in acf.hpp/avtp.hpp and //fusa:test +
Catch2 bracket tag coverage in test_acf.cpp/test_avtp.cpp. 3 new tests
added where coverage was genuinely missing: acf_category()/
avtp_category() message-uniqueness (REQ-ACF-001, REQ-AVTP-015),
encoder-forces-correct-type-despite-wrong-caller-header (REQ-ACF-004/
038), WireErrorCode numeric-value pinning (REQ-WIREERR-001). Also
fixed a mislabeled inline comment in avtp.hpp that cited REQ-AVTP-022
for behavior that's actually REQ-AVTP-031's (tscf_reserved_all_zero).
## Genuine gaps found (9, filed to .fusa-reqs-pending.json, not the catalog)
- REQ-ACF-006/040: encode_acf_abb/_gbb honor a caller-supplied nonzero
acf_msg_length instead of always recomputing -- a documented,
deliberate divergence needed by e2e.hpp's CRC-trailer accounting,
flagged here for an explicit accept/reject call rather than silently
carried forward.
- REQ-ACF-009/041: decoders never validate declared acf_msg_length
against buffer size -- matches the code's own pre-existing
TODO(phase1-followup) comment.
- REQ-ACF-011: encode_acf_gbb doesn't zero message_timestamp when
mtv=false.
- REQ-ACF-018: no read_size_or_segment_num kind-selector; existing doc
comment contradicts TC18's op-based rule.
- REQ-AVTP-012: no combined stream_id+byte_bus_id address-equality
construct anywhere.
- REQ-WIREERR-002: no WireErrorCode-to-string function.
- REQ-WIREERR-005: SequencerNotKnown enumerator has zero consumers
(owner-tracking not yet built).
## Judgment calls, not filed as gaps (documented here, not in the pending file)
- REQ-ACF-037: cpp's op is a 2-state bool, not c-RCP's 3-state enum --
the OP_NONE fallback case is structurally inapplicable, not missing.
- REQ-AVTP-016/027 (transport retain/release refcounting): cpp-RCP
uses RAII via l2.hpp/udp.hpp/shmem.hpp instead of a manual-refcount
transport abstraction -- an architecture divergence, and neither has
a TC18 citation in c-RCP's own catalog, so they don't fit the
pending file's TC18-scope contract.
## Existing-duplicate mappings (no action; c-RCP id -> cpp-RCP id already covering it)
ACF: 002/022/034/035/036/037->WIRE-010, 005/039->WIRE-013, 007/008->
WIRE-014, 010->WIRE-004, 015/016/046->WIRE-006, 020->WIRE-004,
042/043/045->WIRE-005.
AVTP: 001/003->WIRE-001, 002/004->WIRE-002, 005/006->WIRE-013,
007/008->WIRE-003, 010/011/025->WIRE-007.
## Out of scope (implemented, but in other files -- noted only, not this batch's concern)
AVTP-009/017-020/024/028/029/030/032-034 (l2.hpp, udp.hpp, shmem.hpp,
lifecycle.hpp, mock.hpp, server.hpp); WIREERR-003/004/006/007 (e2e.hpp,
lifecycle.hpp, request.hpp, pwm.hpp) -- confirmed genuinely implemented
there, will get their own tags when those prefixes' batches run.
## Verification
.fusa-reqs.json: 412 -> 448 entries (+36, 3672 -> 4092 lines).
.fusa-reqs-pending.json: 3 -> 12 entries (+9, 35 -> 123 lines).
include/rcp/acf.hpp: +28 lines. include/rcp/avtp.hpp: +14 lines net.
tests/test_acf.cpp: +84 net. tests/test_avtp.cpp: +22 net.
Independently re-verified (not just the porting agent's own report):
confirmed programmatically that zero of the 412 pre-existing catalog
entries were modified or deleted (semantic id-keyed diff against the
pre-batch base, not just a raw line diff -- the raw diff shows churn
in unrelated CLI/RELAY/Discovery entries that's pure JSON
re-serialization noise, not content change), and that zero orphaned
REQ-ACF-*/REQ-AVTP-*/REQ-WIREERR-* tags remain anywhere in acf.hpp/
avtp.hpp/test_acf.cpp/test_avtp.cpp. Full tree rebuilt from scratch:
0 errors, 0 warnings, 58/58 ctest suites pass (100%).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
## CI gate fix found while watching this PR's checks
`cpfusa trace`'s sec-tested gate failed: it was a 17% floor (64/376 at
the time it was written) against `secTestedRequirements/totalRequirements`,
but its own comment already stated the real intent was "a regression
floor against the exact, CYBERSECURITY.md-enumerated subset" losing
test coverage -- not a claim about what fraction of the codebase is
security-relevant. A percentage-of-total is the wrong shape for that
intent once the total catalog is deliberately growing (exactly what
Phase 6 does): this batch's 36 new, correctly non-cybersecurity
REQ-ACF-*/REQ-AVTP-*/REQ-WIREERR-* entries dropped the ratio from
72/412=17.5% to 72/448=16.1%, failing a floor that was never meant to
track total-catalog size. Converted ci.yml's "Enforce security-test
coverage" step to an absolute-count floor (>= 72, the current
CYBERSECURITY.md-enumerated total) instead -- this still catches the
real regression the step exists for (an enumerated id losing its test
tag, or being dropped from severity:cybersecurity) without being
diluted by legitimate, intentional catalog growth elsewhere. Without
this fix, every subsequent Phase 6 batch would hit the same false
failure as the denominator keeps growing toward c-RCP's 1282-entry
scale.
Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>1 parent 4db668c commit 4ac8eae
7 files changed
Lines changed: 774 additions & 95 deletions
File tree
- .github/workflows
- include/rcp
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
33 | 121 | | |
34 | 122 | | |
35 | 123 | | |
0 commit comments