Go Deeper Privacy and data
How Kestrel checks its own work
An illustrated guide to Kestrel's automated tests and release checks.
Testing snapshot · 19 November 2026
These counts change as Kestrel grows. We add tests for new features and for problems we find, so future changes can be checked against the behavior people rely on.
- The nine layers
- Shape of the suite
- The gate
- What each layer catches
- Numbers that are not tests
- Why it is trustworthy
- Glossary
- Run it yourself
The one-sentence version
Kestrel has a single command that must end with the exact words "Ready to push." before a change may leave the machine. Everything below is what has to happen for those words to appear.
The check does not trust an "everything went fine" signal. It reads the final line of output and compares it to the exact sentence it expects. A crash, a skipped stage, or a test that quietly did not run all end with the wrong last line, so the change stays put.
Nine layers, cheapest first
The checks form a ladder. Each rung is more expensive to run than the one above it, and each one catches a different kind of mistake. Cheap rungs run first, so an obvious error is caught in seconds instead of after a long wait.
Tests by layer
Bar length is the number of runs, not importance.
Why the "process guards" rung is so large
Nearly one in six tests checks the project's own rules rather than the product: that the written decisions have not drifted, that a fix came with a test that failed before the fix, that no private phrase leaked into a public file, that the build scripts still agree with each other. These are fast, mechanical checks. They are the reason a rule written down actually stays true a year later, instead of quietly rotting.
The shape of the suite
Grouped a second way, the 15,739 runs tell a simpler story: most of the suite tests product behaviour, and a substantial minority tests promises.
What the runs are about
The suite covers app behavior, project rules, and browser workflows.
- Product behaviourcore logic, data, sources, AI, features, screens 9,567 · 61%
- Process guardsdecisions, handoffs, build scripts, public export 2,622 · 17%
- Safety rulesprivacy, consent, never sending anything 2,279 · 14%
- Real browsera robot clicking the actual screens 1,271 · 8%
The gate, in the order it runs
This is what happens after someone finishes a change. Any red stage stops the line immediately; the later stages never run.
Proofreading seconds
A tool called a linter reads all 1,070 Python files for 276 known mistakes: unused imports, shadowed names, unsafe patterns, accidental security holes. Think of it as a spell-checker for code, with opinions about danger.
Changed-lines inspection seconds
Only the lines this change touched are examined, against the project's recorded debt. New type errors, new risky patterns, new tests that assert nothing: all fail here. Old problems that were already known do not block, so the team can make progress without first fixing everything.
Public-export scrub seconds
Kestrel ships a public copy. This stage refuses to export anything that still contains a private phrase, in any form, including split or encoded.
The full test suite minutes
Roughly 14,500 runs, spread across the machine's spare processor cores. Each test gets its own temporary folder and its own network port, so two tests can never interfere with each other. Nothing on this machine talks to a live job board during a test.
Shuffled re-run minutes
The tests affected by this change are run again in a random order. A test that only passes because another test ran first is not a real test, and this stage exposes it.
Real browser drive minutes
A robot opens the actual application in Microsoft Edge and clicks through the screens this change touched: filling forms, pressing buttons, checking that nothing overlaps or vanishes. This is the only stage that sees what a person would see.
Coverage proof seconds
At least 80 percent of the new lines must actually be executed by a test. Writing code that no test ever reaches is treated as unfinished work.
The failed-first proof seconds
A bug fix must come with a test that failed before the fix and passes after it. This prevents "fixes" that were never actually observed to fix anything.
The verdict instant
Only if the final line reads exactly "Ready to push." is the change released. Anything else, including a silent skip, keeps it on the machine.
What each layer catches
The layers are not redundancy. Each one catches a failure the others cannot see.
Linting
Catches the mistakes a careful reader would catch, at a scale no reader can. Consistent, boring, and fast.
Catches: typos, dead code, unsafe patterns
Unit tests
Small experiments on one piece of logic at a time. "Given this date, is the answer that date?" They run in milliseconds and pin down exact behaviour.
Catches: wrong answers in one function
Integration tests
Several pieces working together, with a temporary database and fake outside services. This is where "each part works but the whole does not" gets caught.
Catches: broken wiring between parts
Contract tests
One test that sweeps every screen at once. For example, every consent dialog must state the same promise. Add a new screen and the existing test already covers it.
Catches: a new feature that skips a rule
Browser tests
A robot uses the real app the way a person would. Slow, but the only layer that proves the thing on screen actually works.
Catches: buttons that do nothing, text that overlaps
Process guards
Tests about the project's promises: no live job board in a test, no private phrase in a public file, no rule added without the check that enforces it.
Catches: drift over months, not bugs in a day
Three numbers that are not test counts
These came up in the audit and are easy to misread. None of them is a number of tests.
Lint rules switched on, each with a code such as S101. One
pass applies all 276 at once. It is one check, not 276.
Existing Pyright diagnostics recorded in the 19 November 2026 baseline. The changed-file check flags new diagnostics against that baseline.
Browser test runs, which only execute when explicitly switched on. A normal check runs about 14,500; this layer needs a real Edge window.
Why it is trustworthy
A large test suite is only worth something if the tests can fail. Four rules protect that.
A test may never be weakened
When a test goes red, the cause is fixed. Assertions are not deleted or loosened to get a green run. A separate check fails any change that reduces the number of assertions.
Tests are written from the spec
Some tests are written by an agent that never sees the implementation, working only from the written specification. That stops tests from merely describing whatever the code happens to do.
Every test sets its own stage
No test may depend on another having run first. Each one creates the conditions it needs, which is why the shuffled re-run is possible at all.
Skips are never silent
If browser tests did not run, the check says so, names the count, and prints the setting needed to run them. A quiet skip cannot pass as a success.
Plain-language glossary
- Test
- A small program that sets up a situation, performs one action, and checks the result. If the result is wrong, it reports a failure with a name and a line number.
- Assertion
- The single line inside a test that states what must be true, such as "this total equals 42". Kestrel has 28,584 of them.
- Lint / linter
- A proofreader for code. It never runs the program; it reads it and flags known bad habits.
- Type check
- A consistency checker. It verifies that a value described as a number is never handled as text. Kestrel records the errors it already had, so only new ones block.
- Baseline
- A snapshot of known, accepted problems. It exists so old debt does not stop new work, and it is never a reason to add more debt.
- Coverage
- Which lines of the program a test actually reached while running. High coverage does not prove correctness, but low coverage proves some code was never tried.
- Parametrized test
- One test written once and run several times with different examples. Eight examples means eight runs from one test, which is why run counts exceed test counts.
- Fixture
- A saved, realistic sample of outside data, captured once and reused. It lets tests exercise real-world shapes without contacting a live website.
- Gate
- The whole sequence of checks that stands between a finished change and a release. It passes only on its exact final sentence, never on a general "no errors" signal.
- Flaky test
- A test that sometimes passes and sometimes fails without the code changing. Kestrel fights these by giving every test its own folder, its own port, and its own clock control.
Running it yourself
The gate is not hidden inside a service. It is a script in the project, and any developer can run it locally.
uv sync --extra dev # install once
uv run --extra dev python scripts/check.py --quick # about a minute: lint and fast guards
uv run --extra dev python scripts/check.py --fast # whole suite, no browser, no coverage
uv run --extra dev python scripts/check.py # the full gate, ending in "Ready to push."
uv run --extra dev python scripts/check.py --stress # shuffled re-run on affected tests
The full gate requires a git base to compare against, because the changed-lines, browser-map and coverage stages all depend on knowing what this change touched.
What the testing work involves
Writing and running these checks takes development time.
What the checks catch
- A failing check can stop a change before it ships.
- Automated checks enforce some rules from the project documents.
- A regression test can catch a known bug if it returns under the conditions the test covers.
- A non-developer can read this page and know what "tested" actually means here.
What it takes to maintain them
- A full check takes minutes, not seconds, and must be run before every push.
- Roughly a third of the suite is about process rather than product behaviour.
- Every fix needs its own test, written to fail first, which slows the fix down.
- Numbers get large and need explaining, which is why this page exists.
The goal is to catch problems before an update reaches someone using Kestrel.
When we can reproduce a problem found in review, a regression test gives us a way to check whether it comes back.
What happens after the tests pass? How we release follows a change through review, packaging, and publication.