Skip to content

fix(sessions): keep previews complete across short file reads#108941

Merged
steipete merged 1 commit into
mainfrom
fix/session-positional-read-windows
Jul 16, 2026
Merged

fix(sessions): keep previews complete across short file reads#108941
steipete merged 1 commit into
mainfrom
fix/session-positional-read-windows

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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.
  • Post-rebase stable patch ID matched the checked patch; the focused test passed again on head.
  • .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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S maintainer Maintainer-authored PR labels Jul 16, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Proof on PR head 6dd0c0f91dc6e165e0c95a4c55918673bfd46a1d:

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.

@steipete
steipete merged commit 203b8db into main Jul 16, 2026
140 of 144 checks passed
@steipete
steipete deleted the fix/session-positional-read-windows branch July 16, 2026 11:30
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant