Skip to content

rewrite(phase6): batch 13 — MOCK/PWRMODE catalog re-derivation (Phase 6 complete) - #166

Merged
SoundMatt merged 1 commit into
rewrite/v3-from-c-rcpfrom
phase6/mock-pwrmode
Aug 22, 2026
Merged

rewrite(phase6): batch 13 — MOCK/PWRMODE catalog re-derivation (Phase 6 complete)#166
SoundMatt merged 1 commit into
rewrite/v3-from-c-rcpfrom
phase6/mock-pwrmode

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

rewrite(phase6): batch 13 — MOCK/PWRMODE catalog re-derivation (Phase 6 complete)

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 13 of
13 -- the FINAL batch, covering the two largest files in the codebase
(mock.hpp/test_mock.cpp) plus genuinely new PWRMODE porting work.

Scope

mock.hpp's REQ-MOCK-* (c-RCP: 33 entries), powerstate.hpp's REQ-PWRMODE-*
(c-RCP: 28 entries, split across c-RCP's power.c+powerstate.c, folded
into cpp-RCP's single powerstate.hpp per this rewrite's earlier design
choice) -- 61 c-RCP entries total. Plus mandatory pickup of 5
mock.hpp-scoped deferred gaps from batches 5 and 6.

Part C — deferred-gap pickup (mandatory, done first)

REQ-WDG-010 (batch 5), REQ-E2E-033/039/041/047 (batch 6): all confirmed
still genuinely implemented+tested in mock.hpp/test_mock.cpp exactly as
found originally -- promoted from .fusa-reqs-pending.json straight into
.fusa-reqs.json with real fusa:req/fusa:test manifest tags added (they'd
only ever had prose/bracket-tag mentions, never a real manifest tag).

REQ-MOCK-* (33 c-RCP entries)

3 new catalog entries (027 pending_count, 028 REQUEST_NOT_FOUND, 029
CHAIN_ERROR/ABORTED -- free ids with real pre-existing tests, now
manifest-tagged). All 26 of cpp's pre-existing REQ-MOCK-001..026 are
confirmed id-collisions (same pattern as every batch since 6 -- cpp's
own entries describe unrelated Table-33 evt-classification content
numbered before this rewrite's id-reuse convention). Filed to pending
with per-id verification: 15 collision ids are separately implemented
+tested elsewhere in cpp (cross-referenced to REQ-LIFECYCLE-/REQ-SRV-/
REQ-CANCEL-*), 1 not-applicable (C++ RAII supersedes a manual-refcount
requirement), 10 genuine gaps (mostly cpp's fixed-10-endpoint
architecture lacking c-RCP's dynamic add/remove-endpoint API). Free ids
030-033 (stream-scoped lookup family): genuine architectural gaps, filed
honestly rather than force-fit.

REQ-PWRMODE-* (28 c-RCP entries, genuinely new porting work)

Unlike every other batch this phase, powerstate.hpp had ZERO existing
REQ-PWRMODE-* citations to walk -- this required reading c-RCP's
power.c+powerstate.c source directly against cpp's powerstate.hpp.
20 new catalog entries (19 investigated + 028, which had code tags but
no catalog entry). Implemented 3 small, safe fixes with new tests:
cold_start_lifecycle_target() (closes 003+014), and a backward-
compatible network_available parameter on begin_wake_from_sleep()
(closes 016). REQ-PWRMODE-004 was initially assessed as a small fix but
reclassified to a genuine architectural gap on closer inspection: the
literal transition-table fix would contradict an already-tested,
protected REQ-PWR-002 assertion -- filed to pending rather than forcing
a design decision that isn't this batch's to make. 8 total architectural
gaps filed (004, 012, 017, 019, 021, 022, 026, 027), most notably 026
(mode commits before the sleep/standby response is confirmed
transmitted -- a real safety-relevant ordering gap, not cosmetic).

No new entry (MOCK or PWRMODE) carries severity:cybersecurity -- verified
against CYBERSECURITY.md/ci.yml and c-RCP's own severity fields. 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 against the WHOLE catalog, not
just this batch, to catch any regression across all 12 prior batches):
semantic id-keyed diff confirms zero pre-existing entries modified/
deleted, exactly 28 new ids matching the report's breakdown exactly
(MOCK 3, PWRMODE 20, promoted-deferred 5), zero duplicate ids in either
the catalog or the pending file. Independently re-ran the real cpfusa
binary myself against the merged worktree: testedRequirements ==
totalRequirements == 1133, cpfusa trace --gaps returns zero ids.
Confirmed sec-tested count holds at exactly 72/1133. Directly
spot-checked the REQ-PWRMODE-004 reclassification and REQ-WDG-010's
promotion against the real diff -- both accurate, and the 004
reclassification shows genuinely careful judgment (catching a real
conflict rather than force-fitting a fix). Full tree rebuilt from
scratch: 0 errors, 0 warnings, 58/58 ctest suites pass (100%).

Phase 6 complete

All 13 batches merged. Final catalog: .fusa-reqs.json 1105 -> 1133
entries (+28, all 100% traced and tested, zero regressions across all
13 batches, independently re-verified via a fresh whole-tree cpfusa
trace). Final pending/gap catalog: .fusa-reqs-pending.json 141 -> 174
entries (+38 added, -5 promoted = net +33), honestly documenting every
id-collision and architectural gap found across the whole phase. The
whole-catalog traceability gate (testedRequirements == totalRequirements)
is clean. A detailed Phase 6 completion summary will be posted to
issue #129 separately.

include/rcp/mock.hpp: +8 lines (tags only). include/rcp/powerstate.hpp:
+73 lines (2 new functions + tags). include/rcp/wakeup.hpp: +1 line
(tag only). tests/test_mock.cpp: +8 lines (tags only).
tests/test_powerstate.cpp: +76 lines (2 new test blocks).
tests/test_wakeup.cpp: +1 line (tag only).

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

… 6 complete)

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 13 of
13 -- the FINAL batch, covering the two largest files in the codebase
(mock.hpp/test_mock.cpp) plus genuinely new PWRMODE porting work.

## Scope

mock.hpp's REQ-MOCK-* (c-RCP: 33 entries), powerstate.hpp's REQ-PWRMODE-*
(c-RCP: 28 entries, split across c-RCP's power.c+powerstate.c, folded
into cpp-RCP's single powerstate.hpp per this rewrite's earlier design
choice) -- 61 c-RCP entries total. Plus mandatory pickup of 5
mock.hpp-scoped deferred gaps from batches 5 and 6.

## Part C — deferred-gap pickup (mandatory, done first)

REQ-WDG-010 (batch 5), REQ-E2E-033/039/041/047 (batch 6): all confirmed
still genuinely implemented+tested in mock.hpp/test_mock.cpp exactly as
found originally -- promoted from .fusa-reqs-pending.json straight into
.fusa-reqs.json with real fusa:req/fusa:test manifest tags added (they'd
only ever had prose/bracket-tag mentions, never a real manifest tag).

## REQ-MOCK-* (33 c-RCP entries)

3 new catalog entries (027 pending_count, 028 REQUEST_NOT_FOUND, 029
CHAIN_ERROR/ABORTED -- free ids with real pre-existing tests, now
manifest-tagged). All 26 of cpp's pre-existing REQ-MOCK-001..026 are
confirmed id-collisions (same pattern as every batch since 6 -- cpp's
own entries describe unrelated Table-33 evt-classification content
numbered before this rewrite's id-reuse convention). Filed to pending
with per-id verification: 15 collision ids are separately implemented
+tested elsewhere in cpp (cross-referenced to REQ-LIFECYCLE-*/REQ-SRV-*/
REQ-CANCEL-*), 1 not-applicable (C++ RAII supersedes a manual-refcount
requirement), 10 genuine gaps (mostly cpp's fixed-10-endpoint
architecture lacking c-RCP's dynamic add/remove-endpoint API). Free ids
030-033 (stream-scoped lookup family): genuine architectural gaps, filed
honestly rather than force-fit.

## REQ-PWRMODE-* (28 c-RCP entries, genuinely new porting work)

Unlike every other batch this phase, powerstate.hpp had ZERO existing
REQ-PWRMODE-* citations to walk -- this required reading c-RCP's
power.c+powerstate.c source directly against cpp's powerstate.hpp.
20 new catalog entries (19 investigated + 028, which had code tags but
no catalog entry). Implemented 3 small, safe fixes with new tests:
cold_start_lifecycle_target() (closes 003+014), and a backward-
compatible network_available parameter on begin_wake_from_sleep()
(closes 016). REQ-PWRMODE-004 was initially assessed as a small fix but
reclassified to a genuine architectural gap on closer inspection: the
literal transition-table fix would contradict an already-tested,
protected REQ-PWR-002 assertion -- filed to pending rather than forcing
a design decision that isn't this batch's to make. 8 total architectural
gaps filed (004, 012, 017, 019, 021, 022, 026, 027), most notably 026
(mode commits before the sleep/standby response is confirmed
transmitted -- a real safety-relevant ordering gap, not cosmetic).

No new entry (MOCK or PWRMODE) carries severity:cybersecurity -- verified
against CYBERSECURITY.md/ci.yml and c-RCP's own severity fields. 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 against the WHOLE catalog, not
just this batch, to catch any regression across all 12 prior batches):
semantic id-keyed diff confirms zero pre-existing entries modified/
deleted, exactly 28 new ids matching the report's breakdown exactly
(MOCK 3, PWRMODE 20, promoted-deferred 5), zero duplicate ids in either
the catalog or the pending file. Independently re-ran the real cpfusa
binary myself against the merged worktree: testedRequirements ==
totalRequirements == 1133, cpfusa trace --gaps returns zero ids.
Confirmed sec-tested count holds at exactly 72/1133. Directly
spot-checked the REQ-PWRMODE-004 reclassification and REQ-WDG-010's
promotion against the real diff -- both accurate, and the 004
reclassification shows genuinely careful judgment (catching a real
conflict rather than force-fitting a fix). Full tree rebuilt from
scratch: 0 errors, 0 warnings, 58/58 ctest suites pass (100%).

## Phase 6 complete

All 13 batches merged. Final catalog: .fusa-reqs.json 1105 -> 1133
entries (+28, all 100% traced and tested, zero regressions across all
13 batches, independently re-verified via a fresh whole-tree cpfusa
trace). Final pending/gap catalog: .fusa-reqs-pending.json 141 -> 174
entries (+38 added, -5 promoted = net +33), honestly documenting every
id-collision and architectural gap found across the whole phase. The
whole-catalog traceability gate (testedRequirements == totalRequirements)
is clean. A detailed Phase 6 completion summary will be posted to
issue #129 separately.

include/rcp/mock.hpp: +8 lines (tags only). include/rcp/powerstate.hpp:
+73 lines (2 new functions + tags). include/rcp/wakeup.hpp: +1 line
(tag only). tests/test_mock.cpp: +8 lines (tags only).
tests/test_powerstate.cpp: +76 lines (2 new test blocks).
tests/test_wakeup.cpp: +1 line (tag only).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit f013d5a into rewrite/v3-from-c-rcp Aug 22, 2026
22 checks passed
@SoundMatt
SoundMatt deleted the phase6/mock-pwrmode branch August 22, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant