fix(gateway): split the heartbeat check interval from the send interval; expose the two fixed worker-client timeouts (mxaccessgw#192)
R21-O14: MxGateway:Worker:HeartbeatIntervalSeconds was documented as the worker heartbeat send interval, but it never reached the worker (which sends on its own fixed 5 s) and only set the gateway's HeartbeatCheckInterval. It is renamed HeartbeatCheckIntervalSeconds (default 5, unchanged). The old key stays as a deprecated alias with the same meaning so existing appsettings keep working; setting both is a validation error. The grace-vs-interval check now compares against the resolved check interval. R21-O15: WorkerClientOptions.EventChannelFullModeTimeout and HeartbeatStuckCeiling were always their compile-time defaults. They are now MxGateway:Worker:EventChannelFullModeTimeoutMilliseconds (default 5000, > 0) and HeartbeatStuckCeilingSeconds (default 75, >= HeartbeatGraceSeconds). The factory's mapping moved into SessionWorkerClientFactory.CreateWorkerClientOptions so every field is set from configuration and is testable. The effective-config record shows the resolved check interval and both new values. Docs: GatewayConfiguration.md, GatewayProcessDesign.md sample, MxAccessWorkerInstanceDesign.md heartbeat section; appsettings.json uses the new keys. Tests: CreateWorkerClientOptions mapping + defaults (fail under a mutated mapping), alias honoured, both-keys conflict, and bounds for the new options. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -945,7 +945,7 @@ Suggested configuration shape:
|
||||
"StartupTimeoutSeconds": 30,
|
||||
"PipeConnectAttemptTimeoutMilliseconds": 2000,
|
||||
"ShutdownTimeoutSeconds": 10,
|
||||
"HeartbeatIntervalSeconds": 5,
|
||||
"HeartbeatCheckIntervalSeconds": 5,
|
||||
"HeartbeatGraceSeconds": 15,
|
||||
"MaxMessageBytes": 16777216
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user