Skip to content

chore: add lint-workflow-size to cap workflow file growth#791

Open
ralphbean wants to merge 1 commit intomainfrom
chore/lint-workflow-size
Open

chore: add lint-workflow-size to cap workflow file growth#791
ralphbean wants to merge 1 commit intomainfrom
chore/lint-workflow-size

Conversation

@ralphbean
Copy link
Copy Markdown
Contributor

@ralphbean ralphbean commented May 9, 2026

Summary

  • Adds hack/lint-workflow-size, a pre-commit linter that caps workflow YAML files at 200 lines by default
  • Files over the cap need an explicit # lint-workflow-size: max-lines=N override comment, making growth intentional and reviewable
  • Covers both .fullsend agent workflows and the shim template
  • Error messages reference ADR-0005 (forge abstraction layer) and guide toward extracting logic into scripts/

Motivated while reviewing #729, where ~85 lines of inline shell were added to review.yml. The established pattern (used by fix.yml, pre-review.sh, etc.) is to keep workflow files as thin GitHub-specific glue and put testable logic in scripts/. This linter enforces that pattern going forward.

Current overrides

File Lines Cap
fix.yml 305 310
prioritize-scheduler.yml 213 220
shim-workflow.yaml 469 475

All other workflow files are under the 200-line default.

Test plan

  • make lint passes
  • pre-commit run lint-workflow-size --all-files passes
  • Verified linter catches violations (file over cap → error with actionable message)
  • Verified per-file override works

🤖 Generated with Claude Code

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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

fullsend review is working on this — view logs

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Site preview

Preview: https://784a4900-site.fullsend-ai.workers.dev

Commit: 355e0f1e8a46188f8b90759001b6cb74e6bc8916

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant