Skip to content

Recover resume transcript when a turns segment has malformed JSON - #479

Closed
TheGreatAxios wants to merge 1 commit into
mainfrom
cl-5935-resume-transcript-fails-turns-segment-has-malformed-json
Closed

Recover resume transcript when a turns segment has malformed JSON#479
TheGreatAxios wants to merge 1 commit into
mainfrom
cl-5935-resume-transcript-fails-turns-segment-has-malformed-json

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Resume hydrate (loadRecentTurns) now skips mid-file null holes and non-tail malformed JSONL lines so surrounding history still paints.
  • Unrecoverable segments name the failing file in the error message.
  • Reactor ContextStore.load() still hard-fails (display-only recovery only).

Test plan

  • bun test src/session/optimized-context-store.test.ts (14 pass)
  • bun run typecheck
  • bun run build
  • bun run test (4550 pass, 0 fail)

Fixes CL-5935

…tory

Resume hydrate used loadRecentTurns, which aborted the whole segment on one
mid-file null hole or garbage line. Display-only recovery now skips bad lines
and still paints usable turns; fully unrecoverable segments name the file in
the error. Reactor ContextStore.load still hard-fails.
@linear-code

linear-code Bot commented Aug 13, 2026

Copy link
Copy Markdown

CL-5935

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #480, which landed the writer root-cause fix (no more null-padding on stale keepBytes) and reactor load() recovery with metadata preservation.

#479 only soft-recovered loadRecentTurns for display and left reactor load hard-failing. Null-hole hydrate is covered by #480’s null-strip. If we still want display resilience for non-null mid-file garbage, that can be a small follow-up on top of main.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant