Skip to content

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

@BYK

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

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)perfIndicates a performance issue or need for optimization

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions