Repository navigation
benchmarks(errors): add Reflex - #226
Merged
Merged
Conversation
…re its cost
Phase 1 of PR 7 (Reflex). This adds the clean Reflex 0.9.10.post2 app,
its framework.toml (pyright, ruff, and `reflex compile --dry` as a check
stage; `reflex run` as the development server) and three measurement
cases: m08 (caught by reflex compile), m44 (runtime error) and m16
(silently wrong). The other 46 Reflex cases follow in phase 2, so
`citry-errors validate` lists them as missing until then.
Runner changes the app needs:
- a `{backend_port}` placeholder, a second reserved port, for a
development server that runs its backend apart from the page;
- a `python-traceback` reader that points a failing Python command's
finding at the traceback's last frame inside the app;
- the server-output record ends at the stop signal, because Reflex
reports its killed frontend process as an error at every stop. The
log file keeps everything.
Changing the runner changes every stored result's key, so the next run
reruns every framework.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…changes Adds a Reflex case for each of the 49 mistakes: 40 ported, 6 not applicable and 3 prevented (m18, m32 and m41). In a run with nothing stored, 31 are static errors (28 in the editor, 3 from ruff or `reflex compile`), 2 runtime errors and 7 missed, and only 9 cases needed the browser check; the 49 cases took about 85 seconds with `--jobs 5`. Reflex joins the report's order and its "Other Python libraries" group, after ReactPy as in the performance report, and the README, design doc and plan describe it. Nothing is published yet. Review fixes: - m32 is prevented: Reflex converts an event's text argument to the type the handler declares, which the catalogue counts as prevented. - m05, m22 and m29 gain `indirect` notes for findings Python points at a call's first line or the end of the file; m14, m18, m41 and m12 give more exact reasons. - The server-output record now ends once the log has stopped growing, and every command runs with PYTHONUNBUFFERED=1, so a Python server's printed output is recorded while the page is checked. The design doc names the line that needs the cut (granian's intermittent `Unexpected exit from worker-1`) and what it cannot see. - The python-traceback parser takes the exception from the unindented line after the last frame, accepts a bare exception name, and skips frames in generated dot-folders. - The port-in-use check matches Reflex's message. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ison The page record now holds, for every <img>, whether it loaded (`complete && naturalWidth > 0`). Before it records the page, the snapshot script waits up to two seconds for images still loading, so a slow image is not read as broken. A misspelled image path that a development server answers with a page and status 200, as Reflex's does, breaks the image without any error, and only this value shows it: Reflex's m48 moves from "never" to "silently wrong" (still missed). No cell of the ten published frameworks is expected to change, because their m48 cells are errors, which come first. The README and design doc describe the new value and its error modes: an image still loading, and a lazy image the browser never requests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…a rebase A run now records, next to its commit, the git tree id of the benchmark's inputs (cases/, catalogue.toml, frameworks/ and runner/) and whether they had uncommitted changes. The published results/ folder is left out, because it changes after the run that wrote it. GitHub rebases a stack of pull requests when it merges them, so the commit a published run names can vanish from the branch; any commit whose inputs give the same tree id has the same cases and tools. matrix.md, report.html and results.json print the tree id, and the README gives the two git commands that work it out for a commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Reflex page gets the `Projects: 3` line, counted with Reflex's `length()` on the project list var, and `id="board"` on the board wrapper, and a case for each of m51 to m63. m51 does not apply: Reflex gives every item `rx.foreach` renders its position as a key when the page gives none, which is how Reflex's docs write the loop. m60 and m63 carry `indirect` notes, because pyright and `reflex compile` report them where the event is passed or at the first line of the call. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…3 cases - The Reflex card is keyed by its project's title, as the reference page asks of a list the browser updates in place, so m51 is a ported case that removes the key (Reflex then keys each card by position). - The m60 handler prints the reason it takes, as the other ports do. - The tree id reads the inputs with `git ls-tree --full-tree`, so the README's command gives the same id from any folder, records nothing when git fails or an input is missing, and the reports flag uncommitted changes to the inputs rather than to the whole folder. - The development server is stopped even when its log cannot be read. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Run 20261021T075938Z covers twelve frameworks and 744 cases from commit caee448, benchmark inputs tree 9277cffd0 (this commit has the same inputs), with nothing stored (about 37 minutes, --jobs 5). No cell of the other eleven frameworks changed from #225's published run, and no cell's evidence changed either: the image-load record, the server output that now ends at the stop signal, and PYTHONUNBUFFERED for every command moved nothing. Reflex: 37 static errors, 4 runtime errors, 12 missed, 6 not applicable, 3 prevented; 16 of its 53 ported cases needed the browser check. The docs page's "Catching errors" section and its data file, the README, the design doc and the plan now include Reflex, after a prose and claims review. Co-Authored-By: Claude Opus 5.5 <[email protected]>
JuroOravec
force-pushed
the
benchmarks/errors-fw-reflex
branch
from
October 21, 2026 09:15
a16bd06 to
7957361
Compare
GitHub rebased this branch when #225 merged. The run used caee448; its inputs tree is unchanged and matches dd8e202 on this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 21, 2026
JuroOravec
added a commit
that referenced
this pull request
Oct 21, 2026
main matches the merged #226, which this branch already contains, so the files are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Reflex 0.9.10 to the error-prevention benchmark (#158, plan PR 7), the last framework from the performance benchmark, and publishes a combined run of all twelve frameworks. Stacked on #225; merge that first.
The app
The layout
reflex initwrites:rx.Field[...]and@rx.event.uv.lock, and the browser packages in thereflex.lock/folder that Reflex expects a project to commit.Tools:
reflex compile --dry(the check);reflex runfor the runtime check.No stricter setting qualifies; the notes say why.
Cost:
reflex compiletakes 0.4 s per case, and the browser check uses the dev server, so no production build is needed. Only 16 of the 53 ported cases needed the browser check, because the runner skips it once a static check reports an error.Runner changes
python-tracebackreader forreflex compilefailures. It points at the last line of the app's own code.cases,catalogue.toml,frameworksandrunner. A rebase changes the commit hash but not this id, so a published run can still be checked against any branch. The README shows how.Results
Reflex reports 37 of its 53 ported mistakes before the app runs, the most of any Python framework here.
reflex compile: catches attribute typos on state objects, unknown event triggers and loops over non-lists.Pathis sent as text.Combined run
run --no-cache: 744 cases, about 37 minutes, every clean app passed. No cell, and no line of evidence, changed for the other eleven frameworks against #225's published run.🤖 Generated with Claude Code