Skip to content

feat: v2.12.0 — Test & Simulation Harness Rebuild (§Phase 14 milestone 56) - #51

Merged
SoundMatt merged 1 commit into
mainfrom
feat/v2.12.0-test-sim-harness-rebuild
Jul 29, 2026
Merged

SoundMatt merged 1 commit into
mainfrom
feat/v2.12.0-test-sim-harness-rebuild

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

Implements ROADMAP.md milestone 56, "Test & Simulation Harness Rebuild (v2.12.0)" — the last milestone of Phase 14 — per the Satellite Package Disposition table's entries for mock.hpp and sim.hpp.

  • rcp/mock.hpp is replaced in full with mock::Server: an in-process RC Server simulator holding a real lifecycle::ServerLifecycle (v2.1.0), a real regmap::RegisterMap + regmap::Ep0 (whole-map read, root-client-gated whole-map write), and one instance each of gpio::GpioEndpoint/spi::SpiEndpoint (v2.3.0) as its representative endpoint set. Server::dispatch is the single request/response entry point.
  • rcp/sim.hpp is replaced in full with sim::Simulator: wraps mock::Server with the pre-replacement latency/jitter modeling concept and Fault/Recover controls, now wired to rcp::watchdog::StreamWatchdog/Manager (v2.10.0) instead of the retired client-driven CommandType::Watchdog kick. No background threads, matching every Phase 14 header's "primitives, not a scheduler" convention since v2.9.0/v2.10.0.
  • The old Controller/Registry pair is preserved unchanged under new rcp/legacy_mock.hpp, the same split precedent rcp/wire.hpp → rcp/legacy_wire.hpp established at v2.0.0 — purely so the still-untouched old-model dependents (rcp/capi_impl.hpp, rcp/cli.hpp, rcp/config.hpp, all v2.16.0 per the disposition table, plus ~16 test files using it as a generic test double for their own not-yet-rebuilt packages) keep building until each is rebound at its own later milestone.
  • New/rewritten requirement coverage: tests/test_mock.cpp (REQ-MOCK-001..010, new), tests/test_sim.cpp (REQ-SIM-001..007, entirely rewritten), tests/test_legacy_mock.cpp (pre-replacement REQ-CTRL-*/REQ-REG-*/REQ-RESP-*/REQ-STAT-*/REQ-ERR-011 coverage moved unchanged), all traced in .fusa-reqs.json.
  • Bumps kVersion/project version to 2.12.0; adds ROADMAP.md milestone 56's "Done (v2.12.0)" narrative.

Test plan

  • cmake --build build --parallel (Debug, Clang and GCC) — clean, no new warnings beyond pre-existing ones carried into the unchanged, moved test_legacy_mock.cpp
  • ctest --test-dir build --output-on-failure — 60/60 tests pass (Debug + Release, two compilers)
  • RELAY_BUILD_CLI=ON build — cpp-rcp binary builds and runs (version/capabilities)
  • README.md quick-start snippet re-verified to compile standalone against rcp/legacy_mock.hpp
  • Cross-checked every fusa:req/fusa:test tag in source against .fusa-reqs.json — fully consistent both directions
  • CI (cpfusa check/lint/analyze/cyber/trace/verify/qualify gates) — pending, this PR relies on the hosted cpfusa binary this sandbox doesn't have

…e 56)

Rebuilds rcp/mock.hpp and rcp/sim.hpp against the new TC18
stream/endpoint/register-map model, per the Satellite Package
Disposition table's entries for these two files and ROADMAP.md
milestone 56.

mock::Server is an in-process RC Server simulator holding a real
lifecycle::ServerLifecycle (v2.1.0), a real regmap::RegisterMap plus
regmap::Ep0 (including EP0's whole-map read and root-client-gated
whole-map write), and one instance each of gpio::GpioEndpoint and
spi::SpiEndpoint (v2.3.0) as its representative endpoint set — GPIO
and SPI were sequenced first in Phase 13 specifically for having the
simplest fully-built request/response shapes. Server::dispatch is the
single request/response entry point, decoding the standard request
kind's evt[2:0]/op fields and gating GPIO/SPI operational traffic on
the lifecycle being RCP_CONFIGURED.

The old in-process Controller/Registry pair (Zone/Command-shaped) is
preserved unchanged under rcp/legacy_mock.hpp, purely so the
still-untouched old-model dependents that build against it keep
working until each is rebound at its own later milestone:
rcp/capi_impl.hpp, rcp/cli.hpp, and rcp/config.hpp (all v2.16.0 per
the disposition table), plus every test file using it as a generic
in-process test double for its own not-yet-rebuilt package. This is
the same file-split precedent rcp/wire.hpp's rcp/legacy_wire.hpp
established at v2.0.0 — REQ-CTRL-*/REQ-REG-*/REQ-RESP-*/REQ-STAT-*/
REQ-ERR-011 and their tests/test_mock.cpp coverage move to
tests/test_legacy_mock.cpp unchanged.

sim::Simulator wraps mock::Server with the latency/jitter modeling
concept and Fault/Recover scenario controls carried forward from the
discarded sim::Controller, re-targeted at the new request/response
shapes, and wires watchdog-miss detection through
rcp::watchdog::StreamWatchdog/Manager (v2.10.0) instead of the
retired client-driven CommandType::Watchdog kick model. Nothing else
depended on the old sim::Controller API, so no legacy shim was needed
for sim.hpp. Neither new type spawns a background thread of its own,
matching the "primitives, not a scheduler" convention every Phase 14
header has followed since v2.9.0/v2.10.0.

New/rewritten coverage lives in tests/test_mock.cpp
(REQ-MOCK-001..010, new) and tests/test_sim.cpp (REQ-SIM-001..007,
entirely rewritten), traced in .fusa-reqs.json; the pre-replacement
mock coverage lives on unchanged as tests/test_legacy_mock.cpp. Bumps
kVersion/project version to 2.12.0. Updates ROADMAP.md with a Done
(v2.12.0) summary for milestone 56.

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit cd49803 into main Jul 29, 2026
20 checks passed
@SoundMatt
SoundMatt deleted the feat/v2.12.0-test-sim-harness-rebuild branch July 29, 2026 00:11
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