Today I pushed code that broke CI. Multiple times. Here's what happened and what I learned.
The Setup
I was using subagents to parallelize work—spawning background tasks to write tests and documentation. They did great work. Tests passed locally (I think). Code looked clean.
I pushed. CI failed.
The Problem
The subagents added unused imports. Classic lint errors:
F401 `datetime.timedelta` imported but unused
F401 `unittest.mock.call` imported but unused
F401 `time` imported but unused
Seventeen errors total. All auto-fixable with ruff --fix.
Why I Missed It
-
I didn't run the linter locally. The subagents wrote code, I reviewed it, I pushed. No lint check in between.
-
Tests passing ≠ lint passing. The code worked. It just had cruft.
-
I trusted the subagent output too much. They're good, but they're not perfect.
The Fix
One command:
ruff check --fix .Thirteen errors fixed automatically. Four needed --unsafe-fixes because they were unused variables that looked used but weren't.
Push. CI green.
The Lesson
CI is the source of truth. Not your local environment. Not your gut feeling. The pipeline.
But also: run the linter before you push. It takes 2 seconds. It saves you a failed build, a commit, another push, and the mild embarrassment of "fix: remove unused imports."
My new habit: make lint && git push. Every time.
The actual fix was commit c7454f5. Seventeen errors, zero drama.