Skip to content

Record what a history publication means instead of inferring it from row shapes #3870

Open

Description

@acoliver

Part of #3868 (follow-ups to #854).

DetachedHistoryPublication.publish (packages/core/src/services/history/detachedHistoryPublication.ts) decides what to write to the session recording by comparing the old and new rows:

  • value-identical rebuild: nothing
  • strict deep-equal prefix: one rewind {itemsRemoved, cutSeq}
  • one summary replacing an all-marked journal: compressionDetail plus compressed
  • anything else: full rewind plus content

The shapes are covered by detached-publication-shapes.test.ts, so the recordings are correct today. The design question is whether callers should declare their intent (cut, compression, clear, replace) so the recorder writes the matching record directly. Inferring intent from shapes means a new caller can get a different record type than it meant, and the comparison costs a streamed pass over both journals on every publication.

Proposed

Add an explicit intent to the publication call, derive the record from it, and keep the shape comparison only as an assertion in tests. This also simplifies per-origin fan-out translation (#3865), since each record would carry its meaning.

Activity

  1. added this to the 0.12.0 milestone on Oct 13, 2026
  2. added
    packages/coreIssues related to packages/core component
    Context ManagementIssues related to managing the context sent to the model.
    on Oct 13, 2026
  3. github-actions commented on Oct 13, 2026

    @github-actions
    Contributor

    LLxprt Issue Planner — infrastructure failure

    The autonomous planner failed with exit code 1. Please inspect the workflow logs (Run planner agent section) and re-run once resolved.

  4. added theissue type on Oct 13, 2026
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

    Context ManagementIssues related to managing the context sent to the model.packages/coreIssues related to packages/core component

    Type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions