feat(core): persist compaction model and provider state - #46962
Open
rekram1-node wants to merge 1 commit into
Open
feat(core): persist compaction model and provider state#46962rekram1-node wants to merge 1 commit into
rekram1-node wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
None.
Type of change
What does this PR do?
Completed compaction messages and completion events now require
model: Model.Refand may carryproviderState, using the same opaque state schema as assistants. State comes from the accepted summarization attempt and the route's provider-metadata namespace; rejected-attempt state is discarded.Existing checkpoints and stored completion events get a best-effort model backfill from earlier model-bearing history, then later history, then the session model.
unknown/unknownis the final fallback. Older exports remain importable and are normalized before storage; inferred models never acquire provider state. Existing database import paths are covered too.Projection, clients, export/import, and sanitized exports preserve or redact the fields appropriately. Generated clients and existing fixtures are updated for the required field.
No changes to prompts, summary/recent content, retained history, or native-compaction execution/replay.
How did you verify your code works?
test/contract-hygiene.test.ts:244because unchangedsrc/integration.ts:62,68usesSchema.Any.Screenshots / recordings
Not applicable; no UI behavior changes.
Checklist