fix(ci): simplify file-size workflow to size-only with JSON exclusions#92
Merged
JacobPEvans merged 3 commits intomainfrom Mar 14, 2026
Merged
fix(ci): simplify file-size workflow to size-only with JSON exclusions#92JacobPEvans merged 3 commits intomainfrom
JacobPEvans merged 3 commits intomainfrom
Conversation
Lock files (flake.lock, package-lock.json, yarn.lock, etc.) are auto-generated and should not be subject to file size or line count limits. This was causing CI failures on repos with large lock files. (claude)
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the reusable _file-size workflow to ignore certain lock files during file-size and line-count checks, reducing CI noise from generated artifacts.
Changes:
- Add a
findexclusion for*.lockfiles in the file-size scan. - Add the same
findexclusion for*.lockfiles in the line-count scan.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…lock.yaml (claude)
Drop line count check entirely — it added a second find traversal plus expensive `file` detection per file with little value over size limits. Replace hardcoded find exclusions with a configurable `exclude-patterns` JSON array input so callers can customize without forking. Use `stat -c%s` instead of `wc -c` for faster size reads and `::error` annotations for inline PR feedback. BREAKING: removes `max-line-count` input — nix-ai needs to drop this parameter from its ci-gate.yml caller. (claude)
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.
PR #92 Update
Summary
Optimize the reusable file-size workflow (
.github/workflows/_file-size.yml) by removingexpensive line-count checks and replacing hardcoded exclusions with a flexible, configurable
JSON array input. This improves CI performance and maintainability across all consuming
repositories.
Changes
(expensive
filecommand), reducing workflow runtimeexclude-patternsinput acceptsa JSON array of glob patterns instead of inline hardcoding (e.g.,
["**/*.lock", "**/.gradle/**"])wc -ctostat -c%sfor better performance onlarge file counts
::error file=annotations to report violations directlyon files in PR comments
statremains intact
Breaking Changes
max-line-countinput: Repositories using this input (notablynix-ai)must remove it from their workflow calls or update to a compatible version
max-line-countfrom all workflow calls in.github/workflows/*.ymlnix-airequires a follow-up commit to drop this input from its workflowdefinitions
Downstream Impact
The following repositories consume
_file-size.ymland require updates:max-line-countinput from file-size workflow callsmax-line-countTest Plan
.lock,.gradle) and confirm they do not trigger failuresmax-file-sizeand confirmviolations are caught
::error file=annotations appear correctly in PRcomments
max-line-countRelated: #1