Summary
repo-memory's max-patch-size is documented as a per-push diff limit, but the MCP pre-check measures the whole memory folder instead. This blocks pushes even when the actual change is tiny. #42773 was closed by #43301, which only reworded the error message — the behavior is unchanged.
Current behavior
Two checks share the same max-patch-size:
actions/setup/js/push_repo_memory.cjs — measures the git diff. ✅ matches docs.
actions/setup/js/safe_outputs_handlers.cjs — sums the byte size of every file in the folder. ❌ undocumented, contradicts docs.
The docs only define per-file (max-file-size), file-count (max-file-count), and per-push diff (max-patch-size). No total-folder limit exists anywhere in the docs.
Impact
Once accumulated files exceed the limit, every push is rejected — even a one-line change — with no way to satisfy it.
Fix
Make the pre-check use the same diff-based logic as the push gate. Do not add a total-folder limit.
Implementation plan
- In
safe_outputs_handlers.cjs, replace the total-file-size sum with the staged git diff size (same calculation as push_repo_memory.cjs).
- Extract that diff-size calculation into one shared helper so both checks call the same function.
- Add tests: a tiny diff on a large folder passes; an oversized diff fails.
References
Summary
repo-memory'smax-patch-sizeis documented as a per-push diff limit, but the MCP pre-check measures the whole memory folder instead. This blocks pushes even when the actual change is tiny. #42773 was closed by #43301, which only reworded the error message — the behavior is unchanged.Current behavior
Two checks share the same
max-patch-size:actions/setup/js/push_repo_memory.cjs— measures the git diff. ✅ matches docs.actions/setup/js/safe_outputs_handlers.cjs— sums the byte size of every file in the folder. ❌ undocumented, contradicts docs.The docs only define per-file (
max-file-size), file-count (max-file-count), and per-push diff (max-patch-size). No total-folder limit exists anywhere in the docs.Impact
Once accumulated files exceed the limit, every push is rejected — even a one-line change — with no way to satisfy it.
Fix
Make the pre-check use the same diff-based logic as the push gate. Do not add a total-folder limit.
Implementation plan
safe_outputs_handlers.cjs, replace the total-file-size sum with the staged git diff size (same calculation aspush_repo_memory.cjs).References