fix: exclude .git from push_repo_memory size calculation#22610
Merged
fix: exclude .git from push_repo_memory size calculation#22610
Conversation
5 tasks
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/8cd7b765-4d37-4315-bb78-144a48c2779b
Copilot
AI
changed the title
[WIP] Fix push_repo_memory false-positive size limit error
fix: exclude .git from push_repo_memory size calculation
Mar 24, 2026
pelikhan
approved these changes
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes false-positive push_repo_memory size-limit failures caused by counting .git packfiles in the memory directory clone.
Changes:
- Update recursive memory directory scanning to skip
.gitdirectories at any depth so only working-tree files contribute to size totals - Add a regression test covering “small memory files + large
.git/objects/pack” to ensure validation succeeds - Add a changeset entry documenting the patch fix
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| actions/setup/js/safe_outputs_handlers.cjs | Excludes .git directories during recursive size scanning for push_repo_memory validation. |
| actions/setup/js/safe_outputs_handlers.test.cjs | Adds regression coverage ensuring .git packfiles do not trip size-limit validation. |
| .changeset/patch-fix-push-repo-memory-git-size.md | Release note describing the false-positive and the fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
push_repo_memoryMCP tool was reporting false-positive size limit errors ("Total memory size (30 KB) exceeds allowed limit of 12 KB") on workflows with only ~500 bytes of actual memory files. The memory directory is a git clone, and.git/objects/pack/accumulates pack files over time — these were being counted toward the size limit.Changes
safe_outputs_handlers.cjs— Skip.gitdirectories at any depth inscanDir()so only working tree files contribute to the total size checksafe_outputs_handlers.test.cjs— Regression test simulating the exact scenario: small memory files + large.git/objects/pack/entry, verifying the handler returns success.changeset/patch-fix-push-repo-memory-git-size.md— Release note for the fixWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js -commit-branch bin/git git diff�� --name-status 00c116205a950fb30e4e77c7ce49acf032a7187f^ k/_temp/uv-python-dir/git -bare-UQepYn git e/git git(http block)invalid.example.invalid/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git init�� tions/node_modul-u git ndor/bin/git user.name Test User ache/node/24.14.-b /usr/lib/git-corshallow-fetch-fail main�� run --auto tions/setup/node_modules/.bin/git --detach mental-eWsFua' t git(dns block)/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git chec�� -b main ache/go/1.25.0/x64/bin/git user.name Test User ndor/bin/git git comm�� -m Local commit 0/x64/bin/git run --auto ndor/bin/git git(dns block)If you need me to access, download, or install something from one of these locations, you can either:
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.