chore: add lint-workflow-size to cap workflow file growth#791
Open
chore: add lint-workflow-size to cap workflow file growth#791
Conversation
Workflow files are GitHub-specific glue. Logic that accumulates in them binds us to GitHub Actions and can't be unit tested. This linter caps workflow YAML files at 200 lines by default, encouraging extraction to scripts/ (the established pattern). Files that are already over the cap get per-file overrides via a comment (e.g. # lint-workflow-size: max-lines=310). The cap can be raised intentionally — the linter just makes growth visible and reviewable. Covers both .fullsend agent workflows and the shim template. References ADR-0005 (forge abstraction layer). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
fullsend review is working on this — view logs |
Site previewPreview: https://784a4900-site.fullsend-ai.workers.dev Commit: |
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.
Summary
hack/lint-workflow-size, a pre-commit linter that caps workflow YAML files at 200 lines by default# lint-workflow-size: max-lines=Noverride comment, making growth intentional and reviewable.fullsendagent workflows and the shim templatescripts/Motivated while reviewing #729, where ~85 lines of inline shell were added to
review.yml. The established pattern (used byfix.yml,pre-review.sh, etc.) is to keep workflow files as thin GitHub-specific glue and put testable logic inscripts/. This linter enforces that pattern going forward.Current overrides
fix.ymlprioritize-scheduler.ymlshim-workflow.yamlAll other workflow files are under the 200-line default.
Test plan
make lintpassespre-commit run lint-workflow-size --all-filespasses🤖 Generated with Claude Code