Repository navigation
Show the prose readers were missing, fix the run loop, and stop loading third-party scripts - #44
Merged
Merged
Conversation
The hello-world waiver's reason (a first example is intentionally tiny) cannot lapse, but its 2026-12-01 expiry would have failed make verify on every pull request. A waiver may now set permanent = true instead of expires; the two are mutually exclusive and permanent must be the boolean. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
The criterion heuristic awarded accuracy for containing print( and practical usefulness for identifiers such as Ada, price, or config. Neither can be observed from page text, so the credit is withheld and the two criteria only penalise metasyntactic names. The heuristic only bounds curated scores from above; the largest curated-minus-heuristic gap moves from 0.3 to 0.5 against a 1.5 limit, so no page changes state. The rubric snapshot also prints permanent waivers correctly. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
Pages before functions no longer define functions, classes, or handlers: booleans, operators, none, object-lifecycle, iterator-vs-iterable, sentinel-iteration, advanced-match-patterns, and unpacking are rewritten with constructs already taught, and point at the later page with an inline link where a later idea is named. The @ operator demo moves from operators to operator-overloading as a Vector dot product. Manifest order: guard-clauses and exceptions now follow functions (so try is taught before the signature pages, properties, descriptors, context-managers, and metaclasses use it), and sentinel-iteration follows while-loops, which it contrasts itself with. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
…ix HTTP edges Reader-facing: - Example pages now render the intro paragraphs every source file has; they were parsed and then dropped. - Journey pages render inline code instead of literal backticks. - Figures keep readable labels on phones: they fill the banner and scroll sideways rather than shrinking below 72% of their intrinsic width. - Home hero, About and privacy wording match what the site does. Runner and editor: - Tracebacks show only the learner's frames, with source lines. - exit()/sys.exit() end the program instead of returning HTTP 500, stderr is captured, and input() explains why it is unavailable. - Pages that teach something the sandbox lacks say so when Run fails. - The editor gains undo history, auto-indent, Tab indentation, bracket matching and Ctrl/Cmd+Enter to run. - CodeMirror and Shiki are bundled from pinned npm packages; esm.sh is gone from the pages and from the CSP. HTTP: - HEAD is answered for every page, trailing-slash URLs redirect, cache hits are re-stamped with the intended browser lifetime, and the Turnstile clearance cookie is bound to the client address. - /llms.txt and /examples/<slug>.md are served. Search indexes page prose and code and knows everyday synonyms. make runtime-examples-test runs every program in the real sandbox. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
…e browser gate The pending-download test now holds the self-hosted editor and highlighter bundles instead of esm.sh requests. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
…mpson-k7lta5 # Conflicts: # public/prototyping/marginalia-gestalt.html # public/prototyping/production-figures-gestalt.html # public/search-index.json # src/asset_manifest.py # src/example_sources_data.py
…they fit - generics-and-typevar: type parameter syntax first, TypeVar as the legacy spelling, plus 3.13 type parameter defaults. - dataclasses: copy.replace(); typed-dicts: ReadOnly; warnings: warnings.deprecated. - The inline-link check ignores code spans, so `first[T](items)` is not mistaken for a link. All four pages were run in the local Worker sandbox. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
Teaches Path joining, whole-file and line-by-line text I/O, directory listing and the missing-file boundary inside a temporary directory. The program was run in the local Worker sandbox and matches its expected output. Adds the page's figure, registry scores, journey placement and social card. Social cards were re-rasterised because every figure's SVG now carries its intrinsic width for the phone layout. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
…rding Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
…m feed - constants and strings no longer use for loops, f-strings or comprehensions before those pages; assignment-expressions moves after while-loops, since its examples use both loop forms. - Social cards are rasterised with whatever fonts the machine has, so a fixed font size let the Comprehensions title run into its figure and three journey summaries run into the brand line. Each card now fits its eyebrow, title and summary in the rendering browser, and the rasteriser refuses to write a card whose text still does not fit. - The strategy doc drops the Atom feed and records why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
…-k7lta5 # Conflicts: # README.md
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.
Summary
This branch fixes the findings of an independent whole-project review: things a reader or crawler hits that no existing gate measured.
Reader-facing
files-and-pathlibexample, with its figure, journey placement and social card.generics-and-typevarleads with PEP 695 syntax and showsTypeVaras the legacy spelling.copy.replace(),ReadOnlyandwarnings.deprecated.functionsno longer usedef,classortry.operatorsno longer defines a class to demo@; that demo moved tooperator-overloading.exceptionsandguard-clausesnow followfunctions;assignment-expressionsandsentinel-iterationnow followwhile-loops.Runner and editor
File "example.py", line 3).exit()/sys.exit()end the program instead of producing "Internal Server Error".input()explains that the sandbox has no terminal.sandbox_limitfrontmatter field marks the four of them: venv, subprocesses, threads, sockets.Supply chain and HTTP
package-lock.json. Sources are inweb/;make browser-bundlesbuilds them, andmake buildruns it.wasm-unsafe-eval.HEADworks on every page.max-age=300; production showed a 4-hour browser lifetime.CF-Connecting-IP, so a copied cookie fails elsewhere./llms.txtand/examples/<slug>.md.zip,join,docstring).Gates and quality machinery
make runtime-examples-testis new and part ofmake verify. It posts every program to the local Worker sandbox and compares the output. Until now the catalog had only run under host CPython. It adds about 3½ minutes.hello-worldwaiver is permanent. It would have expired on 2026-12-01 and failed every PR.print(or name strings.Behaviour changes to accept
Verification
Local runs used a cloud container against a local
pywrangler devWorker (Chromium, Node 22, Python 3.13), on the merged tree with currentmain, including #28. CI then ran the full gate on the same head.make verify: passed in CI oncb8b029(verify run), includingruntime-examples-test(110/110 in the sandbox) andbrowser-layout-test. Every target also passed locally.scripts/format_examples.py --checkmake verify-python-version VERSION=3.13: passed in the same CI run.git diff --checktests/test_runner_and_http.pyand browser-check assertions), but I did not confirm each one fails with its fix reverted.exit(), stderr,input()and syntax-error programs to/examples/valueson the local Worker and read the output panel.curlforHEAD, the trailing-slash redirect,/llms.txtand.md.og:andtwitter:tags and that its card is served asimage/jpeg.Only verifiable after deploy: cache re-stamping and cookie binding on real Cloudflare, and how the cards look in real link previews.
Visual evidence (required for UI changes)
Screenshots were captured in the session but are not attached here.
Before (phone figures): at 390px, the string-formatting figure's labels rendered at about 5.6px.
After (phone figures): the same figure renders its smallest label at 9.2px and scrolls inside its own box; the page does not scroll sideways.
Before (example page): the closures page started at the first cell; "A closure is a function that remembers names…" appeared nowhere.
After (example page): that text renders under the summary.
Reproduction:
make dev, then load/examples/string-formattingand/examples/closuresat 390×844. Base:866c8aa; head:cb8b029.Example changes
src/example_sources/*.md:::programblock per example:::cellsource/output deterministic and executablemake verify-examplesmake check-generated🤖 Generated with Claude Code
https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc