TypeScript
feat(server,web,mobile): a host that drops because it froze now says why (#22213)
Theo Browned7bc3a2f49f0
diff --git a/apps/mobile/src/features/connection/ConnectionEnvironmentRow.tsx b/apps/mobile/src/features/connection/ConnectionEnvironmentRow.tsxindex ba332c269a7..aa332b407b2 100644--- a/apps/mobile/src/features/connection/ConnectionEnvironmentRow.tsx+++ b/apps/mobile/src/features/connection/ConnectionEnvironmentRow.tsx@@ -1,7 +1,7 @@import * as Dialog from "../../components/ui/Dialog";import { ConnectionTraceId } from "./ConnectionTraceId";import { SymbolView } from "../../components/ui/AppSymbol";-import { hasSavedBearerRoute } from "@t3tools/client-runtime/connection";+import { hasSavedBearerRoute, hostFreezeNotice } from "@t3tools/client-runtime/connection";import type { AtomCommandResult } from "@t3tools/client-runtime/state/runtime";import { type EnvironmentId, resolveEnvironmentMachineKind } from "@t3tools/contracts";import { useAtomValue } from "@effect/atom-react";@@ -67,6 +67,9 @@ export function ConnectionEnvironmentRow(props: {const statusLabel = connectionStatusLabel(props.environment);const statusTraceId = enabled ? props.environment.connectionErrorTraceId : null;const hasConnectionFailure = enabled && props.environment.connectionError !== null;+ const freeze = enabled+ ? hostFreezeNotice(props.environment.environmentLabel, serverConfig?.lastEventLoopStall)+ : null;const isRetrying =enabled &&(props.environment.connectionState === "connecting" ||@@ -151,6 +154,14 @@ export function ConnectionEnvironmentRow(props: {) : null}</Text>) : null}+ {freeze ? (+ <Text+ className="text-xs text-warning-foreground"+ numberOfLines={props.expanded ? undefined : 1}+ >+ {`${freeze.title}. ${freeze.description}`}+ </Text>+ ) : null}</Pressable><ThemedSwitchdiff --git a/apps/server/src/observability/EventLoopMonitor.test.ts b/apps/server/src/observability/EventLoopMonitor.test.tsindex 0941c8428b1..2ccf2591fe7 100644--- a/apps/server/src/observability/EventLoopMonitor.test.ts+++ b/apps/server/src/observability/EventLoopMonitor.test.ts@@ -1,5 +1,6 @@import * as NodeServices from "@effect/platform-node/NodeServices";import { assert, describe, it } from "@effect/vitest";+import * as Context from "effect/Context";import * as Effect from "effect/Effect";import * as FileSystem from "effect/FileSystem";import * as Layer from "effect/Layer";@@ -27,6 +28,8 @@ const stalled: EventLoopMonitor.EventLoopReadings = {rssBytes: 1536 * 1024 * 1024,heapUsedBytes: 512 * 1024 * 1024,elapsedMs: 30_000,+ loadAverage: 219.43,+ cpuCount: 18,};const quiet: EventLoopMonitor.EventLoopReadings = { ...stalled, delayMaxNs: ms(2_950) };@@ -81,6 +84,30 @@ describe("EventLoopMonitor", () => {}),);+ it.effect("reports a long stall when a client connects, before the next timed sample", () =>+ Effect.gen(function* () {+ const long = { ...stalled, delayMaxNs: ms(13_000), activeMs: 13_000 };+ const context = yield* monitor([quiet, stalled, long]);+ const eventLoop = Context.get(context, EventLoopMonitor.EventLoopMonitor);+ // The startup sample is skipped, so a connect before it reads nothing.+ assert.isUndefined(yield* eventLoop.latestNoticeableStall);++ yield* TestClock.adjust("30 seconds");+ // Under 5 s: logged, but not worth telling a client about.+ assert.isUndefined(yield* eventLoop.latestNoticeableStall);+ assert.deepStrictEqual(yield* eventLoop.latestNoticeableStall, {+ detectedAt: "1970-01-01T00:00:30.000Z",+ durationMs: 12_000,+ loadAverage: 219.4,+ cpuCount: 18,+ });++ // Too old to explain a drop now.+ yield* TestClock.adjust("301 seconds");+ assert.isUndefined(yield* eventLoop.latestNoticeableStall);+ }).pipe(Effect.scoped),+ );+it.effect("exports the server's memory, CPU and event loop from each sample", () =>Effect.gen(function* () {yield* monitor([quiet, stalled]);diff --git a/apps/server/src/observability/EventLoopMonitor.ts b/apps/server/src/observability/EventLoopMonitor.tsindex a2944b87b74..3e03190a6ed 100644--- a/apps/server/src/observability/EventLoopMonitor.ts+++ b/apps/server/src/observability/EventLoopMonitor.ts@@ -1,14 +1,19 @@-// @effect-diagnostics nodeBuiltinImport:off - only node:perf_hooks exposes the event loop delay histogram.+// @effect-diagnostics nodeBuiltinImport:off - only node:perf_hooks exposes the event loop delay histogram, and node:os the load average.+import * as NodeOS from "node:os";import * as NodePerfHooks from "node:perf_hooks";+import type { ServerEventLoopStall } from "@t3tools/contracts";import { RotatingFileSink } from "@t3tools/shared/logging";+import * as Context from "effect/Context";import * as DateTime from "effect/DateTime";import * as Effect from "effect/Effect";import * as Layer from "effect/Layer";import * as Metric from "effect/Metric";import * as Path from "effect/Path";+import * as Ref from "effect/Ref";import * as Schema from "effect/Schema";import type * as Scope from "effect/Scope";+import * as Semaphore from "effect/Semaphore";import * as ServerConfig from "../config.ts";import * as Metrics from "./Metrics.ts";@@ -21,6 +26,20 @@ const RESOLUTION_MS = 1000;const STALL_THRESHOLD_MS = 2000;const SAMPLE_INTERVAL = "30 seconds";const STALL_LOG_MAX_BYTES = 256 * 1024;+// Long enough that users felt it. Shorter stalls stay in the log only.+const NOTICEABLE_STALL_MS = 5000;+// Clients show what they get, so an old stall must not explain a new drop.+const NOTICEABLE_STALL_MAX_AGE_MS = 5 * 60_000;++export class EventLoopMonitor extends Context.Reference<{+ /**+ * The latest stall of 5 s or more, if seen in the last 5 minutes. It samples+ * first, so a stall that ended just before a client reconnected is included.+ */+ readonly latestNoticeableStall: Effect.Effect<ServerEventLoopStall | undefined>;+}>("t3/observability/EventLoopMonitor", {+ defaultValue: () => ({ latestNoticeableStall: Effect.succeed(undefined) }),+}) {}/** Delay in ns, active time in ms, CPU in µs. */export interface EventLoopReadings {@@ -39,6 +58,9 @@ export interface EventLoopReadings {readonly heapUsedBytes: number;/** Wall time the readings cover. */readonly elapsedMs: number;+ /** One-minute load average, undefined on Windows. */+ readonly loadAverage: number | undefined;+ readonly cpuCount: number;}// Node skips the first gap after a reset, so a stall right at a sample boundary can be missed.@@ -77,6 +99,9 @@ const makeNodeSampler = Effect.gen(function* () {rssBytes: memory.rss,heapUsedBytes: memory.heapUsed,elapsedMs: nextSampledAt - sampledAt,+ // Windows has no load average and reports 0, which a running process never sees elsewhere.+ loadAverage: NodeOS.loadavg()[0] || undefined,+ cpuCount: NodeOS.availableParallelism(),};histogram.reset();elu = nextElu;@@ -120,9 +145,16 @@ export const layerWith = (makeSampler: Effect.Effect<Effect.Effect<EventLoopReadings>, never, Scope.Scope>,stallLog: StallLogOptions,) =>- Layer.effectDiscard(+ Layer.effect(+ EventLoopMonitor,Effect.gen(function* () {const sample = yield* makeSampler;+ // Clients sample on connect as well as the timer, and the sampler resets shared state.+ const sampling = yield* Semaphore.make(1);+ const warmedUp = yield* Ref.make(false);+ const latestNoticeableStall = yield* Ref.make<+ { readonly stall: ServerEventLoopStall; readonly detectedAtMs: number } | undefined+ >(undefined);const stallSink = yield* Effect.try(() =>new RotatingFileSink({@@ -143,7 +175,22 @@ export const layerWith = (yield* recordGauges(readings);const delayMaxMs = stallMs(readings);if (delayMaxMs === undefined) return;- const { utilization, usage, rssBytes } = readings;+ const { utilization, usage, rssBytes, loadAverage, cpuCount } = readings;+ const now = yield* DateTime.now;+ const detectedAt = DateTime.formatIso(now);+ if (delayMaxMs >= NOTICEABLE_STALL_MS) {+ yield* Ref.set(latestNoticeableStall, {+ detectedAtMs: DateTime.toEpochMillis(now),+ stall: {+ detectedAt,+ durationMs: delayMaxMs,+ ...(loadAverage === undefined+ ? {}+ : { loadAverage: Math.round(loadAverage * 10) / 10 }),+ cpuCount,+ },+ });+ }const attributes = {delayMaxMs,utilization: Math.round(utilization * 100) / 100,@@ -158,8 +205,7 @@ export const layerWith = (Effect.withSpan("server.eventLoop.stall", { root: true, level: "Warn", attributes }),);if (stallSink !== undefined) {- const time = DateTime.formatIso(yield* DateTime.now);- yield* encodeStallLine({ time, ...attributes }).pipe(+ yield* encodeStallLine({ time: detectedAt, ...attributes }).pipe(Effect.flatMap((line) => Effect.try(() => stallSink.write(`${line}\n`))),Effect.catch(() =>Effect.logWarning("event loop stall log write failed", {@@ -168,17 +214,28 @@ export const layerWith = (),);}- });+ }).pipe(sampling.withPermits(1));const wait = Effect.sleep(SAMPLE_INTERVAL);// The layer builds before the rest of the server, so the first sample covers// startup work such as migrations and projection bootstrap. That can block the// loop for seconds on a large database, so skip it rather than warn at every// launch.yield* wait.pipe(- Effect.andThen(sample),+ Effect.andThen(sampling.withPermits(1)(sample)),+ Effect.andThen(Ref.set(warmedUp, true)),Effect.andThen(wait.pipe(Effect.andThen(tick), Effect.forever)),Effect.forkScoped,);++ return EventLoopMonitor.of({+ latestNoticeableStall: Effect.gen(function* () {+ if (yield* Ref.get(warmedUp)) yield* tick;+ const latest = yield* Ref.get(latestNoticeableStall);+ if (latest === undefined) return undefined;+ const ageMs = DateTime.toEpochMillis(yield* DateTime.now) - latest.detectedAtMs;+ return ageMs <= NOTICEABLE_STALL_MAX_AGE_MS ? latest.stall : undefined;+ }),+ });}),);diff --git a/apps/server/src/ws.ts b/apps/server/src/ws.tsindex 8c3744ed776..f4f5b771fec 100644--- a/apps/server/src/ws.ts+++ b/apps/server/src/ws.ts@@ -214,6 +214,7 @@ import * as ServerEnvironment from "./environment/ServerEnvironment.ts";import * as DirectEndpoints from "./environment/DirectEndpoints.ts";import * as RemoteOpenTargets from "./environment/RemoteOpenTargets.ts";import * as DefectReporter from "./observability/DefectReporter.ts";+import * as EventLoopMonitor from "./observability/EventLoopMonitor.ts";import * as BackgroundPolicy from "./background/BackgroundPolicy.ts";import * as EnvironmentAuth from "./auth/EnvironmentAuth.ts";import { requiredScopeForDeviceList, rpcAuthorizationError } from "./auth/RpcAuthorization.ts";@@ -1202,6 +1203,7 @@ export const layerWsRpc = (const projectStore = yield* ProjectStore.ProjectStoreV2;const projectService = yield* ProjectService.ProjectService;const managedFolders = yield* ManagedProjectFolders.ManagedProjectFolders;+ const eventLoopMonitor = yield* EventLoopMonitor.EventLoopMonitor;const threadSearch = yield* ThreadSearch.ThreadSearch;const providerSessionsV2 = yield* ProviderSessionManager.ProviderSessionManagerV2;@@ -1679,6 +1681,7 @@ export const layerWsRpc = (const environment = yield* serverEnvironment.getDescriptor;const auth = yield* serverAuth.getDescriptor();const scratchWorkspaceRoot = yield* managedFolders.scratchRoot;+ const lastEventLoopStall = yield* eventLoopMonitor.latestNoticeableStall;const editorConfig = yield* resolveEditorConfig(yield* resolveAvailableEditorsForConfig(externalLauncher.resolveAvailableEditors()),resolveFileManagerRevealKindForConfig(externalLauncher.resolveFileManagerRevealKind()),@@ -1720,6 +1723,7 @@ export const layerWsRpc = (onSome: (root) => ({ scratchWorkspaceRoot: root }),}),newProjectsRoot: managedFolders.namedProjectsRoot,+ ...(lastEventLoopStall === undefined ? {} : { lastEventLoopStall }),};});diff --git a/apps/web/src/components/HostFreezeToastCoordinator.tsx b/apps/web/src/components/HostFreezeToastCoordinator.tsxnew file mode 100644index 00000000000..d04c7344b47--- /dev/null+++ b/apps/web/src/components/HostFreezeToastCoordinator.tsx@@ -0,0 +1,33 @@+import { useAtomValue } from "@effect/atom-react";+import { hostFreezeNotice } from "@t3tools/client-runtime/connection";+import { useEffect, useRef } from "react";++import { environmentSummaries } from "../state/presentation";+import { environmentServerConfigsAtom } from "../state/server";+import { toastManager } from "./ui/toast";++/** Tells the user why a host dropped, once per stall, when it reports one on reconnect. */+export function HostFreezeToastCoordinator() {+ const configs = useAtomValue(environmentServerConfigsAtom);+ const identities = useAtomValue(environmentSummaries.identitiesAtom);+ const shownRef = useRef(new Set<string>());++ useEffect(() => {+ for (const [environmentId, config] of configs) {+ const stall = config.lastEventLoopStall;+ if (stall === undefined) continue;+ const key = `${environmentId}:${stall.detectedAt}`;+ if (shownRef.current.has(key)) continue;+ shownRef.current.add(key);+ const label =+ identities.find((identity) => identity.environmentId === environmentId)?.label ??+ config.environment.label;+ const notice = hostFreezeNotice(label, stall);+ if (notice !== null) {+ toastManager.add({ type: "warning", ...notice });+ }+ }+ }, [configs, identities]);++ return null;+}diff --git a/apps/web/src/routes/__root.tsx b/apps/web/src/routes/__root.tsxindex a2dc82d03c4..31f944ef7fd 100644--- a/apps/web/src/routes/__root.tsx+++ b/apps/web/src/routes/__root.tsx@@ -37,6 +37,7 @@ import { ThreadNotificationCoordinator } from "../components/ThreadNotificationCimport { ReopenClosedViewShortcut } from "../components/ReopenClosedViewShortcut";import { ProjectCloneToastCoordinator } from "../components/ProjectCloneToastCoordinator";import { PullRequestGuideRunCoordinator } from "../components/pullRequest/guide/PullRequestGuideRunCoordinator";+import { HostFreezeToastCoordinator } from "../components/HostFreezeToastCoordinator";import { SlowRpcRequestToastCoordinator } from "../components/SlowRpcRequestToastCoordinator";import { ChatGptWelcomeCoordinator } from "../components/settings/ChatGptWelcomeCoordinator";import { ProviderAuthCallbackCoordinator } from "../components/settings/ProviderAuthCallbackCoordinator";@@ -243,6 +244,7 @@ function RootRouteView() {<ConfirmDialogHost /><CustomSnoozeDialogHost /><SlowRpcRequestToastCoordinator />+ <HostFreezeToastCoordinator /><PermissionUpdateNotice />{primaryEnvironmentAuthenticated ? <LegacyThreadMigrationToast /> : null}<ProjectCloneToastCoordinator />diff --git a/packages/client-runtime/src/connection/hostFreeze.test.ts b/packages/client-runtime/src/connection/hostFreeze.test.tsnew file mode 100644index 00000000000..970d5fffe49--- /dev/null+++ b/packages/client-runtime/src/connection/hostFreeze.test.ts@@ -0,0 +1,26 @@+import { describe, expect, it } from "vite-plus/test";++import { hostFreezeNotice } from "./hostFreeze.ts";++const stall = {+ detectedAt: "2026-10-20T07:50:37.633Z",+ durationMs: 12_422,+ loadAverage: 219.4,+ cpuCount: 18,+};++describe("hostFreezeNotice", () => {+ it("blames an overloaded CPU when the load is above the core count", () => {+ expect(hostFreezeNotice("leftbook", stall)).toEqual({+ title: "leftbook froze for 12s",+ description: "Its CPU is overloaded (load 219 on 18 cores).",+ });+ });++ it("blames T3 Code when the CPU had room, or the host reports no load", () => {+ const busy = "T3 Code on leftbook was too busy to answer.";+ expect(hostFreezeNotice("leftbook", { ...stall, loadAverage: 4 })?.description).toBe(busy);+ const { loadAverage: _load, ...windows } = stall;+ expect(hostFreezeNotice("leftbook", windows)?.description).toBe(busy);+ });+});diff --git a/packages/client-runtime/src/connection/hostFreeze.ts b/packages/client-runtime/src/connection/hostFreeze.tsnew file mode 100644index 00000000000..51f228f204a--- /dev/null+++ b/packages/client-runtime/src/connection/hostFreeze.ts@@ -0,0 +1,25 @@+import type { ServerEventLoopStall } from "@t3tools/contracts";++export interface HostFreezeNotice {+ readonly title: string;+ readonly description: string;+}++/**+ * Says why a host stopped answering, from the recent stall it reports on+ * connect. Web shows it as a toast, mobile in the environment's connection row.+ */+export function hostFreezeNotice(+ hostLabel: string,+ stall: ServerEventLoopStall | undefined,+): HostFreezeNotice | null {+ if (stall === undefined) return null;+ const { loadAverage, cpuCount } = stall;+ return {+ title: `${hostLabel} froze for ${Math.round(stall.durationMs / 1000)}s`,+ description:+ loadAverage !== undefined && loadAverage > cpuCount+ ? `Its CPU is overloaded (load ${Math.round(loadAverage)} on ${cpuCount} cores).`+ : `T3 Code on ${hostLabel} was too busy to answer.`,+ };+}diff --git a/packages/client-runtime/src/connection/index.ts b/packages/client-runtime/src/connection/index.tsindex 756e68c5dd4..5686b3c3df7 100644--- a/packages/client-runtime/src/connection/index.ts+++ b/packages/client-runtime/src/connection/index.ts@@ -5,6 +5,7 @@ export * as CredentialStore from "./credentialStore.ts";export { type ConnectionDriverProgress, type EnvironmentConnectionLease } from "./driver.ts";export * from "./errors.ts";export * from "./githubRoutingPermissions.ts";+export * from "./hostFreeze.ts";export * as Connection from "./layer.ts";export * from "./model.ts";export * as ConnectionOnboarding from "./onboarding.ts";diff --git a/packages/client-runtime/src/state/server.test.ts b/packages/client-runtime/src/state/server.test.tsindex f788e9e1fef..0eafd2525ee 100644--- a/packages/client-runtime/src/state/server.test.ts+++ b/packages/client-runtime/src/state/server.test.ts@@ -882,6 +882,76 @@ describe("server state projection", () => {}),);+ it.effect("shows a reported stall but never caches it", () =>+ Effect.gen(function* () {+ const events = yield* Queue.unbounded<ServerConfigStreamEvent>();+ const client = {+ [WS_METHODS.subscribeServerConfig]: () => Stream.fromQueue(events),+ } as unknown as WsRpcProtocolClient;+ const supervisor = EnvironmentSupervisor.EnvironmentSupervisor.of({+ target: TARGET,+ state: yield* SubscriptionRef.make(AVAILABLE_CONNECTION_STATE),+ session: yield* SubscriptionRef.make(Option.some(session(client))),+ prepared: yield* SubscriptionRef.make(Option.none<PreparedConnection>()),+ connect: Effect.void,+ disconnect: Effect.void,+ retryNow: Effect.void,+ } satisfies EnvironmentSupervisor.EnvironmentSupervisor["Service"]);+ const savedConfigs = yield* Queue.unbounded<ServerConfig>();+ const cache = Persistence.EnvironmentCacheStore.of({+ loadShell: () => Effect.succeedNone,+ saveShell: () => Effect.void,+ loadThread: () => Effect.succeedNone,+ saveThread: () => Effect.void,+ removeThread: () => Effect.void,+ loadServerConfig: () => Effect.succeedSome(CONFIG),+ saveServerConfig: (_environmentId, config) => Queue.offer(savedConfigs, config),+ loadVcsRefs: () => Effect.succeedNone,+ saveVcsRefs: () => Effect.void,+ removeVcsRefs: () => Effect.void,+ clearVcsRefs: () => Effect.void,+ clear: () => Effect.void,+ });++ yield* Effect.scoped(+ Effect.gen(function* () {+ const state = yield* makeEnvironmentServerConfigState({}).pipe(+ Effect.provideService(EnvironmentSupervisor.EnvironmentSupervisor, supervisor),+ Effect.provideService(Persistence.EnvironmentCacheStore, cache),+ );+ expect(Option.getOrThrow(yield* SubscriptionRef.get(state)).config).toBe(CONFIG);++ const lastEventLoopStall = {+ detectedAt: "2026-10-20T07:50:37.633Z",+ durationMs: 12_422,+ loadAverage: 219.4,+ cpuCount: 18,+ };+ yield* Queue.offer(events, {+ version: 1,+ type: "snapshot",+ config: { ...CONFIG, lastEventLoopStall },+ });+ const projected = yield* SubscriptionRef.changes(state).pipe(+ Stream.filter((value) =>+ Option.match(value, {+ onNone: () => false,+ onSome: (projection) => projection.source === "live",+ }),+ ),+ Stream.runHead,+ );+ expect(Option.getOrThrow(Option.getOrThrow(projected)).config.lastEventLoopStall).toEqual(+ lastEventLoopStall,+ );+ }),+ );++ // Cached, it would read as a fresh freeze on the next launch.+ expect(yield* Queue.take(savedConfigs)).not.toHaveProperty("lastEventLoopStall");+ }),+ );+it.effect("does not rewrite cached configuration when no live update arrives", () =>Effect.gen(function* () {const client = {diff --git a/packages/client-runtime/src/state/server.ts b/packages/client-runtime/src/state/server.tsindex d0cd59c56e9..a38c28db629 100644--- a/packages/client-runtime/src/state/server.ts+++ b/packages/client-runtime/src/state/server.ts@@ -386,7 +386,9 @@ export const makeEnvironmentServerConfigState = Effect.fn("EnvironmentServerConfconst persist = Effect.fn("EnvironmentServerConfigState.persist")(function* (config: ServerConfig,) {- return yield* cache.saveServerConfig(environmentId, withoutEnvironmentThemes(config)).pipe(+ // A cached stall would read as a fresh freeze on the next launch.+ const { lastEventLoopStall: _stall, ...cacheable } = withoutEnvironmentThemes(config);+ return yield* cache.saveServerConfig(environmentId, cacheable).pipe(Effect.as(true),Effect.catch((error) =>Effect.logWarning("Could not persist cached server configuration.").pipe(diff --git a/packages/contracts/src/server.ts b/packages/contracts/src/server.tsindex 06719e9e16f..c39a29d6fe7 100644--- a/packages/contracts/src/server.ts+++ b/packages/contracts/src/server.ts@@ -586,6 +586,19 @@ export const ServerDirectEndpoint = Schema.Struct({});export type ServerDirectEndpoint = typeof ServerDirectEndpoint.Type;+/**+ * A stretch where the server's event loop could not run, so it answered+ * nothing and clients may have dropped the connection.+ */+export const ServerEventLoopStall = Schema.Struct({+ detectedAt: IsoDateTime,+ durationMs: NonNegativeInt,+ /** One-minute load average when the stall was seen. Absent on Windows, which has none. */+ loadAverage: Schema.optionalKey(Schema.Number),+ cpuCount: PositiveInt,+});+export type ServerEventLoopStall = typeof ServerEventLoopStall.Type;+export const ServerConfig = Schema.Struct({environment: ExecutionEnvironmentDescriptor,auth: ServerAuthDescriptor,@@ -616,6 +629,12 @@ export const ServerConfig = Schema.Struct({threadFindProgressive: Schema.optionalKey(Schema.Boolean),scratchWorkspaceRoot: Schema.optionalKey(TrimmedNonEmptyString),newProjectsRoot: Schema.optionalKey(TrimmedNonEmptyString),+ /**+ * The latest stall long enough to notice, sent only for a few minutes after+ * it. A client that reconnects reads it to say why the host stopped+ * answering. Clients do not cache it, since it describes the host at connect.+ */+ lastEventLoopStall: Schema.optionalKey(ServerEventLoopStall),/*** Never sent in a config snapshot: the theme stream emits the current set* before any change, so a snapshot carrying it too would hand every