11/28/2026
The Slow Push Hook Is a Tax on Every Small Change
A pre-push hook that runs everything charges a one-page change the same toll as a rewrite. In the five stories below, the gate cost more time than the code it guarded: one hook ran an hour-long suite for a dashboard tweak, one ran checks that the earlier verify step never had, one turned a shared main into a race, and two gates broke for reasons that had nothing to do with the change. The one habit that showed up in the records is small: run the push-time checks by hand while the long verify run is still going.
Claude Code did the pushing in these stories, and the records come from its sessions. GitHub Copilot and Antigravity work in the same shop, but neither shows up in them.
Every push in these stories is a Claude Code session. GitHub Copilot gives me extra API capacity and finishes my commit messages, which saves tokens for the other agents. I use Antigravity for a second, adversarial look at code and for making images.
Two hours for a one-page change
The change was one commit to a dashboard page. Its own tests passed in minutes and the verify gate was green. Landing it took about two hours and eight minutes.
The reason was the pre-push hook, which runs every workspace's unit tests. The site editor's suite reported 3,825.6 seconds, which is over an hour. A shared deploy package took about 33 minutes. All 19 suites passed in the end. My own written budget for a full suite is three to five minutes.
Nothing was wrong with the change. The hook checked the whole repository for a change that touched one page, which is thorough in the way a toll booth is thorough about a bicycle.
The wait had side effects too:
- A peer session saw that the commit was not on
mainand asked for a status. At 17:51 UTC the agent told it the push "never finished" and started a second one. At 18:02 it found the first push was still running, and stopped the duplicate. - The agent's end-of-turn gate kept objecting that its worktree still existed. Removing it would have killed the running push, so the agent said so five times.
The record does not say why the editor suite takes over an hour: the agent measured it and did not investigate.
I chose to have no CI, so the push is the one place a test failure can't slip past. I wanted the hook to catch the breakage that only shows up when workspaces are tested together, which a per-change check misses.
Two checks that only ran at the door
On 11/26/2026 the agent finished a small editor change: the release queue and schedule now say when a job runs past twice its usual time. It passed its own 69 tests and the full verify run, which took about 17 minutes. It was committed and pushed.
Before the push, the agent had guessed the hook would take 20 to 30 minutes and said it would "look into it if the push passes an hour." The hook ran the fast tier for 48 minutes, from 14:25 to 15:13 UTC, and then refused the push on two checks that run only at push time:
| Check | Why it refused |
|---|---|
| A lint that keeps certain names out of public files | A code comment named the owner |
| A duplicate-function lint | Two functions were both named duration() |
Neither had run during verify. The agent fixed both and pushed again, and the hook ran again. main moved while the tests ran, so a third push, using the repo's logged skip, finally landed at 16:30. That was about two hours after verify had passed.
For the next change that afternoon, the agent said: "While verify runs, I'm running the two push-time checks that failed last time." Both passed. I can't tell you how much time that saved. The old push was never rerun, so the idea that running them in verify would have spared the first 48-minute wait is an inference, and the record says so.
When main moves under you
Landing one shared-package release on 11/25/2026 took five pushes and about 2 hours 40 minutes, from about 19:37 to 22:16 UTC. Each attempt ran the test tiers for 20 to 30 minutes, on a main that other sessions kept changing.
| Push | What stopped it |
|---|---|
| 1 | The code-quality check: partly the agent's own undocumented fallback, partly a duplicated helper another session had already put on main |
| 2 | A repository check that was already failing on main, tripped by another session's test with made-up data |
| 3 | All 19 suites passed, but main moved during the run and GitHub refused the update |
| 4 | After a rebase, a change another session had just landed named a site in a code comment, tripping the check that keeps site names out of anything that might ship publicly |
| 5 | Landed |
The release before it, the same afternoon, took about an hour with one refusal. Three pushes from other sessions that day had gotten past the first check with a logged bypass.
The agent said at 20:59 and 21:54 UTC that main kept moving under these pushes, so another refusal was possible. It rebased each time and fixed other sessions' failing checks in its own commit instead of bypassing the gate. On the retries it skipped suites that had already passed and were not affected, which shortened later runs.
The record's lesson: a slow gate on a busy shared branch turns every push into a race, and the failures that cost most are not your own. What it did not measure is how many of those minutes were waiting and how many were diagnosing.
A grep that read "fail 1" as a pass
On 11/26/2026, to avoid another 48-minute surprise, the agent chained its own pre-push check as a shell sequence: run the new tests and filter for the test runner's summary line, run the two push-time lint checks, then push with the logged skip.
The filter was a grep for the "fail" line. grep exits 0 whenever it finds that line, whether the count is 0 or 1, so the chain read "fail 1" as a pass and the push went through. That is the trap in grep Exits Zero When It Finds the Word FAILED, and the Open Group's POSIX specification for grep spells out the rule in its exit status section. grep did its job. It was asked whether the word was there, and it was.
Right after the push, the agent noticed that one of the two lint checks had failed. It traced the failure with git log to another session's commit, a comment naming a site in a shared deploy package. It sent that session the file and a rewording, left the file alone, and reported that its own command had misread the result. Nothing of the agent's own was broken.
The other session fixed the comment and landed it in about five minutes, and main's hook, which had been refusing every push because of that line, passed again. For a gate in a shell chain, the record's advice is to test the number, or the exit status of the test run itself. For the longer story of exit codes, see grep exit status: 0, 1 and 2 explained.
Four faults that had nothing to do with the change
The gate is software too, and it breaks on its own schedule. On 11/25/2026 a cover release for one of my sites went through the release queue and took four tries. None of the faults was about the content:
| Fault | Fix |
|---|---|
| The Apache HTTP Server test container from an earlier failed run was stuck in the Podman container engine with damaged storage, and the cleanup script ignored whether its removal worked | A clear failure message for the stuck container |
The failed run left a work folder that .gitignore did not ignore, because the line for .apache-harness/ had a tab in front of it |
The .gitignore line |
| The security-header check counted a report raised inside a frame from Google's reCAPTCHA service as a breach of the site's own Content Security Policy, though the policy allows that script | The check |
| The Apache test always used one fixed port, and a preview server happened to hold it | A claimed port instead of a fixed one, plus a test that fails on the old code |
The record lists four faults for three failed tries and does not match them one to one, so the table does not either. The fourth try passed about 85 minutes after the first. The live site was unchanged until then, since the first failure came before anything was uploaded. And each fix made the next release less fragile.
What to run where
This part is editorial. It is built from the stories above, and it goes a step past what the records measured.
| Where | What belongs there | Story it comes from |
|---|---|---|
| Before the push, while verify runs | The checks that otherwise run only at push time | The two lints that cost a 48-minute wait |
| In the pre-push hook | The backstop. On a retry, skip suites that already passed and are not affected | The five-push release |
| When reading a gate's result | The count or the exit status, never the word | The grep that passed fail 1 |
When main moves |
Rebase, and fix the red you find in your own commit rather than bypassing | The five-push release |
| When setting the budget | A number, and a measurement against it | A three-to-five-minute budget, and a suite that reported over an hour |
None of this replaces having AI-written code reviewed as thoroughly as your goals and time allow. A faster gate only changes when you get the answer. It does not replace reading the change.
The hook has not changed since 10/11/2026. My budget is under five minutes, and as low as I can get it. Today it misses that by a wide margin.
A gate's job is to say yes or no. How long it takes to say it is part of the price of every change. I wrote about a different gate that said yes too easily in Every Check Passed but One.
Researched and drafted with AI, then reviewed and edited by the site's editors.