Skip to content

benchmarks(errors): 13 mistakes about data passed between server, browser and components - #214

Merged
JuroOravec merged 7 commits into
mainfrom
benchmarks/errors-handoffs
Oct 20, 2026
Merged

JuroOravec merged 7 commits into
mainfrom
benchmarks/errors-handoffs

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

Part 2, step 2 of the error-prevention benchmark plan (#158). Stacked on #213; merge that first.

Adds 13 mistakes about data passing between the server, the browser and components, none of which need a change to the clean app. Each is written into all six frameworks, or marked not applicable or prevented with a reason. The new full run is published, and the "Catching errors" section of the Benchmarks page is updated to it.

The first commit adds only the catalogue entries, so their wording was fixed before any result was seen. The published run cites the commit that holds the cases.

The 13 new mistakes

E = editor, R = runtime, M = missed, P = prevented, n/a = not applicable

Mistake Citry Django Jinja FastHTML Nuxt Next
m29 parent's listener misspelled M M M M M E
m30 event payload of the wrong type M n/a n/a n/a n/a n/a
m31 misspelled DOM event M M M M M E
m32 payload field sent as text M P P P M E
m33 payload field missing M R R R R E
m34 misspelled field of the reply n/a n/a n/a n/a E n/a
m35 required slot left empty E M R E M E
m38 misspelled state field read E M R E E E
m39 state field given text E M M E E E
m40 misspelled server value in browser code E R R n/a M E
m41 value the browser can't receive R R R R n/a n/a
m42 secret sent to the browser M M M M M M
m47 misspelled template path n/a R R n/a n/a E

Totals, 37 mistakes

Framework Caught Reported before the app runs Before (24 mistakes)
Citry 25/35 21 (20 errors, 1 warning) 17
Next.js 29/32 27 18
Nuxt 22/33 16 13
FastHTML 21/29 14 11
Django 12/33 3 3
Jinja 18/31 2 2

None of the 144 existing cells changed.

Notes

  • Settings: this run still uses each tool's default settings. Turning on the stricter settings decided on Benchmarks: compare which mistakes each framework catches, and when #158 comes in its own PR, so its effect can be seen on its own.

  • Two case fixes found while running:

    • Django and Jinja m42 wrote a literal \n into the file.
    • Django m35 left blank lines that djLint reported, a finding unrelated to the missing slot.

    Both were fixed so each case shows only its own mistake. The commit messages say why.

  • Reviews: a separate agent reviewed all 78 cases, and another checked the prose and the docs page.

  • Rebase: rebasing onto main changed the hash of the commit the run used (1fb5ac267) without changing its tree. The results name the new hash, 60e9fc263.

🤖 Generated with Claude Code

JuroOravec and others added 6 commits October 20, 2026 20:05
…amed journeys

The browser check's clicks become named journeys in each framework's
framework.toml, under [runtime.journeys]. The existing clicks are the
default journey, recorded at the same three points as before (after the
load, after the steps, after a reload). Every other journey starts from a
fresh load in a new browser context and records the page once. New `fill`
and `press` steps let later PRs drive forms and keyboard flows, and each
step accepts only the keys its action uses.

The page record also keeps border color, alt, id, aria-* attributes and
the disabled state, so a mistake that changes only those reads as
"silently wrong" rather than "never" (both still count as missed). Runs
of 16 or more hex digits in ids and aria values are blanked before the
comparison, because Citry mounts an interactive page into an element
with a random id on every render.

No existing cell is expected to change: the only "never" cells (m09) edit
only the button type text. The published results change only after the
next full run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds 13 mistakes to catalogue.toml before any case is written, so the
wording is fixed before a result is seen: m29-m35, m38-m42 and m47, the
part 2 mistakes that need no change to the reference page. 11 are
neutral and 2 (m41, m42) come from Citry's own rule list, which leaves
27 of 37 neutral.

The entries are the plan's drafts with two changes:
- m32 sends `"1"` instead of `"one"`, and says that a framework that
  turns the text into a number counts as prevented, following the
  decision on open question 3.
- m30 sends the card's task count instead of its position, because the
  reference page gives a card no position, and says the mistake does not
  apply where the event carries no value.

The catalogue header and the design doc's fairness rules now name the
maintainer's hand-off list (section 2 of the plan) as a neutral source,
as the plan requires for these entries to count as neutral.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds a case for each of m29-m35, m38-m42 and m47 in Citry, Django,
Jinja, FastHTML, Next.js and Nuxt, as edits to each baseline.

Not applicable, with the reason in each port.toml:
- m30 everywhere but Citry: the card's hide event carries no value,
  because the page's listener already knows which card it belongs to.
- m34 everywhere but Nuxt: Citry reads $state, the HTMX stacks swap in
  HTML, and Next's server action returns a bare number.
- m40 in FastHTML: the value is written into the script's text, so the
  browser code reads no name.
- m41 in Next.js and Nuxt: the API base is a plain string, and JavaScript
  has no path type to reach for.
- m47 in Citry, FastHTML and Nuxt: the page names no template or
  component file.

Prevented: m32 in Django, Jinja and FastHTML. HTMX sends form fields,
which are always text, and the server turns the field into a number, so
"1" and 1 send the same request.

Fixes made while running the cases, each to make the case express its
mistake, not to change its result: the Django and Jinja m42 edits wrote
a literal backslash-n into the file (a TOML literal string), which broke
Jinja's app.py; the Django m35 edit left extra blank lines that djLint
reported (H014), a finding unrelated to the missing fill.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eview

An independent review of the new cases found one wrong claim: the m41
not-applicable reasons for Next.js and Nuxt said JavaScript's URL class
takes only an absolute address, while it also accepts a relative path
with a base address. The reasons now say that a relative setting has no
base to resolve against.

The other changes are wording only and change no edit: the m32
prevented reasons for Django and Jinja open with why the mistake cannot
be written, and several comments say plainly what the case does.

The README's reference-page table now lists the new mistakes next to
the page part each one uses, and Citry's framework notes point to m29
and m42, which now measure the two related forms the notes describe as
unreported.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…istakes

A full run of all 37 mistakes in all six frameworks, from commit
1fb5ac267, replaces the 2026-10-20 results (the earlier run of the same
day stays in git history). It is also the first published run with the
named journeys and wider page comparison from PR 1b; none of the 144
existing cells changed, as the plan expected.

Before the app runs (errors plus warnings, of the mistakes that apply):
Citry 21 of 35, Next.js 27 of 32, Nuxt 16 of 33, FastHTML 14 of 29,
Django 3 of 33, Jinja 2 of 31. Citry misses 10, up from 4: the parent's
misspelled listener (m29), an event payload of the wrong type (m30), a
misspelled DOM event (m31), a wrong-typed or missing payload field (m32,
m33; rejected with a 422 the page never shows), and a secret sent through
js_data() (m42), which no framework reports.

Also:
- the README's notes on single cells explain m30/m34, m32, m35, m38 and
  m42, and say #207 does not list the new gaps yet;
- the docs page's "Catching errors" section and its data file match the
  run;
- the plan marks PR 2 done and records 1b's full run;
- wording fixes from an independent prose review in the catalogue
  header comment (no entry changed), the design doc, the plan and
  Citry's framework notes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The run used 1fb5ac267; rebasing onto main gave the identical tree the
hash 60e9fc2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…doffs

# Conflicts:
#	docs/design/error_prevention_benchmark_plan.md
@JuroOravec
JuroOravec merged commit 2f89579 into main Oct 20, 2026
4 checks passed
@JuroOravec
JuroOravec deleted the benchmarks/errors-handoffs branch October 20, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant