Skip to content

feat(context): slice 1 — non-destructive working set with age-horizon policy and exact recall #180

Description

@akougkas

Part of #179.

Entry kinds contextEviction / contextRecall (format v4, forward rejection in runMigrations), fold.ts, project.ts, byte-stable markers, policies/age-horizon.ts reproducing today's selection through the ledger, engine.ts replacing the mask stage in runAutoCompact (no replaceEntries), context(scope="recall"), /context working-set section, transcript evicted tag, context.workingSet settings block (enabled: true, policy: age-horizon). Legacy destructive mask behind CLIO_CODER_LEGACY_MASK=1 for one release.

Acceptance

  • Scripted runAutoCompact appends one contextEviction and never calls replaceEntries; with enabled: false the summary stage is reached directly.
  • age-horizon selects the same set of entries maskStaleObservations would have rewritten (floor disabled).
  • Recall round-trips byte-exact and appends contextRecall; off-path and not-evicted refs return typed errors naming the nearest valid ref.
  • Fork and /tree cases pass through filterEntriesToActivePath (fix(session): /tree switch and /fork reconstruct different state from the same turn #94).
  • Every switch (entry.kind) site handles the new kinds (exhaustiveness test).
  • npm run ci green.

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

    area:contextContext engine: working set, compaction, project contextenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions