Skip to content

Four custom lint checks run only in prepush, never in CI #941

Closed

Description

@thinkclay

Four custom lint checks run only in pnpm prepush. CI never runs them, so they do not gate a PR — and SKIP_PREPUSH=1 or a push from a machine without the stamp skips them entirely.

Evidence

package.json:

lint  = nx run-many -t lint … && pnpm lint:routes && pnpm lint:sorted-keys && pnpm lint:overrides && pnpm lint:migrations
check = pnpm locales:validate && nx run-many -t lint … && nx run-many -t typecheck …

The CI lint job (.github/workflows/ci.yml, job lint) runs pnpm check, not pnpm lint. grep -rn "lint:routes\|lint:sorted\|lint:overrides\|lint:migrations" .github/workflows/ returns nothing.

So these four are unenforced in CI:

Script What it protects
lint:routes scripts/check-hardcoded-routes.mjs — the "routes are constants" rule in CLAUDE.md
lint:sorted-keys scripts/check-sorted-keys.mjs
lint:overrides scripts/check-override-catalog-alignment.mjs — three shipped incidents (#453, #501, #511)
lint:migrations scripts/check-migrations.mjs — missing search_path (#468) and duplicate migration numbers

The migration-number check is the one with a recent near-miss: a number collision between two concurrent branches happened during release 3, and check-migrations.mjs only sees the branch it runs on, so prepush on each branch passed independently.

Change

Add the four to the CI lint job as explicit steps, or switch that job from pnpm check to a target that includes them. Explicit steps are probably better: each is seconds, and a named failing step says which rule broke without reading a combined log.

pnpm lint:literals was added as its own CI step in the PR that closes #819 — follow that shape.

Acceptance

  • A PR that hardcodes a route string fails CI, not just prepush
  • A PR with two migrations sharing a number fails CI
  • A PR with a pnpm override that disagrees with the catalog fails CI
  • Each runs as its own named step, so the failing rule is visible in the checks list
  • .radium/ci-deployment.md records which checks gate where

Note

Not urgent in the sense that nothing is known to be broken behind them — but a check that cannot fail the build is a check that stops being true on its own schedule. That is exactly what #921 found with continue-on-error: true on the edge-function type check, where 404 errors had accumulated behind a step that had never once been able to fail.

Activity

  1. added
    agent-ready
    on Oct 2, 2026
  2. thinkclay commented on Oct 6, 2026

    @thinkclay
    ContributorAuthor

    Heads-up before anyone picks this up: wiring lint:routes into CI as described here would add a step that cannot fail.

    scripts/check-hardcoded-routes.mjs:45-59 — getStagedFiles() returns an empty Set (not null) in any clean checkout, CI included, so the script prints "✅ No staged files to check" and exits 0 (:110-114). The full-walk branch meant for CI (:120-122) is unreachable. Forcing the walk finds 21 literal routes on main, one of them a redirect to a route that does not exist.

    Filed as #1030. Fix that first (or in the same PR), then wire it in here. The other three checks in this issue deserve the same "does it fail on a planted violation?" test before being trusted in CI.

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

    DXagent-readypriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions