# CLIENT_ENTITY_POLICY
const CLIENT_ENTITY_POLICY = "server_high_water_plus_existing_static_offset"Defines the client entity policy value used by `miniquake.stability_contract`.
src/miniquake/stability_contract.mlminiquake/constants.ml as c → src/miniquake/constants.mlconst CLIENT_ENTITY_POLICY = "server_high_water_plus_existing_static_offset"Defines the client entity policy value used by `miniquake.stability_contract`.
function clientEntityHighWaterStable(serverBefore, serverAfter, entitiesBefore, entitiesAfter)Implements the `clientEntityHighWaterStable` operation for `miniquake.stability_contract` (client entity high water stable).
| Parameter | Type | Default | Description |
|---|---|---|---|
serverBefore | dynamic | — | The server before input consumed by `clientEntityHighWaterStable`. |
serverAfter | dynamic | — | The server after input consumed by `clientEntityHighWaterStable`. |
entitiesBefore | dynamic | — | The entities before input consumed by `clientEntityHighWaterStable`. |
entitiesAfter | dynamic | — | The entities after input consumed by `clientEntityHighWaterStable`. |
function clientEntityLimit(serverBefore, serverAfter, entitiesBefore)WinQuake owns a fixed cl_entities[MAX_EDICTS] array and advances cl_num_entities as higher server entity numbers are first observed. The MiniLang port stores only the reached prefix, so a listen-server client may legitimately catch up from N to an already existing sv.num_edicts high-water after the soak baseline. Preserve only the static-entity offset that already existed at the baseline; new growth beyond that topology remains a failure.
| Parameter | Type | Default | Description |
|---|---|---|---|
serverBefore | dynamic | — | The server before input consumed by `clientEntityLimit`. |
serverAfter | dynamic | — | The server after input consumed by `clientEntityLimit`. |
entitiesBefore | dynamic | — | The entities before input consumed by `clientEntityLimit`. |
const CONTRACT_TEXT = "stability|host-soak=5000|listen-soak=5000|gc-resource-plateau|client-entities<=server-highwater+baseline-static-offset|clean-shutdown|live-output"Defines the contract text value used by `miniquake.stability_contract`.
function contractVector()Implements the `contractVector` operation for `miniquake.stability_contract` (contract vector).
const DEFAULT_SOAK_FRAMES = 5000Defines the default soak frames value used by `miniquake.stability_contract`.
inline function deltaStable(before, after, allowance)Implements the `deltaStable` operation for `miniquake.stability_contract` (delta stable).
| Parameter | Type | Default | Description |
|---|---|---|---|
before | dynamic | — | The before input consumed by `deltaStable`. |
after | dynamic | — | The after input consumed by `deltaStable`. |
allowance | dynamic | — | The allowance input consumed by `deltaStable`. |
const FINGERPRINT = 3504586815Defines the fingerprint value used by `miniquake.stability_contract`.
function hostStable(liveBefore, liveAfter, bytesBefore, bytesAfter)Apply the Quake-compatible host stable behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
liveBefore | dynamic | — | The live before input consumed by `hostStable`. |
liveAfter | dynamic | — | The live after input consumed by `hostStable`. |
bytesBefore | dynamic | — | The bytes before input consumed by `hostStable`. |
bytesAfter | dynamic | — | The bytes after input consumed by `hostStable`. |
const LISTEN_SOAK_FRAMES = 5000Defines the listen soak frames value used by `miniquake.stability_contract`.
const LIVE_BLOCK_ALLOWANCE = 512Defines the live block allowance value used by `miniquake.stability_contract`.
const LIVE_BYTE_ALLOWANCE = 65536Defines the live byte allowance value used by `miniquake.stability_contract`.
function longChecks(before, after)Implements the `longChecks` operation for `miniquake.stability_contract` (long checks).
| Parameter | Type | Default | Description |
|---|---|---|---|
before | dynamic | — | The before input consumed by `longChecks`. |
after | dynamic | — | The after input consumed by `longChecks`. |
function longStable(before, after)Implements the `longStable` operation for `miniquake.stability_contract` (long stable).
| Parameter | Type | Default | Description |
|---|---|---|---|
before | dynamic | — | The before input consumed by `longStable`. |
after | dynamic | — | The after input consumed by `longStable`. |
inline function modes()Implements the `modes` operation for `miniquake.stability_contract` (modes).
const STATUS = "stability_109_frozen_v1"Defines the status value used by `miniquake.stability_contract`.