Repository navigation
Description
Problem
The framework benchmarks compare how fast each framework renders the same app. They don't compare how well each framework catches mistakes. That is what decides whether a developer, or an AI coding agent, finds a bug while writing the code or only when a user hits it.
Citry already catches many mistakes before runtime: citry check, the language server and the VS Code extension report typos in component names and event names, wrong types passed to a component's inputs, attribute values that HTML does not allow, Vue bindings that read Python-only variables, and more. We have no measure of how that compares with the other frameworks we benchmark.
Proposal
Add a third kind of benchmark, next to the performance benchmarks and the comparison of how well AI agents work with each framework: we write the same mistakes in every framework and record when each framework reports them.
-
Collect the mistakes. Gather every typo and error we can think of, every case our tests and lint rules cover, and every bug we've hit in the past. Examples:
- a misspelled component, prop, event or slot name;
- a wrong type passed to a component input;
- an invalid HTML attribute value, such as
draggable="treu"or<button type="sumbit">; - an emitted event the component does not declare, or a listener for one the child never emits;
- reading template data or state that doesn't exist;
- server-side and browser-side mismatches, such as the browser rendering different HTML from what the server sent (a hydration mismatch).
Sources: the rule ids in
packages/py/citry/citry/_diagnostic_catalog.py, thecitry_lsptests, the changelogs, and closed bug issues. -
Port each mistake to every framework. Write the smallest app per framework that contains the mistake, adapted to that framework's syntax. Some mistakes can't happen in some frameworks; record those as "not applicable" rather than dropping them.
-
Score when each framework reports it, using that framework's standard tooling (its type checker, language server or editor extension, linter, build and dev server):
- in the editor while typing;
- by a CLI check or build;
- at runtime, with a clear error;
- at runtime, silently wrong;
- never.
-
Publish the results next to the performance results, and record each framework's tool versions so the run can be repeated.
Scoring questions to settle
- Decide whether a mistake that a framework's design prevents (for example, a typed API with no string event names) counts as caught or as "not applicable". Step 2 records it as "not applicable" until we decide.
- Decide how often to update the pinned tool versions, since a tool update can change which mistakes a framework catches.
- Decide whether a warning counts as caught, or only an error.
Not planned yet
This is tracking only; no work is planned yet.
Related: #92 (AI evaluation suite), #151 (more benchmark frameworks), #149 (citry check reports ~1,600 errors on apps that register citry_ui).
Activity
JuroOravec commentedon Oct 20, 2026
Plan for the next two parts of the error-prevention benchmark, after #205.
What Citry checks today. Counted from the diagnostic catalog, the
parser and the runtime: about 118 distinct mistake checks, or 30 if you
count only diagnostic codes. The gap between the two numbers is mostly
citry.parse.syntax, which reports 48 different template mistakes. Amongthem are an unknown input, a missing required input, an unknown slot and a
missing required slot.
Citry's docs, code and the first run show where it is blind:
Part 2: follow the data. Every place where data crosses from one part of
the app to another gets a row:
provide/inject
At each row we ask four things: are names checked, is a missing required
value reported, are types checked, are invalid values rejected. The 24
existing mistakes cover 11 of the 19 rows, and almost none of the "required"
and "invalid value" checks. 26 new mistakes (m25-m50) fill the gaps; 22 of
them come from outside Citry's own rule list.
Part 3: mistakes other frameworks' tools catch. A survey of what each
framework's own tools check covered:
warnings
It adds 13 mistakes (m51-m63), all from other frameworks' tools. Citry may
be blind to these:
disabled="false"Citry already catches a few of the 13, such as duplicate attributes and
two-way binding on an element with no value. After both parts the catalogue
has 63 mistakes, 51 of them from outside Citry's rule list.
New frameworks, in this order:
render, so it is the most direct test of Citry's claim.
build may make each case slow; measure one case first.
PR split. Each PR grows either the mistakes or the frameworks, never
both:
copies of baseline files. Today 21 FastHTML cases copy all of
main.py,so any change to the page would mean rewriting them all. Convert the
existing cases with a script, and prove the conversion by comparing the
result with the old copies. A second PR lets the browser check type, submit
and follow links without changing the snapshots that existing cases use.
minutes per run.
mistakes, 30 cases).
Each PR commits its new catalogue entries before writing any case, so the
wording is fixed before a result is seen.
A full run is about 22 minutes today. With 63 mistakes and 11 frameworks it
would be about 1.6 hours, and 2 to 3 hours with Reflex. So the plan also
proposes running two or three frameworks at a time.
Decisions (2026-10-20):
has a setting that turns on a stricter check, and other frameworks here
have the same kind of check, the benchmark turns it on in that
framework's normal setup, so the frameworks are compared like for like
(for example Next.js's typed routes, Nuxt's typed pages, vue-tsc's
strictTemplates, Jinja'sStrictUndefined). The framework notesrecord each setting changed from the default. The published results
will change in the next run.
"1"into1for you countsas "prevented", judged case by case.
reflex compiledid not report.
full matrix does not run at every release.
component inputs and slots use Alpine components (
x-datawith anested component).
those cases score "Static/IDE warning" for Next.js, the same way Citry's
warnings score.
feat(benchmarks): error-prevention benchmark, part 1 (#158) (#205)