Skip to content

feat(apps): register the monitoring legacy handoff source and fence its writers #595

Done

Description

@RentnerKev

Phase: 6 | Priority: P0

Register the monitoring legacy handoff source, so the monitoring app can take over configuration and history, and fence every built-in monitoring writer. Prerequisite for RentnerProxy/app-monitoring#1.

Current state

  • No handoff source exists. legacyFeatureHandoffSources is empty (web/src/server/LegacyHandoff/sources.server.ts), so begin returns 404 for every domain.
  • No HostMonitoring writer uses withPlatformOwnedLegacyFeature. That covers the policy route, probe completion, pruning, host invalidation and availability incidents.
  • The worker checks ownership only when it starts (whilePlatformOwns('monitoring') in web/src/start.ts), so a running worker continues after a handoff until the next restart.
  • begin runs the export inside one App API transaction of 10 s. The maximum retained history (100,000 observations and 10,000 incidents, about 15 MB) fits the part limits (1,024 × 256 KiB), but may not fit that transaction.

Scope

  • A monitoring source:
  • Fence every built-in writer with withPlatformOwnedLegacyFeature.
  • Stop the running worker at begin and keep it stopped after commit, without a restart. The routes report the handed-off state, and the UI hides the built-in controls after commit.
  • Aborting the handoff on uninstall returns ownership and resumes the worker.
  • The export completes within the transaction limits for the maximum history, or runs outside one long transaction while keeping the fence.

Dependencies

Acceptance criteria

  • After begin, no built-in policy, observation or incident is written.
  • The export is complete, deterministic and resumable for the maximum retained history, and its digest is stable across retries.
  • Commit stops built-in probes and notifications without a restart. No outage notification is sent twice across the handover.
  • Aborting before commit restores built-in monitoring with its data intact.
  • The upgrade preview reports monitoring as app-owned after commit.

Tracked by RentnerProxy/app-monitoring#1 and #460.
Use focused project checks and short integration/recovery tests. Endurance runs belong to release preparation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: runtimeenhancementsecurity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions