rewrite(phase6): batch 13 — MOCK/PWRMODE catalog re-derivation (Phase 6 complete) - #166
Merged
Merged
Conversation
… 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>
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 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