Repository navigation
benchmarks(errors): shared values with no provider (m50), completing the plan - #228
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]>
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]>
Adds m50 to catalogue.toml before any case or page change is written, so the wording is fixed before a result is seen: the page makes the board's name available to everything inside it without passing it to each card as an input, and the card reads it under a misspelled key or name. m50 is neutral, which leaves 51 of 63 neutral. The entry is the plan's draft with these changes: - it names the value, `Projects`, and gives an example misspelling; - it lists the mechanisms as provide/inject, React context, a template context that included templates and components can read, or shared state, in place of a Django context processor alone, since each app uses its framework's own way to share a value; - it says the mistake does not apply where a framework can share a value only by passing it as an input. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… benchmark's reference apps
Adds reference-page part G from the plan: each card shows
`Board: Projects` under its title, and the page makes the board's name
available to the cards without passing it to each one as an input, in
each framework's own way:
- Citry: `<c-provide key="board" name="Projects">` around the cards, and
`self.inject("board")` in the card's template_data().
- django-components: `{% provide "board" title="Projects" %}` and
`self.inject('board')`. The field is `title`, because `name` is the
tag's own argument for the key.
- Django and Rusty: the view puts `board_name` in the page's context,
which `{% include %}` passes to the card's template.
- Jinja: the route puts `board_name` in the context, and the page
imports the card macro `with context`.
- Tetra and django-unicorn: a context processor, because their
components' templates do not see the page's context, and Django runs
the context processors for each component's render, also after Hide.
- Next.js: a React context, provided by a client component the server
page wraps around the board, as the Next.js docs show.
- Nuxt: `provide('boardName', ...)` and `inject<string>('boardName')`.
- ReactPy: `create_context` and `use_context`.
- Reflex: a `SharedState` var that every card reads directly.
- FastHTML has no way to share a value except as an argument, so its
page leaves the line out.
Every clean app ran without a finding or an error, and every snapshot
shows the line on each visible card. The cards' new wrappers moved the
lines that seven cases edit (Citry m04, m35 and m51, django-components
m35, ReactPy m51), and Jinja's m47 and ReactPy's m47 edit the import line
that changed, so their edits now quote the new text, with the same
mistakes as before. Each framework's notes and the README's
reference-page table describe the part.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eworks
Adds m50's cases. Each card reads the shared board name under a
misspelled key or name: `self.inject("bord")` in Citry and
django-components, `{{ bord_name }}` in the Django, Rusty, Jinja, Tetra
and django-unicorn templates, `useContext(BordContext)` in Next.js,
`inject<string>('bordName')` in Nuxt, `use_context(BordContext)` in
ReactPy and `SharedState.bord_name` in Reflex. FastHTML's case is n/a,
because its page has no shared value.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…0 cases - The board name's line moves the footer of the Django, Rusty, django-unicorn and django-components cards four lines below the card's outer `<div>`, where djLint reports m22's unclosed footer. That is past the three-line window, so those four m22 cases get an `indirect` note for djLint's H025, as Citry's and Next.js's m22 cases have for their parsers. The fix comes from the page change, not from a result. - Reflex's state that holds the board's name is now BoardInfoState in board/board_info.py, so it is not taken for Reflex's own `rx.SharedState`; m50's Reflex case reads the new name, with the same mistake. - The notes say how Tetra's page context reaches a component (`_extra_context` or the tag's `context:`), and that a name misspelled in `_extra_context` logs a warning; that Nuxt's `useState` would make a misspelled key silent; and why django-unicorn's cards cannot use the page's context, which they see only on their first render. The django-unicorn context processor's comment says the same. The new paragraphs in the django-components, Tetra and django-unicorn notes join the card's bullet, and several are reworded for clarity. - FastHTML's m50 reason and notes also say it has no shared state of its own, and the README's row names imported macros. Corrections to the earlier commit messages: in 3b10df7, five cases were re-indented and two edit a changed import line, seven in all. The django-components page first provided the name as `name=`, which is the `{% provide %}` tag's own argument for the key; its clean app failed in the first m50 run, and the field became `title` before the run that counted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue mistake Run 20261021T094626Z covers twelve frameworks and 756 cases from commit dd41087, benchmark inputs tree 2a28b0cfb (this commit has the same inputs), with nothing stored (about 38 minutes, --jobs 5). m50, a card that reads the page's shared board name under a misspelled key or name: Next.js, ReactPy and Reflex report it in the editor; Citry, django-components and Jinja fail to render the page; Nuxt prints a Vue warning; Django, Rusty, Tetra and django-unicorn show `Board:` with no error; FastHTML is n/a. No existing cell's outcome changed. Five m22 cells (Django, Rusty, django-unicorn, django-components and ReactPy) gained the `°` mark, because the card's new `Board:` line moved the unclosed footer further from the line the tools report; the four djLint cases got an `indirect` note for it in dd41087, and ReactPy's already had one. Every other difference in the evidence is a line number, an address or a timestamp. The docs page's "Catching errors" section and its data file, the README, the design doc and the plan now count 63 mistakes and record Ref G and m50 as done, after a claims and prose review. Co-Authored-By: Claude Opus 5.5 <[email protected]>
12 tasks
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 the last planned mistake, m50 (a descendant reads a shared value that no ancestor provides), together with Ref G, which shares the board's name with every card. That completes the plan for #158: 63 mistakes across twelve frameworks. Stacked on #226; merge that first.
Ref G per framework
Each card shows
Board: Projects, shared from the page through the framework's own mechanism, not passed as an input:<c-provide key="board" ...>andself.inject("board"){% provide %}andself.inject{% include %}or a macro importedwith contextprovideandinjectcreate_contextanduse_contextm50 results
KeyErrorfrominject.UndefinedError, becauseStrictUndefinedis on.Board:line.Other cells
No existing outcome changed. Five m22 cells gained the
°mark, because the new line moved the unclosed footer more than three lines from where djLint and pyright report it. The four djLint cases got anindirectnote; ReactPy's case already had one.Run
run --no-cache: 756 cases, about 38 minutes, every clean app passed. Its inputs tree id2a28b0cfbmatches commitdd410877f.🤖 Generated with Claude Code