Skip to content

feat: v2.10.0 — Watchdog & Liveness Rebuild (§Phase 14 milestone 54) - #49

Merged
SoundMatt merged 1 commit into
mainfrom
feat/v2.10.0-watchdog-liveness-rebuild
Jul 28, 2026
Merged

SoundMatt merged 1 commit into
mainfrom
feat/v2.10.0-watchdog-liveness-rebuild

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

Implements ROADMAP.md milestone 54, "Watchdog & Liveness Rebuild (v2.10.0)", the second of four Phase 14 satellite-package rebuilds.

  • rcp/watchdog.hpp — REPLACE (per the Satellite Package Disposition table). The pre-replacement client-driven periodic CommandType::Watchdog kick model, built on rcp.hpp's Zone/Command/Controller, is discarded — that command type has no analog in the target protocol. The actual per-stream watchdog timeout/latch primitive already existed as rcp::e2e::RxWatchdog (v2.6.0); this milestone builds the driver/wiring layer around it:

    • watchdog::StreamWatchdog::kick_from_request resets a stream's watchdog on every accepted inbound request, regardless of kind or safety tag — the "reset by any inbound request" rule, directly, in place of the old client-side health poll.
    • StreamWatchdog::check reads a live regmap::RequestStreamConfig on every poll, reports overflow, and — only when rx_wd_safestate_enable is set — reuses rcp::e2e::apply_watchdog_overflow to latch safe state and purge normal (non-safety) requests.
    • watchdog::Manager multiplexes StreamWatchdog across every registered stream (keyed by an opaque uint64_t, e.g. avtp::StreamId::to_u64()) and fans out HealthEvents to subscribers.
  • rcp/deadline.hpp — ADAPT (per the disposition table). The alive/dead-on-deadline concept survives from the old Monitor, but every concrete signal source is rebound away from Status-subscription polling, which doesn't exist in the target model. deadline::Monitor is driven by two independent liveness signals per the roadmap's own "and/or": note_heartbeat (a new regmap::ResponseQueueConfig::flush_time field) and note_lifecycle_change (a new lifecycle::ServerLifecycle::subscribe_state_changed trigger) — either alone is sufficient evidence of liveness. Both additions are small, explicitly-scoped, and purely additive.

Nothing else in the tree depended on the old watchdog::Keeper/deadline::Monitor APIs (only their own tests did), so no legacy shim was needed.

Test plan

  • cmake --build build --parallel — full build clean (clang, C++17)
  • ctest --test-dir build — 59/59 test suites pass, including rewritten test_watchdog, test_deadline, and the test_lifecycle additions for REQ-LIFECYCLE-007
  • relay conform --strict build/cpp-rcp — RELAY §12 conformance gate: PASS
  • cpfusa check / cpfusa lint / cpfusa cyber / cpfusa trace --req-coverage 100 / cpfusa qualify / cpfusa verify — all exit 0, no new errors introduced
  • .fusa-reqs.json rewritten: REQ-WDG-001..008, REQ-DL-001..008 fully rewritten against the new model; REQ-LIFECYCLE-007 added for the new state-changed trigger
  • ROADMAP.md updated with a Done (v2.10.0) summary for milestone 54
  • kVersion/project version bumped to 2.10.0

Replaces rcp/watchdog.hpp in full, per the Satellite Package Disposition
table's entry for this file: the pre-replacement client-driven periodic
CommandType::Watchdog kick model built on rcp.hpp's
Zone/Command/Controller is discarded, not adapted (that command type
has no analog in the target protocol). The actual per-stream watchdog
timeout/latch primitive already existed as rcp::e2e::RxWatchdog
(v2.6.0); this milestone's job is the driver layer around it:

- watchdog::StreamWatchdog::kick_from_request resets a stream's
  watchdog on every accepted inbound request, regardless of kind or
  safety tag, matching the "reset by any inbound request" rule
  directly instead of a separate client-side health poll.
- StreamWatchdog::check reads a live regmap::RequestStreamConfig on
  every poll, reports HealthEvent::overflowed on timeout, and — only
  when rx_wd_safestate_enable is set — calls
  rcp::e2e::apply_watchdog_overflow to latch safe state and purge
  normal requests, reusing the v2.6.0 purge-normal/retain-safety rule
  unmodified.
- watchdog::Manager multiplexes StreamWatchdog across every request
  stream the embedding application registers (keyed by an opaque
  uint64_t, e.g. avtp::StreamId::to_u64()) and fans out HealthEvents
  to subscribed callbacks.

Rebuilds rcp/deadline.hpp per the disposition table's ADAPT call: the
alive/dead-on-deadline concept survives, but every concrete signal
source is rebound away from Status-subscription polling, which does
not exist in the target model. deadline::Monitor is driven by two
independent liveness signals per the roadmap's "and/or" — note_heartbeat
(regmap::ResponseQueueConfig::flush_time, a new field added at this
milestone) and note_lifecycle_change (lifecycle::ServerLifecycle's new
subscribe_state_changed trigger, also added at this milestone) — either
alone being sufficient evidence of liveness. Both additions are small,
explicitly-scoped, and purely additive; no pre-existing field or
transition rule in regmap.hpp/lifecycle.hpp changes.

Nothing else in the tree depended on the old watchdog::Keeper or
deadline::Monitor APIs (only their own tests did), so no legacy shim
was needed, same as every other Phase 14 rebuild.

New/rewritten coverage lives in tests/test_watchdog.cpp
(REQ-WDG-001..008, entirely rewritten), tests/test_deadline.cpp
(REQ-DL-001..008, entirely rewritten), and tests/test_lifecycle.cpp
(REQ-LIFECYCLE-007, new), traced in .fusa-reqs.json. Bumps
kVersion/project version to 2.10.0. Updates ROADMAP.md with a Done
(v2.10.0) summary for milestone 54.

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit d663466 into main Jul 28, 2026
20 checks passed
@SoundMatt
SoundMatt deleted the feat/v2.10.0-watchdog-liveness-rebuild branch July 28, 2026 22:49
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