fix(session): bound diff summary payload - #33892
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found several related PRs addressing similar issues with diff handling and session summaries: Potentially Related PRs:
The most relevant is PR #32410 which appears to have previously addressed the same problem of retaining file-diff patch text in summaries. You may want to check if this PR was merged and whether this new PR (33892) is refining or extending that fix further. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #33106
Type of change
What does this PR do?
Caps session summary diffs before generating, persisting, and serving them so a pathological workspace diff cannot bloat session or message JSON.
The snapshot diff path now stops once the summary budget is reached, and oversized rows are trimmed on read and write as a safety net.
How did you verify your code works?
bun test test/session/summary-diffs.test.tsSnapshot.diffFull(..., { limit })bun test/ pre-push typecheck still hit unrelated pre-existing module-resolution errorsScreenshots / recordings
N/A
Checklist