Skip to content

[upstream #16436] upstream PR #16436 follow-up: the resume contract loses a live compaction's anchor identity #176

Description

@berry-13

Split out of the review of LibreChat-AI#16436 — LibreChat-AI#16436 (comment).

What happens

While a manual compaction is live and has emitted its created event, a page reload or replica handoff rebuilds the turn from resume state. trackUserMessage replaces the identity-only anchor projection with the loaded leaf shape (including its parentMessageId), and getResumeState exposes only isRegenerate, not the job's compact flag. The client therefore fails isCompactionAnchorProjection, treats the anchor as a submitted user row, and mergeResumeMessages can blank a user leaf or flip an assistant leaf to isCreatedByUser: true.

Expected

The compaction identity survives the resume contract: either the anchor projection is preserved through trackUserMessage, or compact is included in the client-safe resume state and the merge treats the row as an anchor, not a submitted user message.

Why it is out of scope for LibreChat-AI#16436

That PR ships the server-side persistence identity; the resume contract and the client's reconnect merge are a separate surface spanning data-provider types and client merge logic.

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: packagesreviewctl followups statebugSomething isn't workingreadyreviewctl followups state

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions