Skip to content

Default auto-checkpointing to bound replay depth #843

Description

@flyingrobots

Problem

Omitting checkpointPolicy silently disables automatic checkpointing. Replay depth therefore grows without a bound until a caller explicitly creates a checkpoint, and every materialization pays for the entire retained suffix.

Measured on a real store at 262 unreplayed patches:

  • one read spawned 5,267 Git subprocesses;
  • the backlog grew by two commits per write; and
  • no runtime signal exposed the monotonic degradation.

The current runtime path is:

normalizeCheckpointPolicy(undefined) -> undefined
_tryAutoCheckpoint()                 -> returns when no policy exists

Required behavior

  • An omitted policy uses a validated runtime-backed default cadence of 64 replayed patches.
  • checkpointPolicy: null remains the explicit opt-out.
  • The opt-out survives detached and forked runtime construction.
  • Default and caller-supplied policies are represented by one immutable CheckpointPolicy domain value.
  • Checkpoint creation remains semantically neutral: graph state hashes do not change.

Acceptance

  • Omitted policy checkpoints when replay depth reaches or exceeds 64.
  • Explicit null never auto-checkpoints.
  • Detached and forked runtimes preserve explicit null.
  • Invalid cadences fail through typed runtime validation.
  • No structural checkpoint-policy bags remain in live domain seams.
  • Focused checkpoint, fork, and detached-open tests pass.
  • Full lint, typecheck, stable unit, and coverage gates pass.
  • PR fix!: default checkpointPolicy to { every: 64 } #842 review threads and exact-head CI are green.

Implementation: #842

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:runtimePrimary work area: runtime.priority:asapImmediate release pressure.status:activeSomeone is actively working this issue.type:bugDefect or incorrect behavior.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions