Skip to content

Snapshot patch can produce multi-MB parts with 100K+ file entries #18921

Closed as not planned

Description

@BYK

Description

Snapshot.patch() runs git diff --name-only with no file count cap. When a worktree has unignored test artifacts (e.g. .test-tmp with 99K+ files from test runs), the diff returns all file paths — stored as a 17 MB JSON patch part in the DB and sent to the browser.

Steps to reproduce

  1. Run tests in a project that creates temp files not covered by .gitignore
  2. Start a session with snapshot enabled
  3. Observe patch parts with thousands of file entries

OpenCode version

latest (dev)

OS

Linux

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    perfIndicates a performance issue or need for optimization
    on Mar 24, 2026
  2. github-actions commented on Mar 24, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is specifically about the patch part size from Snapshot.patch(), it may be a new and distinct problem worth tracking separately.

  3. assigned and unassigned on Apr 26, 2026
  4. removed
    perfIndicates a performance issue or need for optimization
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  5. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions