fix(session): recover legacy parts for old sessions#17054
Open
seilk wants to merge 1 commit intoanomalyco:devfrom
Open
fix(session): recover legacy parts for old sessions#17054seilk wants to merge 1 commit intoanomalyco:devfrom
seilk wants to merge 1 commit intoanomalyco:devfrom
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Contributor
|
The following comment was made by an LLM, it may be inaccurate: The only PR that appears in the search results related to this issue is the current PR (#17054) itself. The other PRs found (16447, 16628, 17046) are tangentially related but address different concerns:
No duplicate PRs found |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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
Closes #16878
Type of change
What does this PR do?
This fixes one specific old-session failure mode: the session is discoverable and can be opened, but the body renders as metadata-only rows because the SQLite
partrows are missing.In the case I traced locally, widening the session-history window made the old sessions show up again, but opening them only showed assistant headers like
Sisyphus · claude-opus-4-5-20251101-max · 29.8swith no actual message body.The underlying issue is that current reads rely on SQLite
partrows, while some older sessions still have recoverable part JSON in legacy on-disk storage. This change adds a narrow read-time fallback inMessageV2so that when SQL parts are missing, opencode can still hydrate the message from legacy part storage.How is this different from other recent session fixes?
This PR is intentionally separate from the recent session-list fixes:
This PR does not change how sessions are discovered. It fixes the next failure mode after discovery succeeds: old sessions open, but their bodies are empty because the read path cannot recover missing
partrows.How did you verify your code works?
partrowsstorage/part/...textcontentChecklist