Repository navigation
Conversation
Legacy JSONL and a stream whose prefix does not start at zero cannot be opened. Delete drops that container without folding it. An adapter that does not override discard_unreadable leaves the deletion incomplete. Co-authored-by: Saurav <saurav.panthee@gmail.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
Co-authored-by: Saurav <saurav.panthee@gmail.com>
Co-authored-by: Saurav <saurav.panthee@gmail.com>
Contributor
Author
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.
What changed
Deleting a chat whose history cannot be opened now drops that container instead of leaving the deletion incomplete.
SessionStorage::discard_unreadableremoves a legacy JSONL file and resets a stream whose prefix does not start at zero, without folding the retained bytes. A later open of the reset stream is an empty published session. The trait default refuses withStorageError::Corrupt. An adapter that can hold unreadable history has to override it, or the delete stays incomplete and the file stays.RecordStorageoverrides it. In-memory storage keeps the refusal.The conversation service calls this only when opening the history returns
CorruptorAnotherVersion. A busy lease stays leased-elsewhere. Any other discard error stays on the deletion. When the provider link was still unread, the tombstone records that the history was lost.A semantic record this build cannot decode still opens as a placeholder, so delete takes the normal lease and erases it. This path is the history that never opens: legacy JSONL, and a stream whose saved prefix is gone.
Tests
memory_storage_refuses_to_discard_unreadable_historylocks the refusing default.discard_unreadable_removes_legacy_jsonl_and_resets_a_predecessor_streamremoves the JSONL file and resets a pruned prefix.deleting_a_legacy_jsonl_chat_removes_itfinishes the delete and the file is gone.An issue for this split could not be opened from this environment. GitHub access here is read-only.
Scripted gateway checks
This pull request changes how a delete treats history that cannot be opened. The scripted gateway summary is not part of it.