Skip to content

Skip mid-file interleaved garbage in turns.jsonl on resume - #656

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-7052-resume-must-skip-mid-file-interleavedgarbage-turnsjsonl
Aug 24, 2026
Merged

Skip mid-file interleaved garbage in turns.jsonl on resume#656
TheGreatAxios merged 3 commits into
mainfrom
cl-7052-resume-must-skip-mid-file-interleavedgarbage-turnsjsonl

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Skips JSON.parse failures on a turns line with a warning so glued truncated writes or mid-file junk no longer abort reactor resume.
  • Keeps schema-invalid turns failing closed; salvages glued {...}{...} fragments when possible and names turns.jsonl plus the line number in warns.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • Optimized context store tests cover skip/salvage paths

Fixes CL-7052

JSON.parse failures on a turns line warn and skip so a glued truncated
manage_tasks write or mid-file junk no longer aborts reactor resume.
Schema-invalid turns still fail closed. Warns name turns.jsonl and the
line number; glued {...}{...} fragments are salvaged when possible.

Fixes CL-7052
@linear-code

linear-code Bot commented Aug 24, 2026

Copy link
Copy Markdown

CL-7052

@TheGreatAxios
TheGreatAxios merged commit 50eeac4 into main Aug 24, 2026
5 checks passed
TheGreatAxios added a commit that referenced this pull request Aug 27, 2026
* Skip mid-file interleaved garbage in turns.jsonl on resume

JSON.parse failures on a turns line warn and skip so a glued truncated
manage_tasks write or mid-file junk no longer aborts reactor resume.
Schema-invalid turns still fail closed. Warns name turns.jsonl and the
line number; glued {...}{...} fragments are salvaged when possible.

Fixes CL-7052

* Simplify glued-line recovery and skip mid-file garbage on reactor load (CL-7052)

* Fix prettier formatting in optimized context store
TheGreatAxios added a commit that referenced this pull request Aug 27, 2026
* Skip mid-file interleaved garbage in turns.jsonl on resume

JSON.parse failures on a turns line warn and skip so a glued truncated
manage_tasks write or mid-file junk no longer aborts reactor resume.
Schema-invalid turns still fail closed. Warns name turns.jsonl and the
line number; glued {...}{...} fragments are salvaged when possible.

Fixes CL-7052

* Simplify glued-line recovery and skip mid-file garbage on reactor load (CL-7052)

* Fix prettier formatting in optimized context store
@TheGreatAxios
TheGreatAxios deleted the cl-7052-resume-must-skip-mid-file-interleavedgarbage-turnsjsonl branch August 28, 2026 00:09
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