Chapter 19: Engineering the Quality Gate¶
From a Pile of Checks to One Gate Estate¶
1. The Pile You Have¶
The estate in these examples is a composite: twelve repositories, one team, real measurements, invented names. Your names will differ — the shapes are what transfer.
A team does not design its gate estate. It accumulates one.
A release ships a defect a test would have caught, so a test is added. A credential reaches a log, so a scan is added. A migration breaks a neighbour's schema, so a validation step is added. Each addition is a reasonable response to a real failure, made by someone who had just been burned. Nobody argues against it, because arguing against a test is arguing for defects.
That is the whole mechanism: each check is defensible, and the set is never reviewed. No meeting asks whether the new check belongs at the same moment as the last one, whether the command that runs it means what it meant last year, or whether the slowest check has quietly made the fast path unusable.
Ask a team to list its checks and you get six to ten commands, each added at a different time, each with its own output format and its own idea of when it runs. That is not a gate estate. It is an accumulation — every layer reasonable when it settled, none of them chosen together.
🎯 What You'll Learn¶
- What a gate and a gate estate are, in words you can use in a review
- Why every individual check is defensible while the set as a whole is not
- The three questions this chapter answers: what makes a check a gate, what the levels are, and how they compose
Four Words, Defined Here¶
| Word | What it means | What it is not |
|---|---|---|
| check | one thing a machine verifies — lint, the tests, a secret scan, a type check | not a verdict; a check produces a result |
| gate | a check a change must pass before it may proceed | not a report, a dashboard or a notification |
| gate estate | all the gates of one organisation, taken as a set | not one gate or one repository's gates |
| estate | everything one person operates: repositories, services, hosts | not the gates — the estate is what the gates protect |
The Measurement¶
"Messy" is not actionable. This is.
In one estate of twelve repositories, reading only the build files — no interviews, no dashboards:
| What was measured | The result |
|---|---|
| Repositories with a command that gates a merge | 11 of 12 |
| What that command ran | 7 checks in two repos · 5 in one · 4 in four · 2 in three · a delegated runner in one |
| Repositories whose gate contained no linter | 4 |
| CI workflows that never invoked the full gate | 2 — and one repository had no workflow that ran it |
No single decision produced that table. Each repository made a reasonable local choice, and the estate ended up with one command name running eight different bodies of work.
🎭 Key Insight — the problem is the number of meanings, not the number of gates.
Two teams, both with a command called
ci:
The team What ciactually runsWhat "the checks" means there one lint · validate · test · security — always those four a list you can print the other lint, and the tests if the person remembered whatever the person who ran it had in mind The first team can answer "did you run the checks?" in one sentence; the second cannot, and three people will give three answers, each correct about their own command.
💰 Cost Check: an uneven gate estate is not paid for once. It is paid on every change — a deploy that fails on lint nobody ran, a review that re-litigates which command is authoritative. The hour this chapter asks for is spent reading build files, not writing them.
What this chapter answers, in order. §2: what makes a check a gate — the four things it declares. §3: what the levels are, and how a gate is named. §4: the one level whose absence keeps failing your pushes — the deployment gate. §5: how the levels compose into one estate. §6: what skipping this costs. §7: what it looks like in a repository.
Foundation: this layer sits on the three structures — the prompt defines what must be true, the engineering structure decides how it is checked, the workflow structure enforces it.
2. A Gate Is a Contract, and It Declares Four Things¶
A gate does not "just pass". It promises something in four parts, and a green result is only as good as the part the reader checked.
| Declaration | The question it answers | The failure when it is missing |
|---|---|---|
| Invariant | what must always be true | nobody knows why the gate exists, so nobody can delete or extend it |
| Scope | exactly what it reads and what it ignores | the reader assumes it covered more than it did |
| Verdict | pass, fail, or not-verified — and what each means | "not run" is read as "passed" |
| Cost | how long it takes, and on which moment | it drifts onto a moment whose budget it violates |
Invariant is the sentence the gate exists to keep true: "no credential is committed", "every endpoint has a test". Without it, the gate is a habit.
Verdict is the three-state rule. A gate that can only say pass or fail will eventually say pass about something it could not read. Write the third state down — not-verified — or the first two will lie.
Scope is the expensive one. A gate's name suggests a scope; its body reads a scope. When they differ, the gate is honest code wearing a dishonest name.
A command called validate runs the content checks and the syntax checks. Its readers — including the person who wrote the pipeline — believe it runs everything. A change lands. The deploy fails on lint, in files the change never touched, and the author says the sentence that costs a day: "but validate passed."
Nothing lied. The command did what it always did. The name claimed a scope the body never had, and the reader inherited the claim.
Write It Down in Four Sentences¶
invariant: no credential reaches the repository
scope: every staged file; ignores vendored/ and *.min.*
verdict: pass | fail | not-verified (a scan that could not read a file)
cost: under 2s — atomic moment
Four lines, in the file where the gate lives. When one is wrong, the argument about the gate becomes a conversation about a sentence instead of a memory.
✅ What to Check¶
- Take your slowest gate. Write its invariant. If you cannot, it exists because of an incident nobody remembers.
- Name the exact paths your gate does not read. If the name suggests otherwise, the name is the defect.
3. A Gate Has a Name, a Stage and an Environment¶
Three separate questions describe any gate, and confusing them is what makes gate names drift:
| Question | The word for it | Example |
|---|---|---|
| what does it decide? | its name | deployment gate |
| when does it fire? | its moment | commit, full, scheduled |
| where does it run? | its environment | local, staging, production |
The Five Names¶
Use these, and no others. Each is the industry's name for the same decision, which is why the reader already knows what it means.
| The gate | The command | The decision it makes |
|---|---|---|
| commit gate | pre-commit |
may this be committed? — the staged diff, seconds |
| merge gate | ci |
may this land? — the whole tree, the pipeline's own gate |
| deployment gate | deployment-gate env=local |
would this deploy, and did it? |
| smoke test | smoke env=staging |
does the deployed system do the one thing it exists for? |
| release gate | orch release tag=v1.4.0 |
may this become a version? |
Two naming rules follow from this table. Commands name actions: pre-commit is what you do, deployment-gate is what runs. Environments are arguments: one deployment gate, three values, never three gate names.
The Four Stages¶
A gate moment is when in a change's life a gate fires, and each moment has a budget — the most time it may take before it stops helping. The four moments are defined in Chapter 2 §10; this chapter only places checks on them.
A moment is when, never where. The environment is a separate question — staging is a place a build runs, full is the moment a change is judged as a whole. The two words are one letter apart and must never be used for each other, which is why every stage in this chapter is written with its gate: the commit stage, the full stage.
flowchart LR
A["Atomic<br/>ms–s"] --> B["Commit<br/>seconds"]
B --> C["Full<br/>minutes"]
C --> D["Scheduled<br/>hours"]
What this shows: the journey a change makes. The arrow is time, not a dependency between checks.
| Stage | The question it answers | Fits |
|---|---|---|
| Atomic | is this one thing right, right now? | lint, types, formatting |
| Commit | can the author still fix this cheaply? | the commit gate, unit tests on changed files |
| Full | does the whole change hold together? | the merge gate, integration tests |
| Scheduled | is anything rotting that a change would not reveal? | dependency audits, clean-checkout builds |
Two rules of placement. A check lives at exactly one moment — two copies will drift, and when they disagree nobody knows which is authoritative. And the moment's budget is part of the design: a ten-minute check on the commit stage teaches people to commit with --no-verify, and once that habit exists every gate on that stage is bypassed.
"Release" is not a moment. A moment is when; release is an event, and what runs at it is the release gate, in an environment. That was one word doing two jobs, and it is why the vocabulary drifted.
A gate that judges a deployment is not at a moment. The four moments govern a change: they are the moments a diff passes through before it may land. The deployment gate and the smoke test judge an artefact that is already on a host, so they run at the deploy event, not inside the change's life. The rule stays one: a check lives on exactly one stage, or at exactly one event — never both. A check that runs in both places is two checks that will disagree, and the disagreement will surface as a release nobody can explain.
✅ What to Check¶
- For every check, name its moment. Two moments is a defect; none is a gap.
- Read your own prose: every use of "gate" without a name from the table is a sentence that will be misread.
- Time the commit moment. Over a minute means something is sitting where it does not fit.
4. The Deployment Gate: the Level That Fails Your Pushes¶
If you have ever had a push go red in CI, the failure was probably not a defect in your code.
Here is every deploy failure in the estate these examples describe, over two days, and what would have caught it:
| The failure | A check on the code? | What actually catches it |
|---|---|---|
| the workflow was invalid; the forge reported a run with no jobs | no | a workflow-schema check |
| the platform CLI began requiring a confirmation flag it had never required | no | a local run of the same command |
| the portal ingested a URL that returned 404 | no | a check that the route exists before the URL is switched |
the audio check read site/ while the deploy published site-book/ |
no | a build-output check comparing what is built with what is shipped |
a reader typing /book got 404 |
no | a smoke test of the journey a person takes |
Not one was a defect in the code. They were defects in the path — and a gate that only reads the code cannot see the path. That is the missing level, and it has a name: the deployment gate.
The Local Tier, and Its Ceiling¶
The deployment gate runs in three environments, and the cheapest one proves the most per second.
| Question | Local (ENVIRONMENT=local) |
Staging / production | What local costs |
|---|---|---|---|
| does the workflow parse, and does the job graph still name the jobs? | ✅ | ✅ | seconds |
| does the strict build produce the deployable artefact? | ✅ | ✅ | a minute |
| does the built site carry what the deploy would upload? | ✅ | ✅ | included in the build |
| do the worker bindings and the Worker bundle? | ✅ | ✅ | seconds |
| does the generated audio match the page it narrates? | ✅ | ✅ | tens of minutes per chapter |
| do permissions, secrets, DNS and TLS work? | ❌ | ✅ | — |
| does the real address serve a reader? | ❌ | ✅ (the smoke test) | — |
That last cost is the one to plan around. A local text-to-speech render is free and private, and it takes longer than everything else in the gate put together — so the check that any page edit has not invalidated its narration is worth having, and the re-render it demands is worth scheduling rather than doing on every save. A gate is not free just because it runs on your machine.
That table is the honest part. Local proves would this deploy; only the deployed environment proves it is deployed and working. A gate that blurs the two teaches people to trust a green build.
The Command¶
deployment-gate env=local # your wrapper — make, npm run, task — is your project's choice
It replays the path: the deploy-path checks (workflow schema, job graph, worker bundle, and the local stack when STACK=1), the guardrails, the strict build, the built-site audio contract, and a served smoke. Every check it cannot run is printed with its reason — because a silent skip reads as a pass, and that is the same defect one level up.
deployment-gate env=staging # the same artefact, on a real host
smoke env=staging # is the deployed address working?
The Five Gates, in the Order a Change Meets Them¶
| # | The gate | The command | What has to be true when it passes |
|---|---|---|---|
| 1 | commit gate | pre-commit |
the staged change is sound — it may be committed |
| 2 | merge gate | ci |
the whole tree holds — it may be pushed |
| 3 | deployment gate | deployment-gate env=local |
this would deploy — it may go to a host |
| 4 | smoke test | smoke env=staging |
the address serves a reader |
| 5 | release gate | orch release tag=v1.4.0 |
it may become a version — clean tree, gates green, tag pushed |
Read the table as a sequence, not a menu. Each gate answers a question the next one assumes: a release is safe because the smoke test passed, which is possible because the deployment gate produced a deployable artefact, which depended on the merge gate's verdict, which began with a commit that passed its own gate. Skip a row and the next row is a guess.
What a Smoke Test Proves — and What It Must Do When It Fails¶
The smoke test is the only gate that judges the system a reader actually reaches, so its scope is the whole reason it
exists. The address answering is its precondition, not its verdict. A static page answers 200 with the
application behind it dead: the load balancer is healthy, the HTML renders, the status code is correct, and the
interaction the estate sells returns a failure. A smoke test that checks only the address certifies exactly the state
it was built to detect.
So it exercises the journeys, not the URLs — the three or four interactions the business exists on. It asserts a contract, not a status code: that a query returns documents, that a request returns the response shape its clients parse, that a sign-in yields a session. It is read-only, deterministic and finished inside a minute, because a gate that mutates data is a second incident and a gate that takes five minutes is one people start skipping. It does not depend on anything the estate does not control — a model provider, a third-party widget — or it reports that dependency's health as if it were the estate's.
Its failure has an edge, and the edge is the point. A smoke test that fails describes a deployment that is already live and already wrong, so the sequence stops: the release gate does not run, and the environment returns to the version that last passed this gate — automatically, not after a discussion. That is why the rollback is rehearsed (§18, §25): a rollback nobody has executed is a plan, and the moment it is needed is the worst moment to learn it does not work. A smoke test whose failure has no consequence is not a gate. It is a dashboard with a status code.
The edge has one honest exception, and stating it is part of the design: a change that cannot be reversed has no rollback to take. A migration that dropped a column, a provider that was cut over, a schema that was rewritten — for those, the failure edge is a roll-forward path, and the thing that must be prepared before the deploy is the fix, not the return. The gate is not weaker for saying so; it is weaker when a team discovers it during the incident, so the irreversible changes are named in the gate's own record and the roll-forward path is rehearsed like any other.
And the edge has a precondition, which is easy to leave implicit. A rollback is a return to something that still exists: an artefact the platform kept, a schema that accepts the older code, a copy of the data that has been restored at least once. So the deployment gate declares its way back before it runs, and the declaration names which layer it returns through — the artefact, the schema, or the data. A gate that assumes a backup is a gate that assumes an unread file: a copy nobody has restored is a hypothesis, not a recovery (§18). The three layers have different costs, and a design that has only the first is the common one: the artefact rolls back in minutes, the schema rolls back only if the migration was additive, and the data does not roll back at all unless someone rehearsed it.
The Irreversible Release, as a Named Class¶
Some changes have no way back, and the estate is stronger when it says so than when it pretends otherwise. A irreversible change — a dropped column, a truncated table, a provider cut over — is not an exception to the gate. It is a class with a procedure, and the procedure has three facts that must be true before it runs. Without them, "declared" means "someone wrote a reason", which is how a ban becomes a formality.
| The fact | What it proves | Where it is recorded |
|---|---|---|
| The observation window has elapsed | the previous phase has been live long enough that the data being removed is no longer what a rollback would need — and no rollback happened inside it | the change's own record, with the date the expand or migrate phase reached production |
| The data is archived, and the archive has been restored once | "we copied it" is a hypothesis; §18's drill is what turns it into a recovery. A copy taken but never restored is the most expensive kind of optimism | the drill record's timestamp, not a promise |
| The decision is forward-only, and owned | after this deploy there is no return, so the decision is made before it, by a person who accepts that — never during the incident | the release evidence — §25's three cases, answered in advance |
Those three facts are what §15's ban means by "declared, reviewed and owned": declared is the window and the archive, reviewed is the drill, owned is the signature. The gate refuses destruction; the procedure is how destruction is allowed. A team that cannot state all three has not decided to make an irreversible change — it has discovered it intends to.
Order matters, and it is the reason the class is safe. Destructive work belongs to the last phase of expand → migrate → contract (§25), one deploy per phase, and never in the same deploy as the code that stops using the old shape. The window exists so that the rollback stays available while the new shape proves itself; shortening it to one release converts a reversible change into an unrehearsed one.
✅ What to Check¶
- Name the last three deploy failures you had. How many would a code gate have caught?
- Does your local build produce the same shape as your deploy build? If not, the local gate is measuring something else.
- For each deploy-path check you cannot run locally, write the reason down. An unstated reason becomes an assumption.
- List the journeys your smoke test exercises. If it names a URL rather than an interaction, it is a liveness probe, not a smoke test — and it will pass while the product is down.
- Say what happens when it fails. Name the command that restores the previous version, and the last time you ran it. If either answer is missing, the sequence has no edge and the gate is decorative.
- Name your last irreversible change. State its window, its archive's restore date and its owner. If any of the three is missing, the change was not declared — it was hoped for.
5. How the Gates Compose¶
Three Words First¶
| Word | What it means | What it is not |
|---|---|---|
| entry point | a command a person types to run "the checks" — ci, test, validate |
not the checks themselves |
| composition | which checks run under which command, declared in one place | not a habit, not a README |
| slice | a command that runs part of a gate, on purpose | not the whole gate, and never named as if it were |
The Seven Rules¶
Each rule has the same four beats: the claim, why it matters, where it lives, and what breaking it looks like.
1 · One name means one thing.
Why: a name that means something different in each repository makes "it passed" untranslatable.
Where it lives: the naming rule every repository reads.
Breaking it looks like: ci runs four checks in one repository and seven in another, and both are called green.
2 · A slice says what it skips.
Why: a fast command is useful, and dangerous in exactly the proportion it stays quiet.
Where it lives: the slice's own output — before the verdict, not in a document beside it.
Breaking it looks like: validate skips the tests, and the person who ran it believes it did not.
3 · The same command locally and in CI. Why: if the local command runs less than the pipeline's, "it passed here" predicts nothing. Where it lives: the one composition file both the pipeline and the developer invoke. Breaking it looks like: a deploy fails on lint, in files the change never touched, because the author ran the fast path.
4 · A gate proves it ran. Why: a verdict with no count and no evidence cannot be audited, and cannot be caught being wrong. Where it lives: the gate's own output and its log — the numbers, not the adjective. Breaking it looks like: "passed" with no number, or a check that matched zero rows and reported success.
5 · One command is the whole gate. Why: five entry points with overlapping subsets make "did you run the checks?" unanswerable, and every one of them can say yes. Where it lives: the single composition file that defines the whole gate as the union of its named parts. Breaking it looks like: the table below.
| The command | What it actually runs | What its name promises |
|---|---|---|
ci |
lint · validate · test · security | everything |
check |
validate · lint | "the checks" |
test |
lint | "the tests" |
security |
validate | "security" |
One definition is a union; a slice is visibly a subset of it. Four entry points with overlapping subsets are four definitions of one phrase, and the phrase stops meaning anything.
6 · A failure names the fix. Why: a gate that says failed sends its reader to a log; a gate that says this file, this line, this reason sends them to the fix. Where it lives: the failure line itself, in the same shape everywhere. Breaking it looks like: exit 1 and nothing else, so the next reader greps.
7 · Debt is declared, printed and expiring. Why: a check that cannot exist yet is a decision; a check nobody misses is a false green. Where it lives: an exemption registry printed on every run, with a reason and a date. Breaking it looks like: a skipped check nobody recorded, discovered during an incident.
Eight Questions Before the Next Gate¶
| # | The question | A weak answer looks like |
|---|---|---|
| 1 | What invariant does this keep true? | "it catches bugs" |
| 2 | Which moment can afford it? | "we'll put it in CI" |
| 3 | What exactly does it read, and what does it ignore? | nobody has looked at the ignore list |
| 4 | What does it say when it cannot read? | a colour |
| 5 | What would make us delete it? | silence |
| 6 | Who owns it when it breaks? | "whoever wrote it" |
| 7 | Does an existing gate already cover this? | not asked |
| 8 | What does a false positive cost here? | not measured |
Question 5 is the one that keeps an estate from only growing. A gate nobody can imagine deleting is either essential or invisible, and you cannot tell which until you name the condition.
✅ What to Check¶
- Pick the rule your estate violates most; fix it before adding the next gate.
- For each rule, name the file where it would be enforced.
- Count the entry points that claim to run "the checks". More than one definition is the defect.
6. What Skipping This Costs¶
This chapter is not asking for effort. It is asking for a set of decisions that are expensive to make late. Here is what each omission costs, taken from one estate:
| If you skip… | This is what happens | The rule that prevents it |
|---|---|---|
| the declarations (§2) | a gate named validate ran a quarter of what its name promised, and a deploy failed in files the change never touched |
scope written down, in the gate's own file |
| the third verdict | a gate silently dropped two registry rows and reported green — confidence it had not earned | pass · fail · not-verified |
| one name, one meaning | eight bodies of work behind one command name; "did you run the checks?" had eight answers | rule 1 |
| declared exemptions | skips discovered during incidents instead of at the gate | rule 7 |
| liveness | an audit found 12 of 16 gates with no case that could fail them | a crafted failing case per gate (§7) |
| the deploy-path level | five deploy failures in two days, none of them code defects | the deployment gate (§4) |
The pattern is the same in every row: the estate did not fail loudly, it failed silently. A gate that cannot fail, a slice that does not say what it skips, a skip nobody wrote down — each produces the same feeling as success, which is why none of them is noticed until something ships broken.
✅ What to Check¶
- Take the last three incidents in your estate. Which row of that table do they belong to?
- Ask of each gate: if it were deleted tomorrow, what would break, and who would notice?
7. How It Is Implemented¶
The chapter is advice until it is a file. These are the files.
1 · The composition file — one definition of the whole gate:
# the merge gate: the union of its named parts, in one place
ci: validate lint test security-scan
@echo "ci: 4 checks — the same four the pipeline runs"
2 · The exemption registry — every skipped check, with its reason, printed on every run:
# config/gate-exemptions.yaml — debt that expires, never silence
exemptions:
ci: a composition of validate + lint + test + security, each proven separately
3 · The liveness proof — for each gate, one crafted case that makes it fail:
test-<gate> # plants the defect that gate names, asserts the refusal
4 · The generated table — the audit, as an artefact rather than a meeting:
gate-estate # → a generated table: gate · moment · what it promises · proven by
The generator reads three sources that already exist — the command surface (the Makefile), the pipeline (the workflow), and each gate's self-test — and fails the run when a gate has neither a failing case nor a declared exemption.
Measured once, and the ratio is normal. On a sixteen-gate estate the first run named twelve gates with no failing case. Five were aggregations whose liveness comes from their parts, legitimate once declared. Two were real: validators nothing could fail on purpose, invisible for months. The rest was the check's own blind spot — the first version looked for a --self-test flag, found none, and called four live gates dead. A gate that cannot see a proof is the same defect one level up.
✅ What to Check¶
- Does a new reader find the whole gate in one file? Open it and look.
- Does every gate name the case that fails it? If not, which exemption is missing?
- Does the table regenerate, or is it a document that was true the day it was written?
8. Four Anti-Patterns the Design Prevents¶
An anti-pattern is a way of building that looks reasonable locally and fails systematically. You do not recognise it by how it was written; you recognise it by what it produces everywhere it is used.
| Anti-pattern | What it looks like | The design that prevents it |
|---|---|---|
| Many entry points, one promise | several commands claim to run "the checks"; people pick the cheapest | one name, one composition (rule 5) |
| The gate that reads its own output | it reports defects in generated files no change can fix | scope drawn around sources; regenerate, never edit |
| The context-sensitive gate | it does more in CI than locally, and nobody knows which ran | one behaviour; scope as an explicit argument |
| The copy-paste gate | the same gate in a dozen repositories as a dozen slightly different bodies | one standard, and a check that each copy matches it |
Two further classes belong to Chapter 2 §10 rather than here: the gate that cannot fail, and the gate that fails on the wrong thing. They are enforcement defects; these four are composition defects.
Common Mistakes to Avoid¶
- Adding a check without naming its invariant and its moment.
- Letting a name promise more than the body runs.
- Reading a build product and calling it the source.
- Copying a gate into a new repository without a conformance check.
✅ What to Check¶
- Pick the anti-pattern you recognise in your own estate, and name the design change that would have prevented it — not the person who caused it.
- For each of the four, ask whether one of §5's rules would have stopped it. If none would, the rule set has a gap.
9. Build the Workbench¶
Artefacts¶
| Artefact | What it is for | Where it lives |
|---|---|---|
| deployment gate | would this deploy? — the path, checked locally | deployment-gate env=local |
| gate table | every gate: its name, moment, promise and proof | docs/gates.md, generated |
| composition file | the one definition of the whole gate | Makefile or the CI workflow |
| exemption registry | every skipped check, with reason and expiry | config/gate-exemptions.yaml |
| liveness record | for each gate, the case that fails it | the gate's own self-test |
Decisions¶
| Choice | Default | What changes if you choose otherwise |
|---|---|---|
| one composition file | yes | several definitions of "everything", which is the defect |
| moment per check | exactly one | two copies that drift |
| verdict states | pass · fail · not-verified | "not run" read as "passed" |
| exemptions | declared, printed, expiring | silent skips discovered during incidents |
| the table | generated | a document true the day it was written |
Sequence¶
- Inventory — list the commands and what each runs. Checkpoint: one table, one line per repository.
- Name — the five names; one command per decision. Checkpoint:
cimeans one thing everywhere. - Place — one moment per check; move the misfits. Checkpoint: the commit moment is under a minute.
- Prove — a failing case for each gate. Checkpoint: a planted defect turns it red.
- Watch the path — the deployment gate, local first. Checkpoint: a planted workflow error fails locally.
- Generate — build the table from the repository. Checkpoint: the audit runs in the gate.
Done When¶
- One command is the whole gate, and every other command is a visible subset of it.
- Every gate can name the defect it would catch.
- A planted defect in the deploy path fails locally, before a push.
- The table is generated, and a gate with no failing case fails the run.
10. 🔑 Chapter Summary¶
The gates a team has are an accident; the gates a team designs are an asset.
- Checks accumulate because each one is reasonable and the set is never reviewed. Measure the set before arguing about the next check.
- A gate is a contract: invariant, scope, verdict, cost. Scope is the declaration whose absence costs the most.
- A gate has a name, a moment and an environment — five names (commit · merge · deployment · smoke · release), four moments, environments as arguments.
- The deployment gate is the level that fails your pushes. Local proves would this deploy; only the deployed environment proves it is deployed.
- Seven rules compose an estate: one name one meaning · a slice says what it skips · local equals CI · a gate proves it ran · one command is the whole gate · a failure names the fix · debt is declared and expiring.
- Skipping this fails silently: an unearned green, a scope assumed, a skip unrecorded, a gate that cannot fail.
- Four artefacts make it real: the composition file, the exemption registry, a failing case per gate, the generated table.
- Four anti-patterns belong to composition — many entry points, reading its own output, context sensitivity, copy-paste.
The orchestrator's test: ask which command runs everything. If the answer is one word, and it means the same thing in every repository, you have a gate estate. If the answer is a conversation, you have a pile.