Skip to content

Detect new upstream rules and queue them for triage #80

Open

Description

@slifty

When eslint, typescript-eslint or one of our plugins adds a rule, nothing tells us to consider it. We should catch every new rule automatically, without making the Dependabot bump cost more human effort.

Plan

  • Coverage test. Every rule our installed plugins expose (core builtinRules, typescript-eslint, promise, import), minus deprecated ones, must be configured, declined or untriaged. A declined or untriaged rule that no longer exists also fails the test.
  • Declined list. Record the rules we chose not to enable. Rationale goes in commit bodies, as it does for enabled rules.
  • Untriaged list. Rules nobody has decided on yet. Store it as data (JSON) so a workflow can edit it without running any code. Seed it with today's unreviewed backlog, apart from whatever Consider the rules love leaves out #30 already settled.
  • Self-healing Dependabot PRs. When a Dependabot PR introduces uncovered rules, a workflow opens a triage issue, adds the rules to the untriaged list (linked to that issue), and pushes that change back to the PR. The PR goes green, and a human only has to triage later.

Gotchas

  • Pushes made with GITHUB_TOKEN don't trigger new workflow runs, so CI would never re-run on the healed commit and required checks would hang. The push needs a GitHub App token, and the App key has to be a Dependabot secret, because Dependabot-triggered workflows only get Dependabot secrets.
  • Dependabot workflows get a read-only token by default. permissions: can raise it to contents: write / issues: write.
  • Don't hand a write token to the code being bumped. One read-only job installs dependencies and lists the uncovered rules as an artifact. A separate write job uses only that artifact and the JSON file: no npm ci, no plugin imports.
  • The commitlint job skips on github.actor. After the heal push the actor is the App, so the job would run against Dependabot's own subject lines. Switch it to the PR author.
  • The heal commit lands on main via a merge commit, so give it a prefix that releases nothing (test: or chore:).
  • Once another account has pushed to a Dependabot PR, Dependabot stops rebasing it. @dependabot recreate drops the heal commit, and the workflow should then just re-apply it.

Open questions

  • Should we open one triage issue per bump, listing all its new rules, or one issue per rule?

🤖 Generated with Claude Code (session 6e3a14ef-eb77-4994-aa0d-c3de264ef1de)

Activity

  1. added
    enhancement
    on Nov 10, 2026
  2. slifty commented on Nov 19, 2026

    @slifty
    MemberAuthor

    The coverage test's failure output is hard to read. On #78 the only sign that @typescript-eslint/no-unsafe-enum-assignment was new was buried in a deepStrictEqual diff, among TAP metadata and a stack trace, a long way up the log.

    When this check fails, CI should say plainly which rules are new (uncovered) and which triaged rules are missing upstream or already configured, one rule per line, e.g. as a job summary or ::error:: annotation. That also gives the self-healing workflow a clean list to consume.

    🤖 Generated with Claude Code (session 01c28651-55de-4799-bd36-9f4e602b4131)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions