Skip to content

Treat failed run.json with error as valid session state - #726

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7287-hide-unreadable-session-diagnostics-from-corbits-resume
Aug 31, 2026
Merged

Treat failed run.json with error as valid session state#726
TheGreatAxios merged 2 commits into
mainfrom
cl-7287-hide-unreadable-session-diagnostics-from-corbits-resume

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Session parse now treats a failed run.json with an error string as valid state instead of a corrupt file.
  • Resume-by-id of a truly unreadable file throws one recovery line; diagnostics go to structured log instead of stderr.

Verification

  • Typecheck and build passed; targeted tests passed.
  • Full bun run test was blocked by host git hooks rejecting fixture authors (CL-7267 is the helper for that).

Fixes CL-7287

loadState used to treat any parsed error field as a corrupt file, so a valid failed run with an error string was unreadable. Parse is now a tagged result, resume-by-id of a truly unreadable file throws one recovery line, and diagnostics go to structured log instead of stderr.
@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

CL-7287

loadState now returns a tagged result so callers can tell a missing run.json from a present but unreadable one without restatting the file. Unreadable resume-by-id prints one recovery line; parse diagnostics stay in the structured log.
@TheGreatAxios
TheGreatAxios merged commit 6bab08a into main Aug 31, 2026
5 checks passed
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