Our deploy gate said PASS. The code was broken. A leftover process answered.
A check passed on code we had broken on purpose. The answer came from the server of the previous run, which had never been killed.
What it protects you from
Ship Gate runs your checks on the exact commit you are about to ship, in parallel, with a timeout per check. It refuses to deploy anything the checks did not see. Its deploy replaces replicas one at a time and rolls back to the image that was live before, without a rebuild (so far tested against a fake Docker; see the limitations). And it can prove that every check is still able to fail.
It is plain bash. No daemon, no SaaS, no agent on the server.
A check is skipped "just this once"
ship-gate deploy cannot start without the gate passing
build | tee log hides a failed build, the old image goes live
no pipes around checks; exit codes are read directly
Uncommitted files go into the build, so the gate measures code that is never shipped
checks run in a clean git worktree of the pinned commit
Another session commits while the gate runs, and unchecked code ships
if HEAD moved during the gate, the deploy stops
Two people deploy at the same time
a lock on the server (taken atomically with mkdir)
A hung check blocks the gate forever
a timeout per check
The timeout kills the test runner but its worker keeps the port open, and the next run measures the leftover process
the whole process tree is killed, grandchildren included (taskkill /T on Windows)
A deploy recreates all replicas at once, and the proxy answers 503
replicas are replaced one at a time, so capacity never drops
"Rollback" rebuilds HEAD^, a version that was never live
rollback re-tags the image that was actually live before; no rebuild
A check quietly loses its teeth (renamed test file, stale pattern) and stays green forever
ship-gate selftest breaks the code on purpose and expects each check to fail
A lane dies half-way, its remaining checks never run, and the gate opens with the checks that did
the summary walks the checks the config declares; a check without a result of its own closes the gate
A hung check, gate or self-test is killed by hand and counts as passed
a pass needs a record written by the step itself; an exit code alone is not accepted
The server's compose.yml or .env is changed by a deploy
protected files are fingerprinted before and after the deploy, and backed up
How it works
Checks run in a clean git worktree of the pinned commit, never in your working tree. What is shipped is always git archive of that commit.
prereq checks run first and the first failure closes the gate. Other lanes run in parallel; checks inside a lane run in file order.
The deploy takes a lock on the server. After the gate, HEAD must be unchanged and the copy still clean, or the deploy stops.
Scale to N+1, wait until the new replica is healthy, stop one old replica, repeat. The proxy finds replicas through Docker DNS, so nothing is renamed.
Rollback moves :live back to the image that was live before the last deploy and keeps the broken one for inspection.
For each mutation, the named check must pass on clean code and fail on broken code. A check that stays green prints NO TEETH.
1 server reachable? live commit known to this repo? show the commits going out
2 take the server lock
3 back up protected files; send `git archive <sha>` to a fresh release folder;
start the candidate image build on the server, in the background
4 gate (pre) runs locally at the same time, on the clean copy
(and the self-test in a second clean copy, if needed)
5 pinned commit: HEAD unchanged? the copy still at <sha> and clean?
6 wait for build and self-test: both must pass, or live is not touched
7 switch: :live -> :previous, :candidate -> :live, replicas replaced one by one
8 protected files unchanged? every replica on the new image?
9 gate (post) against live; on failure print (or run) the rollbackThe nine deploy steps as the README lists them. The deploy is part of the full edition.
What is inside
Requirements
docker compose)Reference
| Command | What it does |
|---|---|
ship-gate check pre | run the [pre] checks on a clean copy of HEAD |
ship-gate check post | run the [post] checks (against the live system) |
ship-gate check pre --in-place | for CI: run in the current checkout, which must be clean |
ship-gate selftest | engine self-test plus every mutation |
ship-gate selftest --strict | also fail if a [pre] check has no mutation |
ship-gate deploy [--dry-run] | full edition: the deploy |
ship-gate deploy --auto-rollback | full edition: roll back by itself if the [post] checks fail |
ship-gate rollback [--dry-run] | full edition: back to the previous live image, no rebuild |
ship-gate status | full edition: live commit, previous commit, running images, lock |
Limitations
Taken from the product's README, which is the place to check before you buy.
Deploy, switch and rollback have only run against fake ssh and docker that imitate Docker Compose, never against real Docker on a real server. Real Docker can differ in details. Try it on a staging server first.
The code avoids bash 4 features and GNU-only flags for macOS (bash 3.2) and Linux, but it has not been run there yet.
No multi-server, no Swarm, no Kubernetes. Several services means several configs.
It uses that server's CPU while live traffic is served. Use build_cmd to pull a prebuilt image from a registry instead.
Ship Gate does not run or reverse them. A rollback returns the code, not the schema.
A replica counts as ready only through health_cmd or a Docker HEALTHCHECK. Without either, the switch refuses.
Find and replace text cannot contain |; use the ! form for anything more complex.
must be sh or bash.
nice on Windowsdoes not change the Windows priority class.
Ship Gate does not trust the exit code of its own steps for that reason, but it cannot protect a script of yours that runs ship-gate check pre && something if ship-gate itself is force-killed. To stop a run, use Ctrl+C.
Pre-release. The gate and self-test are tested; the deploy has only met a fake Docker.
ssh and docker.bash tests/run.sh) has 125 tests in the full edition and 63 in the core edition, as of 0.1.4.docker rename is never called.0.1.4 (2026-12-01): Fixes from an outside test that followed the README as a first-time buyer.
Editions
Open source
Apache License 2.0
check and selftestCommercial
Core files stay Apache 2.0; deploy files under the ViaCustos commercial licence
deploy, rollback and statusCommercial editions come as Solo (for your own projects) and Agency (for delivering projects to clients). Pricing and licence terms are announced at launch.
Where it came from
A check passed on code we had broken on purpose. The answer came from the server of the previous run, which had never been killed.
All replicas restarted at once on every deploy. The first fix renamed containers, and the rename caused the next outage, during a rollback.
Checks ran on the working tree, another session committed during the gate, and a pipe hid a failed build. We hit all three.
Works well with
A 19-item launch standard and a one-file Python checker that measures the live URL and gives every item PASS, FAIL, HINT or MANUAL.
Each owner decision is one Markdown note with the owner's exact words. Claude Code hooks show the right one when an agent touches a file or a topic.
A verifier subagent that compares an agent's "done" with measured probe values, a probe runner with a negative test per probe, and a council with a mandatory dissent.