MiniQuake

src/miniquake/stability_contract.ml

Package
miniquake.stability_contract
Reachable
Yes

Imports

Declarations

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`.

View source

clientEntityHighWaterStable

function clientEntityHighWaterStable(serverBefore, serverAfter, entitiesBefore, entitiesAfter)

Implements the `clientEntityHighWaterStable` operation for `miniquake.stability_contract` (client entity high water stable).

ParameterTypeDefaultDescription
serverBeforedynamic—The server before input consumed by `clientEntityHighWaterStable`.
serverAfterdynamic—The server after input consumed by `clientEntityHighWaterStable`.
entitiesBeforedynamic—The entities before input consumed by `clientEntityHighWaterStable`.
entitiesAfterdynamic—The entities after input consumed by `clientEntityHighWaterStable`.

View source

clientEntityLimit

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.

ParameterTypeDefaultDescription
serverBeforedynamic—The server before input consumed by `clientEntityLimit`.
serverAfterdynamic—The server after input consumed by `clientEntityLimit`.
entitiesBeforedynamic—The entities before input consumed by `clientEntityLimit`.

View source

CONTRACT_TEXT

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`.

View source

contractVector

function contractVector()

Implements the `contractVector` operation for `miniquake.stability_contract` (contract vector).

View source

DEFAULT_SOAK_FRAMES

const DEFAULT_SOAK_FRAMES = 5000

Defines the default soak frames value used by `miniquake.stability_contract`.

View source

deltaStable

inline function deltaStable(before, after, allowance)

Implements the `deltaStable` operation for `miniquake.stability_contract` (delta stable).

ParameterTypeDefaultDescription
beforedynamic—The before input consumed by `deltaStable`.
afterdynamic—The after input consumed by `deltaStable`.
allowancedynamic—The allowance input consumed by `deltaStable`.

View source

FINGERPRINT

const FINGERPRINT = 3504586815

Defines the fingerprint value used by `miniquake.stability_contract`.

View source

hostStable

function hostStable(liveBefore, liveAfter, bytesBefore, bytesAfter)

Apply the Quake-compatible host stable behavior.

ParameterTypeDefaultDescription
liveBeforedynamic—The live before input consumed by `hostStable`.
liveAfterdynamic—The live after input consumed by `hostStable`.
bytesBeforedynamic—The bytes before input consumed by `hostStable`.
bytesAfterdynamic—The bytes after input consumed by `hostStable`.

View source

LISTEN_SOAK_FRAMES

const LISTEN_SOAK_FRAMES = 5000

Defines the listen soak frames value used by `miniquake.stability_contract`.

View source

LIVE_BLOCK_ALLOWANCE

const LIVE_BLOCK_ALLOWANCE = 512

Defines the live block allowance value used by `miniquake.stability_contract`.

View source

LIVE_BYTE_ALLOWANCE

const LIVE_BYTE_ALLOWANCE = 65536

Defines the live byte allowance value used by `miniquake.stability_contract`.

View source

longChecks

function longChecks(before, after)

Implements the `longChecks` operation for `miniquake.stability_contract` (long checks).

ParameterTypeDefaultDescription
beforedynamic—The before input consumed by `longChecks`.
afterdynamic—The after input consumed by `longChecks`.

View source

longStable

function longStable(before, after)

Implements the `longStable` operation for `miniquake.stability_contract` (long stable).

ParameterTypeDefaultDescription
beforedynamic—The before input consumed by `longStable`.
afterdynamic—The after input consumed by `longStable`.

View source

modes

inline function modes()

Implements the `modes` operation for `miniquake.stability_contract` (modes).

View source

STATUS

const STATUS = "stability_109_frozen_v1"

Defines the status value used by `miniquake.stability_contract`.

View source