diff --git a/src/lib/yaml/handlers.ts b/src/lib/yaml/handlers.ts index 84e035d..2d678b2 100644 --- a/src/lib/yaml/handlers.ts +++ b/src/lib/yaml/handlers.ts @@ -703,10 +703,28 @@ const resourceGroupHandler = defineHandler> +// YAML-managed update fields only. Do not Required<> the whole UpdateMonitorRequest +// — additive optional keys (capturePolicy, package, status, …) must not break +// snapshot constructors after spec regen (evolution harness). +type MonitorSnapshotKeys = + | 'name' + | 'config' + | 'frequencySeconds' + | 'enabled' + | 'regions' + | 'environmentId' + | 'assertions' + | 'auth' + | 'incidentPolicy' + | 'alertChannelIds' + | 'tags' +type MonitorUpdateFields = Omit< + Schemas['UpdateMonitorRequest'], + 'clearEnvironmentId' | 'clearAuth' | 'managedBy' +> +type MonitorSnapshotBase = Required< + Pick> +> type MonitorSnapshot = Omit & { auth: MonitorSnapshotBase['auth'] | null incidentPolicy: MonitorSnapshotBase['incidentPolicy'] | null