Repository navigation
Rebuild the vendored marked bundle at 18.0.10 - #32
Conversation
The pin lives in scripts/vendor-marked.sh as a shell variable, so dependabot cannot see it; the weekly sweep is what catches the drift. 18.0.8 through 18.0.10 are bug fixes to emphasis, blockquote continuation, task-list checkboxes, and EOF backtick fences. No API change, so leaf.js's Marked construction is untouched.
leaf-agent
left a comment
There was a problem hiding this comment.
Reviewed as a self-authored PR, so this is a COMMENT rather than an approval. No findings against the diff — the bump verifies out, and the one red check is not this change.
The bundle is authentic. npm pack [email protected] and sha256 on package/lib/marked.esm.js gives 4cf47dfebb7f614a08fc0a579ab0fe407ff0ed2b717bf953040c85b2f493a4f0, byte-identical to the vendored copy — so the file is exactly what scripts/vendor-marked.sh produces at the new pin, with no hand-edit in it. 18.0.10 is npm's current latest, and the upstream release notes for 18.0.8–18.0.10 are bug fixes only, matching the description's account of them.
The runtime's construction still holds. Loading the new bundle in node and building it the way leaf.js does — new Marked({breaks: true, renderer: {html: (t) => escapeHtml(t.text)}}) — Marked/Lexer/Parser/Renderer are all still exported, a single newline renders <br>, and both block and inline raw HTML route through the html override: <div onclick="x"> and <img src=x onerror=alert(1)> come back escaped, and `Vec<T>` stays a codespan.
The red test is unrelated to this diff, and is a shape #26 has already diagnosed and fixed. Run 32632120929 reports 1 failed, 1010 passed, 6 skipped, the failure being test_an_open_tab_reloads_before_posting_through_a_revendored_layer — a layer-epoch test that never renders a thread body, so it never loads this bundle at all.
Why it is the unroute instrument and not a poll that answered wrong
The assertion prints its counters unchanged across the whole 30s wait: the wait began on sends=1 acked=1 pending=0 asked=2 heard=2 and gave up on sends=1 acked=1 pending=0 asked=2 heard=2. Nothing was outstanding and nothing new went out — the page issued no poll for thirty seconds, rather than issuing one that came back wrong.
That is what a stranded first poll looks like from outside. The runtime starts its timer behind the first poll settling — pollAndPresent().finally(() => setInterval(pollAndPresent, POLL_MS)) (leaf.js#L12156) — so a fetch that never settles leaves setInterval unstarted for the life of the tab. And the lift immediately before the wait is page.unroute("**/api/state*") (test_render.py#L3308), which is exactly the instrument #26 names: the handler is taken away while a request is in its hands, and that request is then neither continued nor refused.
#26 already carries this test converted — cut = CutOff().hold(page) with cut.restore() in place of the unroute — so it needs nothing here beyond that PR landing.
Rerunning the failed job.
A page grows by insertion: status tiles are an lf-grid inside the document, not a separate page form (notes/layout-model.md, slices #29 and #32). - lf-grid places its direct children as cells at the page's available width. `columns` takes a count (a ceiling that rewraps a column at a time) or a template of fr tracks, which stacks below 600px. Each cell is a frame. - x-measure says how a block uses its frame: a surface fills it, a group (tabs, a comparison, a grid, a pane) passes the measure to what it holds, and an undeclared block is text and keeps the reading measure inside a frame wider than the column. The theme declares the plain HTML elements. - x-bound and data-bound hold a block to its own height; `end` follows the newest entry unless the reader has scrolled back (runtime/bounds.js). lf-record declares it, and lf-text-document scrolls its listing under a caption that stays in view, declaring that inner box with --lf-bound-box. - version check advises against page CSS that makes a box scroll vertically or places an element declaring a reading role, by tag or by the id the page gives it; data-bound validates like data-width. - lf-metrics is gone: a row of metrics is an lf-grid of lf-metric tiles. - live-progress is a document with a status grid and checks beside a bounded log, so lf-monitor, lf-monitor-grid and lf-monitor-region retire; the monitoring package keeps its release request and guides release pages instead. The command hub stays a plan tree: its header already carries the counts tiles would repeat, and its record now bounds itself and follows the newest receipt. - page-authoring.md's "Composing a page" replaces "Document, page tabs, or workspace" with the recipes; the glossary gains frame, grid, cell, text and surface, and bounded block. Tests: the monitor-posture test became one for the release document's grids and log; the log-evidence test now also checks following the newest line; new tests cover grid frames, the template stack, the CSS advice, the bound's validation, and a followed bound surviving wholesale child replacement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
A decision page about Leaf's layouts came out as paragraphs, tables and Asks with no picture, though its subject was page widths, grids and regions. Every diagram-rich page from the past two days (`layout-model-decisions`, `rail-pins`, a dispatched "excellent leaf, with diagrams") got its drawings because the user asked for them; pages built without that request had none. The session record shows the guidance was loaded and lost on framing. It mapped a few subject kinds to diagrams inside "Reading cost", so an agent that classed its page as "a decision" (which "Composing a page" calls a document read in order) wrote prose. Mermaid can't place a page layout, and the only other route, inline SVG, was called a last resort. The review step checked that diagrams add information, never that one was missing. Changes: - `SKILL.md`, page contract: a view whose point has a shape shows it in a picture, with words for what the picture can't say. - `page-authoring.md`, new "Draw the subject": decide what each view draws before its words; which points have a shape (layouts, structures and flows, state changes, before/after, alternatives that differ in arrangement); a page deciding about one of these draws it too; a table whose rows name places, sizes or connections is a drawing written out. The existing image, diagram and table rules move here from "Reading cost", and the pre-handover reading checks for a shape described in words. - `authoring-evidence.md`: replaces "inline SVG only for a bespoke drawing" with how to draw one, taken from `rail-pins`: schematic wireframes, compared states in one figure at one scale, one class set on theme tokens so both colour schemes hold (an SVG loaded with `leaf page media` can't read them), `role="img"` with a `<title>`. - `authoring-asks.md`: an Ask between arrangements nothing can run yet draws each option inside it. Eval, with each arm's guidance pasted into the prompt and the model writing the whole page: on the #32 layout decision the old text drew 0 and 1 figures, the new 3–6 across five runs; a data-flow explanation went from 1 to 2–3. On a near-miss that should stay text (choosing an error message), the new text adds one small evidence figure per run. A sentence bounding that made no measurable difference and was cut. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Weekly vendored-bundle sweep.
scripts/vendor-marked.shheldMARKED_VERSION=18.0.7while upstream is at 18.0.10 — the pin is a shell variable rather than a manifest entry, so dependabot cannot see it and the drift is silent until this step reads it. Bumped the variable and reran the script; the rebuilt bundle is the change, not the version string.marked ships one browser-native ESM file, so the script is a copy out of the published package and the bundle tracks the version directly. 18.0.8 through 18.0.10 are bug fixes only — emphasis and strong runs staying literal when unmatched, blockquote continuations no longer nesting spuriously, task-list checkboxes placed after list-looseness is finalized, and EOF backtick fences parsed after paragraphs. No API change, so
leaf.js'snew Marked({breaks: true, renderer: {html: ...}})construction is untouched.Verification
The new bundle exports the same surface (
Marked,Lexer,Parser,Renderer,parse, and the rest), and the runtime's exact construction still behaves:breaks: truerenders a single newline as<br>, and thehtmlrenderer override escapes raw HTML rather than passing it through — the property that keeps a message body from injecting markup, since a widget reaches a message only through the CLI-validatedmarkupfield.Full suite green on this branch —
uv run pytest tests --run-nightlygave1011 passed, 6 skipped in 613.65s.test_a_reply_renders_the_markdown_it_was_written_inandtest_a_state_waiting_for_markdown_cannot_overwrite_a_newer_oneare the readings that load this bundle in a real browser.