50% off your first month on Pier Code Pro for a limited timeEnds soonClaim on X →
← All use cases

Fix a failing CI build

Paste the red CI log and let Pier work backwards: reproduce the failure locally, find what broke, fix it, and confirm the pipeline goes green.

Pier - web-api

CI is red on main. The lint job fails with 'is defined but never used'. Fix it.

Let me run the same lint command CI runs so I see the real errors.

Ran pnpm lint

src/lib/auth.ts:12:10 error 'verifyToken' is defined but never used

1 problem (1 error, 0 warnings)

A helper was left behind after a refactor moved token checks into middleware. It is dead code; removing it is the clean fix.

Edited src/lib/auth.ts (+0 -4)

11import { decode } from './jwt'
12-function verifyToken(raw: string) {
13- return decode(raw)?.sub ?? null
14-}
15-

Ran pnpm lint && pnpm test

lint: 0 problems

test: 84 passed

CI step green locally

Dead helper removed, lint clean, tests pass. Push this and the build goes green. Commit?

  1. 01Paste the failing CI output or point Pier at the job log.
  2. 02The agent reproduces the failing step locally to see the real error.
  3. 03It traces the failure to the commit or config that introduced it.
  4. 04It writes the fix and re-runs the same step to confirm it passes.

A red build holds up the whole team, and the log almost never tells you the real story. The line that failed is usually a few steps downstream of the actual cause, a renamed export, a dependency that moved, a lint rule that got stricter, an env var that is set on your laptop but missing in CI. Pier does what you would do first: reproduce the failing step locally, so it is looking at the real error instead of reading tea leaves in a truncated log.

From there it works backwards, reading the job definition, checking what changed recently, and pinning the cause to a specific file or setting instead of papering over the symptom. When it has a fix it runs the exact command CI runs, so green on your machine means green in the pipeline, not another red build five minutes after you push.

This is the unglamorous unblock-the-team work that comes up constantly, and it leans on reading far more than writing, which keeps it cheap. Want a sense of what a job like this costs? The cost per task page has the figures, or you can browse more use cases.

Related

Begin here

A gateway between people and intelligence. Join the early-access list and be first to ship with Pier.

$curl -fsSL https://dl.piercode.com/install.sh | sh

Available for macOS and Linux