rewrite(phase6): batch 12 — DISC/RELAY catalog re-derivation - #165
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 12 of 13. ## Scope discovery.hpp's REQ-DISC-* (c-RCP: 30 entries), adapt.hpp's REQ-RELAY-* (c-RCP: 17 entries) -- 47 c-RCP entries total. ## Major finding: DISC already far ahead of the catalog, RELAY needed real work discovery.hpp/test_discovery.cpp already carried real fusa:req/bracket-tag citations for nearly the full 001-030 range from an earlier untracked pass (only 5 missing //fusa:req manifest lines for 025-028/030) -- almost entirely a catalog-side derivation. adapt.hpp/test_adapt.cpp only covered cpp's own pre-rewrite REQ-RELAY-001-005 numbering; the real c-RCP 006-017 range needed genuine investigation against c-RCP's per-op field-table design vs cpp's simpler generic-RequestFn shape. ## Id-collision pattern (same class as batches 6-11) Both prefixes' pre-existing low-numbered ids were assigned before this rewrite's "reuse c-RCP's exact id" convention took hold and collide with unrelated, real c-RCP content at the same numerals (verified directly, e.g. cpp's REQ-DISC-001 "Discovery request framing" vs c-RCP's real REQ-DISC-001 "should_drop flags non-NTSCF subtype" -- unrelated). Filed as 14 id-collision gaps (DISC 001-009 x9, RELAY 001-005 x5) to .fusa-reqs-pending.json -- in every DISC case the real c-RCP behavior turned out to already be correctly implemented+tested under the matching numeral, only the catalog entry was stale/collided. ## New catalog entries (29) - DISC: 21 (010-030) -- genuinely implemented+tested already; 5 needed their missing //fusa:req manifest tag added (025-028, 030). - RELAY: 8 (006, 008, 009, 010, 012, 014, 016, 017) -- genuinely implemented+tested, with text adapted to document where cpp's generic-RequestFn design diverges from c-RCP's per-op field table (no failure path on 006, no bound-kind check on 008/009, no transport/kind params on 012). 014/016/017 actually live in relay.hpp/rcp.hpp rather than adapt.hpp -- tagged in adapt.hpp per this repo's existing convention (001-005 already do the same), with test tags placed in test_relay.cpp where the real tests live. Added 2 small missing tests (Channel::is_closed(), to_string(Protocol) uniqueness) to genuinely earn 002's and 016's claims. ## Architecture-divergence gaps filed (4, RELAY only, deliberate not oversights) REQ-RELAY-007 (no per-op opcode enum -- explicitly documented in test_adapt.cpp's own header comment as intentionally unported), REQ-RELAY-011 (no adapt-specific error category/strerror -- std::errc reused instead), REQ-RELAY-013 (no RCP-namespaced SpecVersion alias -- single-namespace architecture has nothing to duplicate, c-RCP's two- package split doesn't apply here), REQ-RELAY-015 (no manual caller retain/refcount -- superseded by std::unique_ptr RAII, also explicitly documented as unported in test_adapt.cpp). No new entry (DISC or RELAY) carries severity:cybersecurity -- confirmed via ci.yml/CYBERSECURITY.md that only cpp's existing (untouched) REQ-DISC-001..009 are in the enumerated 72-id cybersecurity subset; REQ-RELAY-* never appears there. sec-tested count unchanged at exactly 72. ## Verification Independently re-verified (the porting agent's own final step re-ran the real pinned cpfusa v0.18.0 binary, not an approximating script -- the batch-11 lesson applied from the start this time): semantic id-keyed diff confirms zero pre-existing entries modified/deleted, exactly 29 new ids matching the report's breakdown exactly (DISC 21, RELAY 8), zero duplicate ids. Independently re-ran the real cpfusa binary myself against the merged worktree: testedRequirements == totalRequirements == 1105, cpfusa trace --gaps returns zero ids. Confirmed sec-tested count holds at exactly 72/1105. Directly spot-checked the REQ-DISC-001 collision claim and the REQ-RELAY-013 architecture-divergence gap text against the real diff -- both accurate. Full tree rebuilt from scratch: 0 errors, 0 warnings, 58/58 ctest suites pass (100%). .fusa-reqs.json: 1076 -> 1105 entries (+29, 11498 -> 11836 lines). .fusa-reqs-pending.json: 123 -> 141 entries (+18, 1420 -> 1600 lines). include/rcp/adapt.hpp: +19 lines (tags only). include/rcp/discovery.hpp: +5 lines (tags only). tests/test_adapt.cpp: +5 lines (tags only). tests/test_relay.cpp: +36 lines (tags + 2 new tests). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.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.
rewrite(phase6): batch 12 — DISC/RELAY 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 12 of 13.
Scope
discovery.hpp's REQ-DISC-* (c-RCP: 30 entries), adapt.hpp's REQ-RELAY-*
(c-RCP: 17 entries) -- 47 c-RCP entries total.
Major finding: DISC already far ahead of the catalog, RELAY needed real work
discovery.hpp/test_discovery.cpp already carried real fusa:req/bracket-tag
citations for nearly the full 001-030 range from an earlier untracked
pass (only 5 missing //fusa:req manifest lines for 025-028/030) --
almost entirely a catalog-side derivation. adapt.hpp/test_adapt.cpp only
covered cpp's own pre-rewrite REQ-RELAY-001-005 numbering; the real
c-RCP 006-017 range needed genuine investigation against c-RCP's
per-op field-table design vs cpp's simpler generic-RequestFn shape.
Id-collision pattern (same class as batches 6-11)
Both prefixes' pre-existing low-numbered ids were assigned before this
rewrite's "reuse c-RCP's exact id" convention took hold and collide
with unrelated, real c-RCP content at the same numerals (verified
directly, e.g. cpp's REQ-DISC-001 "Discovery request framing" vs
c-RCP's real REQ-DISC-001 "should_drop flags non-NTSCF subtype" --
unrelated). Filed as 14 id-collision gaps (DISC 001-009 x9, RELAY
001-005 x5) to .fusa-reqs-pending.json -- in every DISC case the real
c-RCP behavior turned out to already be correctly implemented+tested
under the matching numeral, only the catalog entry was stale/collided.
New catalog entries (29)
their missing //fusa:req manifest tag added (025-028, 030).
implemented+tested, with text adapted to document where cpp's
generic-RequestFn design diverges from c-RCP's per-op field table
(no failure path on 006, no bound-kind check on 008/009, no
transport/kind params on 012). 014/016/017 actually live in
relay.hpp/rcp.hpp rather than adapt.hpp -- tagged in adapt.hpp per
this repo's existing convention (001-005 already do the same), with
test tags placed in test_relay.cpp where the real tests live. Added
2 small missing tests (Channel::is_closed(), to_string(Protocol)
uniqueness) to genuinely earn 002's and 016's claims.
Architecture-divergence gaps filed (4, RELAY only, deliberate not oversights)
REQ-RELAY-007 (no per-op opcode enum -- explicitly documented in
test_adapt.cpp's own header comment as intentionally unported),
REQ-RELAY-011 (no adapt-specific error category/strerror -- std::errc
reused instead), REQ-RELAY-013 (no RCP-namespaced SpecVersion alias --
single-namespace architecture has nothing to duplicate, c-RCP's two-
package split doesn't apply here), REQ-RELAY-015 (no manual caller
retain/refcount -- superseded by std::unique_ptr RAII, also explicitly
documented as unported in test_adapt.cpp).
No new entry (DISC or RELAY) carries severity:cybersecurity -- confirmed
via ci.yml/CYBERSECURITY.md that only cpp's existing (untouched)
REQ-DISC-001..009 are in the enumerated 72-id cybersecurity subset;
REQ-RELAY-* never appears there. sec-tested count unchanged at exactly
72.
Verification
Independently re-verified (the porting agent's own final step re-ran
the real pinned cpfusa v0.18.0 binary, not an approximating script --
the batch-11 lesson applied from the start this time): semantic
id-keyed diff confirms zero pre-existing entries modified/deleted,
exactly 29 new ids matching the report's breakdown exactly (DISC 21,
RELAY 8), zero duplicate ids. Independently re-ran the real cpfusa
binary myself against the merged worktree: testedRequirements ==
totalRequirements == 1105, cpfusa trace --gaps returns zero ids.
Confirmed sec-tested count holds at exactly 72/1105. Directly
spot-checked the REQ-DISC-001 collision claim and the REQ-RELAY-013
architecture-divergence gap text against the real diff -- both
accurate. Full tree rebuilt from scratch: 0 errors, 0 warnings, 58/58
ctest suites pass (100%).
.fusa-reqs.json: 1076 -> 1105 entries (+29, 11498 -> 11836 lines).
.fusa-reqs-pending.json: 123 -> 141 entries (+18, 1420 -> 1600 lines).
include/rcp/adapt.hpp: +19 lines (tags only). include/rcp/discovery.hpp:
+5 lines (tags only). tests/test_adapt.cpp: +5 lines (tags only).
tests/test_relay.cpp: +36 lines (tags + 2 new tests).
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com