Repository navigation
Count changed files (not total wiki files) in push-wiki-memory limit enforcement - #36818
Merged
Merged
Conversation
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Copilot
AI
changed the title
Fix push wiki memory file limit to count changed files
Count changed files (not total wiki files) in push-wiki-memory limit enforcement
Jun 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates push_repo_memory’s MAX_FILE_COUNT enforcement to reflect the number of actual working-tree changes produced by the run (via git status --porcelain), instead of the total number of files scanned from the artifact (which could incorrectly fail large wiki artifacts even when only a small subset changes).
Changes:
- Removes pre-copy
MAX_FILE_COUNTenforcement based onfilesToCopy.length. - Adds post-copy enforcement based on changed-file count derived from
git status --porcelain. - Adds a regression-style source assertion test to ensure changed-file enforcement remains and the old pre-copy check does not return.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/push_repo_memory.cjs | Moves file-count enforcement to post-copy and bases it on git working-tree changes. |
| actions/setup/js/push_repo_memory.test.cjs | Adds a source-level regression assertion for changed-file-based enforcement. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
| let hasChanges = false; | ||
| let changedFileCount = 0; | ||
| try { | ||
| const status = execGitSync(["status", "--porcelain"]); |
| const scriptContent = nodeFs.readFileSync(scriptPath, "utf8"); | ||
|
|
||
| expect(scriptContent).toContain("changedFileCount"); | ||
| expect(scriptContent).toContain('execGitSync(["status", "--porcelain"])'); |
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.
push-wiki-memoryenforcedMAX_FILE_COUNTusing total scanned files in the wiki artifact, which incorrectly failed large wikis even when a run changed only a small subset. This updates enforcement to use actual git working-tree changes produced by the run.Behavior change
filesToCopy.length.MAX_FILE_COUNTafter copy using changed-file count fromgit status --porcelain.Failure semantics
Regression guard
push_repo_memory.test.cjsto ensure: