Skip to content

docs(benchmarks): name where seven error-benchmark mistakes live, fix three stale statements - #863

Merged
JuroOravec merged 1 commit into
mainfrom
docs/benchmark-titles
Nov 24, 2026
Merged

JuroOravec merged 1 commit into
mainfrom
docs/benchmark-titles

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

What this changes

The error-benchmark catalogue names each mistake in a short title, and some
titles did not say where the mistake lives. m60 ("Handler declares arguments
the event does not send") reads as a Citry server event handler, but the case
is a browser-side Vue method that handles a child component's hide event.
"Event" and "handler" can each mean a server event or a browser component
event, and "template" and "state" were unclear in the same way.

This PR rewords seven titles and fixes three inaccurate statements. It leaves
everything the benchmark scores untouched: no id, description, category,
port or setting changes. The m61 follow-up (a FastAPI check in citry check) is filed as #862.

Merge this after the 1.3.0 release. It changes the Benchmarks page text
and the published report, which are not part of the release candidate.

Title changes

The new titles use the same words across the set: "server handler" for code
that answers a request from the browser, "child's event" or "child
component's event" for an event a child sends to its parent in the browser,
and "browser event" (already in m31) for a DOM event such as a click.

id Old title New title
m13-state-field-typo State field typo in an update handler Server handler writes to a misspelled state field
m24-undeclared-event Child emits an event the parent does not listen for Child component emits a misspelled event to its parent
m29-listener-name Parent listens for a misspelled event Parent listens for a misspelled event from its child
m30-event-payload-type Event sent with a payload of the wrong type Child component's event carries a value of the wrong type
m38-state-read-typo Template reads a misspelled state field Displayed value is read from a misspelled state field
m39-state-type State field given a value of the wrong type Server handler stores a wrong-typed value in a state field
m60-handler-arguments Handler declares arguments the event does not send Parent's handler takes more arguments than its child's event sends

I read all 63 entries and the Citry port of each. The other 56 titles already
say well enough where the mistake lives (for example "browser-side
component", "browser event", "server handler name", "CSS variable"), so they
stay. Two titles use words that fit only some frameworks, and I checked them
against all twelve ports: m13 and m39 say "server handler", which is true
for every ported framework (Django views, FastHTML routes, Next.js server
actions, Nuxt API routes, ReactPy and Reflex handlers, and so on). m38 says
"displayed value" because the read is in a view in some frameworks and in the
template in others.

Where the titles are copied, all in sync now:

  • benchmarks/errors/catalogue.toml, the source.
  • benchmarks/errors/results/2026-11-16/ (results.json, matrix.md,
    report.html): the published report that the docs data comes from. Only
    the seven title strings change, in exactly seven lines per file.
    report.html is drawn again by the runner's own html_report.write, which
    first reproduced the committed file byte for byte from the unchanged
    results.json. matrix.md is edited row by row.
  • docs_site/data/error_prevention.json, regenerated with
    python -m docs_site.scripts.error_benchmark_data (it needs only the
    standard library). The diff is the same seven lines.
  • docs/design/error_prevention_benchmark_plan.md, which copies five of the
    titles in its tables and TOML blocks.
  • docs_site/content/about/benchmarks.md: the bullet for m60 under "The 4
    mistakes Citry misses" now matches its new title.

Left alone on purpose: docs_site/versions/* (archived pages for released
versions) and benchmarks/errors/results/2026-10-21/ (the older run, kept as
that run's record under the titles it was published with).

Decision for you: editing the published 2026-11-16 report by hand. I did
not rerun the runner's report step, because the run folder it reads
(.benchmarks/errors/runs/...) is not stored in the repository and I found
no copy on this machine, so the title strings were the only way to keep the report, the docs data and the catalogue in step. The
report's inputs_tree still names the inputs the run scored, and a title
cannot change a result (the catalogue's "freeze before a published run"
rule exists so that a change to a mistake cannot be chosen after seeing the
result; ids, descriptions and ports are untouched). If you would rather keep
the report exactly as the run wrote it, drop the three files under
results/2026-11-16/; the next run's report carries the new titles anyway.
The docs data would then need the script run from a copy of results.json
with the titles changed.

Three inaccurate statements

  1. benchmarks/errors/frameworks/citry/framework.toml said
    mode="development" "changes only how translations are loaded".
    Development mode also asks a visitor to reload an out-of-date page, warns
    when two elements share an id, and, since feat(check): typed emits, citry.Secret, development-only page checks, CSS class rules (#207) #242, runs the browser check
    for server and browser rendering different content
    (packages/py/citry/citry/_vue/serialization.py near line 1494). The
    comment now says so and that the app keeps the default production
    mode. The setting did not change, and notes is not part of the runner's
    cache key, so stored results stay valid.
  2. The Benchmarks page entry for m42 (secret sent to the browser) now says
    that Citry refuses a value wrapped in
    Secret, and that the benchmark's
    secret is a plain string, which Citry cannot tell from other text.
  3. docs/design/issue_207_proposals.md had two stale references. Row 6 said
    the benchmark app serves its pages from hand-written ASGI code, so m45,
    m48 and m61 stay unreported. It is a FastAPI app now: citry check warns
    about m45 and m48, and m61 is reported only at runtime. Section 12c cited
    server_render.rs:3011-3014, lines that now hold unrelated code. The code
    it meant (the component() arm that gives up on any prop other than
    citry-id and key) is at server_render.rs:3635-3637.

One edit beyond the three: the page's m14 bullet said Citry shows "no error".
With the corrected comment that reads as a contradiction, so it now adds that
Citry's development mode can warn about this in the browser console and that
the benchmark runs in production mode.

For you to decide

  • Citry 1.0.0, the release the benchmark measures, includes the development
    checks, so with mode="development" the Citry cells for m14 (and
    possibly m57) may differ from the published ones. Design note 12c in
    issue_207_proposals.md records that m14 warns on a 1280px window in
    development mode; I did not run the benchmark app that way. I did not
    change the setting or rerun anything. Whether to measure development mode
    is your call.

Review and checks

An independent prose pass and cold read, and a separate technical review,
ran on the draft. Changes from them: m29 and m38 got new wording (the first
version said "component" where FastHTML and the Alpine ports have none, and
"page text" where half the ports read the field in a view); the development
mode note names the reload prompt; the page's m14 bullet says "can warn";
the server_render.rs range is the tight one.

Docs, benchmark data and comments only: no crates/ or packages/ code
changed, so no package changelog entry, no versioning question, and no new
value reaches the browser. tomllib reads catalogue.toml (63 mistakes)
and framework.toml; the catalogue titles equal the titles in
results.json and error_prevention.json for all 63 mistakes. I did not
build the docs site or run the benchmark: the worktree is a sparse checkout
and disk was tight.

🤖 Generated with Claude Code

… three stale statements

Seven catalogue titles did not say whether the mistake is in server code or in
browser code, or which kind of event it means. m60 read as a Citry server event
handler but is a browser-side Vue method that handles a child component's event.
The ids, descriptions, ports and settings are unchanged. The published
2026-11-16 report and docs_site/data/error_prevention.json carry the new titles.

Also correct the development-mode note in the Citry framework.toml, say on the
Benchmarks page that citry.Secret values are refused, and update two stale
references in docs/design/issue_207_proposals.md.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@JuroOravec
JuroOravec merged commit e49e009 into main Nov 24, 2026
21 checks passed
@JuroOravec
JuroOravec deleted the docs/benchmark-titles branch November 24, 2026 18:01
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