AI code quality: no sprawl, no drift
This is the main difference. The autonomous factory checks its own quality on every train, against the same standardized metrics, and quality is only allowed to hold or improve. AI coding tools tend to let a codebase sprawl and drift; this one holds the line.
As of 8 November 2026Based on 337,000 lines of code and more than 43 billion tokens burned.
Where drift comes from
When agents write the code and another AI decides whether it is good enough, nothing holds the line. Each change is judged on its own and looks fine.
Components get written again instead of reused, patterns multiply, and quality slides a little with every merge. Nobody notices until the codebase is hard to change.
Metrics are the gate, not an AI
Opinions find problems. Numbers decide what merges.
- Gate
- A change merges when standardized metrics say so. The same metrics apply to every car of every train, so the numbers compare across time.
- AI review
- AI review still reads every change. Every finding must quote the code it is about, is checked against that code, and only then counts as real or false. AI review does not get the final word.
- Isolated runs
- Tests, lint, type checks and static analysis run in isolation on every change, so a result does not depend on whose machine it ran on.
Measured on every train
Nine free static tools, coverage and type checks make up a scorecard that runs on every train. A change may not add a violation.
| Metric | First measured | 8 Nov | Trend | Direction | Industry reference |
|---|---|---|---|---|---|
| Line coverageHigher is betterGoogle: 75% commendable, 90% exemplary (opens in a new tab) | 84.75% | 91.40% | ▲ better | Google: 75% commendable, 90% exemplary (opens in a new tab) | |
| Branch coverageHigher is better | 79.44% | 84.90% | ▲ better | ||
| Function coverageHigher is better | 81.46% | 88.70% | ▲ better | ||
| Files under type checkingHigher is betterGrows with every car | 19.4% | 57.2% | ▲ better | Grows with every car | |
| Duplicated lines (jscpd)Lower is betterSonarQube default: at most 3% in new code (opens in a new tab) | 1.56% | 0.56% | ▲ better | SonarQube default: at most 3% in new code (opens in a new tab) | |
| Import cyclesLower is better | 6 | 0 | ▲ better | ||
| ESLint findings on held rulesLower is better | 258 (7 rules) | 408 (97 rules) | More checksThe ratchet holds 14 times as many rules as at the first measurement (7 → 97), each at its own count, so the figure rose with the checks, not with defects. 1,688 more findings come from rules that only report. | ||
| Unused exports (knip)Lower is better | 65 | 0 | ▲ better | ||
| Vulnerable dependencies, high (OSV)Lower is betterCritical: 0 | 13 | 0 | ▲ better | Critical: 0 | |
| Semgrep findings (errors)Lower is better | 65 (0) | 38 (0) | ▲ betterThe fall came with an update of the rule set, not of the code. | ||
| Files over 800 linesLower is better | 8 | 0 | ▲ better | ||
| Maintainability Index, mean (0–100)Higher is betterMicrosoft: 20 and above is green (opens in a new tab) | 27.2 | 27.3 | ▲ betterFirst read on 31 October. 65% of files are in the green band. Microsoft scores a method, the factory a whole file, so its levels sit lower by construction. | Microsoft: 20 and above is green (opens in a new tab) | |
| Car size, median code lines without commentsLower is betterLinearB elite: under 105 lines changed in all (opens in a new tab) | 108 | 57 | ▲ betterFirst read for the week to 25 October. 241 lines changed in all, comments included. | LinearB elite: under 105 lines changed in all (opens in a new tab) | |
| Comment share of the codeTelemetry, no target | 22.6% | 22.7% | = heldFirst read on 29 October. | ||
| Vulnerable dependencies, critical / high (Dependabot)Lower is betterCritical: 0 | 0 / 0 | 0 / 0 | = heldFirst read on 1 November. | Critical: 0 | |
| Availability: the app, its site and sign-inHigher is better | 100% | 100% | = held2,017 checks each in the week to 8 November, no outage; checked since 30 October. |
As of 8 November, all nine static tools run on every train, and a tool that did not run fails the release. The trend line runs through the first measurement and the ends of the last three weeks.
A ratchet on code quality
Each quality metric has a floor that only moves up. Over many trains, quality can only accumulate.
- Holds
- The change keeps every quality metric where it is. It can merge.
- Improves
- The change makes a metric better. It can merge, and the new level becomes the floor.
- Slips
- The change adds a violation or lowers a metric. It does not merge until the metric is back.
- Lines
- Functions
- Branches
Show as table
| Night | Lines | Functions | Branches |
|---|---|---|---|
| 7 Oct | 84.8% | 81.5% | 79.4% |
| 8 Oct | 84.8% | 81.5% | 79.5% |
| 9 Oct | 85.6% | 82.3% | 79.9% |
| 10 Oct | 87.0% | 83.8% | 81.2% |
| 11 Oct | 87.2% | 84.0% | 81.4% |
| 12 Oct | 87.3% | 84.1% | 81.5% |
| 13 Oct | 87.3% | 84.2% | 81.5% |
| 14 Oct | 87.4% | 84.2% | 81.5% |
| 15 Oct | 87.6% | 84.4% | 81.8% |
| 16 Oct | 87.6% | 84.4% | 81.8% |
| 17 Oct | 88.2% | 85.0% | 82.5% |
| 18 Oct | 88.4% | 85.3% | 82.9% |
| 19 Oct | 88.4% | 85.3% | 82.9% |
| 20 Oct | 88.4% | 85.3% | 82.9% |
| 21 Oct | 90.2% | 87.2% | 84.0% |
| 22 Oct | 90.2% | 87.2% | 84.1% |
| 23 Oct | 90.6% | 87.6% | 84.4% |
| 24 Oct | 90.8% | 87.9% | 84.5% |
| 25 Oct | 90.9% | 87.9% | 84.5% |
| 26 Oct | 90.9% | 87.9% | 84.5% |
| 27 Oct | 90.9% | 88.0% | 84.5% |
| 28 Oct | 90.9% | 88.0% | 84.5% |
| 29 Oct | 91.4% | 88.6% | 84.9% |
| 30 Oct | 91.4% | 88.7% | 84.9% |
| 31 Oct | 91.4% | 88.7% | 84.9% |
| 1 Nov | 91.4% | 88.7% | 84.9% |
| 2 Nov | 91.4% | 88.7% | 84.9% |
| 3 Nov | 91.4% | 88.7% | 84.9% |
| 4 Nov | 91.4% | 88.7% | 84.9% |
| 5 Nov | 91.4% | 88.7% | 84.9% |
| 6 Nov | 91.4% | 88.7% | 84.9% |
| 7 Nov | 91.4% | 88.7% | 84.9% |
| 8 Nov | 91.4% | 88.7% | 84.9% |
Every finding checked against the code
Every car passes AI review and automated checks before merge. Only confirmed P1/P2 findings hold a car.
| Review | Week to 1 Nov | Week to 8 Nov |
|---|---|---|
| Review runs | 967 | 1,037 |
| Findings confirmed real | 263 | 352 |
| of them P0/P1 (would have hurt a user or their data) | 7 | 12 |
| Findings judged false | 57 | 33 |
| Precision (real ÷ real + false) | 82% | 91% |
| Real findings per car | 1.35 | 1.38 |
Different models miss different things, so each car is reviewed by more than one. In the week to 8 November nine in ten of their findings held up when checked against the code.
- 2–8 Nov
- Earlier weeks
- Trend, weekly average per calendar day
The dashed trend is background: a straight line through each week’s average per calendar day (43, 36, 38, then 50). Defects per car fell from 2.19 to 1.46 and 1.35, then held at 1.38 in a week of 31% more cars, three products and the factory’s own install path.
Show as table
| Day | Real findings |
|---|---|
| 12 Oct | 18 |
| 13 Oct | 58 |
| 14 Oct | 26 |
| 15 Oct | 70 |
| 16 Oct | 80 |
| 17 Oct | 46 |
| 20 Oct | 22 |
| 21 Oct | 18 |
| 22 Oct | 54 |
| 23 Oct | 71 |
| 24 Oct | 39 |
| 25 Oct | 48 |
| 26 Oct | 4 |
| 27 Oct | 53 |
| 28 Oct | 25 |
| 29 Oct | 44 |
| 30 Oct | 76 |
| 31 Oct | 50 |
| 1 Nov | 11 |
| 2 Nov | 32 |
| 3 Nov | 47 |
| 4 Nov | 112 |
| 5 Nov | 81 |
| 6 Nov | 24 |
| 7 Nov | 24 |
| 8 Nov | 38 |
What a defect costs
A defect caught before merge is the cheapest defect there is. The factory knows exactly what each one cost.
- Human review, 200 lines an hour$59.12
- Human review, 400 lines an hour$29.56
- Rational Trains: review and tests$1.99
- Rational Trains: review only$1.38
Human review: SmartBear advises reviewing 200 to 400 lines at a time, for no more than an hour. At that pace and €30 an hour, the four weeks’ 409,603 changed lines come to $30 to $59 for each of the same 1,165 defects, assuming a human would find as many. Changes that altered no behaviour, such as a one-time reformat, are left out.
Show as table
| Item | Per defect |
|---|---|
| Human review, 200 lines an hour | $59.12 |
| Human review, 400 lines an hour | $29.56 |
| Rational Trains: review and tests | $1.99 |
| Rational Trains: review only | $1.38 |
Everything in BigQuery
Every car and every train writes its metrics to BigQuery, so progress is visible, not claimed.
See every number in Reporting- Functional
- What shipped, train by train: cars, review rounds, test runs, pass rate, real and false bugs, cost.
- Code quality
- The scorecard of every train, including how much code is reused instead of written again.
- Your view
- It is plain BigQuery: query it, chart it, compare any two trains.
It learns
The same way a good team does: by looking back at every release.
- Retrospectives
- Every train ends with a retrospective. What it finds goes into how the next train runs.
- Critical bugs
- A critical bug found while a feature is being built is fixed in the same train, before release.
- Triage
- AI review over-reports: of 278 “known issue” lines left by 13 trains, 3 were worth fixing. Triage is now part of the factory, so noise does not pile up.
Where the numbers come from
The factory’s figures come from its own BigQuery journal. Industry figures come from the publishers’ own pages.
- Code Coverage Best Practices (opens in a new tab)Google Testing Blog
- Understanding quality gates (opens in a new tab)SonarQube Server documentation, Sonar way, the default gate
- Code metrics: maintainability index range and meaning (opens in a new tab)Microsoft Learn
- Best Practices for Code Review (opens in a new tab)SmartBear, review rates
- Engineering Benchmarks 2026 (opens in a new tab)LinearB, 8.1 million pull requests