Skip to content

Add --max-warnings ratchet to root lint script#69

Open
toon-backlog-bot[bot] wants to merge 2 commits into
mainfrom
agent/68-eslint-max-warnings-ratchet
Open

Add --max-warnings ratchet to root lint script#69
toon-backlog-bot[bot] wants to merge 2 commits into
mainfrom
agent/68-eslint-max-warnings-ratchet

Conversation

@toon-backlog-bot

@toon-backlog-bot toon-backlog-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

CI's pnpm lint (eslint .) had no --max-warnings gate, so all 902 existing
ESLint warnings passed silently and a newly introduced warning wouldn't fail
CI either — the warning signal was effectively decorative. This adds
--max-warnings 902 to the root lint script (the same script CI's
ci.yml calls directly), so any new warning above the current count now
fails lint. Lowering the ceiling as existing warnings get fixed is left for a
follow-up, as noted in the issue.

The pnpm lint step in .github/workflows/ci.yml also had
continue-on-error: true, which would have swallowed the ratchet's non-zero
exit code and kept the CI job green regardless (caught in review). This PR
removes that flag too, so a new warning above 902 now actually fails the CI
job instead of being silently absorbed.

Closes #68

Verification

  • pnpm lint — confirmed exactly 902 warnings on main before the change,
    matching the issue.
  • pnpm lint on this branch — passes (✖ 902 problems (0 errors, 902 warnings), exit 0).
  • Sanity-checked the ratchet is effective: temporarily set
    --max-warnings 901 and confirmed pnpm lint fails (exit 1, "ESLint
    found too many warnings"), then restored to 902.
  • Confirmed continue-on-error: true removal means a failing pnpm lint
    step now fails the CI job instead of being marked as a passed-with-warnings
    step.
  • pnpm -r build — passes.
  • pnpm test — 53 pre-existing failures in workflow-orchestrator.test.ts
    and related files, confirmed present on main prior to this change
    (unrelated to this PR's scope) and unaffected by it.

Notes

  • No devbox CLI available in this environment; verified the pinned
    toolchain manually instead (Node 22, pnpm 8.15.9 via corepack — matches
    devbox.json's pins), then ran the same commands devbox run lint /
    devbox run build / devbox run test would invoke.
  • Added an empty changeset (config-only change, no package version bump).

CI's `pnpm lint` had no --max-warnings gate, so all 902 existing
ESLint warnings passed silently and a newly introduced warning
wouldn't fail CI either. Set the ceiling to the current count (902)
so new warnings are visible; a follow-up can lower it as warnings
are fixed.

Closes #68

@ALLiDoizCode ALLiDoizCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: the ratchet has no effect in actual CI.

.github/workflows/ci.yml line 25-26:

      - run: pnpm lint
        continue-on-error: true

The lint step already has continue-on-error: true (pre-existing, not touched by this diff). That means even after this PR, when eslint . --max-warnings 902 exits non-zero for a new warning, the workflow step is marked as having "succeeded with warnings" and the job/build continues and reports green. Issue #68's stated goal — "a new warning in a PR should be visible and mean something" — is not met: nothing in the GitHub UI fails, no check turns red, and nothing blocks merge. The PR body's claim that "a newly introduced warning wouldn't fail CI either" (implying this PR fixes that) is therefore inaccurate — CI still won't fail, because the step-level continue-on-error swallows the new non-zero exit code exactly as it swallowed the old one.

To actually close #68, this PR (or a follow-up bundled with it) needs to also remove continue-on-error: true from the pnpm lint step in ci.yml (or otherwise surface the failure, e.g. a separate required check). As-is, pnpm lint failing locally/manually is real, but the CI signal the issue is about remains just as decorative as before.

Everything else checked out: package.json's lint script change is correct and matches the stated warning count, the changeset is appropriately empty (root package is private, no version bump needed), and the PR title accurately describes the diff.

The --max-warnings ratchet added in this PR had no effect in CI because
the lint step's continue-on-error: true swallowed any non-zero exit
code, so the job stayed green regardless. Removing it lets a new
warning above the 902 ceiling actually fail CI, closing the gap the
review pointed out.
@toon-backlog-bot

Copy link
Copy Markdown
Contributor Author

Addressed the blocking review comment: removed continue-on-error: true from the pnpm lint step in .github/workflows/ci.yml (9039140). Now that the ratchet's non-zero exit isn't swallowed, a new warning above 902 will fail the CI job as intended, closing the gap identified in the review.

Verification:

  • pnpm lint — still passes at exactly 902 warnings, exit 0.
  • pnpm -r build — passes.

Ready for re-review.

@toon-backlog-bot toon-backlog-bot Bot added the review-round:1 Fix loop: first round of review changes addressed label Jul 7, 2026

@ALLiDoizCode ALLiDoizCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff (package.json, .github/workflows/ci.yml, changeset) plus repo standards in CLAUDE.md.

Checked:

  • eslint . --max-warnings 902 correctly ratchets: fails when warnings exceed 902, passes at exactly 902 (matches --max-warnings semantics and the PR's own 901/902 sanity check).
  • The prior blocking review (continue-on-error swallowing the ratchet's exit code) has been correctly addressed — continue-on-error: true is removed from the pnpm lint step in ci.yml, so an over-902 warning count will now actually fail the CI job, not just the local command.
  • No other lint script overrides in the monorepo that would conflict with the new flag.
  • Empty changeset is the correct choice (config-only change, private root package, no version bump) — this is a documented changesets pattern.
  • No security or correctness concerns; scope stays within CLAUDE.md's "libraries only" boundaries.

Metadata fix applied: the PR body's Summary only described the package.json change and never mentioned the ci.yml continue-on-error removal, even though that removal is now part of the diff and was the critical fix for the earlier blocking review. Updated the body (gh pr edit) to describe both changes and reflect the continue-on-error fix in the Verification section. Title was already confirmed accurate by the prior reviewer and still fairly describes the change, so left as-is.

No blocking CODE issues remain.

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

Labels

review-round:1 Fix loop: first round of review changes addressed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI emits 902 eslint warnings — warning signal is decorative at this volume

1 participant