fix(sessions): keep previews complete across short file reads#108941
Merged
Conversation
Contributor
Author
|
Proof on PR head
Behavioral coverage forces permitted short positional reads at both position zero and tail offsets, covering sync/async titles, usage, previews, and custom reset-archive selection. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 17, 2026
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.
Related: #108655
What Problem This Solves
Fixes an issue where users could see incomplete session titles, usage summaries, preview rows, or reset-archive history when a filesystem returned a permitted short positional read.
Why This Change Was Made
All bounded positional session reads now use the existing fill-until-EOF helpers. This covers synchronous and asynchronous title heads, usage and preview tails, and custom reset-archive header matching without raising any materialization caps.
User Impact
Session lists and history previews remain complete on filesystems that return less data than requested, including network-backed filesystems.
Evidence
node scripts/run-vitest.mjs src/gateway/session-utils.fs.test.ts— 69 tests passed.node scripts/check-changed.mjs -- src/gateway/session-utils.fs.ts src/gateway/session-transcript-files.fs.ts src/gateway/session-utils.fs.test.ts— formatting, production/test typechecks, lint, and boundary guards passed on Blacksmith Testbox..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main— clean, no accepted/actionable findings.AI-assisted. I reviewed the full changed paths, callers, sibling positional-read surfaces, tests, and Node's short-read contract.