Skip to content

Increase repo-memory max-patch-size ceiling from 100KB to 1MB#32667

Merged
pelikhan merged 2 commits into
mainfrom
copilot/replace-repo-memory-size-limit
May 16, 2026
Merged

Increase repo-memory max-patch-size ceiling from 100KB to 1MB#32667
pelikhan merged 2 commits into
mainfrom
copilot/replace-repo-memory-size-limit

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

The max-patch-size field in repo-memory was hard-capped at 100KB, blocking workflows that need to persist non-trivial data in a single push.

Changes

  • repo_memory.go: Raises maxRepoMemoryPatchSize constant from 1024001048576
  • JSON schema: Updates maximum for both object-style and array-style repo-memory max-patch-size entries to 1048576
  • Docs + scratchpad: Updates descriptions and examples to reflect the new 1MB ceiling
  • Tests: Updates error message assertions and adds test cases validating values previously rejected (e.g. 500KB, 1MB)

Default (10KB) and overall behavior are unchanged — users explicitly opting in to larger values can now configure up to 1MB:

tools:
  repo-memory:
    max-patch-size: 524288  # 512KB — previously rejected, now valid

The absolute maximum for the max-patch-size configuration field has been
raised from 102400 (100KB) to 1048576 (1MB), allowing users to explicitly
configure larger patch sizes for non-trivial agentic memory workflows.

Default behavior is unchanged (10KB default, 100KB was formerly the cap).
Users who need more than 100KB can now set max-patch-size up to 1MB.

Updated: constant, schema, docs, scratchpad spec, and tests.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace repo-memory patch size limit with rate limit over time Increase repo-memory max-patch-size ceiling from 100KB to 1MB May 16, 2026
Copilot AI requested a review from pelikhan May 16, 2026 17:08
@pelikhan pelikhan marked this pull request as ready for review May 16, 2026 17:36
Copilot AI review requested due to automatic review settings May 16, 2026 17:36
@pelikhan pelikhan merged commit 72a4848 into main May 16, 2026
@pelikhan pelikhan deleted the copilot/replace-repo-memory-size-limit branch May 16, 2026 17:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Raises the repo-memory max-patch-size ceiling from 100KB to 1MB while preserving the existing 10KB default.

Changes:

  • Updates Go validation constants and comments for the new 1MB maximum.
  • Updates schema limits and repo-memory documentation/scratchpad references.
  • Expands validation tests to cover newly allowed larger patch sizes.
Show a summary per file
File Description
pkg/workflow/repo_memory.go Raises the runtime max-patch-size constant and related comments.
pkg/workflow/repo_memory_test.go Updates boundary assertions and adds larger valid values.
pkg/parser/schemas/main_workflow_schema.json Raises object and array schema maximums to 1MB.
docs/src/content/docs/reference/repo-memory.md Updates repo-memory reference docs/examples for the 1MB limit.
scratchpad/repo-memory.md Updates internal repo-memory scratchpad limit references.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/5 changed files
  • Comments generated: 3

Comment on lines +4556 to +4557
"maximum": 1048576,
"description": "Maximum total patch size in bytes (default: 10240 = 10KB, max: 1048576 = 1MB). The total size of the git diff must not exceed this value."
Comment thread scratchpad/repo-memory.md

- **Minimum**: 1 byte
- **Maximum**: 102400 bytes (100 KB)
- **Maximum**: 1048576 bytes (1 MB)
**File Type Restrictions**: Use `allowed-extensions` to restrict which file types can be stored (default: empty/all files allowed). When specified, only files with listed extensions (e.g., `[".json", ".txt", ".md"]`) can be saved. Files with disallowed extensions will trigger validation failures.

**Patch Size Limit**: Use `max-patch-size` to limit the total size of changes in a single push (default: 10KB, max: 100KB). The total size of the git diff (all staged changes combined) must not exceed this value. If it does, the push is rejected with an error. Use this to prevent large unintentional memory updates.
**Patch Size Limit**: Use `max-patch-size` to limit the total size of changes in a single push (default: 10KB, max: 1MB). The total size of the git diff (all staged changes combined) must not exceed this value. If it does, the push is rejected with an error. Use this to prevent large unintentional memory updates.
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.

Replace repo-memory patch size limit with a rate limit over time

3 participants