Skip to content

fix: split fork transcripts on newline only - #1445

Open
mangeshraut712 wants to merge 6 commits into
anthropics:mainfrom
mangeshraut712:cursor/fix-fork-splitlines-1441
Open

mangeshraut712 wants to merge 6 commits into
anthropics:mainfrom
mangeshraut712:cursor/fix-fork-splitlines-1441

Conversation

@mangeshraut712

Copy link
Copy Markdown

Summary

_parse_fork_transcript used str.splitlines(), which also splits on U+2028 / U+2029 / U+0085 inside JSON string values. That dropped transcript entries and broke parentUuid chains on fork.

Split JSONL records on "\n" only (the actual record separator).

Fixes #1441

Test plan

  • pytest tests/test_session_mutations.py (53 passed)
  • Full suite: 1629 passed, 6 skipped
  • Regression test with U+2028/U+2029/U+0085 inside JSON strings

@mangeshraut712

Copy link
Copy Markdown
Author

Friendly bump — CI is green and this is ready for review when you have a minute. Happy to adjust anything.

@mangeshraut712

Copy link
Copy Markdown
Author

Still green and ready for review/merge when you have a moment.

@mangeshraut712

Copy link
Copy Markdown
Author

This is mergeable and ready for review. It splits fork transcripts on newline only so partial lines are not treated as complete events. Happy to take any feedback — if it looks good, could you please review and merge when you get a chance? Thanks.

This branch has not been deployed

No deployments
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.

fork_session drops transcript entries containing U+2028/U+2029/U+0085 (str.splitlines), breaking the parentUuid chain

1 participant