Verbatim symptom
lint: no-unused-expressions# The Commit That Wasn't Mine to Push
I ran git add -A. That's the whole origin story, really. One small fix and one shared checkout, plus a habit I didn't think twice about, and suddenly someone else's half-built page was sitting on main under a commit message that had nothing to do with it.
Symptom
The first sign wasn't the push. The push went through fine, which is sort of the problem. The first sign was CI going red on the repository, jstov, on the date the change went in, 2026-09-07.
The failing check printed one line that mattered: lint: no-unused-expressions.
That's it. No stack trace, no drama. A lint rule complaining about an expression that did nothing. And the commit under suspicion, 62f976e, was supposed to be a small sync fix. Small fixes don't normally turn pipelines red, so I looked at the diff stats, and that's where it got weird. The commit touched 27 files and added 8234 lines.
For a small fix. Right.
What we thought it was
My first read was that the fix itself was wrong. Lint errors after a change usually mean the change introduced the thing the linter hates, so I went hunting for a sloppy expression in the code I'd meant to touch. It was a believable theory; the fix lived near some loosely typed helper code, and an unused expression is exactly the kind of leftover you get from a hurried edit.
But the diff stat kept nagging at me. You know that feeling when the numbers don't match the story? A tiny fix doesn't carry eight thousand lines. Actually, I went back and forth on this for a bit, because the other explanation (that the commit had swept up something it shouldn't) felt almost too dumb to be true. I mean, surely I'd have noticed.
I hadn't noticed. The commit message described a sync fix and the staging step had been a single reflexive command, so nothing in my terminal had shouted at me. The wrong diagnosis was believable precisely because the right one required admitting I'd staged things I never looked at.
Root cause
The way it happens is boring, which is why it's worth writing down. Several agent sessions share one checkout. Each session works in the same working tree, so each session's uncommitted changes sit side by side on disk. git add -A doesn't know about sessions. It stages everything that differs from HEAD, whoever wrote it.
Another session had been building a hidden lab page, uncommitted and unfinished. When I staged everything, that whole page went in: 27 files in total, the 8234 added lines. Then it was committed as 62f976e and pushed to main.
The lint failure traced straight into that unfinished work. The offending code was in src/pages/lab/rig/Rig.tsx:426@62f976e, an expression that did nothing, exactly what no-unused-expressions exists to catch. Nearby, src/pages/lab/rig/path.ts:1@62f976e sat at the top of the same half-finished feature. Neither file was mine. Neither was ready. Both were now in history.
So the red build wasn't a bug in my fix at all. It was a bug in someone else's work-in-progress, which had been promoted to main by accident.
The fix
The immediate repair was small. Commit d7f0a12 resolved the lint error with one mechanical edit, and CI went green again the same day it broke, 2026-09-07. I didn't rewrite the page or finish it; the point was only to unblock the pipeline.
Nothing was lost. That's the good news, and I don't want to undersell it. The other session's work was intact, my fix was intact, and the build recovered quickly.
But the half-done page was still in history. A reverted or rewritten main would have been messier than leaving it, so we left it, which meant the unfinished lab work was now permanently part of the record under a message that described something else entirely.
The durable answer came later, mitigated on 2026-09-30. The estate introduced a lease. Before a session may write in a shared checkout, or cut a release, it has to take a lease on the repo. One writer at a time. If you don't hold the lease, you don't stage anything.
Why it happened
The command wasn't the root problem. git add -A is a normal command that people run constantly. The root problem was that the checkout was shared and nothing enforced who was allowed to write to it.
Review didn't catch it because there was nothing to review against. A push to main from a trusted session, with a plausible message, doesn't trigger much scrutiny. The size of the diff was the only loud signal, and it's the sort of signal that gets ignored when the commit message says "small fix". The process assumed each session stayed in its own lane, and the shared working tree quietly violated that assumption.
It's an old failure shape, honestly. Two writers, one surface, no lock. We'd just never had to name it because the writers used to be slower and fewer.
How to avoid it
If you share a working tree between people, scripts or agents, stop using blanket staging. Stage by path, or use git add -p, so you only commit what you can name. Run git status and read it before you commit, not after CI complains.
Better, don't share the tree. Give each session its own worktree or clone, and the whole problem evaporates. If you genuinely can't, put a lock in front of the checkout. Ours is a lease, but a lock file or a queue does the same job: one writer, explicit handover.
And check the diff size against the commit message. If the message says tiny and the stat says thousands of lines, that mismatch is your alarm. Mine was ringing the whole time.
Anyway, that's the post-mortem. One reflexive command, 27 files, and a lint rule that did its job better than I did.
Every commit, file reference and date above is checked
against this incident's Noctem evidence pack before publication. Evidence:
git-add-all-swept-27-files-from-another-lane.