mixle.experimental.typed_runtime.staleness moduleΒΆ
Typed stale-proposal admission, correction, and shrinkage policy.
- class CorrectionResult(source_proposal_id, source_payload_hash, run_id, model_id, node_id, target_model_version, target_dependency_versions, semantics, method, evidence_id, payload, payload_hash='')[source]
Bases:
objectIdentity-bound payload recomputed or approximated for target versions.
- Parameters:
- property fingerprint: str
Bind the exact correction payload, target state, method, and evidence.
- class CorrectionSemantics(*values)[source]
Bases:
StrEnumWhether a corrected payload is exact at the target state or approximate.
- class StalenessAction(*values)[source]
Bases:
StrEnumCoordinator action for a locally computed proposal.
- class StalenessPolicy(max_model_lag=0, max_node_lag=0, shrink_decay=0.5)[source]
Bases:
objectHard lag limits and conservative stale-delta decay.
- class StalenessReceipt(proposal_id, action, reason, model_lag, node_lag, scale, correction_fingerprint, correction_semantics, source_payload_hash, target_model_version, target_dependency_versions)[source]
Bases:
objectMeasured lag, consistency contract, and admission decision.
- Parameters:
- property accepted: bool
Whether the proposal may proceed to versioned commit preflight.
- assess_staleness(proposal, contract, current, policy, *, correction=None)[source]
Apply exact/strict/bounded/corrected semantics before payload mutation.
- Parameters:
proposal (ProposalPacket)
contract (UpdateContract)
current (RuntimeVersions)
policy (StalenessPolicy)
correction (CorrectionResult | None)
- Return type:
StalenessReceipt