Skip to content

[long-run] Add resumable search epochs with explicit exact and adaptive semantics #218

Description

@chaoz23

Parent: #215. Depends on #156 and #217. Feeds #66. Related: #112 and #190.

Product outcome

Turn a marathon into compact, restart-safe epochs so a resource stop preserves its best valid frontier and evidence without requiring one ever-growing process heap.

Contract

  • End an epoch at its state grant, a predictive soft-owner watermark, checkpoint/finalization reserve, cancellation/deadline, or exhaustive completion.
  • Preserve an immutable result and a validated checkpoint before advancing.
  • Make memory/time/resource-stopped work resumable when a safe checkpoint can be produced; preserve the prior known-good checkpoint when it cannot.
  • Define two named modes:
    • exact: lossless compact/spill and evidence/order-equivalent resume; no silent eviction.
    • adaptive: deterministic lossy sampling with replayable eviction log; never exhaustive.
  • Bind epoch identity to source/configuration, seeds, resource policy, retention policy, and ordered event log.
  • Geometric window growth requires a successful commit and reopen of the prior epoch.

Acceptance criteria

  • Exact split runs match uninterrupted fixed-state findings, order, frontier, and next checkpoint.
  • Cancellation and each resource stop retain a valid partial report and either a current or named prior checkpoint.
  • Stale source/configuration/policy/event logs fail closed.
  • Checkpoint commit/reopen time and reserve are included inside the declared campaign envelope.
  • Adaptive mode records every retained/evicted representative and cannot emit completeness or unreachable claims.
  • Protected systematic, rare-prefix, delayed-consequence, and long-tail service floors survive adaptive epochs.
  • Tests cover stop during expansion, commit, reopen, and ledger update; corruption; stale revision; tiny epochs; exact migration; and deterministic adaptive replay.

Non-goals

  • Making adaptive mode the default before a promotion gate.
  • Using recent dryness as proof that a lineage has no future value.
  • Provider monetary cost accounting.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions