Proposed plandev at a9da7e3e8 November 2026

Rune to ten.

A proposed plan to bring Rune to 10 out of 10 in each of the ten areas an architecture review scored: 748 items in 16 themes over five phases. Each area has measurable targets, and every item says what it fixes, where, how to tell it is done and how to keep it done.

It is a proposal from outside the project, not the maintainers' plan. The items were planned against dev at a9da7e3e, and their code links point there. Phase 0's fixes are filed, with ready commits, as #260, #261, #263, #264; the roadmap is this issue.

  • 748
    issues, each one deliverable of one to five PRs
  • 16
    themes, each a meta issue with exit criteria
  • 50
    issues in milestone 2a, the seams and cliffs
  • 75
    existing GitHub issues the plan builds on
  • 2,060
    points of work (S 1, M 3, L 8)
  • 4
    issues already filed for phase 0, each with ready fix commits
01

The plan in brief

The roadmap files 748 issues in 16 themes over five phases: 22, 131, 348, 202 and 45.

Rune aims at apps that feel like SwiftUI on iOS at 120 Hz on macOS, Windows, Linux, the web and iOS. This roadmap lists the work that the code at a9da7e3e still needs to meet that aim, in ten areas: performance and feel, rendering, text and input methods, layout, motion, platform reach, accessibility, architecture, API ergonomics, and tooling and verification. Each area has measurable targets, such as input-to-present latency on a reserved 120 Hz Mac, keystroke time at a stated document size, GPU bytes held by an idle window, or WCAG 2.2 AA criteria. The plan proposes a targets page that lists every target with its threshold, hardware and lane. The work is grouped into 16 themes over five phases, 0 to 4. PLAN.md stays the statement of direction; this roadmap is the work that closes the gap between PLAN.md and the code.

Each theme groups the items for one area of code with one owner, and each of its exit criteria names the phase whose lanes can prove it. Phases gate each other: a phase starts when the entry conditions below hold, which mostly means the previous phase's exit criteria, and each phase-4 item starts when its own gate trips. Phase 2 runs as two milestones. Milestone 2a lands the seams and the worst cliffs first: one SurfaceHost frame core, the shell::Event and HostRequest boundary, the typing cliff, RuneTextView, the component store, device-loss recovery, count budgets, the motion audit and the verified branch. Milestone 2b then adds platform certification and breadth. In these items, T1 is the required pre-merge check, and T2 lanes run after merge on real operating systems, GPUs and browsers. Where an exit quotes an interim number, the phase that closes the full target is named beside it.

If only three things

Gate dev on a required check that runs the documented tests, since recent commits broke 16 of them (#260). Measure input-to-present on real hardware. Then fix typing in long fields and IME through a Rune-owned text input protocol. Everything else in the plan leans on those three.

02

Scores by phase

Each area's score, now and after each phaseScores run from 1 to 10. A score rises once the phase's exit criteria hold on the lanes that prove them, not when its issues close.
Performance and feel6 → 10
0510now: 60: 61: 72: 8.53: 9.54: 10now01234
Rendering7 → 10
0510now: 70: 71: 7.52: 8.53: 9.54: 10now01234
Text and IME4 → 10
0510now: 40: 41: 52: 73: 8.54: 10now01234
Layout7 → 10
0510now: 70: 71: 7.52: 8.53: 9.64: 10now01234
Motion8 → 10
0510now: 80: 81: 8.52: 93: 9.54: 10now01234
Platform reach4 → 10
0510now: 40: 41: 52: 6.53: 8.54: 10now01234
Accessibility5 → 10
0510now: 50: 51: 62: 7.53: 94: 10now01234
Architecture and modularity4 → 10
0510now: 40: 4.51: 5.52: 83: 9.54: 10now01234
API ergonomics6 → 10
0510now: 60: 61: 72: 8.53: 9.54: 10now01234
Agent tooling and verification5 → 10
0510now: 50: 5.51: 72: 8.53: 9.54: 10now01234
NowAfter each phase
Now: the architecture review at rev 1571ad57. After: the plan's own trajectory, which assumes the reserved hardware, signing accounts and a few upstream changes arrive.
03

Phases

Issues and effort by milestoneBars count issues, coloured by priority. Points weigh S as 1, M as 3 and L as 8; trackers (XL) count 0.
Phase 030 points22
Phase 1274 points131
Phase 2a181 points50
Phase 2b753 points298
Phase 3655 points202
Phase 4167 points45
P0P1P2P3

Phase 0: Tell the truth (fixes ready)

Make the docs describe the code, make the documented test command green, and set out the targets and prerequisites later phases cite. The fixes are filed as #260, #261, #263 and #264, each with ready commits that haven't landed on dev yet; the items that set targets or policy are left as proposals.

Issues: 22: 17 with fixes ready, 5 left as proposals (the targets page, the readiness ledger, the stability policy, the memory target and the doc-claims check).

Duration: about a day to write; landing is up to the maintainers.

Starts when: Fixes written on 8 November 2026, after the plan was.

Themes: T01; T02; T10; T15

Done when
  • The documented test command exits 0 on dev with no weaker assertion. Fix ready: #260 fixes the 16 tests that failed at 5526e3fc, from 8 causes. Checked on macOS; Linux not yet.
  • No sentence in PLAN.md, the READMEs, site/, WEB.md or a crate description states a render thread, command channel, rope, native IME protocol or Slug text as current. Fix ready: #263.
  • ARCHITECTURE.md exists, and the crate README lists where layout differs from CSS. Fix ready: #264.
  • The README's Measured numbers carry their rev, backend and date. Fix ready: #263.
  • examples/README.md lists all 30 examples, and --tree lists scroll-right. Fixes ready: #264 and #261.
  • Hashed shader inputs are LF-normalized (#182), so Windows uses its precompiled uber shader.

Phase 1: Close the loop

Gate every change to dev with one required T1 verdict, catch public API breaks before merge, and measure real input-to-present latency from OS-injected input on a reserved ProMotion Mac. Land the work that needs no new seam: the Glass pacing fix, the failure and trust floor, the TextInputClient spec, proof that incremental layout matches a fresh one, and the counters every later budget reads.

Issues: 131

Duration: 3-5 weeks with about 16 parallel streams, or about 34-84 engineer-weeks of work; fewer streams stretch it in proportion. The throughput measured here re-forecasts phases 2-4.

Starts when: The red rune-kit tests and the line-ending fix (#182) have merged, so T1 starts green, and PLAN's threading section is rewritten. A repo admin can turn on a merge queue for dev. An isolated self-hosted Mac that only merge-queue and push events reach is online, and the reserved ProMotion Mac is in place. The other phase-0 doc fixes may finish in parallel.

Themes: T01; T02; T03; T04; T05; T06; T07; T08; T09; T10; T11; T12; T13; T14; T15; T16

Done when
  • dev advances only through a merge queue whose required T1 check runs scripts/verify t1: 0 direct pushes, a T1 p50 of at most 15 min, 0 GPU skips on lavapipe, the macOS suites on Metal before merge, and the documented test command green at every dev commit.
  • Merge-queue candidates on the self-hosted Mac run as a user with no credentials and with caches split by trust level, and promotion, signing and issue filing run only on hosted jobs. A drill with a malicious merge-group candidate reaches no secret.
  • cargo-semver-checks is required for rune, rune-kit, rune-motion and themes/opencode on macOS, Windows, Linux and wasm32. 12 of 12 literal-built types have exhaustive-literal tests, an opencode-shaped canary app builds in T1, and removing an API item needs a Breaking fragment with a migration.
  • A native macOS window replays scripts with OS-injected input, and the reserved ProMotion Mac reports input-to-present p50 and p95 and missed presents from real present times for every push to dev. A note names the real present source, or none, for every backend and browser. At least 97% of Glass frames present one refresh after the previous one, with RUNE_PACING=present kept as a revert.
  • A refused configure or a Lost surface never panics, and GPU, surface and image failures reach a diagnostics channel that apps launched from Finder or as GUI apps can read. SVG, SVGZ, <use> and Markdown-depth bombs are bounded, and release builds ignore Rune's dev argv and an ambient OTEL endpoint.
  • TextInputClient is specified, with headless replay fixtures for every adapter, and IME commits join the typing undo group. winit-backed overlays compose CJK and claim secure input, fields send their purpose, web autofill leaves exactly the filled value, and secure fields expose nothing to accessibility text runs.
  • Input and IME recordings drop secure-field content and length, home paths and tokens before they become fixtures, and a T1 check covers the committed fixtures.
  • Counters exist for view runs, measure passes, layout solves, rows built, pipelines created and GPU bytes. A committed matrix maps each PLAN section 8 target to a scene, a probe and a failing check.
  • Incremental layout equals a fresh layout on at least 2,000 generated sequences of 20 commits per T1 run. rune-taffy's unsafe code runs under Miri, LayoutStore's safe accessors read no unchecked memory, and Taffy is pinned exactly.
  • Every rune and rune-kit doc example and all 30 examples compile in T1. The examples-check list of examples without a headless test is empty, and app-audit runs in T1.
  • The macOS, Windows, Linux and browser GUI jobs run on every push to dev. winit is an exact pin with a hook canary, procwatch reads footprint and CPU on every desktop, and the platform docs come from a checked capability registry.
  • The motion audit fails on a finding, and the motion gate tests are in the required check. The kit's focus rings, invalid states and field buttons pass a keyboard walk over the gallery.

Phase 2: Fix the cliffs and name the seams

Make typing and IME feel native on macOS and the web, and put every host, headless included, on one SurfaceHost frame core behind a Rune-owned shell::Event and HostRequest boundary. Move component memory into the runtime that drew it, recover from device and surface loss, and bound every commit. Turn the T2 lanes, count budgets, one cross-OS golden set and the motion audit into gates. Milestone 2a lands the seams and cliffs; milestone 2b adds platform certification and breadth. Each seam names one integration owner role, and at most one RuntimeCore field family, one SurfaceHost backing port and one text-input adapter are in review at a time.

Issues: 348 (50 in milestone 2a, 298 in 2b)

Duration: 12-16 weeks with about 16 parallel streams, or about 119-309 engineer-weeks of work: 2a in 6-8 weeks, then 2b in 6-8 weeks, which may overlap the start of phase 3. Re-forecast at the phase-1 exit; fewer streams stretch it in proportion.

Starts when: T1 and the API gate are required checks in the merge queue, and the frame record reports real present times on the ProMotion Mac. TextInputClient, the counters and the budget matrix have merged. The reserved Windows and Linux machines and the phones for the mobile web lanes are installed.

Themes: T01; T02; T03; T04; T05; T06; T07; T08; T09; T10; T11; T12; T13; T14; T15; T16

Done when
  • 2a: Window, overlay, web, LayerHost and headless hosts run on one SurfaceHost frame core, and the web and LayerHost skip quiet frames. Hosts read 0 runtime request fields, and every OS side effect is a HostRequest.
  • 2a: Keystroke p95 is at or below 2 ms at 50 KB with AccessKit on, enforced on the reserved-Mac lane; this is interim, and phase 3 closes 1 ms at 50 KB. Undo keeps 100 of 100 groups at 200 KB, and T1 count budgets hold the bytes shaped and the whole-text copies per keystroke.
  • 2a: macOS press-and-hold, reconversion and emoji replacement pass through RuneTextView on the macOS real-IME lane, which stays green for 14 days before RuneTextView becomes the default. Overlays take IME on macOS, Windows and X11, with Wayland layer-shell overlays in phase 3, and the web textarea bridge and app-drawn editors run on TextInputClient.
  • 2a: 0 kit thread_locals hold per-surface state, rune-kit uses 0 doc(hidden) rune items, and a component store's byte gauge reads 0 after its Runtime drops.
  • 2a: After an injected device loss or a Lost surface, wgpu and native Metal windows redraw correctly within 500 ms and keep app state, scroll and focus.
  • 2a: T1 is gated by count budgets on at least 12 canonical scenes and by the 36 motion scenarios as debug tests under one Rust rule set. Apps can pin a verified branch that fast-forwards only to a SHA every required lane passed.
  • 2b: The verified branch covers native and wgpu Metal, DX12, lavapipe on X11 and Wayland, Chromium, WebKit, Safari WebGPU and the iOS simulator. Dev-to-verified lag p95 is at most 3 h under the committed lane capacity model, and a red lane names its first bad commit within 3 h through one report broker that publishes only allowlisted fields.
  • 2b: One golden set is byte-identical on macOS, Linux and Windows with no GPU, and every host makes 0 frames, submissions and self-wakes over 10 s of idle.
  • 2b: A lost WebGPU device or WebGL context recovers within 1 s in Chromium and WebKit, which completes 6 of the 9 backend configurations; iOS LayerHost and Safari follow in phase 3.
  • 2b: No commit runs the view more than 3 times, 0 view re-runs are needed to fill a virtual window, and a 1M-row list scrolls at CPU p95 at or below 1 ms with fixed heights and 2 ms with variable heights.
  • 2b: A streamed token costs at most the new bytes, the open block's last line and 1 KB of parse and highlight work, including in a growing fence, table or list, and a plain-text token into a 50 KB reply rebuilds only the last two blocks. Any exception for an open paragraph is a recorded change to the target. A keystroke in the feed scene builds at most 5% of mounted nodes.
  • 2b: Windows, Linux and LayerHost record real present times that drive telemetry and motion sampling, and the reserved Windows and Linux lanes report input-to-present. The web records a labelled proxy that counts toward no input-to-present target.
  • 2b: Reduce Motion applies live and Reduce Transparency is read live on every desktop and web target, with the renderer's opaque fallbacks in phase 3. The AX, UIA, AT-SPI and browser-tree lanes run on every merge, 100% of kit stories pass the keyboard walk with 0 allowlisted failures, and the kit contrast tokens pass.
  • 2b: Every link sink classifies URLs through one classifier, and every untrusted input has a byte, count, depth and time budget. Parser and consumer fuzz targets, including highlighting and TextEdit driven through commit and layout, run nightly for a time sized from their measured rate, and a crash issue older than 7 days fails the job.

Phase 3: Presentation model and platform depth

Deliver retained O(changed) paint on an owned Send FramePacket, and a non-generic runtime core with rune-abi and rune-render split out. Add native IME adapters and text parity on every desktop, bound GPU and glyph memory, and manage colour end to end with wide gamut and HDR. Bring media to every platform, give Windows and Linux the app services and signed packaging they need, and ship the full layout vocabulary with right-to-left layout. Reach WCAG 2.2 AA on desktop and web, give coding agents an inspector protocol, and publish registry releases.

Issues: 202

Duration: 10-16 weeks with about 16 parallel streams, or about 84-228 engineer-weeks of work. Re-forecast at the 2a exit; fewer streams stretch it in proportion.

Starts when: SurfaceHost, shell::Event and the HostRequest queue run every host, and the verified branch moves only on green T2 lanes. Count budgets and the motion audit gate T1, a paint differential compares a second paint path frame by frame, and the RuntimeCore field families sit behind accessors. Signing certificates, a free registry name, speech-lane hosts, and the real-GPU, low-end, iPhone, HDR and photodiode hardware are available.

Themes: T01; T02; T03; T04; T05; T06; T07; T08; T09; T10; T11; T12; T13; T14; T15; T16

Done when
  • The PaintList differential is byte-identical with build() across all suites, and fallbacks stay under 1% of frames. Entries visited are at most twice the entries changed, and Board long-card scroll p95 is under 8.3 ms on the reference Mac; this is interim, and phase 4 closes 4 ms p95 with 0 frames over 8.3 ms.
  • Runtime<S> has at most 8 fields over a non-generic core, at most 15 non-test files hold impl<S> Runtime<S>, and subsystem state is private. A second state type adds at most 5% of LLVM lines, and rune-abi and rune-render are leaf crates under scripts/crate-deps.
  • Keystroke p95 is at or below 1 ms at 50 KB and 2 ms at 200 KB, and at or below 4 ms at 1 MB, with AccessKit on, on the reserved Mac.
  • The TSF, Wayland text-input-v3 (layer-shell overlays included), X11 and EditContext adapters pass 100% of their conformance cases. Real-IME lanes pass on macOS, Windows and Linux. The text-services matrix is filled except for its named platform limits, and macOS password and one-time-code AutoFill pass a native comparison fixture.
  • Text parity has an ink ratio of 0.97-1.03 and an MAE of at most 0.5 levels on every platform, and the Windows and Linux numbers are committed as goldens.
  • A text-free overlay adds at most 2 MiB, about 4 MiB less than today, and every GPU pool is counted, aged and budgeted. A hidden window frees at least 90% of its transient bytes within 2 s on macOS, Windows, X11 and Wayland.
  • Device loss recovers on 9 of 9 backend configurations, iOS LayerHost and Safari WebGPU included. Renderer lanes on real NVIDIA, AMD and Intel GPUs are green, and input-to-present is measured on Windows and Linux on all three vendors.
  • Colour is managed end to end: the sRGB tag survives 6 of 6 configure paths, images honour ICC profiles, P3 colours are kept, and EDR and HDR present on macOS, iOS and Windows. Chromium paint parity is at least 99.5 on 4 of 4 platforms.
  • Player plays every manifest fixture on macOS, Windows, Linux (#30), the web and iOS at the clip rate, with A/V drift at most 40 ms and at most 1 dropped frame per minute.
  • Single instance, deep links, notifications, window state and crash capture work on Windows and Linux. Signed macOS, Windows and Linux packages build, install, upgrade and uninstall in CI.
  • All 14 layout features ship, including full grid, baselines, sticky on all edges, custom layout and virtual columns. Right-to-left layouts mirror within 0.5 pt, and kit components mirror.
  • The WCAG 2.2 A and AA matrix has 0 Rune or Kit cells failing or partial on desktop and web, and the speech lanes pass 14 nights in a row. Each reader's own cursor walks a virtual list to row 10,000 and back. Text size and contrast modes apply live, and the reflow lint and composited contrast report 0 findings with no allowlist.
  • Coding agents drive a running UI through the versioned session protocol, with warm snapshot p95 at most 50 ms. At least 95% of nodes carry file:line, and at least 10 recorded replays match in T1.
  • The kit manifest resolves every standard control: Slider (#149), Stepper, Sheet, Tabs, chips, avatar, command palette, and date and colour pickers. The token lint is clean, and a 0.x release from the verified branch publishes to a registry with a declared MSRV.
  • macOS elastic overscroll, wheel-notch glides, and Windows and Linux touchpad coasting match native traces, and scroll, growth and flights are traced sources. A saved view edit shows with a p95 of at most 1 s on an Apple-silicon Mac.
  • The Android spike records emulator and device numbers in research/40 and files the shell's work as estimated issues.

Phase 4: Gated independence and new shells

Make motion independent of app code wherever telemetry justifies a presenter thread. Ship owned shells where winit is a liability (macOS) or absent (iOS and Android), and run several web apps on one page. Record the decisions phase 3 left to measurement.

Issues: 45

Duration: 8-12 weeks from each gate with about 16 parallel streams. The iOS shell can start at the end of phase 2 and run beside phase 3. Android has no estimate until its spike reports.

Starts when: Phase 4 does not wait for phase 3 to end; each item starts when its own gate trips. The iOS shell starts once the SurfaceHost frame core with its LayerHost port, shell::Event and TextInputClient have shipped and the iOS simulator lane is green. That holds from the end of phase 2, so the iOS shell can run beside phase 3 and shorten the critical path. The owned macOS shell starts after the winit hook canary, RuneTextView and the overlay and macOS file splits. The presenter is built only if the presenter decision measures more than 0.5% of motion frames dropped while the main thread is busy, after the named stall fixes, and only once PaintList transform groups exist. The Document type is built only if typing p95 at 10 MB exceeds 4 ms. The Android shell's work starts after iOS text input ships.

Themes: T01; T06; T08; T11; T12; T13; T14

Done when
  • The presenter decision records main-busy drop rates per flagship workload, with no injected stall, on the Mac, Windows and Linux lanes. On no-go, every flagship workload stays at or under 0.5% in a nightly check. On go, presenter windows follow the written eligibility contract, the concurrency model tests pass, and an opted-in window drops 0 frames of running animation and momentum during a deliberately stalled 30 ms commit.
  • Every host, iOS included, presents 0 frames and makes 0 submissions at rest, and iOS encodes 0 command buffers while backgrounded.
  • The default macOS shell runs with 0 trampolines, KVO swaps or swizzles on winit objects.
  • iOS ships as RuneView and a Swift package, with UITextInput, selection handles and the edit menu, Writing Tools, password AutoFill and one-time codes, VoiceOver, Dynamic Type, safe areas and lifecycle. Simulator cases pass on every push, the device checklist shows at least 99% one-period frames at 120 Hz, and no WCAG cell fails on iOS.
  • The Android shell, built from the issues the phase-3 spike filed, passes its IME, TalkBack, lifecycle and restoration cases on every push and reaches at least 99% one-period frames on a 120 Hz device. Until it does, the platform area does not meet its target.
  • Rune-Bench first tries reach at least 85% compile and 75% spec match, each at least the same model's SwiftUI rate, for three folds in a row.
  • The Document-type, crate-split, uber-shader and web-HDR decisions are recorded from measurements, and every ratchet sits at its end value.
  • The flagship scroll scenes reach CPU p95 at or below 4 ms with 0 frames over 8.3 ms on the reference Mac.
  • A 100 MB file shows its first usable viewport at p95 at or below 250 ms, with peak extra memory at most 2.5x the file size, whatever the Document decision.
04

Themes

T01 · authoring

Docs and authoring: the docs describe code Rune doesn't have, examples skip the fast patterns, and a view edit takes about 8 s to show

54 issuesphases 0-46 existing issues

PLAN.md, the READMEs, the site and WEB.md describe a render thread, a rope, a native IME protocol and Slug text that the code at HEAD doesn't have, so authors design against parts that don't exist. Doc examples aren't compiled, 19 of the 30 examples have no headless test, and a saved view edit takes about 8 s to reach pixels. Closing this theme gives an app author docs that a script keeps true, compiled examples that teach the fast patterns, one prelude per crate, misuse errors that name the author's own line, and a view edit that shows in about a second.

Done when

Phase 0

  • rg -n 'render thread|command channel|sum_tree|rope|Slug' over PLAN.md, README.md, the crate READMEs and Cargo.toml descriptions, crates/rune-motion/src, site/src and WEB.md returns only lines labelled Target or stated as future. PLAN section 3 states the presenter gate: build a presenter only if main-thread-busy drops stay above 0.5% of motion frames in a flagship workload after the named stalls are fixed. The 1% figure in the perf and architecture notes is brought in line in the same PR.
  • Every README Measured number names its rev, date, backend and machine, and scripts/measure-readme reproduces it. Unmeasured PLAN section 8 rows say they are unmeasured. PLAN's Mac memory target is hello at or below 30 MiB phys_footprint, with private-working-set and PSS targets for Windows and Linux. Every PLAN guarantee and hot-reload row has a status: done, partial, or planned with an issue.
  • scripts/doc-claims runs from scripts/file-size.sh in under 5 s. It covers PLAN sections 1-3, README Differences and Measured, crate descriptions, the site architecture pages and WEB.md, and every canary fails as expected. 0 claims stay pending after their phase-0 issue closes. ARCHITECTURE.md is under 300 lines, and a probe checks its owner and thread tables. The Text input, Layout and CSS, and examples index pages are published.
  • A public targets page defines every target the roadmap cites, with its threshold, hardware, lane and the issues that prove it. Where two sources give different numbers for one target, the stricter number governs and any looser number is labelled interim.

Phase 1

  • rune, rune-kit and rune-motion have 0 ignore fences, and README.md, the crate READMEs and the guide pages have 0 uncompiled Rust blocks. A temporary ignore has a reason and sits under a ceiling that only goes down, to 0. T1 extracts the site snippets whenever a file they read changes, and a missing_docs ratchet runs in T1 and the platform lanes.
  • All 30 examples are listed in examples/README.md and compile in T1. Each has a sibling headless test that asserts an interaction or state change, and the examples-check list of untested examples is empty. T1 runs every headless command the index lists, and app-audit --strict has 0 unsuppressed findings, each suppression with a reason. No example parses Rune's flags itself, and hello imports only the preludes and follows the system appearance.
  • scripts/rune-dev hello patches a view edit on a fresh machine with only the documented prerequisites, building locally by default, and no machine names remain in scripts/. A smoke test patches hello and an outside fixture app on macOS, Linux and Windows, keeping state and scroll. A patched poll, key or IME handler that panics is not retried with the original code; it reports the panic and follows the failure policy.

Phase 2

  • Every example and kit-gallery view compiles with rune::prelude::* and rune_kit::prelude::* plus at most one more rune or rune_kit use line. Each prelude holds 40 names or fewer and shares no name with the other prelude or with std's. Every same-named type pair is renamed with a deprecated alias, or listed in docs/api-map.md with a one-line distinction, and the API map regenerates with no diff. No guide page is over 500 lines. missing_docs is denied with a count of 0 on macOS, Windows, Linux and wasm32, and each example builds in every platform lane its index row declares.
  • api/panic-inventory.txt has 0 unclassified entries. In debug builds, every app-misuse entry has a test whose message names the app's file:line and the fix; in release builds the same mistake warns once and does not panic. A handler, on_edit accessor or virtual_rows row typed for another state warns at commit with its call site, before any input. Inserting at the front of an unkeyed dynamic list warns with the .children call site. Uncoloured text meets 4.5:1 contrast in both appearances. Compile-fail cases with fix text pin the 10 most frequent Rune-Bench compile failures.
  • The hot-reload output line carries per-stage stamps, and a weekly lane publishes per-stage and total p50 and p95 on macOS, Linux and Windows over a committed corpus of 30 edits.

Phase 3

  • On an Apple-silicon Mac, save-to-presented-frame p95 for a view edit is at most 1 s. Linux and Windows reach a median of at most 2 s. 100% of measured edits keep state and scroll, and an edit to an impl method body patches without a restart.
  • Rune-Bench (at least 40 tasks, a pinned model, 3 runs per task) and its SwiftUI port are committed with 95% intervals and run at each changelog fold. A fold is blocked when either first-try rate drops by more than 5 points and the interval excludes 0.

Phase 4

  • Rune-Bench first tries compile in at least 85% of tasks and match the expected tree in at least 75%, each at least the same model's SwiftUI rate, for three folds in a row. Import errors cause at most 2% of compile failures, and every failure class above 3% of tasks has a linked issue.
T02 · merge-gate

CI: no required check gates dev, so broken builds and unannounced API breaks reach the revs apps pin

47 issuesphases 0-35 existing issues

No required check gates dev. At a9da7e3e the documented test command fails 7 rune-kit tests and no CI job runs it, so a red build or a removed public item can reach the revs that apps pin, and apps have no tagged release to install. Closing this theme means every dev commit passed one required pre-merge verdict, called T1 in these issues, that agents and CI share. A public API break can't land without a Breaking fragment and a migration, and apps can install tagged 0.x releases.

Done when

Phase 0

  • A Stability page, linked from README and AGENTS.md, defines a stable tier and an unstable tier. It says how a break is announced (a Breaking fragment), that a deprecated stable name stays for at least one changelog fold and 30 days, and what the MSRV policy is. Each rule names the check that enforces it.
  • cargo test -p rune -p rune-kit --features rune-kit/markdown exits 0 at dev HEAD on macOS and Linux, and no test was deleted, ignored or weakened to get there.
  • A readiness ledger gives every prerequisite outside the code (hardware, accounts, certificates, the registry name, the accessibility audit and upstream changes) an owner role, a start-by phase, a proof that it is ready and a fallback. It is reviewed at each phase exit.

Phase 1

  • dev advances only through the merge queue, with the T1 jobs required in the ruleset. 100% of dev commits carry a green T1 verdict, with 0 direct pushes over 30 days. Every admin bypass gets a green T1 run on its SHA within 2 h, and scripts/verify audit-dev, run weekly, reports 0 uncovered SHAs.
  • Over the first 50 warm runs on hosted runners, T1 has a p50 of at most 15 min and a p95 of at most 25 min.
  • T1 runs scripts/verify t1 with nextest. It covers the whole headless suite on Linux lavapipe with 0 GPU skips, the macOS suites on Metal with 0 skips, the Windows unit tests, the 4 scripts/ suites, the accessibility unit tests and the Kit accessibility goldens. It reports 0 inventory targets unrun, including feature-gated and harness = false targets.
  • Every row of scripts/ci-matrix.toml is checked on every PR and merge group: 10 target triples with default and no-default features, plus hot, each feature and the web-hello wasm build. The webgl and rune-fx wasm32 jobs become required within one merge after #115 and #119 close.
  • These are required T1 checks: semver-checks for rune, rune-kit, rune-motion and themes/opencode on 4 targets with default, all and no-default features, against a named baseline; committed per-target API snapshots; frozen exhaustive-literal tests for 100% of api/literal-types.list; and a canary app and a frozen legacy app that build in their own workspace with their own lockfile.
  • Each of these fixture PRs fails T1: one that removes or changes a public item without a Breaking fragment and a compiling migration, and one that drops a deprecated alias before its window ends. The fragment backlog is folded, every folded entry carries its rev, and running the fold twice changes nothing.
  • taffy is pinned to =0.15.0 and winit to =0.30.13 in every manifest that relies on their internals, and a test covers every CompactLength variant through Taffy's public API.
  • Merge-queue candidates on the self-hosted Mac run as a user with no credentials, with caches split by trust level and reset between levels. Promotion, signing and issue filing run only on hosted jobs that validate the artifacts they read. A hardening drill with a malicious merge-group candidate reaches no secret and no cache that later dev jobs use.

Phase 2

  • semver-checks attributes each PR's own breaks against its merge-queue parent, and checks the range from the verified rev to the candidate against merged Breaking fragments. A fixture with two queued PRs blames only the PR that made the break. Until this lands, the baseline stays the merge base.
  • T1 fails on growth in clippy (at -D warnings for every matrix row, with the 3 relaxed lints back at deny), cargo fmt --check for every crate, crate-deps, duplicate dependency versions, file-size (soft-cap warnings under a ceiling that ends at 8 or fewer, any test file over 1,000 lines, any folder over 40 files) and arch-ratchet.
  • Every skip goes through skip_unless!, and its count is reported. At most 10 flaky tests are quarantined, each for at most 14 days, and flaky runs stay at or below 0.1% of executions. Changing a protected path, removing a test or raising a ceiling without an evidence trailer fails. actionlint and zizmor report 0 high findings, 100% of actions are pinned by SHA, and a drill shows that no self-hosted job can be reached from pull_request events.
  • Every rev records the stripped hello size, the brotli wasm and cold-load sizes, and the package and duplicate counts, and T1 fails a rise without a fragment or trailer (above 3% for brotli sizes). A fixed runner records clean build time per rev, and that lane fails a rise above 10%.

Phase 3

  • Every crate in the publication closure declares and inherits rust-version, is green on the MSRV lane on 4 targets, and passes cargo publish --dry-run and a docs.rs-equivalent doc build. A tagged 0.x release cut from the verified branch installs with cargo add and builds hello on macOS, Windows and Linux, and releases ship at most 31 days apart while dev changes.
T03 · platform-lanes

CI: nothing runs Rune's own tests on macOS, Windows, Linux GPUs, browsers or iOS after merge, so apps pin revs no platform lane checked

43 issuesphases 1-329 existing issues

The macOS GUI tests are opt-in, and no job runs Rune on a Windows or Linux GPU, in a browser or on the iOS simulator after merge. A regression in pacing, pixels or a platform API ships in the revs apps pin, and no one learns which commit caused it. Closing this theme gives apps a verified branch that moves only to a SHA every lane passed, a named culprit for every red lane, and reserved hardware that enforces the latency and wall-clock targets.

Done when

Phase 1

  • The 19 macOS GUI tests and the Windows, Linux and browser GUI jobs run on every push to dev and report within 2 h. No job may fail, and 0 tests are quarantined. Until the report broker lands, a red lane opens at most one issue per culprit range, with metadata only.
  • The reserved ProMotion Mac lane reports input-to-present p50 and p95 and missed presents for every candidate rev.

Phase 2

  • All 5 platforms and their variants run on every push to dev with 0 skips for declared resources under RUNE_TEST_STRICT=1. Each desktop lane runs its accessibility-API test (roles, names, an action, focus and a state change), and the web lane asserts the DOM mirror.
  • A committed capacity model gives each reserved machine its service times and reserved slots, and sizes batches so that the promoted SHA itself is still tested. One committed lane manifest names every machine, including a UHD 620-class low-end reference. The verified branch and both bisectors schedule through it before the 3 h lag below is promised.
  • The verified branch moves only by fast-forward, to a SHA whose own artifacts passed every lane, and apps pin it. Dev-to-verified lag p95 is at most 3 h over 30 days. A red lane is classified, bisected to a culprit and reported within 3 h.
  • One report broker files every lane, bisector, fuzzer and speech-lane failure. It keys incidents by signature and culprit, aggregates lanes, keeps infrastructure failures apart and rate-limits repeats. Public issues carry only allowlisted fields, and raw evidence stays in restricted artifacts.
  • The renderer lanes for native Metal and wgpu Metal, DX12, lavapipe on X11 and Wayland, WebGPU and WebGL2 in Chromium and WebKit, Safari and the iOS simulator are green on every verified rev, with 0 skipped GPU tests and the expected adapter in each manifest. Native Metal output matches wgpu Metal.
  • Lanes show that a hidden window gives its memory back on macOS, Windows, X11 and Wayland, and that a covered or minimised window presents 0 frames. The first-use suite runs cold and warm every night.
  • A scene lays out with identical rect digests on all 5 targets at equal scale.
  • Every platform's lanes stay green for 30 consecutive days of merges, with oldest-version lanes run weekly and before each changelog fold.

Phase 3

  • Lanes on real NVIDIA, AMD and Intel GPUs join, so 11 of 11 renderer lanes are green on every verified rev. Canonical scenes agree within 2/255 across backends and vendors.
  • Wall-clock suites run nightly on macOS, Windows, Linux, the web and iOS, and weekly on the low-end lane, pooled over at least 5 paired runs. Every number records rev, backend, device and date, and a paired regression is bisected and reported.
  • Input-to-present latency and cadence are measured on Windows and Linux on all three GPU vendors and on a hybrid-GPU laptop.
  • The photon rig calibrates key-to-photon latency within 0.5 ms each quarter. Native-peer baselines give every 'matches native' row a number, and live-resize capture shows 0 frames the native peer would not show.
T04 · headless-verification

Verification: headless runs use five frame loops, goldens are machine-bound, and no count budget or motion finding fails a merge

73 issuesphases 1-310 existing issues

Headless runs go through five frame loops and two script dispatchers that drift apart. Goldens hold on one machine only, frame cost has no exact counters, and no motion-audit finding fails a merge. A regression in work per frame or in motion can pass CI, and a coding agent can't trust what a headless run shows. Closing this theme gives one headless driver that behaves the same in every mode, one golden set on every OS, count budgets and the motion audit as required checks, and a session that drives, inspects and replays a running UI.

Done when

Phase 1

  • Counters exist for view runs, layout passes, pipeline creations and GPU bytes. The motion audit fails on a finding. A committed budget matrix maps every PLAN section 8 target to a scene, a probe and a check.
  • --native --script replays a script in a macOS window, with OS-injected input stamped into the frame record. Every input and IME recorder drops secure-field content and length, home paths and tokens, and a T1 check covers the committed fixtures.

Phase 2

  • Every runner uses one HeadlessHost that drives frames through SurfaceHost. Every script event and flag behaves the same in single-window and --desktop runs, and no flag is accepted and then ignored. A mid-run error keeps the outputs already flushed, and machine output is structured and schema-checked.
  • Count budgets on at least 12 canonical and worst-case scenes are required in T1, and a seeded regression in each counter family fails. Every host kind makes 0 frames, submissions and self-wakes over 10 s of settled idle, and soak overhead stays flat.
  • Every motion-audit scenario runs as a test on every merge under one Rust rule set, with rate-jitter, reduced-motion, idle and first-use passes. A finding fails unless a bounded allow row with a reason covers it, and debug and release builds record the same commits.
  • One golden set is byte-identical on macOS, Linux, Windows and wasm32 in the CPU-only canonical lane. Every artifact carries a provenance envelope outside its payload hash, and normalized spring traces are bit-identical across aarch64, x86-64 and wasm32.
  • Work started in setup is deterministic in the canonical lane. A canonical scripted run of live-values gives byte-identical payloads across 20 runs, also with a 50 ms delay injected in its producer. A wake from an unmanaged setup thread fails the run and names the setup function, and no example parses argv to decide whether it is headless.
  • Every subsystem in the oracle matrix is differential-tested on generated inputs on every merge.
  • Every rect change in a story, eligible example or scripted interaction is caught at merge and needs a changelog fragment, and CI never writes goldens.
  • The Markdown streaming differential runs at least 256 generated documents per T1 run with random UTF-8 split points. At every checkpoint the incremental stream state matches a from-scratch streaming parse of the same prefix, and the final tree, find matches and selection match a one-shot render. Growing single-paragraph, long-fence, table and late-reference fixtures are included, and the test fails on the parent of the #190 fix.

Phase 3

  • 14 of 14 instance kinds and 2 of 2 blend modes have rune-ref oracle arms, and a new KIND_* constant without one fails. Mutation scores and Miri runs are published nightly.
  • A coding agent loads a scene, sends input, steps the clock and queries the tree through a versioned session without relaunching, and every script event and flag behaves the same in session runs as in single-window runs. 100% of keyed nodes carry file:line. Recorded replays match at every checkpoint, rebuilt from a scene name or AppSpec init plus recorded external results, with no serialization bound on app state. --check runs the layout lint, motion gate, app-audit and golden diffs and prints one structured result.
T05 · failure-and-trust

Failure: a lost GPU, a refused surface, a panic or hostile content can end or freeze a shipped app, and no diagnostics channel lets an app read the failure

39 issuesphases 1-310 existing issues

A refused surface configure or a Lost surface can panic, a lost GPU device can end the app, and an SVG or Markdown bomb can hang it or make it read local files. Errors go to stderr, which an app launched from Finder or as a Windows GUI app never shows. Closing this theme gives every failure class one defined outcome and one report path, recovery from device and surface loss without a restart on every backend, and one trust boundary with byte, count, depth and time budgets for untrusted content.

Done when

Phase 1

  • A refused configure, a lost surface, and an SVG or Markdown bomb no longer panic, hang or read local files. Failures reach a diagnostics channel that apps launched from Finder and Windows GUI apps can see. The failure-model page records today's outcome for every callback family, including the non-unwinding extern callbacks that still abort until the FFI guard lands.

Phase 2

  • On the 6 configurations other than the two iOS LayerHost backends and Safari WebGPU, an injected device loss gives 0 panics, 0 unresponsive windows and a correct frame within 500 ms native and 1,000 ms on the web. State, scroll and focus are unchanged, and 3 losses in a row recover.
  • No acquire or configure result ends the app. A recreated surface draws within 2 frames of a restoration event, and after 3 failed tries it retries at most once a second. No surface call or GPU wait blocks the main thread for longer than one refresh.
  • Each failure class has its documented outcome, one report path and a passing injection test, run in a child process, on macOS, Windows, Linux, the web and LayerHost. Every lock taken in a callback or Drop either has a stated reason its data stays valid after a partial update, or invalidates its owner when poisoned. There are 0 production eprintln! calls outside the diagnostics module and 0 allocation expect calls in native Metal.
  • Every rendering fallback emits one diagnostic and increments a counter.
  • Every link sink classifies URLs through rune::trust with its own policy. Every untrusted input has a budget and an adversarial test that fails in under 100 ms. Release builds ignore dev argv and an ambient OTEL endpoint, and control channels bind to loopback and check Host.
  • fuzz/README.md maps every input in the trust inventory to a target. At least 12 targets run nightly: Markdown streamed and whole, DiffView, Mermaid, highlighting and TextEdit driven through Runtime commit and layout, SVG to pixels, HTML paste, RTF paste, CF_HTML, URLs and script JSON. Each runs for a time set from its measured rate, to reach 10 million cases per target per week in debug and in release, with executions and coverage logged. A crash issue older than 7 days fails the job, the target of zero release panics counts as met only while no crash issue is open, and every fixed crash becomes a corpus case that T1 replays.
  • No content path depends on catch_unwind on wasm32. A 10,000-source Mermaid fuzz finds 0 panics in under 60 s, and the wasm smoke test draws each source that crashed before as code while the page stays alive.

Phase 3

  • The two iOS LayerHost backends and Safari WebGPU meet the same device-loss bar, so 9 of 9 configurations recover.
  • In debug builds, native Metal returns validation errors of the kind wgpu reports instead of panicking.
T06 · runtime-core

Runtime: one 255-field struct generic over app state holds every subsystem, frames scan every node, and kit memory lives in thread_locals

36 issuesphases 1-45 existing issues

Runtime<S> is one struct of 255 fields, 28 of them pub, and it is generic over app state. Every subsystem can reach every other, apps read its fields directly, and a new state type adds codegen for the whole runtime. Per-frame bookkeeping scans the whole node tree, and kit components keep memory in thread_locals, so two windows share and evict each other's state. Closing this theme gives a thin wrapper over a non-generic core of owned subsystems with private state, per-feature index lists, and component memory that belongs to the runtime that drew it.

Done when

Phase 1

  • When the focused control is removed, focus moves to the neighbouring stop, while focus_return and modal restore still win. Disabled beats focus and press in either builder order, read-only fields refuse SetValue and ReplaceSelectedText, and a modal opened mid-drag delivers exactly one cancelled Phase::Up. Each has a test in the merge gate.
  • scripts/compile-budget gives identical rune-owned LLVM-line counts on reruns, T1 fails above the ceiling, the macOS lane records the incremental-rebuild median, and the numbers are posted on #124.

Phase 2

  • No kit thread_local holds mutable per-surface state; the arch-ratchet kit count covers only listed immutable constants. Two windows with the same keys keep independent RollingText, ScrollBar and Markdown and syntax state, and a 300-area test keeps a bar mid-drag. Each store evicts on its own runtime's generation, holds entry and byte limits, reports its bytes, and reads 0 after its runtime drops.
  • rune-kit references 0 doc(hidden) rune items, with a ratchet ceiling of 0. cached, digest, snapshot and component::with_store are documented and in the API snapshot.
  • In the gated board and table scenes, nodes visited per animating frame stay at or below changed plus visible. The debug path-scan counter reads 0 for key, hit, gesture and secondary events on a 10,000-node tree, and a hover move visits at most both hit chains plus the group members it enters or leaves. Loops, sticky, flights, drawn rects, visible rows and scroll viewports iterate their own lists, each checked against a full scan by a debug assert.
  • No two nodes share a path, including keys that contain '/', '#' or '%' (fuzzed). A bare key that matches more than one node warns in debug with both paths and call sites, and release resolves it to the documented first match. Two SplitViews and two rows with menus each resolve to their own nodes through the scoped forms, and the gallery and examples emit no ambiguity warnings.
  • Tooltips from El::help, Kit Tooltip and HoverCard show on keyboard focus and stay while hovered, and Escape dismisses them without moving focus.
  • A scripted live-only scenario gives identical FrameStats commits, view runs and instance streams in debug and release. Debug checks are counted separately in live_only_checks, and a check leaves memo, stores, virtual ranges and the request queue unchanged.
  • The Pointer, Focus and TextInput, drag-out and clipboard, Motion, Paint and Reports, and Tree families have left struct Runtime, with field ceilings lowered in arch-ratchet. The has_* post-apply pass is gone in release, and stub invariants run in every debug commit. frame_step is a set of named phase methods of at most 80 lines each, with tests that record their order. Every pub field except state has an accessor and is deprecated, reduced_motion has a working setter, and no code in the repo reads a deprecated field.

Phase 3

  • Runtime<S> has at most 8 fields, 0 pub(crate) fields and 1 pub field (state). At most 15 non-test files hold impl<S> Runtime<S>. Every subsystem that owns state has only private fields and a compile_fail doctest.
  • A second state type adds at most 5% of rune-owned LLVM lines, and the incremental rebuild after a one-line view edit has a median of at most 1.2 s on the reference Mac. If it misses, a decision on a wider crate split is opened with the measured numbers.
  • runtime/frame.rs, runtime/commit* and runtime/input/* mention the playground 0 times, and hello builds with dev tools off. ARCHITECTURE.md classifies every production thread_local in crates/rune, with 0 per-surface entries and scopes that a guard restores.
  • After a real or simulated memory-pressure warning on each desktop OS and on iOS, reclaimable bytes (text caches, component stores and transient GPU pools) return to their baseline within 1 s, with no frame over 8.3 ms during or after the trim.

Phase 4

  • A go or no-go for each candidate crate split (rune-text, rune-shell, rune-tooling) is recorded with compile-budget numbers in research/ and on #124.
T07 · commit-and-layout

Layout: one commit can run the view dozens of times and mount every row, and grid beyond equal columns, baselines and right-to-left are missing

59 issuesphases 1-34 existing issues

One commit can run the view dozens of times, a virtual list can mount every row, and nothing proves that incremental layout equals a fresh layout. Grid templates, baseline alignment, sticky on every edge and right-to-left layout are missing, so an app that needs them can't match CSS or SwiftUI. Closing this theme makes each commit cost what changed, makes elision the default, keeps a 1M-row list inside its frame budget, and ships the CSS and SwiftUI feature matrix with right-to-left layout.

Done when

Phase 1

  • 0 incremental-vs-fresh layout mismatches in at least 2,000 fuzz sequences per T1 run and 100,000 nightly. Miri runs clean on rune-taffy, and 0 safe calls read unchecked memory.

Phase 2

  • No commit runs the view more than 3 times, and code enforces the cap. At least 99% of commits in each scene run it at most once, 0 re-runs are needed to fill a virtual window, and nothing mounts a whole list.
  • Resize and virtual scroll relayout with 0 root view runs when the retained structure is unchanged, with images and fitted overlays on screen. md-resize layout is at most 2 ms p95.
  • A 1M-row list with fixed or variable heights scrolls at CPU p95 at or below 1 ms (fixed) and 2 ms (variable). Its first viewport takes at most 100 ms, it realizes at most 200 rows, and appends are O(1).
  • In examples/feed a keystroke or a streamed token runs the view at most once, and no memo version is computed by hand. The sampled cache differential check finds 0 stale hits, and every Fast apps rule in docs/fast-rules.toml maps to a line in the example that examples-check verifies.
  • On a generated corpus of at least 500 trees, every element matches Chromium within 0.01 pt or falls in one of at most 10 documented deviation classes, and the static export equals the live layout.
  • Tree explain, the layout lint and 5 misuse rules cover every gallery scene. The rules flag 50 of 50 seeded mistakes and 0 of 50 correct layouts, and no misuse panics a release build.

Phase 3

  • A 100,000-column list meets the same budgets as the 1M-row list.
  • The layout debug overlay covers every gallery scene.
  • All 14 features of the layout matrix ship with builders and examples, right-to-left included. Sticky works on all edges and anchoring on both axes. A localized change costs only its dependency closure, and a tree 8,192 levels deep never crashes a release build.
T08 · text-engine

Text: typing reshapes and copies the whole field, undo loses its depth, and fonts and glyph atlases are rebuilt per window

48 issuesphases 1-417 existing issues

Each keystroke reshapes and copies the whole field, undo history loses depth, and each window builds its own fonts and glyph atlas. Typing slows as a note grows, and a second window pays again for the same glyphs. Closing this theme keeps typing inside one frame up to 1 MB, gives caret and selection each platform's rules, shares one font store per process and one glyph core per device, and matches each platform's text rendering.

Done when

Phase 1

  • Flying text and resting text use the same coverage exponent.

Phase 2

  • long_note type_mid keystroke and preedit p95 is at or below 2 ms at 50 KB, plain and rich, with AccessKit on (--profile perf, reserved Mac). 2 ms is interim: the full target, 1 ms at 50 KB, closes in phase 3. Bytes shaped per keystroke are at most the edited paragraph plus 1 KB, and at 1 MB a keystroke makes at most one whole-text copy and one whole-text scan under the T1 count budget.
  • Typing event-to-present p95 is at or below 16.7 ms and p50 at or below 8.3 ms at 50 KB on the 120 Hz Mac, readable from --tree and procwatch, and p95 is no more than one refresh behind the native field.
  • 100 of 100 undo steps are kept at 1 MB. History bytes per step are at most 2 x (changed text bytes + 32 B per changed formatting record) + 256 B, and recording an edit allocates nothing per existing history step.
  • 100% of a sourced caret corpus of at least 300 cases (bidi, complex scripts, CJK, emoji, Backspace and Delete) passes under the Mac, Windows and Linux mappings. KeyPlatform is detected at run time in every build: Windows in a browser on Windows, Mac in a browser on an Apple device, and Mac on iOS.
  • 0 font discovery operations run on the main thread before the first frame. Each process has one font collection with each file mapped once, and a cold fallback face costs at most 2 ms on the main thread. Every text cache stays within its entry and byte bounds in the 20,000-frame stress gate, and release builds show 0 aliased spans or layouts.
  • On the desktops, the coverage lane reports 0 missing clusters where the OS has coverage, 100% family agreement for the four Han locales, every RGI emoji in colour except VS15, all four colour formats in colour, and a visible box for every uncovered cluster.
  • The pristine fast path, max length, input filters and caret blink (with the system rate and the off setting) pass their contracts in rune, and #125-#129, #173 and #180 are each closed by a reproducing test.

Phase 3

  • Keystroke p95 is at or below 1 ms at 50 KB and 2 ms at 200 KB with AccessKit on, on the reserved Mac.
  • Keystroke p95 is at or below 4 ms at 1 MB, plain and rich with AccessKit on, and in each of the three 200 KB single-paragraph cases. A 100 KB paste and a select-all delete at 1 MB each take at most 8 ms. The composite differential passes 10,000 seeded cases on every merge.
  • Key-to-photon p95 for typing at 50 KB is at or below 35 ms on the photon rig.
  • Glyph pages are shared per device, so a glyph shown in two windows rasterizes once. An extra overlay adds at most 1 MiB of text memory, a text-free overlay adds no atlas page, and no first-mount frame spends over 4 ms of text work on the main thread.
  • The coverage lane meets the desktop coverage bar on the web and iOS.
  • Per-platform parity goldens are committed with pinned manifests for macOS, iOS, Windows, Linux and the web, and each lane fails outside an ink ratio of 0.97-1.03 or above an MAE of 0.5 levels, at every scale and theme.
  • The large-file note records 10 MB and 100 MB numbers and the decision on the Document type.

Phase 4

  • A 100 MB file shows its first usable viewport at p95 at or below 250 ms, with peak extra memory at most 2.5x the file size, whatever the Document decision. Typing stays at or below 4 ms p95 at 10 MB, in text_input or in the Document type if it is built.
T09 · text-input

Text input: input methods ride winit's four-event stream, so overlays and system text services get no document context

33 issuesphases 1-37 existing issues

Input methods reach Rune through winit's four-event IME stream, which carries no document context. A candidate window can't read the text around the caret, reconversion and press-and-hold don't work, and winit-backed overlays can't compose or claim secure input. System text services such as spell check and Writing Tools have nothing to read. Closing this theme puts every desktop and web input method and text service on one Rune-owned TextInputClient over TextEdit, so composition, undo grouping and services behave as the platform's native field does.

Done when

Phase 1

  • TextInputClient is specified, checked against NSTextInputClient, ITextStoreACP2, text-input-v3, EditContext and UITextInput, and implemented once over TextEdit, and the winit and web paths run on it. A test shows that a request with a stale revision or a defocused field id changes nothing. text_in never returns more than 4,096 UTF-16 units.
  • At least 40 replay fixtures (ja, zh-Hans, zh-Hant, ko, vi, dead keys, press-and-hold, emoji picker, dictation and secure fields) pass headless in T1 in under 30 s. IME commits, dead keys, dictation and emoji inserts match the recorded macOS and Windows undo grouping in at least 6 scenarios each.
  • A winit-backed overlay field composes Japanese with the candidate window within 2 pt of the caret. A secure overlay field keeps a balanced secure-input claim across 100 show and hide cycles. The web input sink sits within 1 CSS px of the caret during composition, and on the field rect otherwise, in Chromium, Firefox and WebKit. The autofill repro in #109 leaves exactly the 13 filled characters.

Phase 2

  • On the macOS real-IME lane (Kotoeri, Pinyin, Zhuyin, 2-Set Korean and Telex at four scales), press-and-hold, reconversion, emoji replacement, dictation and Look Up pass through RuneTextView in a window and in a non-activating panel, with menu and shortcut tests unchanged. RuneTextView becomes the default only after 14 consecutive days of green lane runs. The web bridge and app-drawn editors pass the same replay scenarios, and the browser lane runs at least 15 scenarios on Chromium and WebKit on every push to dev.
  • On the web, the focused input sink carries the field's own name, description, and required, invalid, read-only and multi-line state, checked by a Playwright snapshot, VoiceOver with Safari and NVDA with Chrome. Screen-reader line moves reach the end of a 1 MB field, and every input purpose sets the documented sink attributes.

Phase 3

  • 100% of headless conformance scenarios pass for the macOS, TSF, Wayland, X11, web textarea, EditContext, overlay and app-drawn-editor adapters. 100,000 seeded fuzz sequences per T1 run finish with 0 invariant violations, and removing the stale-request guard makes the fuzz fail.
  • The anchor rect each adapter reports is within 1 pt of the drawn caret at 100, 125, 150 and 200% scale. On a 1 MB field with a 900 KB selection, each query reads at most 4,096 units beyond its range and answers in under 1 ms on the reference Mac.
  • Every desktop and web cell of the text-services matrix (spell check, autocorrect and text replacements, dictation, Writing Tools, emoji picker, Look Up, purpose and AutoFill, secure entry, the edit menu and text drag) is filled from an executed test or lane step, or names a platform limit. macOS password and one-time-code AutoFill pass a native comparison fixture. Where Apple offers custom views no API, the issue ends in a proposed change to the target that names the missing API, not a closed issue. Voice Control and Voice Access select and correct words on the desktops.
  • The real-IME lanes on Windows and Linux pass 100% of scenarios at every release cut, at all four scales and on pinned OS and IME versions, and the macOS lane keeps passing. Every failure becomes a committed replay fixture before the cut.
T10 · motion-and-scroll

Motion: scroll, growth and flights step outside the traced scene, and scrolling doesn't move as each platform's own views do

33 issuesphases 2-31 existing issues

Scroll offsets, height growth and flights step outside the traced motion scene, so their velocity can jump and they can land in different places at 60 and 120 Hz. Touch flings, trackpad momentum, rubber-banding and wheel glides don't follow each platform's own scroll views, and the motion docs give wrong test counts and defaults. Closing this theme makes every presented motion one traced source with continuous velocity at any refresh rate, and makes scrolling match the native toolkit for touch, trackpad and wheel.

Done when

Phase 0

  • Every motion doc statement listed in the motion docs issue (test counts, defaults and missing features) matches the code.

Phase 1

  • The site has a Motion page in its nav, with a SwiftUI parity data file for the fixed list of SwiftUI animation features, and a test fails when a row's API path, example or gate scenario does not exist.

Phase 2

  • The travel-X lane, screen-path lead, presence draw lane and hard-coded spring bugs are fixed, each with its test. Per-lane screen-path progress is within 1e-4 of its own curve, every Fx lane differs by less than 1e-6 across remove and revive, and each lane settles on the element's own LayoutAnim and class epsilon.
  • A fuzz test over NaN, +/-inf, 0 and 1e9 s durations, 1e8 pt offsets and 1,000 retargets a second finds 0 non-finite presented values and 0 release-build panics through the store, Scene, scroll and the Spring::try_ constructors. Every non-looping track settles within MAX_SETTLE.
  • store.rs, scene.rs and commit/apply.rs are each under 800 non-test lines, and the gate traces carry a Reason for every instant layout change.
  • The retarget audit covers 100% of the committed source and operation inventory, and velocity-snap is in RULES at 0.001 pt/s analytic, 0.5 pt/s stepped and 1e-4/s for opacity. Every intended discontinuity carries a cut reason.
  • On at least 40 recorded UIScrollView flings, touch fling distance and duration are within 2%. Velocity estimator error is at most 5% median and 15% p95 (with a floor of 20 pt/s), with 0 releases clamped from coalesced events. Edge overshoot is within 0.5 pt of the 960 Hz reference at 30-144 Hz with +/-4 ms jitter, and the rubber band is within 0.5 pt of the viewport-dimension formula.
  • In replay, content under a dragged pointer or finger lags it by at most 1 refresh. Drag releases at 150, 600 and 2,400 pt/s start their spring within max(2%, 10 pt/s) of the hand speed, and a catch jumps at most 0.5 pt.
  • An animating frame visits at most 2 x changed + viewport and watcher list + 64 Scene and runtime nodes for presentation and scroll, and that count is within 5% between the 10,000- and 100,000-node trees.

Phase 3

  • Every source in the inventory (scroll offsets, momentum, glides, growth, content slides, and launched, matched and text flights) is traced, audited and visible to rest, with 0 finite-difference velocity estimates. The same scenario at 60 and 120 Hz, with jitter, a rate switch and a 100 ms gap, lands within 1/64 device px for tracks and 0.5 pt for scroll, growth and flights, with no allow rows.
  • A macOS trackpad push past an edge rubber-bands within 2 pt per frame of NSScrollView and returns within 0.5 s of momentum end, with 0 jump findings. A whole wheel notch moves at most 35% per frame at 120 Hz, lands in 150 ms +/- 1 frame, and is within 10% per frame of Chromium on Windows and GTK4 on Linux, with lines-per-notch applied once. Precise deltas are never glided.
  • Windows precision touchpads and Linux Wayland trackpads coast within 10% of Chromium's and GTK4's distance on the survey fixtures. Mouse wheels never coast, and a new touch stops a coast within one frame.
  • Paged and child-snapped scroll views land on a snap point at the release velocity within max(2%, 10 pt/s), with 0 overshoot findings at bounce 0. Scroll-linked headers run 0 app callbacks per scrolled frame, and on_landed fires once, at its defined time, in every listed case.
  • Every row of the fixed SwiftUI animation list, including PhaseAnimator, KeyframeAnimator, completion, paging and scroll-linked effects, has a working El example and a gate scenario linked from the site's Motion page. No physics constant is defined in both rune and rune-motion.
  • The input-resampling measurement is committed. If resampling ships, constant-speed drags have a step spread within 10% of the ideal step at every input and display rate pair, with at most 5 ms of added latency and at most 1 pt of overshoot.
T11 · frame-core

Frames: four hosts copy the frame loop in winit types, nothing measures input-to-present, and paint walks the whole tree every frame

51 issuesphases 1-47 existing issues

The window, overlay, web and LayerHost hosts each copy the frame loop in winit types, so a fix such as the quiet-frame skip reaches some hosts and not others. FrameEncoded::presents_at() reports the scheduled refresh rather than the real present time (#175), so nothing measures input-to-present, and paint walks the whole tree each frame. Closing this theme gives one SurfaceHost frame core behind a Rune-owned event and request boundary, real present times on every platform, retained paint patched in proportion to what changed, and a presenter thread only where telemetry shows it is needed.

Done when

Phase 1

  • On the ProMotion reference Mac, every window's FrameRecord ring reports input-to-present p50 and p95 and missed presents from Metal presented times, without --trace. Present times agree with the presentDrawable swizzle within 0.5 ms and missed counts within 1%, and recording allocates nothing. A present-source note names the real present source, or none, for every backend and browser (#175).
  • Glass windows present at least 97% of frames one refresh after the previous one at 120 Hz, toward a 99% target. A synthetic 5 ms CPU scene misses fewer than 0.1% of presents, and the 60 Hz one-period share does not regress (#204).
  • GPU time is recorded on 100% of presented frames where the device has TIMESTAMP_QUERY, including the last frame before idle, with 0 allocations and at most 0.05 ms of CPU per frame.
  • An idle web app and a 30 Hz wake_after LayerHost present 0 frames a second, and the overlay and web compositors read marks aligned index for index with instances (#166, #167).

Phase 2

  • Window, overlay, web, LayerHost, desktop and headless hosts drive frames through SurfaceHost, with 0 non-test calls to FrameClock::advance, Runtime::frame or frame_split outside the core. The Backing parity suite passes the idle, live change, starved callback (poll and timers within one period plus 16 ms after 10 s without callbacks), refused, Lost and hidden scenarios (#139).
  • Hosts read 0 runtime request or platform fields, with an arch-ratchet ceiling of 0. Every side effect is a HostRequest drained after every event and timer callback, and headless tests assert the request streams, including for a hidden window with no frame presented. Runtime code and the public API name 0 winit types.
  • Windows, Linux (Wayland and X11) and iOS in the simulator record real present times and OS input timestamps; iPhone device numbers follow with the iPhone perf lane in phase 3. The frame record keeps actual, predicted and proxy present times in separate fields. The web records a labelled proxy that counts toward no input-to-present target, so the web's targets need an external present source or a recorded change to the target. Motion is sampled at the frame target, with sample-to-present p95 at most 1 ms on native hosts and sample-to-rAF-target p95 at most 0.5 ms on the web, and a stale source falls back within 2 frames with 0 jump findings.
  • Overlays scroll with wheel and trackpad, take IME and secure input, and get the secondary click on macOS, Windows, X11 and layer-shell.

Phase 3

  • The paint differential harness shows identical resolved geometry, marks, hits, resource updates and scope balance on all suites. Fallbacks are under 1% of frames, entries visited are at most 2x entries changed in the pinned scroll workloads, and Board long-card scroll p95 is under 8.3 ms on the reference Mac. 8.3 ms is interim: the full target, 4 ms p95 with 0 frames over 8.3 ms, closes in phase 4.
  • PaintList: Send and FramePacket: Send + 'static are asserted at compile time, and Renderer::prepare takes only &FramePacket. After a deprecation window of one changelog fold and 30 days, with examples/lab and cursed-settings moved to the queued state-write replacement, Frame exposes no &mut Runtime.
  • Stall markers name the first-use work behind every frame over one refresh, and the first-use suite shows 0 Rune-caused main-thread tasks over 8.3 ms after the first frame on macOS, Windows and Linux.
  • On Windows and Linux, the event-loop thread spends at most 0.2 ms p95 per frame in acquire, present and worker waits, or a recorded note shows the present worker is not needed. A surface whose present blocks costs other windows at most 1 refresh (#169).

Phase 4

  • Flagship scroll scenes reach CPU p95 at or below 4 ms with 0 frames over 8.3 ms on the reference Mac.
  • The presenter go or no-go is recorded from main-thread-busy telemetry on flagship workloads, with no injected stall, against 0.5% of motion frames on the reference Mac, Windows and Linux lanes. On go, presenter windows follow the written eligibility contract (a compositor stays on the main thread unless it adopts a Send, data-only contract), the concurrency model tests pass, and a deliberately stalled 30 ms commit drops 0 frames of running animation and momentum on opted-in windows on the reference Mac and Windows machine. Every host makes 0 idle submissions.
T12 · renderer

Render: some GPU pools never shrink, colour isn't managed end to end, effects ignore display settings, and pipelines compile on the UI thread

56 issuesphases 1-419 existing issues

Some GPU pools grow and never shrink, macOS loses the sRGB colour tag on some surface reconfigures, and images ignore their ICC profiles. Effects ignore Reduce Transparency and Increase Contrast, and the first fade, blur or backdrop compiles a pipeline on the UI thread, which can drop frames. Closing this theme bounds GPU memory in bytes, manages colour end to end with wide gamut and HDR where the platform supports them, makes effects follow display settings, and keeps pipeline compiles and GPU waits off the UI thread after the first frame.

Done when

Phase 2

  • T1 count tests show 0 UI-thread pipeline creations after the first frame for the first fade, blur, backdrop, plus-lighter blend, video frame and each effect kind, faded and unfaded, on native Metal, wgpu Metal and DX12.
  • Every built-in pipeline ships precompiled (metallib and DXBC), with a freshness test in the macOS and Windows lanes and one diagnostic on a runtime miss.
  • After the first frame the UI-thread GPU-wait counter reads 0, except for pacing waits that each end within one refresh, and no scenario adds more than 2 ms of render work to the UI thread.
  • kCGColorSpaceSRGB holds after 6 of 6 configure paths on both Apple backends and on iOS LayerHost. ICC-tagged image fixtures decode within 1/255 of Chromium, and native output equals web output within 1/255.
  • Transient pools sit under one per-device budget and free within 2 s of last use by wall clock, with no frame drawn. 10 fade cycles allocate one target, and a 100-step live resize with a blur makes at most 12 backdrop allocations.
  • rune-fx and rune-light pass 26 goldens within 2/255 in both blend modes on every native and WebGPU target. Every canonical scene is byte-identical over 20 runs on every lane. WEB.md has a WebGL2 feature matrix with capability-checked fallbacks, each emitting one diagnostic and never panicking.

Phase 3

  • Every GPU pool is counted within 5% of allocator bytes. A hidden window frees at least 90% of its transient bytes within 2 s on macOS, Windows, X11 and Wayland. A hello window holds at most 8 MiB beyond its drawables, and a text-free overlay at most 1 MiB. A 50-cycle soak ends within 5% of cycle 1, and macOS overlay shows reuse one device.
  • The colour fixture set renders within 1/255 of pinned Chromium in both blend modes on macOS, Windows, Linux and the web. A display-p3 swatch keeps its P3 value within 1/255. PQ, HLG and BT.2020 clips play with 0 errors within 3/255 of their references.
  • EDR and HDR windows read back values of at least 2.0 on macOS, iOS and Windows, with SDR content within 2/255 of an SDR window and at most 25% more GPU time on the 1,000-quad scene.
  • After a display move or a simulated display change, the next frame keeps the new scale and the sRGB tag, pacing moves within 2 frames, and an HDR window reads the new headroom within 1 frame.
  • Every pinned kit story reaches a similarity of at least 99.5, with at most 0.5% of pixels off by more than 8/255 and no 32 px tile with a mean difference above 2/255, in light and dark, on 4 of 4 platforms. Gradient banding stays within Chromium's plus 10%, and a deliberate 3/255 shadow change fails the gate.
  • Within one frame of the OS change, Reduce Transparency runs 0 backdrop-blur passes and draws materials and effect glass opaque, Increase Contrast draws the materials' high-contrast fill, and Reduce Motion freezes every effect on a still frame with 0 frame requests. Effect-clock increment error is at most 0.1 ms after 30 days of uptime.
  • A static isolated layer redraws 0 times while unchanged, and a backdrop over static content runs its pyramid on 1 frame of 100. A steady frame makes 0 GPU allocations, layer encode visits at most 2x the plan entries plus surfaces, and GPU p99 is at most 4 ms on the 1,000-quad and effects scenes on the reference Mac.
  • The instance ABI is defined once in rune-abi, with 0 cross-crate include_str! and a conformance test, and rune-render builds and tests without rune, with no change to public paths.
T13 · media

Media: video plays only on macOS, a playing clip presents at the display rate, and image loads stall the UI thread

24 issuesphases 1-49 existing issues

Video plays only on macOS. A playing clip presents at the display rate rather than its own, the completion thread polls every 1 ms, and image hashing and large uploads run on the UI thread. A surface waker that reads Player state can deadlock, and a web app that draws a video or a NativeSurface ends. Closing this theme plays and decodes media on every platform as the browser does, at the clip's own rate, with bounded memory and no UI-thread stalls.

Done when

Phase 1

  • A surface waker that calls Player::state and Player::time on every frame plays 600 frames without hanging, and a debug assertion shows that no surface push_* call runs while a player lock is held.

Phase 2

  • A Windows shared texture reused by name at a new size, or recreated under a new generation, is reopened or refused with a readable error and never copied with a mismatched descriptor, as the Windows lane checks.
  • A web app that draws el().video() or an app-fed ByteFrame NativeSurface keeps running and taking input for 5 s with the placeholder drawn, and nothing traps or panics.
  • With nothing else moving on a 120 Hz display, a 24 fps clip presents 24 +/- 1 frames a second and a 60 fps clip 60 +/- 1, with A/V drift at most 40 ms. The completion thread wakes at most 2 times per presented frame, and a paused Recorder wakes 0 times a second.
  • No frame uploads more than 4 MB of non-video image data, under a count budget. The frame that first shows a 5K image takes at most 2 ms more main-thread time than a steady frame. ImageCache load and rgba of a 256 MiB buffer, and Recorder stop and drop, return within 1 ms on the UI thread.
  • A decode request dropped before it starts is decoded 0 times. Summed transient decode memory stays under its budget with four 8192 x 8192 images queued, and one 8192 x 8192 decode peaks at no more than 1.5 times its RGBA size, measured with the counting allocator.

Phase 3

  • Scrolling 500 4K images keeps CPU and GPU image bytes each within budget, a poster holds 0 CPU bytes after upload, and a playing surface creates 0 GPU textures, buffers or bind groups per frame after a 10-frame warm-up.
  • 5 of 5 platforms (macOS, iOS, Windows, Linux through #30, and the web) play every manifest fixture with 0 errors, A/V drift at most 40 ms and at most 1 dropped frame per minute at the clip rate, with 0 CPU copies per frame where the platform offers GPU import.
  • Every WebP, GIF and AVIF fixture that Chromium decodes also decodes natively, within 1/255 of the web build. On WebGPU, loading an 8192 x 8192 image does no getImageData and peaks at no more than 1.5 times its RGBA size.

Phase 4

  • Recorder start, stop and drop record a complete file on macOS, Linux, Windows and iOS, and permission denial and interruptions give readable errors. HLG and PQ fixtures play with 0 errors on Windows and in Chromium, within 3/255 of the CPU tone-map reference on SDR targets.
T14 · platform-shells

Platform: Windows, Linux and the web lack native shell pieces, services and packaging, and iOS and Android have no shell

60 issuesphases 1-419 existing issues

Windows and Linux lack shell pieces that winit doesn't provide, such as full drag and drop, pop-up menus and title bars, and the app services and signed packaging an Electron replacement needs. The macOS shell depends on trampolines, a KVO swap and swizzles on winit's objects, the web host lags the desktop, and iOS and Android have no shell. Closing this theme gives each OS the shell pieces Rune owns, opt-in services in a rune-app crate, signed packages on three desktops, a UIKit shell for iOS and an Android shell, with every platform claim generated from a checked capability registry.

Done when

Phase 1

  • winit's requirement starts with '=', which a Cargo.toml test checks. The T1 hook scan finds 0 call sites missing from the inventory, and the canary fails in the macOS, Windows and Linux GUI lanes when any inventoried hook is skipped or fails its behaviour check.
  • capabilities() covers every app service and media capability on all seven platforms, with feature gates, session probes and minimum OS and browser versions. The generated tables in README.md, crates/rune/README.md, WEB.md and the site differ from the registry by 0 lines, the lint finds 0 support claims outside generated blocks, every Native cell names a test that passed in its OS's latest lane, and the stated minimum versions equal the ones the weekly oldest-version lanes run.
  • On the web, on_window and on_ready each run once at their documented time, on_frame_encoded and on_frame_drawn run on every drawn frame, and a T1 test fails when an App hook has no stated web behaviour. A two-finger pinch zooms a generated page in iOS Safari, and the static export keeps every width.

Phase 2

  • Showing and hiding a Wayland layer overlay 100 times costs 0 UI-thread roundtrips after the first show, keeps a constant thread count, and never hangs on a compositor that does not configure. Five startup shortcuts do not delay the first frame on Wayland, Prefs::set on a 64 KB file returns in under 50 µs, and the Windows pointer hook is reinstalled after an injected stall.

Phase 3

  • The rune-www and default-features web-hello .wasm files are each at most 1.5 MB with brotli -q 11, the cold load is at most 2.2 MB brotli, and text goldens pass after any font-stack change.
  • The services ship in the opt-in rune-app crate. Single instance (ten parallel launches leave one owner and deliver ten argument sets), deep links and opened files, and notifications work on Windows, X11 and Wayland. Every service cell on macOS, Windows and Linux is Native, with a fake test and a lane smoke test, or Unsupported, with a named OS or desktop limit.
  • Windows drag and drop (positions, images, virtual files and drag_out), Linux pop-up menus, Linux title bars and Wayland dialog parents pass on the Windows 11, GNOME, KDE, sway and X11 lanes, and every cell that fails carries a protocol limit in the registry.
  • On each push to dev, CI builds, installs, upgrades and uninstalls a .app and .dmg, an MSIX, and an AppImage and Flatpak of examples/hello, with an empty before-and-after system diff. Every production push notarizes or signs and verifies its artifacts, and fails when secrets are missing.
  • The Android spike records emulator and device numbers and a recommended shell in research/40, and files the shell's work as estimated issues.

Phase 4

  • The owned macOS shell (RunePanel, RuneWindow and the app delegate) is the default, the class-change canary sees 0 changes to winit's classes and objects, and the winit fallback is removed one release later.
  • Two Rune apps run on one page sharing one GPU device, App::window opens a second canvas, and the page makes 0 submits at rest.
  • Every iOS simulator case passes on each push to dev. A backgrounded app encodes 0 command buffers, and after a memory warning the gauges fall to their launch values. The scroll scene reaches at least 99% one-period frames at 120 Hz on an iPhone Pro. The UITextInput adapter passes the desktop text-input conformance cases, and Writing Tools, password AutoFill and one-time codes pass a native comparison fixture, or end in a proposed change to the target that names the API Apple does not offer custom views. performAccessibilityAudit reports 0 issues, VoiceOver reaches and activates every Kit component, Dynamic Type matches SwiftUI within 1 pt from xSmall to AX5, and iOS settings apply within one frame.
  • The Android shell passes the kit gallery's IME, TalkBack, back, lifecycle, rotation and restoration cases on API 29 and the current API, on every push. The device reaches at least 99% one-period frames with 0 presents while stopped, and the template builds an APK and an AAB in CI. Until it does, the platform area does not meet its target.
T15 · accessibility

Accessibility: no lane runs a screen reader, most system settings aren't read, and long lists and fields are out of a reader's reach

40 issuesphases 0-39 existing issues

No lane runs a real screen reader, so nothing shows that VoiceOver, NVDA, Narrator or Orca can use a Rune app. Most system settings, such as text size, contrast and Reduce Transparency, aren't read, a reader can't reach virtual-list rows past the mounted range, and secure fields leak their text into accessibility text runs. Closing this theme gives one cheap AccessKit tree on every desktop and the web, settings that apply live, speech lanes that drive Rune, and a WCAG 2.2 AA matrix with no failure caused by Rune or Kit on desktop and web.

Done when

Phase 1

  • Secure fields expose nothing beyond the platform's native secure field, with no plaintext and no length in text runs. An unknown role string warns in debug, and a box with only hover or drag handlers is no longer announced as a button.

Phase 2

  • One AccessKit tree feeds the macOS, Windows and Linux platform trees for windows, overlays, layer surfaces and embedded hosts. The fault tests (reader restart, refused adapter, subclassed macOS view, nested UIA update and feature off) show 0 panics, and every refusal appears as a warning and in --tree.
  • With a reader attached, incremental update p95 is at most 1 ms and scroll-only updates at most 0.1 ms, frame p95 stays within 10% of the run without a client, and a keystroke in a 200 KB field costs at most 0.3 ms extra.
  • The AX, UIA, AT-SPI and browser accessibility-tree lanes run after every merge to dev and are green. The caret rect each platform's text API reports is within 1 pt of the drawn caret, and 1 px for the web input sink, in single-line, multiline, scrolled and off-origin cases.
  • Reduce Motion and Reduce Transparency are read on every desktop and web target and apply live within one frame, including to motion already running, and Cx::reduced_transparency() has a reader test per target.

Phase 3

  • Text size, contrast and forced colours, web text spacing and zoom are read on every desktop and web target and apply live within one frame.
  • The web platform tree moves onto the same AccessKit tree (#118).
  • On macOS, Windows, Linux and the web, each reader's own reading cursor (VoiceOver, NVDA, Narrator, Orca and the 3 browser pairs), not only ScrollIntoView, walks to row 10,000 of a virtual list and back with the correct set size for focusable and plain rows. It reads every line of a 1 MB field and runs row actions as custom actions, and status changes are heard without moving focus. iOS follows in phase 4.
  • Every field exposes its name, purpose, required and invalid states with an error relation, and a language, on macOS, Windows, Linux and the web, or has an n/a cell with a reason. iOS follows with the iOS shell in phase 4.
  • The scene and reflow sweeps find 0 clipped, overlapping or unreachable items at 320 pt width, 200% text and pseudo-locales, outside an allowlist that only shrinks. Composited contrast has 0 failures with no allowlist, Reduce Transparency included.
  • The VoiceOver, Narrator, NVDA and Orca speech lanes and the 3 browser pairs pass every critical scenario on each of the last 14 nights, and every accessibility suite is a required check on dev. The WCAG 2.2 A and AA matrix shows no criterion failing because of Rune on desktop or web, each row names its test, and the support matrix lists only combinations whose lanes meet this bar.
T16 · kit

Kit: standard controls are missing, components bypass theme tokens and states, and streaming Markdown rebuilds the whole reply

52 issuesphases 1-311 existing issues

rune-kit lacks standard controls such as Tabs, Sheet, Stepper and date and colour pickers. Some components use raw values instead of theme tokens and miss focus rings, invalid states or keyboard paths, and each streamed Markdown token reparses and rebuilds the whole reply. Closing this theme gives apps the standard desktop controls with one build shape, theme tokens, translatable strings, complete states and keyboard paths, and content components whose cost grows with the new text, not with the whole document.

Done when

Phase 1

  • Each of these has an accessibility golden and passes the keyboard walk: the Checkbox ring draws border_focus, and the inline Select shows a ring on keyboard focus only. An indeterminate Checkbox draws a dash. Menu radio items expose menuitemradio, and H1 to H6 report their own level. Field clear and copy buttons and the sidebar row close button are reachable by keyboard. Every kit control with an error look sets invalid and draws a text or icon cue.
  • The keyboard walk runs over 100% of kit-gallery stories in T1, with any allowlist checked in.

Phase 2

  • Escape closes a plain Popover and returns focus to the trigger, and Tab from every overlay trigger reaches its open content next. Popover, Menu, Select and Dialog take the same Dismiss options, and a dismissible(false) Dialog renders without on_close.
  • A streamed token into a 200 KB Markdown reply with code, diff and Mermaid blocks costs at most the new bytes, plus the open block's last line, plus 1 KB of parse and highlight work per commit, including while a code fence, table or list grows. An open paragraph needs carried delimiter state or a recorded change to the target. Completed blocks are rebuilt 0 times unless something invalidates them, and the output is identical to a full parse and render at every commit.
  • perf/budgets/feed.toml gates in T1. A plain-text token into a 50 KB reply with on_link, images and three code fences builds only the last two blocks and parses at most 2 KB. Prose that says 'mermaid' is cached, and a 5,000-line diff fence builds at most 4 El nodes.
  • Every kit content cache (Markdown parse and stream, syntax, diff chunks and Mermaid scenes) is bounded in entries and bytes, recent entries included, and a stress test shows it.
  • 0 non-deprecated public kit APIs take &mut Vec<El>, and kit-gallery uses 0. The shape test passes with only the listed exceptions: build(self, &Kit) -> El, on_change, on_press, on_<action>, and bool setters that clear.
  • scripts/kit-tokens reports 0 findings outside an allowlist with reasons. The string inventory has 0 strings without an override. Two SplitViews in one window work independently. Equal Select labels show one checked option, and on_choose receives the id. A fixture that adds a Palette or Type token keeps a ..base theme compiling.
  • The keyboard walk has 0 failures over every kit story with an empty allowlist. No on_drag node lacks a keyboard path. Every enabled pointer target is at least 24 pt or meets the spacing exception. The token-pair contrast test has 0 failing meaningful pairs for neutral light and dark and for 32 from_palette seeds.
  • TextInput, TextArea and TextField forward on_paste. A view run with an unchanged 200 KB field copies no text, and a secure field holds exactly one copy, zeroed on drop. A typed character in a 10,000-option Combobox builds at most 40 rows and filters once.

Phase 3

  • components.toml resolves 100% of the standard desktop controls list, and each implemented entry passes its scene, its golden for each listed state and its keyboard test. Slider (#149), Tabs, Sheet, Stepper, Chips, CommandPalette, Avatar, DatePicker and ColorPicker exist. The parity lane runs without an OpenCode checkout, with at most 0.5% of pixels over 8/255 per component and state.
  • Opening a 50 KB Markdown document takes at most 6 ms and a 200 KB one at most 8 ms headless, in paired runs, and no frame is over 8.3 ms while scrolling the 200 KB document.
  • Every kit-gallery scene passes the RTL mirror gate, with directional icon goldens and arrow-key tests in tab strips, segmented controls, sliders and menus, apart from a documented list of elements that stay physical.
Phase 0Phase 1Phase 2aPhase 2bPhase 3Phase 4
05

Where the work sits

Issues per theme and milestoneDarker cells hold more issues. Milestone 2a lands the seams and the typing cliff; 2b adds certification and breadth.
ThemePhase 0Phase 1Phase 2aPhase 2bPhase 3Phase 4Total
T01 authoring1715165154
T02 merge-gate324116347
T03 platform-lanes5524943
T04 headless-verification1710361073
T05 failure-and-trust11420439
T06 runtime-core411137136
T07 commit-and-layout10311859
T08 text-engine652113348
T09 text-input7571433
T10 motion-and-scroll11151633
T11 frame-core791810751
T12 renderer11834356
T13 media1810524
T14 platform-shells76232460
T15 accessibility161913140
T16 kit9301352
Total221315029820245748
06

Critical path

Executable dependencies only, at S under 1 day, M 2-5 days, L 1-3 weeks.

07

Needed outside the code

Needed outside the code

  • Phase 0: a readiness ledger that gives each item below an owner role, a start-by phase, a proof that it is ready and a fallback, reviewed at each phase exit.
  • Phase 1: repo admin rights to turn on the merge queue, required checks, blocked direct pushes and protected environments.
  • Phase 1: a self-hosted Apple-silicon Mac that only merge-queue and push-to-dev jobs reach. Candidate code runs there as a user with no secrets and with caches split by trust level. No pull_request job reaches it, and tokens live only in hosted jobs.
  • Phase 1: a reserved 120 Hz ProMotion Mac with a 60 Hz external display and AC and battery profiles, used only by the latency lane.
  • Phase 1: larger hosted runners and caching, so T1 p50 stays at or under 15 min.
  • Start in phase 1, needed by phase 3: a Developer ID with notarization, and an Authenticode certificate or cloud signing, kept in production-only environments. Identity checks take weeks.
  • Start in phase 1, needed by phase 3: a free registry name for the core crate, because rune is taken on crates.io, and publish rights over the dependency closure (#108). Choosing early avoids renaming every app's dependency later.
  • Feasibility by the end of phase 1, delivery in phase 4: AccessKit iOS and Android adapters that carry VoiceOver and TalkBack, or Rune-owned bridges.
  • Phase 2: reserved 120-144 Hz Windows 11 and 120 Hz Linux PCs (GNOME and KDE, on Wayland and X11) on two GPU vendors.
  • Phase 2: a mid-range Android phone with Chrome and an iPhone with Safari on a device host, for the mobile web lanes.
  • Phase 2: nightly fuzzing compute sized from each target's measured rate, to reach 10 million cases per target per week in debug and in release (10 minutes a night needs about 2,400 executions per second), and crash triage within 7 days.
  • Phase 2: API access to a pinned model for Rune-Bench, and a macOS host with Xcode for its SwiftUI baseline in phase 3.
  • Phase 3: a third GPU vendor beside the phase-2 PCs, so NVIDIA, AMD and Intel are all covered, plus a hybrid-GPU laptop.
  • Phase 3: a UHD 620-class 60 Hz Windows laptop and a base M1 MacBook Air, named in the committed lane manifest.
  • Phase 3: a 120 Hz Android phone and emulator images for API 29 and the current API, for the Android spike.
  • Phase 3: an Apple Developer Program account, a ProMotion iPhone and an iPad with Apple Pencil on a device host. The iPhone perf lane needs them in phase 3, and the iOS input, accessibility and AutoFill lanes in phase 4.
  • Phase 3: a photodiode or high-speed camera rig at the reference Mac, which also gives the web an external present source.
  • Phase 3: a P3 EDR Mac display and an HDR10 Windows monitor.
  • Phase 3: speech-lane hosts with pinned versions of VoiceOver, NVDA, Narrator and Orca.
  • Book in phase 1, needed by the end of phase 3: an independent WCAG 2.2 AA audit, and human checks of Voice Control, Voice Access and Switch Control every 6 months.
  • Phase 3: wgpu HDR surfaces on DirectComposition and the web, or a Rune-owned fallback limited to HDR output, never an owned DX12 backend. DX12 swapchain access is not needed from upstream: the pinned wgpu-hal 30.0.1 exposes dx12::Surface::swap_chain() and waitable_handle() through Surface::as_hal, wgpu-types has Dx12BackendOptions::latency_waitable_object, and Rune already calls as_hal::<Dx12>() on Windows.

Out of scope

  • A serializable command channel, split-process mode or wire protocol before a Send PaintList exists. A versioned recording format comes later, for replay only.
  • A separate off-main app executor. App state, the view, commit, layout and editing stay on the main thread for every app.
  • Moving the O(N) paint walk to another thread before it is O(changed). No presenter for Glass and transaction windows, live resize or the web.
  • Any change to the public 128-byte Instance. Group ids travel in a side vertex stream.
  • Signals, Model<T>, read tracking, a view macro or El<S>.
  • #[non_exhaustive] or new pub fields on the literal-built types (AppSpec, Env, Elevation, PaletteSeed, OverlaySpec, TextStyle, RunOptions, ScrollSpec, Span, ByteFrame, SurfaceDraw, LayerSpec). New options come as builder methods.
  • Replacing TextEdit.text: String with a rope, or tying IME to a rope rewrite. The additive Document type is built only if the 10 MB trigger fires.
  • Owning Vulkan or DX12 backends, replacing Taffy or Parley, a shaped-word cache, a per-frame arena, reviving MTLBinaryArchive, or replacing the CoreGraphics-port rasterizer with OS rasterizers.
  • GPU springs as the animation path.
  • A broad split of the core crate before RuntimeCore and the T1 and T2 checks exist. Only rune-abi and rune-render split now, and a phase-4 decision settles the rest from measurements.
  • Replacing winit everywhere at once, forking it, or bumping it before the platform matrix and hook canaries exist.
  • LCD subpixel text by default without committed parity numbers. The LCD spike only measures.
  • Product services in the core crate. Single instance, notifications and the other services stay opt-in.
  • Starting the iOS shell before TextInputClient, shell::Event and the SurfaceHost frame core with its LayerHost port exist, or building Android's shell before iOS text input ships. The Android spike only measures, so it may run earlier.
  • Gating on wall-clock times on hosted runners, letting CI write goldens, weakening a check without an evidence trailer, and running self-hosted runners on pull_request events.
  • Reformatting the 597 files in one commit, and any rewrite of dev or verified history.
  • Catching panics and resuming mid-commit. A panic tears down the surface and reports.
  • A generational node arena. It stays deferred, because it targets commit fragility, not measured frame cost.

Risks

  • Phase 2 is the largest phase: about 45% of the estimated effort. Dependencies let most of its issues slip without blocking others, so the limit is capacity and integration. It runs as 2a then 2b, with one integration owner role per seam and at most one RuntimeCore field family, one SurfaceHost backing port and one text-input adapter in review at a time.
  • Capacity is unmeasured. Durations assume about 16 parallel streams and are re-forecast at the phase-1 exit from issues closed per week. The estimates leave out the reused app issues (#118, #30, #135, #149, #164, #175, #182, #195, #203) and the issues that research spikes will file. Android needs effort about the size of the iOS shell, held back from the start.
  • Dependencies alone allow the iOS path in about 7-21 weeks of serial work. Capacity, hardware procurement (the iPhone and the Apple Developer account) and soak periods set the rest, so the whole roadmap spans roughly 34-50 weeks at about 16 streams.
  • T1 throughput: past about 15 minutes, contributors route around the gate. T1 keeps to counts and headless suites on hosted runners; pixels, GUI and wall-clock work go to T2 lanes and reserved hardware.
  • The RuntimeCore split and SurfaceHost land while dev takes about 55 merged commits a day (1,642 in the 30 days to a9da7e3e). Each field family moves in its own PR after the accessors land, drop order is encoded in Backing tests, and RuneTextView stays opt-in until the macOS real-IME lane is green for 14 days.
  • Reserved hardware and its capacity decide the last steps in perf, platform, render, text, accessibility and tooling. Every-push lanes, paired perf runs, bisection and nightly jobs share a few machines, so a committed capacity model sizes batching and reserved slots before the 3 h verified lag is promised. Each machine needs an owner.
  • Upstream items can hold a target short: wgpu HDR surfaces on DirectComposition and the web, AccessKit's mobile adapters, hot-patch speed, and Apple's Writing Tools and AutoFill paths for custom views. DX12 swapchain access is not one of them; the pinned wgpu-hal exposes it.
  • Browsers give a page no present time for a canvas, so the web's input-to-present targets need an external present source or a recorded change to the target. A labelled proxy never counts.
  • Reused app issues keep their report and title, get one consolidated backlink, take new scope only as child issues, and close only when their own reproduction passes. #182 blocks the phase-1 desktop tests; #175 and #195 feed phase 1; #115-#117, #203 and #164 phase 2; #118, #30, #135 and #149 phase 3.
  • Behaviour changes reach every app at once. RUNE_PACING=present stays for a release, the exact winit and Taffy pins are marked Breaking, motion goldens are re-blessed once for the FMA change, and Frame.rt stays for one changelog fold and 30 days after state-writing compositors get a queued replacement.
  • Retained paint must stay byte-identical to build(), with a counted fallback. The presenter is built only on go from flagship workloads with no injected stall, after its eligibility contract and loom or shuttle model tests, and stays opt-in.
  • Android has only a spike, in phase 3, to file estimated work. The platform area meets its target in phase 4 only if that work is staffed and lands.
  • Soaks add calendar time: 30 days of green platform lanes and verified-branch lag, 14 nights per speech-lane combination, 14 days of the macOS real-IME lane before RuneTextView becomes the default, and three Rune-Bench folds.
  • Public-repo safety: candidate code runs on self-hosted hardware, and lanes file public issues automatically. Runners stay credential-free with caches split by trust level, promotion and filing run only from hosted jobs that read validated artifacts, reports go through one broker that publishes allowlisted fields, and recordings drop secrets, home paths and tokens.
08

Every item

R0001Docs: PLAN, rune-motion and the site say a render thread animates over a command channel, but motion and paint run on the event-loop threadP0Phase 0MT01Fix ready · #263
arch-plan-threading-model · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

PLAN.md describes two sides joined by a serializable command channel. The app side runs views, layout and handlers on the main thread. A display-link-paced render thread owns the presented tree, spring tracks, scroll physics and drag bindings, then encodes and presents. Tenet 2, the Animation row, the section 3 diagram, the gestures, traces and split-process passages and open question 2 all state this in the present tense. rune-motion repeats it in its Cargo description, README and module docs. The site's architecture page and home sections say the render thread animates and that one command channel joins the two sides. Two site passages also say Rune borrows GPUI's rope, sum tree and macOS and iOS text input code.

The code has no render thread and no command channel. A window's Host<S> holds the runtime, the GPU and the renderer on the event-loop thread. One draw there runs handlers, view, commit, layout, motion sampling, paint, encode, submit and present. catch_up_motion and step_motion step Scene, growth, scroll and flights on the thread that calls Runtime::frame_split. The only frame work that leaves it is an overlay's submit and present on macOS wgpu, which PresentWorker runs on its own thread. There is no rope: TextEdit holds a String. Only the crate README and one site paragraph state the main-thread model.

A reader of PLAN expects running animation to survive a slow handler. Today a handler that holds the main thread for 30 ms holds every running spring for 30 ms. No doc says what measurement would start presenter-thread work.

Where
Why it matters

Contributors and agents read PLAN and rune-motion before the code, and design against a thread that does not exist. The docs target is that every statement in PLAN sections 1-3 is a checked claim or is labelled Target. The motion target is that main-busy drops stay at or below 0.5% of motion frames in every flagship workload. If the rate stays above 0.5% after the named stalls are fixed, an opt-in presenter ships, and its windows drop 0 frames of running animation and momentum in a 30 ms stall.

What would help
  • Rewrite tenet 2, the Animation row, section 3 and the passages above to the current model. Views state targets. Once per frame, on the caller's thread (the main thread in a window), Rune runs commit, layout, motion sampling at the frame's target time, paint and present. Animation still never calls app code.
  • Keep the section 3 diagram, but label the SurfaceHost boundary, a Send paint list and a presenter thread as Target stages.
  • Write the gate: build the presenter only if main-busy drops stay above 0.5% of motion frames in a flagship workload after the named stalls are fixed. Link the presenter-thread decision issue. Any doc that gives 1% as the gate changes in the same PR. The 1% figure stays only as the frame-pacing ceiling for busy-main misses.
  • Answer open question 1, and mark open question 2, split-process dev mode and late-latched input as future work.
  • In rune-motion, say "once per frame, by the caller" instead of "the render thread".
  • On the site, rewrite the present-tense passages and drop the rope and text-input borrowing claims. The WEB.md WebGL line is fixed in R0007.
Done when
  • rg -n 'render thread|command channel' PLAN.md crates/rune-motion site/src returns only lines labelled Target or stated as future.
  • No site page says Rune uses a rope, a sum tree or GPUI's text input code.
  • PLAN section 3 states the 0.5% presenter gate and links the decision issue.
  • No doc in the repo gives 1% as the presenter gate.
How to check

Add a threading-model claim to R0004. Its probe is a test that records the thread that runs each frame stage in a window. Its canary is a present-tense "the render thread animates" sentence in PLAN, which the check must reject.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P0 · size M
R0002Docs: the README says Rune has no AccessKit, and the site says web accessibility is still to comeP1Phase 0ST01Fix ready · #263
a11y-docs-truth · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

Several accessibility statements contradict the code.

  • The crate README's Differences section says "No AccessKit or inspector socket". AccessKit is a default feature. Each window and overlay gets a UI Automation, NSAccessibility or AT-SPI adapter.
  • The README and the a11y module docs both name runtime/a11y. That path doesn't exist. The tree lives in crates/rune/src/a11y/tree.rs.
  • The README says that with nothing focused, a key release goes to the root. route_key_up sends it to every element with a handler, deepest first.
  • The site's Web card says accessibility is still to come, and PLAN section 13 calls accessibility mirroring follow-up work. The web build already keeps a DOM mirror above the canvas, with landmarks, links, buttons and Tab order. What's missing is rendering the full AccessKit tree into it (#118).

An app author who reads the README decides Rune can't serve screen-reader users on the desktop and may ship nothing. One who reads the site decides the web build has no accessibility at all. An agent that follows the runtime/a11y path finds nothing.

Where
Why it matters

Screen-reader users depend on app authors choosing to ship, and those authors decide from these pages. The target is that the README, site and PLAN describe current coverage and an enumerated support matrix. Every enumerated claim matches the code, and every support row names a lane that passed within 14 days.

What would help
  • Change each statement to describe the code. Fix the module path in the README and in a11y/mod.rs. Rewrite the key-release sentence to match route_key_up.
  • On the site and in PLAN section 13, say the web build has a DOM mirror for links, buttons, landmarks and Tab order, and that the full tree is #118.
  • Keep the true statements about unsupported targets. iOS has no adapter, since the feature pulls in only the Windows, macOS and Unix AccessKit crates. The web mirror is thinner than the desktop tree.
  • Add a "Support matrix" heading to the README accessibility section that links the WCAG matrix once the accessibility work publishes it. Until then it states the per-platform adapters by hand.
  • R0005 rewrites the Differences section as a whole. This issue owns the other lines, so the two PRs don't touch the same text.
Done when
  • Every statement listed above matches the code at the merge commit.
  • Every path the accessibility docs name exists.
  • iOS and the web mirror's limits are still stated as limits.
  • The README accessibility section has a support-matrix slot that names each platform's adapter.
How to check

Review against the code. Add claims to R0004. One probe checks that the accessibility feature is in the default list. Another checks that every source path named in the README's accessibility section exists. A third probe is the existing key-release routing test.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size S
R0003Examples: nothing lists the 30 examples or says what each teaches, where it runs and how to run it headlessP1Phase 0ST01Fix ready · #264
api-examples-index · docs

Fix ready: a commit that fixes this is linked from #264; it hasn't landed on dev yet.

What happens

examples/ holds 30 apps and no README. The repo README links [Examples](examples) to the bare directory. It also tells agents to start from examples/hello and the crate README, which is 2,830 lines. Nothing says which example shows run_windows, live values, overlays, virtual_rows or streaming Markdown. Nothing says which platforms each runs on, or how to run it headless. Four examples have no //! summary line at all: live-values, overlay, overlay-lab and web-hello. They start with use.

To find the example for a pattern, an author or agent has to open and read each of the 30 main.rs files. Most then copy hello, which doesn't show the fast patterns, because nothing points them elsewhere.

Where
Why it matters

An index is the cheapest way to send authors and agents to code that shows the right pattern. It is also what later checks read to pick lanes. The examples target is that 100% of discovered examples are listed in examples/README.md, compile in T1 (the per-merge check lane) and in each platform lane their index row declares, and have a sibling headless test. The tooling target is that 100% of documented headless commands in the crate README and examples/README.md have a fixture that runs in T1.

What would help
  • Add examples/README.md with one table row per example. Columns: the example, what it teaches (one line), the main APIs it shows, the platforms it supports (macOS, Windows, Linux, web, iOS), and one headless --snap or --tree command that runs as written from the repo root.
  • Group rows by what they teach: start here, lists and scrolling, motion, overlays and windows, text and Markdown, media, web. Mark labs as labs.
  • Give every example a //! summary line that matches its row.
  • Link the index from README.md:45 and README.md:57.
  • Keep the platform column in a fixed vocabulary, so the examples check in R0205 can read it to pick lanes and T1 can run each listed command.
Done when
  • examples/README.md has a row for each of the 30 examples, with a platform column and a headless command.
  • Every example's entry file starts with a //! summary.
  • README.md links the index from the agent section and the Docs line.
  • Each listed headless command was run once at the merge commit and exited 0.
How to check

In this issue, run each command in the index by hand and record the results in the PR. Later, the examples check under R0205 fails when an example has no row or no //! line, and T1 runs every listed command.

Part of
  • Theme: T01
  • Tracked in R0205
  • Phase 0 · priority P1 · size S
R0004Docs: nothing checks that the architecture claims in PLAN, the README, crate descriptions, the site and WEB.md still holdP1Phase 0MT01Proposal
arch-doc-claims-check · infra

Proposal: this sets a target or a policy, so it is left for the maintainers to decide.

What happens

No check ties a fact a doc states to the code, so the docs drift as the code moves. The crate README's Differences section still says macOS runs on wgpu, that there is no AccessKit and that scrolling is vertical only. But metal-backend and accessibility are default features, and scroll_x and scroll_xy exist. PLAN's Animation row still says a render thread owns the presented tree. rune-motion's Cargo description says the same. WEB.md says there is no WebGL fallback beside a webgl feature. scripts/file-size.sh is the one repo-shape check that runs beside the code, and it reads no docs.

Each phase-0 docs fix in this plan corrects a set of lines once. Without a check, the next backend, feature or thread change makes them false again, and nobody notices until an agent designs against them.

Where
Why it matters

The docs target is that every statement in the listed sections is a claim in docs/claims.toml or is labelled Target. It allows 0 failing claims, requires every canary to fail, and lets no claim stay pending. The tooling target is that 0 PLAN or README lines state an unbuilt capability as current.

What would help

Add scripts/doc-claims and docs/claims.toml. Each claim names:

  • a doc file and a passage pattern;
  • a probe: a cargo test that asserts the behaviour (for example, a test that records which thread runs each frame stage), a structural query (a Cargo feature is in default, a symbol exists), or a path that must exist;
  • a negative canary: a mutated passage or probe result that the script must reject.

The inventory covers every architecture statement in PLAN sections 1-3, the README Differences and Measured sections, the crate description fields, the site architecture pages and WEB.md's backend section. Passages that start with Target: are skipped. A claim that is false today lands with pending = "#N", which reports without failing. The docs fix for that issue removes the mark.

Keep probes behavioural, and keep the claim count to what those sections state, so the check doesn't fail on wording changes. Structural probes should read files and run no cargo, so the script runs in under 5 s. Behaviour probes reuse tests that T1 (the per-merge check lane) already runs, and the script reads their results. Call it from scripts/file-size.sh, which the docs already tell contributors to run.

Done when
  • Every statement in the listed sections is a claim or is labelled Target.
  • Each claim has a probe and a canary, and every canary fails as expected in a self-test.
  • scripts/doc-claims runs in under 5 s and is called from scripts/file-size.sh.
  • Every claim marked pending names an open issue.
  • 0 claims stay pending after their phase-0 docs issue closes.
How to check

The script's canary self-test runs on every call. scripts/file-size.sh runs it, so it runs wherever the size check runs and in T1. A PR that removes a pending mark without fixing the passage fails.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size M
R0005README: 'Differences from PLAN.md' says macOS runs on wgpu with no AccessKit, glass or horizontal scrolling, and 'Measured' has no rev, backend or dateP1Phase 0MT01Fix ready · #263
arch-readme-differences · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

The crate README's "Differences from PLAN.md" section is mostly false at this commit:

  • It says macOS runs on wgpu's Metal backend. Rune's own Metal backend (metal-backend) is a default feature.
  • It says there are no glass underlays. SystemMaterial::Glass draws NSGlassEffectView on macOS 26.
  • It says there is one pipeline with three fragment paths. The uber-quad has 14 instance kinds.
  • It says there is no AccessKit and scrolling is vertical only. accessibility is a default feature, and scroll_x and scroll_xy exist.

The "Measured" section gives a 10.9 MB binary (9.3 MB stripped) and a settings bench at 0.13 ms mean and 0.29 ms p95 frame CPU. It names no date, rev, backend or machine, and it predates the native backend. Nothing can reproduce it.

Nearby lines are stale too. The crate doc in lib.rs still calls Rune a "first slice" with a wgpu renderer. tok::Theme says its alphas are for linear-light blending, but windows blend in sRGB by default. "Launching fast" tells apps to call rune::prewarm_gpu() first in main, and no example does.

Where
Why it matters

Agents read this section to learn where Rune departs from PLAN, and today it steers them away from features Rune has. The docs target is that every Measured number has a date, rev, backend and machine. The perf target is that each published number records rev, backend, device and date. The examples target is that every section in docs/status-sections.txt names a rev from the current fold. The tooling target is that Measured sections are refreshed by a monthly job.

What would help
  • Rewrite Differences to list only true divergences: main-thread animation, winit shells, path identity with an #index fallback for unkeyed children, and no typed models.
  • Add scripts/measure-readme. It builds with --profile perf, runs the settings bench and the binary-size measurement, and writes Measured with the rev, date, backend and machine. Rows from PLAN section 8 that nothing measures yet are listed as unmeasured.
  • A monthly scheduled job reruns it on the reserved Mac and opens a PR when a number moves.
  • Fix the lib.rs crate doc and the tok::Theme comment. Either call prewarm_gpu() in hello and settings, or reword the advice to say when it helps.
  • Add docs/status-sections.txt, which lists each status section and needs a Last checked at <rev> line in it. scripts/changelog-fold fails when a listed rev is older than the last fold. research/ and CHANGELOG.md are excluded.
Done when
  • Every Differences bullet is true at the merge commit.
  • Every Measured number names its rev, date, backend and machine, and scripts/measure-readme reproduces it.
  • Unmeasured PLAN section 8 rows are listed as unmeasured.
  • The lib.rs crate doc, the tok::Theme comment and the prewarm_gpu advice match the code.
  • The fold fails on a status section whose rev is older than the last fold.
How to check

Claims in R0004 probe the AccessKit and Metal defaults, horizontal scroll and the glass material. The fold-time status check runs in scripts/changelog-fold, and the monthly job keeps Measured current.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size M
R0006Docs: the README and PLAN describe virtual rows, scrolling and the layout pass differently from the code, and memo's example teaches virtualizeP1Phase 0ST01Fix ready · #263
layout-docs-match-code · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

The crate README and PLAN describe lists, scrolling and layout in ways the code doesn't match.

  • The README says virtual rows need internal padding rather than stack gaps. VirtualList::set_gap supports gaps.
  • It says view construction still visits every row and that a lazy view API is a remaining optimization. El::virtual_rows is that lazy API: it builds only mounted rows.
  • It says render coordinates are rebased near the window. The only rebasing is the scroll glide, which samples displacement rather than the absolute offset. Node positions stay f32.
  • PLAN says huge lists use a sum tree of row heights. The code keeps a flat prefix-sum Vec<f32>.
  • PLAN says Taffy runs over Rune's node arena, "so there's one tree, not two", and that layout runs once. rune-taffy's LayoutEngine keeps its own slot store beside the runtime's Vec<Node>, and a commit can solve more than once, with retry and settle passes.
  • The main memo rustdoc example builds .virtualize(72.0).children(..) over every message, in an ignore fence. The virtualize docs tell apps to use virtual_rows instead, because virtualize builds every row on every commit.

Agents copy rustdoc and README examples. The memo example teaches the pattern that builds 1,000 rows to show 20. The lazy-API line tells them the fast pattern doesn't exist.

Where
Why it matters

Authors who follow these docs write lists that do work proportional to the list, not the viewport. The list target is that a 1M-row list scrolls at CPU p95 at or below 1 ms with fixed heights and 2 ms with variable ones, with at most 200 realized rows. The elision target is that in a 1,000-row virtual_rows feed a composer keystroke runs the view at most once and builds at most 5% of mounted nodes. The docs target is 0 ignore fences and 0 uncompiled Rust blocks.

What would help
  • Rewrite README lines 329-335 to describe virtual_rows as the default and virtualize as the short-list path. Say gaps work. Drop the lazy-API and rebasing sentences, or say what is rebased today.
  • Rewrite PLAN 4.7 and the Layout row to state what is current: a prefix-sum height index, a separate rune-taffy slot store, and one to three solves per commit. Link the planned issues for a height index, f64 positions and bounded passes as Target.
  • Rewrite the memo example as virtual_rows with one memo per row, keyed by message id. Compile it as a no_run doctest.
  • The vertical-only scrolling line is in the Differences section, which R0005 rewrites.
Done when
  • Every sentence listed above matches the code at the merge commit.
  • The memo example uses El::virtual_rows and compiles as a no_run doctest.
  • PLAN 4.7 labels the sum tree, one tree and one pass as Target and links their issues.
How to check

The doctest compiles in cargo test -p rune --doc, which T1 (the per-merge check lane) runs. Claims in R0004 cover PLAN 4.7, so a future change to the height index has to update the passage.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size S
R0007Docs: platform, web and media support statements contradict the codeP1Phase 0ST01Fix ready · #263
platform-docs-truth · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

Several docs describe platform and media support that has changed, and apps and agents plan against them.

  • The crate README says interactive Wayland overlays and per-monitor placement are unsupported. The layer-shell surface binds a seat for pointer and on-demand keys, and overlays take a DisplayId for any monitor. It also says Windows overlays are checked only with cargo xwin clippy.
  • The image docs say decoding runs on one worker. ImageCache::new starts up to 4 decoder threads. image.rs uses a .webp path as its example, but the image crate is built with png and jpeg only.
  • WEB.md says the web target has no WebGL fallback. A webgl feature exists, but it doesn't compile on wasm32 (#115), never runs when navigator.gpu has no adapter (#116), and draws washed-out colours (#117). So neither "none" nor "supported" is true.
  • WEB.md tells apps to disable a dev feature that Rune doesn't have. It says web bundles Inter Regular and IBM Plex Mono Regular. The embedded-fonts comment says Inter Regular, Medium and SemiBold, plus IBM Plex Mono.
  • PLAN's Shells row says Rune moves to its own shells as soon as text input lands. PLAN section 13 and WEB.md describe a different staged path.
  • The repo README lists four platforms. The public page lists five, with iOS "embedded in UIKit or SwiftUI".
Where
Why it matters

An author choosing Rune for a Linux overlay, a web app or WebP images decides from these lines. The desktop target is that every platform claim in the docs comes from a checked registry, and every generated table matches it. The web target is that the web build is a first-class target in every browser engine. The media target is that Player, Recorder and images work on every platform.

What would help

In one PR, correct each statement to what the code does today:

  • Describe Wayland overlay input and per-monitor placement as they work. Keep the macOS non-key panel hover limit if it still holds. Say how Windows overlays are checked.
  • Fix the worker count, and either enable WebP or drop the .webp example and claims.
  • In WEB.md, describe webgl as present, opt-in and not working yet, linking #115, #116 and #117. Remove the dev feature line and fix the font list.
  • Rewrite PLAN's Shells row and section 13 as a staged path, each stage with its gate. The stages are a text-input protocol with per-OS adapters, a shared SurfaceHost, owned macOS panels and windows, an iOS UIKit adapter, and a web adapter without winit. State iOS as embedding plus a planned shell, and Android as M7, not started.
  • Make README.md and the public page list the same platforms with the same maturity words.

Leave the video-tiles rotation note alone, because apps still can't push rotated frames.

Done when
  • Every statement listed above matches the code or is removed.
  • WEB.md's WebGL line links #115, #116 and #117.
  • PLAN's Shells row and section 13 name each stage and its gate.
  • README.md and the public page list the same five platforms with the same maturity words.
How to check

Review against the code. Claims in R0004 probe the webgl feature, the decoder count and the image formats. Later, the platform capability registry generates these tables, and a test keeps them in sync.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size S
R0008Docs: the README and PLAN describe a renderer Rune no longer hasP1Phase 0ST01Fix ready · #263
render-docs-drift · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

The renderer docs contradict the code in several places.

  • The crate README says the renderer is one pipeline and one draw call per frame, and Measured says 174 instances "drawn in one draw call". Layers, effects and backdrop blur add passes when a frame needs them.
  • The README says effect, lighting and blur shaders and iOS aren't precompiled. builtin_native.metallib precompiles Rune's, rune-fx's and rune-light's own pipelines for macOS, iOS and the iOS simulator.
  • PLAN's GPU row and section 4.2 say wgpu first, with raw Metal later through wgpu-hal escape hatches. Rune's own Metal backend is the macOS default.
  • PLAN 4.3 describes six primitives, a GPU clip table, Slug, sparse strips, linear-light blending, dithering everywhere and dirty-rect scissoring. It doesn't say which exist.
  • The shader.wgsl header lists kinds 0 to 11 and says output is linear by default. render.rs defines 14 kinds, adding KIND_EFFECT (12) and KIND_BACKDROP_BLUR (13), and windows blend in sRGB by default.
  • pin_contents_top_left says wgpu's reconfigures keep the sRGB tag.
  • rune-light's README says the field distance clamp is 128 px, but field.wgsl uses 256. Its Output paragraph says a non-sRGB target gets a manual sRGB encode, but float targets stay linear.
  • RUNE_DISABLE_DXBC, WGPU_ADAPTER_NAME and WGPU_POWER_PREF change rendering, and the README documents none of them.
Where
Why it matters

Agents and contributors read these docs before changing the renderer, and they reason from a pipeline that is gone. The rendering target is that every RUNE_ and WGPU_ variable read by rendering code is documented. The tooling target is that 0 PLAN or README lines state an unbuilt capability as current.

What would help
  • Rewrite the README renderer entry to describe the code: a 128-byte instance with 14 kinds, inline clips, offscreen layers only when needed, the native Metal default, sRGB-encoded blending by default and precompiled built-ins.
  • Update PLAN's GPU row and 4.2 to say the native backend shipped. In 4.3, mark each item as done, planned with its issue, or not started.
  • Fix the shader header, the pin_contents_top_left comment and the two rune-light paragraphs.
  • Document the three variables next to RUNE_GPU_BACKEND.
  • Add two tests. One checks that the shader.wgsl header names every KIND_* constant in render.rs. The other checks that every RUNE_ or WGPU_ variable read in render, gpu, window and overlay code appears in the crate README.
Done when
  • Each statement listed above matches the code at the merge commit.
  • PLAN 4.3 gives a status for each item.
  • The shader-header test fails when a kind is added without a header line.
  • The env-var test fails when an undocumented rendering variable is read.
How to check

Both tests run in cargo test -p rune, which T1 (the per-merge check lane) runs. Claims in R0004 cover PLAN 4.2 and 4.3.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size S
R0009Docs: PLAN 4.5 and 4.6 describe a rope, native IME protocols and Slug text, and FontSmoothing says Off draws coverage as isP1Phase 0ST01Fix ready · #263
text-plan-docs · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

PLAN 4.6 and the stack table say text editing uses Zed's sum_tree and rope. They say each platform's own text protocol is implemented directly (NSTextInputClient, UITextInput, TSF, text-input-v3), and that winit's IME is rejected. In the code, TextEdit holds a String. IME arrives through winit's WindowEvent::Ime, the web build uses a textarea bridge, and iOS has no text input.

PLAN 4.5 promises 4× horizontal subpixel positioning, kitlangton/gpui luminance dilation, Slug outlines under scale animation and a soft fade by default, "never an ellipsis". The code floors pens to CoreGraphics' subpixel steps and applies its ppem-dependent dilation. It rasterizes through DirectWrite on Windows, keeps quarter-octave raster buckets, and supports ellipsis truncation beside fade.

The FontSmoothing docs say the pipeline "draws coverage as is", and that Off matches -webkit-font-smoothing: antialiased. But coverage_exponent applies TEXT_GAMMA (1.12 to 0.45 by luminance) whenever smoothing isn't On and isn't DirectWrite on Windows. That covers Linux, the web, iOS and macOS Off. The gamma was fitted to Chromium. research/23-text-quality.md still describes the calibrated rasterizer that the CoreGraphics port removed.

Where
Why it matters

Agents plan text work against PLAN. They propose rope-based fixes to a String editor, or assume IME works in overlays and on iOS. The input-method target is that every supported input method talks to a Rune-owned document protocol, with 100% of the scenarios that apply to each adapter passing headless. The editing target is keystroke p95 at or below 2 ms at 50 KB and 4 ms at 1 MB. The glyph target is ink ratio 0.97-1.03 against the platform reference, with flight and rest using the same coverage exponent. Wrong docs about the exponent make that last one hard to reason about.

What would help
  • Rewrite the stack table rows and PLAN 4.5 and 4.6 to state what is current: TextEdit on a String, winit IME, CoreGraphics-matched rasterizing and DirectWrite on Windows, quarter-octave buckets, ellipsis and fade. Label as Target, with the issue linked, the text-input protocol with per-OS adapters, per-platform raster profiles and any large-document storage.
  • Rewrite the FontSmoothing rustdoc to say where TEXT_GAMMA applies (Linux, the web, iOS and macOS Off) and why. Point at coverage_exponent.
  • Put a dated note at the top of research/23 that says it is superseded and names the CoreGraphics port and the DirectWrite path.
Done when
  • No PLAN line states the rope, native IME protocols or Slug text as current.
  • Each planned text item in PLAN links its issue.
  • The FontSmoothing docs match coverage_exponent on every platform.
  • research/23 opens with a dated note naming what replaced it.
How to check

rg -n 'sum_tree|rope|Slug' PLAN.md returns only Target lines. Claims in R0004 cover the stack table rows. A unit test pins coverage_exponent to 1.0 for On and to the gamma for Off, so the docs and code can't drift apart silently.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size S
R0010Docs: no page says which input methods and text services work on which platformP1Phase 0ST01Fix ready · #263
text-platform-docs · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

The crate README says text input gets "IME preedit through winit", and that an app-drawn editor gets the input method through .ime_cursor() and App::on_ime. It doesn't say what that means on each platform. On Windows, winit 0.30 uses IMM32, not TSF. On X11 it uses XIM. Overlays get no IME at all: only window hosts route WindowEvent::Ime into the runtime. iOS has no text input. The web uses a sliding textarea, and EditContext is not used. No page says which text services (spell check, dictation, emoji picker, autofill, Look Up, Writing Tools, the edit menu, text drag and drop) a Rune field offers on each platform.

App authors find these limits from user reports, after a Japanese user can't type in an overlay or a Windows user's IME candidate window is misplaced.

Where
Why it matters

An author choosing Rune for a chat app or an editor needs to know which users can type before they ship. The input-method target lists the adapters that must pass: macOS, Windows TSF, Wayland text-input-v3, X11, web textarea and EditContext, iOS UITextInput, overlays and app-drawn editors. The services target is that Rune fields offer each service in a fixed matrix wherever the platform's native field offers it, with 100% of cells filled. The only allowed limits are named: the web has no spelling, Look Up or Writing Tools API for custom-drawn text, and Linux has no Writing Tools or Look Up.

What would help
  • Publish a "Text input" page on the docs site with two matrices by platform: one for input methods and one for text services, with rows as in the targets above.
  • In this issue, write the cells by hand from the code today, each checked against a code path. For example: Windows IMM32 through winit, X11 XIM, no IME in overlays, no text input on iOS, web textarea without EditContext. Each limit links its issue.
  • Point the README's text-input section and WEB.md's browser-input section to the page.
  • Later, as the text-input tests land, a generator replaces the hand-written cells. A cell reads "works" only if a test or lane run that names it passed, with the OS and IME versions recorded. A skipped or failing test never marks a cell "works".
Done when
  • The Text input page is published, with every current limit named and linked to an issue.
  • The README and WEB.md link the page.
  • Every hand-written cell cites the code path it was checked against in the PR.
  • Once the generator lands, every "works" cell links a passing test or lane run with its versions.
How to check

In phase 0, review each cell against the code. Claims in R0004 probe the overlay and iOS limits, so wiring IME into overlays makes the check ask for a page update. When the generator lands, a T1 test feeds it a skipped and a failing result and asserts neither cell reads "works".

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size S
R0011PLAN: some lines state hot-reload layers, measured numbers and CI gates as current when the code has none of themP1Phase 0ST01Fix ready · #263
tooling-plan-status · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

Some PLAN lines describe the present where the code has nothing yet.

  • Section 5 says the 300 ms edit-to-pixels goal is "reachable for tokens, literals and shaders" today, and that structural Rust edits "measure about a second". Rune has no token-file watcher, no live-literal channel and no runtime shader rebuild. The crate README measures a median save-to-GPU time of about 8 s for Settings.
  • The hot-reload table gives layer 3 as "measured ~1 s (989 ms median, S1)". The stack table's Hot reload row and the section 8 Reload row repeat "≈ 1 s measured". That number is from a spike on a plain binary, not Rune's loop.
  • Section 5 says each reload is applied atomically and acknowledged by its first presented frame id. Nothing does that today.
  • Section 6c lists exact CI gates: gungraun instruction counts, allocation counts, shuttle and Miri on every PR. The only workflows deploy the site and www. rune-ref has a gungraun bench that no CI job runs.
  • Section 8 says CI runs deterministic correctness on every change.
  • M1 is marked "now" and lists an inspector. The README says there is no inspector socket.

The guarantees table in 6b and the hot-reload layers carry no status, so readers can't tell goals from shipped features.

Where
Why it matters

Agents read PLAN to learn what Rune can do, and these lines tell them a 1 s reload loop and CI gates exist. The tooling target is that 0 PLAN or README lines state an unbuilt capability as current, and that save-to-first-new-frame p95 is at most 1 s. The docs target is that every statement in PLAN sections 1-3 is a checked claim or labelled Target.

What would help
  • Change each line above to state the goal as a goal and today's number as today's number. For example: "structural edits on the Mac: goal 300 ms, measured about 8 s median for Settings at <rev>".
  • Add a Status column (done, partial, or planned with its issue) to the 6b guarantees table and the section 5 layers table.
  • Mark the 6c CI gates as planned, and link the issue that adds each lane.
  • Change M1's "now" list to name only what exists, or mark each item.
Done when
  • No PLAN line states an unbuilt gate, layer or measurement as current.
  • Every guarantee row and hot-reload layer has a status, and every planned one links an issue.
  • The reload numbers in PLAN name their rev and match the crate README.
How to check

Review in the PR. Add claims to R0004 for the hot-reload and CI-gate lines, with a probe that the named workflow or bench job exists. Each tracking issue that ships a layer or gate updates its Status cell when it closes.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size S
R0012Docs: no page lists each target with its threshold, reference hardware, owning issues and the lane that proves itP1Phase 0ST01Proposal
tooling-scorecard · docs

Proposal: this sets a target or a policy, so it is left for the maintainers to decide.

What happens

Rune's issues quote targets as numbers: frame-pacing rates, typing latency, list scroll cost, edit-loop latency. PLAN section 8 lists some performance targets. But no public page gathers every target with its threshold, the hardware it is measured on, the issues that deliver it and the lane that proves it. So two issues can quote different numbers for the same thing, and nobody notices. Three such conflicts exist today:

  • Typing at 50 KB. The text-editing target and the phase-2 exit give keystroke p95 at or below 2 ms. The typing target gives 1 ms.
  • Frame time. One scroll exit closes at 8.3 ms p95 frame time. The frame-time target asks for 4 ms.
  • Instance kinds. One tooling target counts 13 uber-quad instance kinds. render.rs defines 14, the last being KIND_BACKDROP_BLUR = 13.0.

Some phase exits also promised results before the lane that proves them exists, such as iOS checks before the iOS adapter.

Where
Why it matters

A contributor who closes an issue against the weaker number thinks the target is met when it isn't. The perf target is that every criterion is checked continuously: 100% of rows are enforced or marked failing with an open issue, and each published number records rev, backend, device and date. The docs target is 0 failing claims. The tooling target is that 0 PLAN or README lines state an unbuilt capability as current.

What would help

Publish docs/targets.md and link it from PLAN section 8. One row per target clause, with:

  • the threshold, in words and numbers, with units;
  • the reference hardware and backend;
  • the issues that deliver it;
  • the lane that proves it, and how often it runs;
  • the phase whose lane proves that clause, so no clause sits in a phase before its lane exists;
  • any interim exit, marked Interim, with the final number beside it.

Where two numbers conflict, the stricter one governs, and the table records the ruling:

  • Typing: 1 ms p95 at 50 KB governs. The 2 ms phase-2 exit is labelled interim and is enforced on the reserved-Mac lane, since a count budget in T1 (the per-merge check lane) can't prove a p95. A planned issue owns the 1 ms target in phase 3.
  • Frame time: 4 ms p95 governs. The 8.3 ms exit is labelled interim. A planned issue owns the 4 ms target in phase 4.
  • Instance kinds: 14, from render.rs.
Done when
  • docs/targets.md has a row for every target an open issue quotes.
  • Each row names its hardware, owning issues, lane and phase.
  • The three conflicts above are recorded with the governing number, and interim exits are labelled.
  • A phase-exit summary names the rows that passed and the lane run that showed it.
How to check

Claims in R0004 check that every issue number in the table resolves and every named lane exists. A canary row with a missing lane must fail. The table is updated when a target's owning issue closes.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P1 · size S
R0013Kit: the README says Rune blends in linear light, Button has 3 sizes and Mermaid draws 3 diagram typesP2Phase 0ST01Fix ready · #263
api-kit-readme-drift · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

The rune-kit README and nearby docs disagree with the code.

  • It says Rune blends in linear light. Windows blend in sRGB-encoded space by default.
  • It lists Button as "10 variants × 3 sizes". ControlSize has five sizes, Mini to ExtraLarge.
  • It says scrollbars are not drawn. ScrollBar exists.
  • It says popover and select opening autofocus is "still separate". Select now autofocuses. Popover still doesn't.
  • It says disabled controls use per-layer opacity, "so text over a dimmed fill is slightly lighter". Since #208, disabled controls fade as one layer, as CSS opacity does.
  • motion.disclosure is documented as the spring for accordion and collapsible. Neither reads it. Only the shell's sidebar and pane do.
  • The kit README, AGENTS.md, rune-mermaid's Cargo description and the mermaid feature comment all say Mermaid draws flowcharts, sequence and state diagrams. rune-mermaid parses 17 diagram types, from class and ER diagrams to gantt, sankey and C4. The README also says Mermaid layout runs once per source and is cached. While a fence is still open, a streaming diagram draws from its complete lines and lays out again as each line arrives.
  • research/25 says the highlight cache keeps the last 32 blocks, has 8 token kinds and lives under markdown. The code has a 4 MiB byte budget, 11 kinds and an always-on syntax module. research/33 cites markdown.rs lines that no longer exist.
Where
Why it matters

Agents pick components from this README. They skip Mermaid for a gantt chart Rune can draw, or build their own scrollbar. The kit target is that components read only theme tokens and that every manifest component matches its reference look. The docs target is 0 stale statements in crate READMEs. The streaming-content target is that kit Markdown with code and Mermaid blocks costs work proportional to the new text. Docs that describe layout as once per source hide where that cost goes.

What would help
  • Fix each README line to match the code, and list the 17 Mermaid diagram types, or link rune-mermaid's crate docs.
  • Update AGENTS.md, rune-mermaid's description and the feature comment the same way.
  • Either make Accordion and Collapsible use motion.disclosure, or change its doc to name the shell sidebar and pane. Recommended: use it, so disclosure motion is one token.
  • Add dated notes to the stale research/25 and research/33 passages. Don't rewrite the history.
Done when
  • Each listed line matches the code at the merge commit.
  • No doc says Mermaid draws 3 diagram types.
  • motion.disclosure is read by every component its doc names.
  • research/25 and research/33 carry dated notes, and research/33's citations resolve.
How to check

Review against the code. Later, the kit manifest generates the component list. Claims in R0004 probe the Mermaid type count against rune-mermaid's dispatch.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P2 · size S
R0014Docs: there is no architecture map of crates, subsystems, threads and seamsP2Phase 0ST01Fix ready · #264
arch-architecture-map · docs

Fix ready: a commit that fixes this is linked from #264; it hasn't landed on dev yet.

What happens

Rune has no short document that says how it is put together. The crate README is a 2,830-line feature guide. PLAN.md is direction, and parts of it describe a render thread that doesn't exist. AGENTS.md lists the crates in one line each. To learn which subsystem owns which state, a contributor reads Runtime, a struct with about 250 fields on lines 366-801 of runtime.rs. To learn which thread runs what, they grep for about 40 std::thread spawn sites. To learn where the host boundary is, they read Host<S> in window.rs. To learn which of the 61 thread_local! statics are per-thread caches and which are process state, they read each one.

Every change to the runtime starts with this archaeology, and two contributors can each add the same state to different places.

Where
Why it matters

Contributors and agents need a map to put new state in its owning subsystem. Without one, the Runtime field count keeps growing. The docs target is that ARCHITECTURE.md exists and that its owner and thread tables are probe-checked, with 0 failing claims.

What would help

Add ARCHITECTURE.md at the repo root, under 300 lines, in the style of rust-analyzer's. It covers:

  • the crate graph;
  • the frame lifecycle from OS event to present, naming the function for each stage;
  • a thread table: each thread's name, what runs on it, and its spawn site;
  • a subsystem owner table: each struct and the field family it owns, updated as the runtime is split into subsystems;
  • the host boundary (Host<S>, overlays, embedding) and the instance ABI;
  • the thread_local! classification;
  • the invariants the commit relies on, such as Measurement and Measured, moved stubs and frame-phase order.

Link it from AGENTS.md's Layout section. Write it against the current main-thread model that R0001 puts into PLAN.

Done when
  • ARCHITECTURE.md exists, is linked from AGENTS.md and is under 300 lines.
  • Every path it names exists.
  • Each owner-table row's struct declares the fields its row names.
  • The thread table lists every non-test std::thread spawn site in crates/rune/src.
How to check

Claims in R0004 check every path, every owner row against its struct, and the thread table against std::thread::spawn and Builder::spawn sites outside tests. Adding a thread or moving a field family without updating the map fails the check. Each PR that splits out a runtime subsystem or adds a SurfaceHost updates the owner table.

Depends on
Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P2 · size S
R0015Docs: no page lists where Rune's layout differs from CSS flexboxP2Phase 0ST01Fix ready · #264
layout-docs-css-deviations · docs

Fix ready: a commit that fixes this is linked from #264; it hasn't landed on dev yet.

What happens

Rune lays out with Taffy, but its element defaults and several builder rewrites differ from CSS, and no doc lists them. Every element starts as display: flex, position: relative and flex-shrink: 0. CSS starts from display: block, position: static and flex-shrink: 1. An author or agent who writes CSS-shaped layout expects a row's children to shrink, and gets overflow instead.

The Layout entry in the crate README lists three gotchas: .grow(g) is flex: g 1 0, flex items keep a content-sized minimum, and .virtualize(..) needs a growth stack. It does not mention the flex-shrink default or these rewrites:

  • Children of a horizontal scroll viewport get max-content widths and flex-shrink: 0. In a vertical stack they also get align-self: flex-start.
  • Text widths round up to whole device pixels.
  • A scroll viewport splits into a sized column wrapper, which keeps the overflow, and an inner box that fills it with flex: 1 1 auto and a zero minimum size.
  • The --html export starts every element from its own base rule, which adds min-width: 0. The live base has no such minimum, so the static first frame and the live frame can start from different defaults.
  • calc() lengths resolve to 0, and no builder makes one.
Where
Why it matters

Agents and people write layout from CSS habits, and each undocumented default costs a debugging round: a row that overflows, a scroll child that doesn't wrap. The web handoff from the static first frame to the live app can shift when the two bases differ. The target is that "Flex and grid results match a browser's for every layout builder Rune exposes, and every deliberate difference is documented": every element in a generated corpus of at least 500 trees lands within 0.01 pt of a browser or is covered by a listed deviation, with at most 10 deviation classes. The parity harness can only allowlist a difference against a list that exists.

What would help

Add a "Layout and CSS" section to crates/rune/README.md, and render the same list on the docs site:

1. The base defaults: display, position, flex-shrink, with the CSS default beside each. 2. Each rewrite a public builder reaches: what Rune does, why, and the nearest CSS. 3. Each difference between the export's base rule and the live base. For min-width: 0, either list it or make the export match the live base. Listing it now is the smaller change; whether to change the code is for the CSS parity work to decide with numbers. 4. A short "not supported" list for Taffy features no builder reaches, such as calc().

Once the CSS parity harness lands, each entry names the allowlist case that covers it.

Done when
  • The base defaults and every rewrite in flatten.rs and rune-taffy's setters that a public builder reaches are listed, each with what, why and the nearest CSS.
  • Every difference between the export base rule and the live base is listed, or removed in code.
  • The docs site renders the same list.
  • Once the parity harness exists, each entry links its allowlist case, and there are at most 10 entries.
How to check

Review the list against rune_base, flatten.rs, setters.rs and page.rs. When the CSS parity harness lands, a check in its script keeps the allowlist and this list the same set, so a new deviation fails until it is documented.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P2 · size S
R0016PLAN: the Mac idle-memory target is RSS, which counts shared fonts and frameworks, and Windows and Linux have no targetP2Phase 0ST01Proposal
perf-memory-target-footprint · docs

Proposal: this sets a target or a policy, so it is left for the maintainers to decide.

What happens

PLAN's performance table sets idle memory as "Mac ≤ 50 MiB RSS, iPhone ≤ 40 MiB footprint". RSS is the wrong metric for a budget. It counts shared, mapped fonts and system frameworks that the app does not own, so it can't be compared with a native app and it moves with what else is loaded.

The paired measurements in research/34 show the gap. hello, idle after 5 s on an M2 Max, measured 92.5 MB RSS and 33 MB phys_footprint on the Metal backend, and 95.1 MB RSS and 34 MB footprint on wgpu. By the RSS target hello fails by almost 2x. By footprint it is close to a native app. The iPhone row already uses footprint.

Windows and Linux have no memory target at all. The README's memory numbers name no metric either: "77 MB to 70 MB" for an idle settings window gives no metric, window size or backend. procwatch reads footprint on macOS only and returns nothing elsewhere, so there is no probe for the other desktops yet.

Where
Why it matters

A target that hello already misses by 2x for reasons the app can't control guides no work. A footprint target tracks what the app allocates: its pools, caches and drawables. The goal is that "memory footprint is bounded, attributed, stable, and given back at rest and under pressure", with "Mac hello ≤ 30 MiB footprint (a new target replacing PLAN's 50 MiB RSS); iPhone ≤ 40 MiB; Windows and Linux hello within 1.2x of a native hello on the same machine". Without a stated target, a desktop regression of 20 MB has nothing to fail against.

What would help
  • Replace the Mac row with: hello ≤ 30 MiB settled phys_footprint.
  • Add Windows (private working set) and Linux (PSS) rows: hello within 1.2x of a native hello on the same machine.
  • Pin the workload next to the targets: window size, backend, scale, and how long after launch the number is settled.
  • Name the metric beside every memory number in PLAN and the crate README, and fix the "77 MB to 70 MB" line.
  • Mark the Windows and Linux rows unmeasured until a probe reads them.
Done when
  • PLAN section 8 states a footprint target per platform, the workload and the probe for each.
  • The Mac row reads hello ≤ 30 MiB settled phys_footprint.
  • Windows and Linux rows exist, stated as 1.2x a native hello, and are marked unmeasured until measured.
  • Every memory number in PLAN and crates/rune/README.md names its metric.
How to check

Review against research/34's table. When the doc-claims check lands, add a claim that fails if PLAN's idle-memory row names RSS or a memory number in the README has no metric.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P2 · size S
R0017Crates: rune's crate doc calls it a 'first slice', and rune-register doesn't say who uses itP3Phase 0ST01Fix ready · #263
arch-crate-descriptions · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

The first line of rune's crate docs, the line docs.rs and cargo doc show first, still reads "Rune, first slice". It lists what the first slice had: a keyed tree, Taffy, springs, an instanced wgpu renderer, input, scroll and growth stacks, themes and headless tooling. It says nothing about what the crate is now, such as windows, overlays, accessibility, the Metal backend that is on by default, or the web target. crates/rune/Cargo.toml has no description at all.

rune-register is a workspace member that nothing in the workspace depends on. The changelog calls it opt-in, and its description says what it does. Neither its description nor any README says who it is for: apps, the playground, kit-gallery or a later Rune feature. It has no README, and AGENTS.md's crate list leaves it out. A reader can't tell whether it is supported API or an experiment.

The rune-motion description ("driven by a render thread") is wrong too. That fix lands with the threading rewrite of the docs, so this issue leaves it alone. The stray pack.new file at the repo root and a check against such files go with the ratchet clean-up work.

Where
Why it matters

The crate doc is the first text an agent reads from cargo doc or docs.rs. A "first slice" framing tells it that the crate is an early prototype and lists features from that time. A crate with no stated users gets either copied into apps without support or ignored. The target is that "the architecture docs and the changelog tell agents and apps the truth, and checks keep them true", with every statement in the listed sections a checked claim or labelled Target. It also asks that crate shape be deliberate and enforced, and an unexplained crate isn't.

What would help
  • Rewrite the crate doc in crates/rune/src/lib.rs. One paragraph says what Rune is and what this crate holds (layout, runtime, renderer, windows, overlays, dev tooling, as AGENTS.md puts it). Link the crate README for the guide. List no feature as current unless it is built.
  • Add a description to crates/rune/Cargo.toml that says the same in one line.
  • Give rune-register a description and a short README that name its intended users and say whether apps may depend on it. Add it to the crate list in AGENTS.md. If it should go instead, remove it in a separate change with a changelog fragment.
Done when
  • rune's crate doc no longer says "first slice" and states only built capabilities as current.
  • crates/rune/Cargo.toml has a description.
  • rune-register's description and README name who uses it, and AGENTS.md lists it.
How to check

Review against the crate list in AGENTS.md. When the doc-claims check lands, it covers crate descriptions and the crate doc's first paragraph, so a later rewrite that brings back an unbuilt capability fails.

Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 0 · priority P3 · size S
R0018Kit: the documented test command fails on dev, with seven rune-kit test targets red since #190 and #208P0Phase 0MT02Fix ready · #260
tooling-kit-tests-red · bug

Fix ready: a commit that fixes this is linked from #260; it hasn't landed on dev yet.

What happens

At this commit, the test command in AGENTS.md, run as cargo test -p rune -p rune-kit --features rune-kit/markdown --no-fail-fast, exits 101. Seven rune-kit test targets fail: the lib, disabled, markdown, markdown_blocks_and_highlights, markdown_find, markdown_select and text_input_press.

Five Markdown failures date from #190 (1571ad57):

  • While a reply streams, an open link or image span shows text that the finished parse doesn't start with.
  • The first table column is 49.42 pt wide, but its text plus 10 pt of padding measures 50 pt.
  • Autolinks miss two URLs: the one in a link destination and the one in angle brackets.
  • Find matches nothing in image alt text.
  • A drag over a streamed message selects Secon, not Second .

Two failures date from #208 (a9da7e3e), which made disabled controls fade as one layer. disabled.rs still asserts that disabled styling adds no layer scope. text_input_press.rs still expects the disabled field's glyph alpha to be 0.5.

While dev is red, a new failure is hard to see, and no required check can start from this baseline.

Where
Why it matters

Apps pin dev revs, so a red rev may ship a real Markdown regression to every chat app that streams replies. The gate this baseline serves says "the documented test command is green at every dev commit" and "any red dev is fixed or reverted within 2 h". Kit's own target is "0 failing rune-kit tests on any dev commit", and the Markdown target asks that "100% of kit tests" pass.

What would help

One PR per root cause.

  • #190. For each Markdown failure, find what changed in the parser, table layout, find or selection. Fix the code. If the new output is the one intended, say why in the PR, update the test to assert it, and add a changelog fragment.
  • #208. The tests check how the fade is built, not what it looks like. The options are:

1. Assert one layer scope per disabled control, with 0.5 opacity on the layer. 2. Let a single-part control dim its part directly and require a layer only for controls with several parts. 3. Assert the composited result: the final label and fill colour, enabled against disabled, as the contrast button test does.

Option 3 is recommended. It stays true if the composite strategy changes again. Option 1's scope count can be an extra check where #208 made it a contract.

  • A case that depends on the machine's fonts goes through the skip helper from R0056. Don't loosen its assertion.
Done when
  • The documented command with --no-fail-fast exits 0 on macOS and Linux at the fixing commit.
  • No test is deleted, ignored or loosened. Each changed assertion checks a rendered result (colour, rect or tree) and is at least as strict as before.
  • The disabled tests fail if a disabled control is not dimmed, or an enabled one is.
  • Each fixing commit says which behaviour changed and why. A changelog fragment covers any change to rendered output.
How to check

Run the documented command on macOS and Linux. After that, the rune-kit suite runs in the T1 workflow (R0030). It becomes a required check through R0042, so a recurrence blocks the merge.

Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 0 · priority P0 · size M
R0019Plan: the hardware, accounts, certificates, audits and upstream changes later phases need have no owner, lead time, proof or fallbackP0Phase 0ST02Proposal
tooling-readiness-ledger · docs

Proposal: this sets a target or a policy, so it is left for the maintainers to decide.

What happens

Later phases depend on about 20 things outside the code:

  • reserved machines, GPUs and phones
  • a latency rig
  • signing certificates
  • registry names
  • an accessibility audit
  • changes in upstream crates

None of them has an owner, a lead time, proof that it is ready, or a fallback. Some take longer to get than the gap before the issue that needs them, so that issue stalls when it starts. One example: pacing across three GPU vendors was planned for phase 2, but the phase-2 PCs cover only two vendors.

Where
  • PLAN.md:502-504: reference devices are pinned "before any number becomes a gate", and performance runs "on reserved hardware". The plan names no device and no owner.
  • research/09-agent-native-and-perf-targets.md:407: ordinary CI "cannot honestly claim input-to-photon without a sensor fixture".
  • PLAN.md:537: AccessKit's iOS and Android adapters "are young".
  • PLAN.md:296: a structural hot patch is measured at about 1 s, against a 300 ms goal.
  • scripts/mac-app.md:4-6: bundles are signed locally with MAC_APP_SIGN. No CI signing identity exists.
  • #108 asks about crates.io. Publishing needs names for the core and kit crates.
  • Not an upstream gap: Windows frame-latency access. Rune already reaches the D3D12 device through as_hal::<Dx12>() (crates/rune/src/native_surface/windows.rs:72). The pinned wgpu-hal 30.0.1 exposes dx12::Surface::swap_chain() and waitable_handle(), and wgpu-types has Dx12BackendOptions::latency_waitable_object. This needs no row.
Why it matters

Several targets can't be met without these items:

  • The latency lane runs "on a reserved ProMotion Mac and a reserved 120 Hz Windows PC". It holds input-to-present to "p50 at most 8.3 ms and p95 at most 16.7 ms", with hardware capture "at least once per quarter".
  • Post-merge lanes cover "all 5 platforms and 8 variants".
  • Desktop packaging asks that "every production push signs and verifies signatures".

Without a ledger, a missing machine or certificate is found when the issue starts, not at the phase exit before it.

What would help

Add docs/readiness.md and link it from PLAN.md §10. A pinned issue is the other option, but a file is recommended: its changes show up in reviewed diffs, beside the plan. Each row has these columns:

  • owner role (not a person)
  • the phase and issues that need it
  • a start-by phase, from its lead time
  • proof of readiness, such as a lane manifest naming the device, a signed artifact or a dry-run publish
  • a fallback
  • the done-when criteria that fail without it

Initial rows:

  • Reserved 120 Hz ProMotion Mac and 120 Hz Windows PC
  • Real-GPU machines for the post-merge lanes. Three-vendor pacing moves to phase 3.
  • ProMotion iPhone and Android device
  • Photodiode and HID rig, or a high-speed camera
  • Apple Developer ID and notarization, a Windows code-signing certificate, and CI secrets for both
  • Registry names (#108)
  • Booking for a WCAG audit
  • Upstream feasibility checks, each at a set phase: wgpu HDR output on DirectComposition and on the web, the AccessKit iOS and Android adapters, and subsecond patch time against 300 ms

Each phase-exit review updates the ledger and re-forecasts the criteria that are blocked.

Done when
  • The ledger exists, and PLAN.md links to it.
  • Every outside prerequisite that a planned issue names has a complete row.
  • No row's start-by phase is later than the phase of the first issue that needs it.
  • Each phase-exit review records a ledger update.
How to check

The phase-exit review checks the ledger. A small check in R0029 can fail the build when a row has an empty column or names an issue that doesn't exist.

Part of
  • Theme: T02
  • Phase 0 · priority P0 · size S
R0020Docs: no page says what a dev rev may break, how a break is announced, or how long a deprecated name staysP1Phase 0ST02Proposal
api-stability-policy · docs

Proposal: this sets a target or a policy, so it is left for the maintainers to decide.

What happens

README says: "Rune is pre-release. Pin a rev of dev; dev is never rewritten." That is the whole promise to apps. No page says:

  • which APIs are stable
  • what a dev rev may break
  • how a break is announced
  • how long a deprecated name stays
  • which Rust version is supported
  • what #[doc(hidden)] items and Runtime's pub fields promise

AGENTS.md names 12 literal-built types, but it gives no rule for anything else. CHANGELOG.md marks 4 of its 476 bullets as Breaking.

An app can't tell whether a field it reads is safe to depend on. An agent making a rename can't tell whether it must keep an alias.

Where
Why it matters

The goal is that "a public API break can't reach dev unannounced, and apps get time to migrate": "a renamed or removed stable item keeps a #[deprecated] alias for at least one fold and 30 days". Releases need "rust-version ... declared, inherited and green in an MSRV lane on four targets". The checks that enforce these rules need a written definition of "stable" to enforce.

What would help

Add STABILITY.md at the repo root, beside CHANGELOG.md. Link it from README "Add it" and from AGENTS.md "Changes". It defines:

  • Stable tier. Builders, the literal-built types (later read from the list in R0040), the preludes and the crate-root re-exports. A break needs a **Breaking:** fragment that names the replacement and shows a migration. A renamed or removed stable item keeps a #[deprecated] alias for at least one fold and 30 days, and the alias's note names its earliest removal date.
  • Unstable tier. Runtime pub fields, #[doc(hidden)] items and test-support modules. A break still needs a Breaking fragment, but no alias. Each item says "Unstable" in rustdoc.
  • Pinning. Today, pin a dev rev. Once a verified branch exists, pin its revs instead.
  • MSRV. One workspace rust-version, inherited by every published crate. A raise needs a fragment.

Each rule names the check that enforces it: R0041, R0039, R0040, R0046, R0045 or R0043. A rule whose check hasn't landed says "not yet enforced" and links the issue.

Done when
  • The page exists, and README and AGENTS.md link to it.
  • It defines both tiers and says how to recognise an unstable item.
  • It states the Breaking fragment format and the alias window of one fold and 30 days.
  • It states the MSRV policy.
  • Each rule names its check, or says "not yet enforced" and links the issue.
  • Every unstable-tier item carries an "Unstable" note in rustdoc.
How to check

Review the page in each PR that adds or changes a gate job, and update it in that same PR. Once R0039 lands, a test checks that every doc(hidden) item and Runtime field in the snapshot is marked unstable.

Part of
  • Theme: T02
  • Tracked in R0027
  • Phase 0 · priority P1 · size S
R0021Docs: motion docs give wrong test counts, defaults and missing featuresP2Phase 0ST10Fix ready · #263
motion-docs-drift · docs

Fix ready: a commit that fixes this is linked from #263; it hasn't landed on dev yet.

What happens

Several motion docs say things the code at this commit does not do. An app author who trusts them picks the wrong default, looks for a feature that already exists, or reads a test count that is long out of date.

  • The rune-motion README says cargo test runs 53 tests and 1 doctest. The crate now has 93 #[test] functions.
  • Its "Not yet" list says growth caps and flight-layer z-order are not implemented. Both exist, in rune's runtime rather than in rune-motion: growth steps in step_growth, and flights keep their paint order in update_layer_paint_order.
  • The rune README says scrolling is vertical only. El::scroll_x and El::scroll_xy exist.
  • The El::transition docs say the default is a 0.2 s enter and 0.15 s exit fade. Transition::opacity() uses the SETTLE spring pair, 0.3 s in and 0.24 s out.
  • Research 06 gives the opacity settle epsilon as 1/512. The code uses 1/1024.
  • Spring::DEFAULT and Spring::SMOOTH are SwiftUI's 0.5 s springs. tok::motion::DEFAULT and tok::motion::SMOOTH are aliases for SETTLE (0.3 s) and GLIDE (0.32 s). Nothing in the docs explains that two palettes with the same names give different springs.

The README line about width-leading screen paths is left out of this issue. The fix for the screen-travel X lane changes that line.

Where
Why it matters

App authors and agents copy what the docs say. A wrong default duration leads to hand-tuned springs that fight the tokens. A note that horizontal scroll is missing leads to hand-written carousels. These docs feed the site's Motion page. That page has to link every row of a fixed list of SwiftUI animation capabilities to a working example and gate scenario, and the motion audit has to cover the whole public motion surface. Neither works if the docs underneath are wrong.

What would help
  • Say what the tests cover (closed form against ODE integration, C1 continuity under retargets, zero allocation, presence revive and the rest) instead of giving a count that goes stale.
  • Move growth caps and flight z-order out of "Not yet". Add a note that they live in rune's runtime.
  • Replace "Scrolling is vertical only" with a pointer to El::scroll_x and El::scroll_xy.
  • In the El::transition docs, name tokens::pair::SETTLE and its 0.3 s and 0.24 s springs.
  • Fix research 06 to say 1/1024, or note why the code differs.
  • Add one paragraph to the rune-motion README and to the Spring constants' docs. It should say that Spring::* constants follow SwiftUI's values and that Rune's own defaults are the tok::motion tokens.
Done when
  • Every statement listed above matches the code at the merge commit.
  • The El::transition docs name tokens::pair::SETTLE and its durations.
  • The Spring::DEFAULT and Spring::SMOOTH docs point to tok::motion for Rune's defaults.
  • No README gives a test count.
How to check

Review the diff against each cited line. cargo test --doc -p rune-motion keeps any new doc example compiling. When the site's Motion page lands (R0120), its parity test catches API paths that drift later.

Part of
  • Theme: T10
  • Phase 0 · priority P2 · size S
R0022Accessibility: --tree and the JSON goldens leave out the scroll-right actionP2Phase 0ST15Fix ready · #261
a11y-dump-scroll-right · bug

Fix ready: a commit that fixes this is linked from #261; it hasn't landed on dev yet.

What happens

--tree, Runtime::accessibility_json and the Kit JSON goldens name each node's actions from a fixed table of 15 actions in dump.rs. The table has scroll-left but no scroll-right.

node.rs adds both ScrollLeft and ScrollRight to every scroll view with horizontal overflow (st.x.max > 0.0), and actions.rs runs ScrollRight. So the dump of a horizontal scroll view says it scrolls left but not right. A test or an agent that reads --tree can't see that the viewport scrolls right, and no golden can catch a regression in it.

ScrollRight is the only action that node.rs or text.rs adds and the table misses. Nothing keeps it that way: the next action someone adds can drop out of the dump in the same silent way. None of the 26 Kit goldens contains scroll-left today, so no golden holds a horizontal scroll view yet.

Where
Why it matters

Agents and tests read --tree to learn what a control can do. The accessibility target is that "every control states its name, role, value, state and actions completely and truthfully", and that the docs tell the truth: "every enumerated claim matches the code". A dump that hides an action the platform tree offers fails both.

What would help
  • Add (Action::ScrollRight, "scroll-right") to the table and size it 16.
  • Add a drift test. Build one fixture scene that reaches every add_action branch in node.rs and text.rs: a field, a slider with a step, a disclosure, a context menu, a link, and a scroll view with both axes. For every node in the full TreeUpdate, check every AccessKit action against n.supports_action, and fail when a supported action has no entry in the table. Also fail when an entry in the table appears on no fixture node, so the fixture keeps covering the table.
Done when
  • The dump of a horizontal scroll view lists scroll-right.
  • The drift test fails when an action that node.rs or text.rs can add is missing from the table.
  • The drift test fails when a table entry appears on no fixture node.
  • Any golden that changes is listed in the PR.
How to check

Unit tests in crates/rune/src/a11y/tests.rs, run by cargo test -p rune -p rune-kit --features rune-kit/markdown on every change.

Part of
  • Theme: T15
  • Phase 0 · priority P2 · size S
R0023Hot reload: scripts/rune-dev defaults to a private remote build host and knows only the settings exampleP1Phase 1MT01
api-hot-reload-local · feature
What happens

Live Rust editing works. PLAN measures about 1 s from edit to frame on the Mac. But the launcher is built around the maintainers' own machines:

  • Without --local, scripts/rune-dev runs the build under a private worker scheduler on an SSH build host. The host's default name is hard-coded. Someone who runs the documented command gets an SSH or scheduler failure.
  • It checks the machine's hostname to pick a path, and refuses to run on one named machine. Three scripts/native-pacing scripts assert a specific hostname.
  • Its example table holds only settings. scripts/rune-dev hello doesn't work. An outside app works only through --manifest-path and --patch globs.
  • The README says "the launcher currently assumes the maintainers' remote build-worker setup" and makes local mode the opt-in. Its external-app section talks about mirroring to "the build Mac".
  • scripts/test-rune-dev.py covers flag parsing, source watching and the relay. It doesn't cover a real local patch.

The prerequisites aren't listed in one place. They are Rust, dx 0.7.10 and Python 3.11 or later, since the script imports tomllib, plus the platform's native build tools.

Where
Why it matters

Outside the maintainers' machines, the edit loop that most sets Rune apart is broken by default. The target is that "an edit to view code shows on screen in about a second, with state kept", with "the default launcher mode is local" and, on macOS Apple silicon, a median of at most 1 s. Tooling's target is "save-to-first-new-frame p95 at most 1 s". The public repo also shouldn't name private machines.

What would help
  • Make local the default. Keep --local and RUNE_DEV_LOCAL as accepted no-ops.
  • Move remote building behind an explicit --remote. Its host comes from an env var or a git-ignored local config, with no default that names a machine. A wrapper prefix stays in RUNE_DEV_WRAP.
  • Remove every hostname check and machine name from scripts/. The native-pacing scripts can check for a capability, such as a 120 Hz display, instead.
  • Discover desktop examples from the workspace members by name. Skip wasm-only ones with a message.
  • Rewrite the README section: prerequisites, then three steps for an outside app (add the hot feature, run the command, edit a view). Note where a platform only restarts on edit.
  • Extend scripts/test-rune-dev.py with a smoke test on macOS, Linux and Windows. It launches hello and a fixture app outside the workspace, applies a view edit, and checks that state and scroll are kept.
Done when
  • scripts/rune-dev hello patches a view edit on a fresh machine that has only the documented prerequisites.
  • Every desktop example launches by name.
  • No machine names or hostname checks remain in scripts/.
  • The smoke test patches hello and an outside fixture app with state and scroll kept on macOS, Linux and Windows.
How to check

scripts/test-rune-dev.py runs in T1 for the default path and the outside-app path. The smoke test runs on a schedule in each desktop lane. A hygiene grep for hostname checks in scripts/ runs with the ratchets.

Part of
  • Theme: T01
  • Tracked in R0502
  • Phase 1 · priority P1 · size M
R0024Examples: todo's progress bar is a fixed 312 pt and web-hello keys messages by indexP2Phase 1ST01
api-example-rot · bug
What happens

Two examples teach patterns Rune's docs warn against.

todo computes its progress bar width as 312.0 * done / total. 312 is the 360 pt window minus 24 pt of padding on each side, copied by hand. Resize the window and the bar no longer matches its track. .w_frac(done / total) is the idiom, and the docs site shows todo's fn progress as sample code, so the hard-coded width is on the site too.

web-hello keys each message message-{i}, by its index. It only appends today, so nothing breaks visibly. But a reader who adds insert or delete gets keys that move to the wrong message: animations and retained state attach to the wrong row. todo itself keys rows by a stable id (todo-{id}), so the two examples disagree.

launcher's || unreachable!() placeholder init is also a workaround, since AppSpec's init must be a fn pointer. It is left to the issue that lets App take an init closure.

Where
Why it matters

Examples are copied. Docs and examples should be "complete, compiled, tested and current". Identity should be "typed or checked, not a silent string convention". A copied index key gives row state and motion to the wrong item, with no warning, the first time a list inserts at the front.

What would help
  • todo: replace the computed width with .w_frac(done as f32 / total.max(1) as f32). Add a test that resizes the runtime and checks that the bar's width stays the right fraction of the track.
  • web-hello:
    • Give each message a stable id: a Message { id, text } and a counter, as todo does.
    • Key rows by that id.
    • Add a test that inserts a message at the front and checks that each existing row keeps its key and its message.
  • Put both tests in sibling test files, per the repo rule.
Done when
  • todo's bar width follows a resize (test).
  • No example computes a size from its own window size by hand.
  • Inserting a web-hello message at the front keeps each row's key on its message (test).
How to check

The example tests run in T1. When unkeyed and index-keyed list diagnostics land, a debug warning on index keys in a dynamic list catches the same pattern in new examples.

Part of
  • Theme: T01
  • Tracked in R0205
  • Phase 1 · priority P2 · size S
R0025Examples: live-values and overlay decide headless from their own flag list, so a --script --video run starts a wall-clock producerP2Phase 1ST01
api-headless-detection · bug
What happens

live-values and overlay decide at startup whether they run in a window. Each scans argv for its own list of seven or eight flags (--snap, --trace, --tree, --frames, --strip, --first-pixels, --list-scenes, and --list-windows in overlay). Rune's own check, Args::headless, also counts --html, --script, --video, --out, --duration and --desktop.

So live-values --script s.json --video v.mp4 is headless to Rune but windowed to the example. The example's setup spawns a thread that sets live values from Instant::now() on a wall clock, and poll stops sampling from the virtual clock. The recording then depends on how fast the machine runs, and two runs give different frames. overlay does the same with its cursor thread.

This is a copyable pattern. rune::is_headless() exists for this job, but no example uses it and the guide does not mention it.

Where
Why it matters

Agents copy examples, and these two teach a check that drifts from Rune's. An agent that records a scripted video of a copied app gets frames that change from run to run, and a golden comparison fails for no visible reason. The examples target asks that every example "have a sibling headless test that asserts an interaction or state change". The headless-lane target asks for "a byte-identical payload on the 3 desktop OSes". Neither holds while an example starts a wall-clock thread in a scripted run.

What would help
  • Replace the argv scans in live-values and overlay with rune::is_headless().
  • Have launcher ask Rune whether --desktop was given, or derive its title bar from a supported query, instead of scanning argv.
  • Add a short "Am I headless?" paragraph to the agent tooling section of the guide. It names rune::is_headless() as the supported check, and Args::parse_from(..).headless() for apps that pass App::args. It also explains the motion-bento case, where an app's own flags are in argv.
  • Teach R0031's examples-check to reject an example that matches Rune flag names in std::env::args().
Done when
  • live-values and overlay call rune::is_headless() and have no flag list of their own.
  • Two --script --video runs of each example give identical traces and identical decoded frames.
  • The guide documents rune::is_headless() as the supported check.
  • examples-check fails on an example that scans argv for a Rune flag, and passes on all 30 examples.
How to check

A determinism test per example runs the same script twice with --video and compares the trace and the decoded frames byte for byte. It runs in T1 with the examples' headless tests. The examples-check rule keeps the pattern from coming back.

Part of
  • Theme: T01
  • Tracked in R0205
  • Phase 1 · priority P2 · size S
R0026Examples: the apps in examples/ use none of memo, virtual_rows, live_only or on_ready, and the docs don't link the crate examples that doP2Phase 1MT01
perf-elision-examples · docs
What happens

The top-level README tells agents to start from examples/hello. The 30 apps in examples/ are what they copy. Not one of them calls memo, virtual_rows, live_only, on_ready, Latest or prewarm_gpu. These are the patterns that the "Launching fast" and "Smooth scrolling" sections and the Fast apps page ask for.

The crate examples that do use them are scroll_bench, layout_text_cost, pinch_bench and canvas_input. Neither section links them. So an agent learns the rules as prose and the shape of an app from code that ignores them.

Some examples have the cases these patterns are for. overlay-lab's pointer-move handler only moves a live value. Several examples spawn work from setup at launch. todo builds every row by hand.

Where
Why it matters

An app built from these examples does the slow thing by default. It builds every row of a long list, rebuilds the view on every drag event, and starts slow work before the first frame. The list target is "Scroll CPU p95 <= 1 ms (fixed)" with "<= 200 realized rows". The frame target is "p95 <= 4 ms and 0 frames over 8.3 ms per run" on the reference Mac. The docs target asks that "every Fast-apps rule maps to example code that a test exercises".

What would help
  • Keep hello small. Use each pattern where an existing example has the case for it:
    • on_ready for slow start-up work;
    • live_only on drag, pointer-move and zoom handlers that only move a live value;
    • virtual_rows with memo rows in one list example (todo, or launcher's result list);
    • prewarm_gpu in an example that opens its window late.
  • Link the four crate examples from "Launching fast" and "Smooth scrolling", and from the matching Fast apps sections.
  • Start docs/fast-rules.toml. It maps each Fast apps rule to an example file and line, and to the test that exercises that line. A check fails when a rule has no entry or an entry's line no longer has the pattern.
  • The large feed example with a count-budget scene is a separate issue and stays out of this one.
Done when
  • Each pattern above appears in at least one app in examples/, where that app has the case for it.
  • Both guide sections and the Fast apps page link the crate examples.
  • docs/fast-rules.toml lists every Fast apps rule with an example line and a test, and its check passes.
  • scripts/app-audit reports no new findings on the changed examples.
How to check

The fast-rules check and app-audit run in T1 (R0032). The headless tests from R0033 exercise the mapped lines.

Part of
  • Theme: T01
  • Tracked in R0205
  • Phase 1 · priority P2 · size M
R0027API: no required check stops a public API break from reaching dev, which apps pin by revP0Phase 1XLT02
api-stability-gate · tracking
What happens

Apps pin a rev of dev, and dev moves many commits a day. Nothing compares the public API between revs. There is no API snapshot, no semver check, and no app outside the workspace that builds against dev.

Some literal-built types have an exhaustive literal in a test, but for several of them that is only because a test happened to need one. CHANGELOG.md has 4 Breaking markers in 476 bullets, and changelog/unreleased/ holds 217 unfolded fragments. An app learns about a break when it bumps its pin and its build fails.

Planned refactors make this worse. Moving Runtime's 28 pub fields behind accessors, and deprecating Frame.rt, both change API that apps use today.

This takes several issues. A written policy defines what counts as a break. A snapshot and semver-checks detect breaks on every target. Frozen literal tests catch added fields. An outside app catches breaks that show up only when crates are used together. A fragment check makes sure each break ships with a migration.

Where
Why it matters

The target is that "a public API break can't reach dev unannounced, and apps get time to migrate". Concretely, "0 breaking changes merged without a Breaking: fragment, and 100% of Breaking fragments carry a migration". Also, "a fixture canary app and a frozen legacy app build in T1 in their own workspace with their own lockfile".

What would help

Land the children in order: the policy, then the snapshot and the literal tests, then semver-checks and the canary, then the changelog lint and the fragment check.

For now, the semver baseline stays the merge base. A later issue attributes each PR's own breaks against its merge-queue parent, before the baseline moves to a lagging verified rev. Without that, a break merged after the verified rev would show up again in every later PR's report.

Done when
  • Every child issue is closed.
  • A fixture PR that removes a pub fn fails a required check.
  • A fixture PR that adds a pub field to a literal-built type fails a required check.
  • A fixture PR that drops a deprecated alias before its window ends fails a required check.
  • A fixture PR that adds a builder method passes.
How to check

The gate's fixture PRs run against the required checks, and the dev ruleset lists those checks.

Issues
Part of
  • Theme: T02
  • Phase 1 · priority P0 · size XL
R0028CI: no required check gates dev, so broken commits reach the revs apps pinP0Phase 1XLT02
tooling-t1-gate · tracking
What happens

Nothing stops a broken commit from reaching dev. The only Rust CI is www.yml, which runs cargo test -p rune-www and builds the wasm page when crates/** changes. Nothing requires it to pass. The dev ruleset holds only the non_fast_forward and deletion rules.

  • #208 opened at 13:49:13Z and merged at 13:49:24Z. Its www check finished at 13:52:19Z.
  • #152 merged 14 s after it opened, while its www build was failing. #156 fixed the build later.
  • 41724a05 and 67ac4b1d reached dev with no pull request.

At this commit, the documented test command exits 101, with 7 rune-kit test targets failing.

The gate takes several issues because each part is useless alone. A required check means nothing on a red baseline. A green check means nothing if it runs part of the suite, skips its GPU tests, or never builds Windows. And none of it holds a merge until the ruleset requires it.

Where
Why it matters

Every app's build rests on the rev it pins. The target: "100% of dev commits covered by a green T1 verdict. 0 direct pushes. Every admin bypass has a green T1 on its SHA within 2 h. T1 p50 at most 15 min and p95 at most 25 min." The gate also needs "0 GPU skips in the Linux T1 job (lavapipe)" and "0 inventory targets unrun".

What would help

Land the children in this order:

1. A green baseline (R0018). 2. One verify entry point with a test inventory (R0029). 3. The T1 workflow with the check matrix, nextest, lavapipe, the macOS and Windows tests, the script tests and the a11y suites. 4. Hardening and isolation for any self-hosted runner. 5. The merge queue that makes the jobs required.

Done when
  • Every child issue is closed.
  • dev advances only through the merge queue, with the T1 jobs required.
  • scripts/verify audit-dev runs weekly and reports, since the switch, 0 dev SHAs without a green T1 verdict and 0 red intervals over 2 h.
How to check

The weekly audit job reads git log and the check-runs API. It fails on any dev SHA that has no green T1 verdict.

Issues
Part of
  • Theme: T02
  • Phase 1 · priority P0 · size XL
R0029Scripts: agents and CI have no shared verify command, and the documented test command covers 2 of 14 cratesP0Phase 1MT02
tooling-verify-script · infra
What happens

AGENTS.md documents two commands: cargo test -p rune -p rune-kit --features rune-kit/markdown and cargo check --workspace --all-targets. The test command covers 2 of the 14 crates under crates/. It never tests rune-motion, rune-mermaid, rune-fx, rune-light, rune-ref, rune-taffy, procwatch, rune-knobs, the themes or the examples. It also leaves out the three rune-kit targets that need mermaid.

Some lanes need settings no command sets. The rune-ref CPU lane needs RUSTFLAGS=-C llvm-args=-fp-contract=off, which only scripts/check-reference.sh sets. hot is not a default feature, so the workspace check never builds it. tools/rune-dev-guard is excluded from the workspace.

So each session picks its own subset of checks, and "passed locally" means something different each time. CI, once it exists (R0030), would be one more variant.

Where
Why it matters

A change that passes the documented command can still break a crate it did not test, and the author learns of it after merge. The targets are that "the documented command exits 0 at 100% of dev commits" and that the inner loop has "one local verify command" with "scripts/verify quick at most 3 min warm". A single job list is also what lets the pre-merge check and a local run give the same verdict.

What would help

Add scripts/verify with subcommands quick, t1, t2, lane <name>, inventory and audit-dev. All of them read one job list (for example scripts/verify-jobs.toml) that verify.yml also reads.

  • t1 runs the full pre-merge set: every workspace crate's tests, the feature-gated targets with their features, the alloc tests and the ratchets.
  • quick maps changed paths to crates through cargo metadata reverse dependencies and runs only those. A change to Cargo.toml, Cargo.lock, rust-toolchain.toml, a build.rs, a shader, fonts or another shared asset, or any path the map does not know, runs the full t1 set.
  • Each lane owns its RUSTFLAGS and environment, so the reference lane's flags move out of a one-off script.
  • inventory prints every test target with the job that runs it. audit-dev checks that each dev commit has a green verdict.

AGENTS.md "Commands" then names scripts/verify quick before a commit and scripts/verify t1 for the full set.

Done when
  • scripts/verify t1 and verify.yml run the same job list, read from one file.
  • A test feeds quick a Cargo.lock change, a build.rs change and an unknown path, and each selects the full t1 set.
  • scripts/verify quick on a rune-motion-only change finishes in at most 3 min warm on the reference Mac.
  • The reference lane's RUSTFLAGS come from the job list.
  • AGENTS.md "Commands" names scripts/verify.
How to check

verify.yml calls scripts/verify t1. A test in the pre-merge check asserts that the workflow's jobs match the script's job list, so the two cannot drift.

Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P0 · size M
R0030CI: no workflow runs the framework's tests, ratchets or default-feature build before a merge to devP0Phase 1MT02
tooling-t1-workflow · infra
What happens

.github/workflows/ holds two files. site.yml deploys the docs site. www.yml builds the public page and runs cargo test -p rune-www on Linux. Nothing else runs before a commit reaches dev:

  • rune's tests (about 1,700 #[test] functions in the lib and about 430 in tests/), rune-kit's tests and the alloc tests (crates/rune/tests/alloc.rs);
  • scripts/file-size.sh, which already writes GitHub ::error annotations but has no caller;
  • the changelog fragment rule and the public-hygiene grep, which are manual steps in AGENTS.md;
  • a build with Rune's default features. www/app takes rune with default-features = false, so accessibility, dbus, svg, embedded-fonts and ogg-audio are never compiled in CI.

Some test targets need features no documented command sets. markdown_fixture, markdown_diagram_stream and markdown_diagram_frame need mermaid, and the documented command turns on only rune-kit/markdown. So even a green local run leaves them out. At this commit the documented command also fails in seven rune-kit targets (R0018), and nothing noticed.

Where
Why it matters

Apps pin dev revs, so every broken commit is a broken pin. Large refactors touch dozens of files with nothing to verify them. The target is "100% of dev commits covered by a green T1 verdict", "0 inventory targets unrun, including feature-gated and harness = false targets", and a check with "p50 at most 15 min and p95 at most 25 min". Count budgets also need a required job to live in on every merge.

What would help

Add .github/workflows/verify.yml on pull_request, merge_group and push to dev, on ubuntu-latest, with Swatinem/rust-cache. It reads its job list from the same file as scripts/verify (R0029).

1. ratchets: scripts/file-size.sh (which runs folder-shape), the changelog fragment lint, the hygiene grep over the diff, and a stray-file check. 2. check: cargo check --workspace --all-targets --locked with default features. 3. test: scripts/verify t1, alloc tests included, partitioned once R0053 lands. 4. inventory: scripts/verify inventory lists every lib, integration, doc, harness = false and feature-gated target with the job and features that run it. Each job writes the targets it ran. A final step fails when a target ran nowhere or is missing from the inventory.

The records differ on rollout. One says to make it required at once; another says to run it advisory for one week after the baseline is green. Recommended: advisory from the day R0018 closes, required through the merge queue in R0028 once a week of runs is green and within the time budget. The count-budget job joins the same workflow when the budgets exist.

Done when
  • verify.yml runs on every PR, merge group and push to dev.
  • Fixture PRs turn each job red: a file over the cap, a bad fragment, a hygiene hit, a stray file, and a failing Rust test.
  • A draft PR that adds a test target without a job fails the inventory step.
  • markdown_fixture and every other feature-gated target run in some job.
  • p50 is at most 15 min and p95 at most 25 min over the first 50 warm runs, posted in the PR that makes it required.
How to check

The fixture PRs above, kept as a self-test of the workflow. The dev ruleset lists the jobs as required, and a weekly audit reports run times.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P0 · size M
R0031Examples: CI compiles none of the 30 examples, and nothing checks that each has a test and an index rowP0Phase 1ST01
api-examples-ci · infra
What happens

The repo has two workflows. site.yml builds and deploys the docs site. www.yml tests and builds rune-www, the public page. rune-www depends on rune with default-features = false, so CI never compiles rune with its default features. No job compiles any of the 30 example crates. www.yml doesn't run on a change under examples/. A change under crates/ can break every example on dev, and the first to notice is whoever next runs one.

Nothing checks the examples' shape either. 19 of the 30 have no test. No index lists them, and no example declares the platforms it runs on. PLAN promises "examples that are also tests", and nothing holds the repo to it.

Where
Why it matters

Apps and agents start from the examples. A broken example teaches a broken API, and agents copy examples before they read prose. The target is that docs and examples are "complete, compiled, tested and current": "100% of discovered examples compile in T1 and in each platform lane their index row declares, have a sibling headless test that asserts an interaction or state change, and are listed in examples/README.md". Tooling has its own target: "100% of documented headless commands in the crate README and examples/README have a fixture that runs in T1."

What would help
  • In T1 (R0030), run cargo check --workspace --all-targets with default features on Linux. That compiles every example, test and bench target.
  • In the platform lanes, build each example on the platforms its row in examples/README.md (R0003) declares.
  • Add scripts/examples-check. It discovers examples from the workspace members, so a new example can't be skipped. It fails when an example has:
    • no headless test in a sibling file;
    • no //! summary;
    • no row in examples/README.md;
    • no platform column in that row.

It also runs every headless command the index lists.

  • Start the check with a ratchet file of examples that still lack tests. The file may only shrink, and R0033 empties it.
Done when
  • T1 compiles every workspace example with default features.
  • Each example builds in every platform lane its index row declares.
  • scripts/examples-check runs in T1 and fails on a missing test, summary, index row or platform column.
  • Every headless command in examples/README.md runs in T1.
  • A canary PR that breaks one example's build fails T1.
How to check

T1 runs the workspace check and scripts/examples-check on every merge to dev. The platform lanes build the examples their rows declare. The ratchet file shows the examples still without tests, and it only goes down.

Depends on
Part of
  • Theme: T01
  • Tracked in R0205
  • Phase 1 · priority P0 · size S
R0032Tooling: scripts/app-audit finds 7 slow patterns in examples and rune-kit, and no check runs itP1Phase 1ST01
api-app-audit-ci · infra
What happens

scripts/app-audit turns the "Fast apps" rules into a grep checklist. It runs in under a second, and --strict makes it exit 1 on any finding. Its findings are places to look, not verdicts. Nothing runs it, so the patterns it flags stay in the code an author copies. At this commit it reports 7 findings, and none in themes/:

"Hover kept in state" is an on_hover or on_hover_change handler with no live_only call nearby. Each pointer crossing commits app state and rebuilds the view. #205 measures how much hover already costs: 68.7 redraws a second during a row sweep where 20 would show every change. Some of these are deliberate, such as the split view's sidebar peek. app-audit has no way to say so, because it skips comment lines and has no allow marker.

Where
Why it matters

Kit components are what apps build from, so a hover that commits in TabStrip or PopupList commits in every app that uses them. The target is that "code in the documented style is fast without hand-written elision", and that "app-audit --strict has 0 unsuppressed findings, each suppression with a reason". A check that only runs by hand stops being run.

What would help

1. Triage each finding:

  • Where hover only drives a look, move it to El::hover styling or add Tx::live_only().
    • Where state must change, as for a peek or an active row, keep it and suppress the finding.
    • Rewrite PopupList and layout_text_cost to build only mounted rows with virtual_rows, or show why the rows are already bounded.

2. Add an allow comment that app-audit honours on the flagged line or the line above, such as // app-audit: allow(hover-state) <reason>. With no reason, the comment is itself a finding. 3. Run scripts/app-audit --strict over examples/, crates/rune-kit and themes/ in T1 (R0030). The script takes one root, so run it once per root, or let it take several.

Done when
  • 0 unsuppressed findings over examples/, crates/rune-kit and themes/.
  • Every suppression has a written reason, and a suppression without one fails.
  • The --strict step runs in T1.
How to check

T1 runs scripts/app-audit --strict on each root. A canary that adds an on_hover handler writing state, with no live_only, fails the step. Reviewers read each new suppression reason.

Depends on
Part of
  • Theme: T01
  • Tracked in R0205
  • Phase 1 · priority P1 · size S
R0033Examples: 19 of 30 examples have no headless test, including todo, playground, launcher and backgroundP1Phase 1LT01
api-examples-headless-tests · infra
What happens

An example without a test can stop working without a compile error: a key changes, a handler stops firing, or a layout collapses. 19 of the 30 examples have no #[test]:

background, cursed-settings, glass-card, glass-panel, lab, launcher, live-values, odometer, overlay, overlay-lab, playground, shapes, showreel, site-scenes, todo, video-player, video-tiles, web-hello, web-showcase.

The 11 that have tests mostly keep them inline. hello, drag-out, drop-files, frosted-bar, kit-gallery, knobs, matched, rich-clipboard, sketch and motion-bento's dock.rs each hold a mod tests in the source file. The repo's rule is a sibling tests.rs or *_tests.rs. Agents are told to start from hello, so they copy both the layout and the inline module.

hello's test shows the shape the others need. It builds a Runtime with no GPU, presses the switch through rt.find and pointer_down, steps frames and asserts that the state and the knob position change.

Where
Why it matters

Examples are where agents learn the API. The target is that "100% of discovered examples … have a sibling headless test that asserts an interaction or state change", and that "every Fast-apps rule maps to example code that a test exercises". A test that only checks that the view builds misses most rot: a press that does nothing still builds.

What would help
  • For each example without a test, add a sibling test file. It drives Runtime with no GPU and asserts at least one interaction or state change: a press, a key, a scroll or an edit. Start with the interactive ones: todo, playground, launcher, live-values, cursed-settings, overlay-lab.
  • Examples that need OS services also get a smoke test in their platform lane. That covers overlays, background, drag-out, the clipboard and video. The headless test covers their view and state. The lane test covers the native part.
  • Move the 10 inline test modules to sibling files. When hello's moves, update the two site snippet markers in the same PR.
  • Each PR removes its examples from the scripts/examples-check ratchet that R0031 adds, until the ratchet is empty.
Done when
  • Every discovered example has a sibling headless test that asserts an interaction or state change.
  • Examples that use OS services have a smoke test in their platform lane.
  • No example keeps a mod tests inline in a source file.
  • The examples-check ratchet list is empty.
How to check

scripts/examples-check runs in T1 and fails on an example with no sibling test. T1 runs the tests, and the platform lanes run the smoke tests. A canary that removes one example's test fails the check.

Depends on
Part of
  • Theme: T01
  • Tracked in R0205
  • Phase 1 · priority P1 · size L
R0034Docs: 45 Rust blocks in README.md and the crate READMEs are never compiled, and the site's snippets build only when site/ changesP1Phase 1MT01
api-guide-snippets-compile · docs
What happens

The READMEs are the guide, and their code is what an agent copies first. No test compiles any of it. No crate pulls its README into rustdoc, so cargo test --doc never sees these blocks:

File```rust blocks
crates/rune/README.md (the 2,830-line guide)29
crates/rune-kit/README.md5
crates/rune-fx, rune-knobs, rune-motion, rune-perf READMEs2 each
crates/rune-light, rune-mac READMEs1 each
README.md1

That makes 45 in all. A renamed method breaks these blocks silently.

The docs site does better. It cuts its code from examples/settings, examples/hello and examples/todo at build time, and a missing file or marker fails the build. But site.yml runs only on changes under site/. A PR that edits examples/hello and moves the #[cfg(test)] marker passes. The site then fails at a later, unrelated push to site/.

Where
Why it matters

The target is "0 uncompiled Rust blocks in guide pages, crate READMEs and README.md". Tooling has the same aim: "100% of README Rust blocks compile as doctests, or are ignored with a reason under a ceiling that only goes down", and "site snippet extraction runs in T1 whenever a file it reads changes". An agent that copies a stale guide block loses a compile round and may then guess at the API.

What would help
  • In each crate, add a doc-only module, #[cfg(doctest)] #[doc = include_str!("../README.md")] mod readme {}, so cargo test --doc compiles every block. Do the same for README.md from rune, and for each guide page once the guide is split.
  • Fix blocks that don't compile:
    • Wrap fragments in hidden # fn scaffolding.
    • Use no_run for windowed code.
    • Use a hidden #[cfg] for target- or feature-gated blocks, and run them in that lane.
    • Write pseudo-code as ``text, not ``rust.
  • A block that can't compile yet may be ignore only with a reason on the fence line, counted in a ratchet whose ceiling only goes down and ends at 0.
  • For the site, there are two options:
    • Add the example paths to site.yml's triggers. That deploys on every example edit.
    • Add a T1 step (R0030) that runs only the snippet extraction, with no deploy, whenever a file it reads changes.

Prefer the T1 step. It fails the PR that breaks the marker, and it reads its file list from snippets.ts, so a new snippet is covered.

Done when
  • Every ``rust block in [README.md](https://github.com/anomalyco/rune/blob/a9da7e3ebf5a8ab9bf19c3015032674b6e042df2/README.md) and the crate READMEs compiles under cargo test --doc`, or is ignored with a reason under the ratchet.
  • The ratchet ceiling is 0.
  • A renamed method used in a README block fails T1.
  • A PR that removes a snippet marker from examples/hello fails T1.
How to check

T1 runs cargo test --doc for the crates, the README ignore ratchet and the snippet extraction step. The platform lanes run the gated blocks. Canary PRs that rename a method in a README block and drop the #[cfg(test)] marker from hello both fail.

Depends on
Part of
  • Theme: T01
  • Tracked in R0204
  • Phase 1 · priority P1 · size M
R0035Errors: no inventory lists the panics an app's own mistakes can reach, or what each one tells the authorP1Phase 1MT01
api-misuse-suite · infra
What happens

Rune already tells authors about performance mistakes at the call site. perf_warn's tests check that a warning names the element, the test's own file and the fix, such as "say Tx::live_only". Nothing does the same for builder and handler misuse. Some panics an author can trigger name no app location, and they fire in release builds too:

  • el.live_text(..) on an element that isn't text panics with "live_text requires a text element". A text editor panics with "live_text cannot bind a text editor". Neither function has #[track_caller], so the location is in el.rs.
  • A virtual stack whose padding isn't in points panics with "virtual stack padding must be in points" during measurement, far from the builder call.
  • A handler typed for a different state than the app's panics at the first press with "handler registered for a different state type than the app's", not where it was registered.
  • #180: a blur calls on_edit for a field the app just removed, and the app's accessor panics.

No list says which assert, expect, panic or unreachable in the public API an app can reach. So nobody can say which ones are invariants and which are app mistakes that deserve a message and a release fallback.

Where
Why it matters

An agent that hits a panic with no app location has to bisect its own code. In release, the same mistake takes down a shipped app. The target is that "misuse is reported at the call site with the fix, and neither a builder mistake nor content an app passes in crashes a release build", with "0 unclassified entries in api/panic-inventory.txt; every app-misuse entry has a case that passes in debug (a message naming the app's file:line and the fix …) and in release (warn once and degrade, 0 panics)".

What would help
  • Add a script that generates api/panic-inventory.txt. It lists every assert, expect, panic, unreachable and indexing panic that a public builder, handler or Tx request can reach, with its file and line. Each entry is classified by hand as an internal invariant or app misuse. Unclassified entries are a ratchet that only goes down.
  • For each misuse entry, require:
    • in debug, a message that names the app's file:line (through track_caller or a recorded registration site) and the fix, raised at the commit where the mistake first appears;
    • in release, one warning and a degraded result, with no panic.
  • Add crates/rune/tests/misuse/ on the perf_warn capture helpers, with one case per entry run in debug and in release. Start with the four above.
Done when
  • api/panic-inventory.txt is generated, checked in, and has 0 unclassified entries.
  • Each misuse entry has a case that passes in debug (app file:line and fix) and in release (warn once, no panic).
  • #180's removed-field blur has a case.
  • Regenerating the inventory gives no diff.
How to check

T1 (R0030) regenerates the inventory, checks the unclassified ratchet and runs the misuse suite in debug. The platform lanes run it in release. A new reachable expect without a classification fails T1.

Depends on
Part of
  • Theme: T01
  • Tracked in R0206
  • Phase 1 · priority P1 · size M
R0036CI: Rune is never compiled for macOS, Windows, iOS, Android or wasm with default features, single features or hotP0Phase 1MT02
tooling-t1-check-matrix · infra
What happens

No CI job compiles the per-OS code that ships by default:

  • www.yml builds the wasm page natively and to wasm, but www/app turns Rune's default features off. That job isn't required either.
  • Nothing compiles macOS, Windows, iOS or Android before merge. A Windows-side change broke the wasm build after merge (#152, fixed by #156).
  • No CI build turns on hot. Only examples/settings forwards it, as an opt-in feature. So rune::hot and the cfg(feature = "hot") branches are never compiled, and their tests never run.
  • tools/rune-dev-guard is outside the workspace, so its 5 tests never run.
  • No feature is ever checked on its own. The webgl feature doesn't compile on wasm32 (#115), and rune-fx doesn't compile for wasm32 (#119). Nothing noticed either break.

A workspace-wide --no-default-features check would not catch a break in a default-free build either: members such as examples/hello turn the defaults back on through feature unification.

Where
Why it matters

The goal names macOS, Windows, Linux, web and iOS, and every app builds one of them by default. The target: "every supported target builds and tests before merge", with "aarch64-linux-android checks pass on every merge" and "wasm32 builds need no fragile wgpu features". The T1 gate covers "the default-feature and feature-matrix builds" with "0 inventory targets unrun".

What would help

Commit scripts/ci-matrix.toml. Each row is a target, a package set and a feature set. The targets are:

  • aarch64-apple-darwin and x86_64-apple-darwin
  • x86_64-pc-windows-msvc and aarch64-pc-windows-msvc
  • x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu
  • aarch64-apple-ios and aarch64-apple-ios-sim
  • aarch64-linux-android
  • wasm32-unknown-unknown

The T1 workflow (R0030) runs every row on hosted runners, with caching:

1. On every target, cargo check -p rune with defaults, and again with --no-default-features, each run on its own. 2. On the desktops, cargo check --workspace --all-targets and --features hot. 3. On Linux, cargo hack check -p rune --each-feature --no-dev-deps. Use each-feature, not the powerset. 4. cargo test -p rune --features hot --lib, and cargo test --manifest-path tools/rune-dev-guard/Cargo.toml. 5. On wasm32, web-hello with defaults.

The wasm32 webgl and rune-fx jobs stay advisory, linked to #115 and #119, and become required when those close. A target that fails today starts the same way, as an advisory job with its own linked issue.

Done when
  • Every row runs on every PR and merge group, and every row except the linked advisory ones is required.
  • A cfg(target_os = "windows")-only compile error in a draft PR fails T1.
  • A feature that compiles only beside another feature fails the each-feature job.
  • The hot unit tests and rune-dev-guard's tests run in T1.
  • The matrix's median is under 15 min with a warm cache.
  • The webgl and rune-fx jobs become required within one merge after #115 and #119 close.
How to check

The dev ruleset requires the matrix jobs. Draft PRs with a deliberate break of each kind fail them.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P0 · size M
R0037Docs: 38 of 63 rune doc examples and 14 of 17 rune-kit doc examples are ignored, so nothing compiles themP1Phase 1MT01
api-doctests-compile · docs
What happens

Most doc examples in rune and rune-kit are fenced ignore, so rustdoc never compiles them. They drift from the API, and nothing notices. The documented test command at this commit gives these doctest results:

CrateCompiledIgnored
rune2538
rune-kit314

Ignored examples include the App overview in app.rs, Button::label_with, the three popover helpers, virtual_rows, memo, TextEdit and the layout watchers. rune-motion's doctests aren't in the documented command at all.

A common cause is that a fence shows a fragment that needs a State, a Cx or a running window. Hidden setup lines or no_run handle that without ignore. Some fences are platform- or feature-specific, such as the file dialog and the clipboard. Those need a #[cfg] and a lane that has the target, not ignore.

Where
Why it matters

An agent reading rustdoc treats a doc example as the right way to call an API. If the example no longer compiles, the agent spends a compile round, or several, finding out. The target is that docs and examples are "complete, compiled, tested and current", with "0 ignore fences" in rune, rune-kit and rune-motion.

What would help
  • Convert each ignore fence to a compiled one:
    • Hidden # lines carry the state type, the use lines and a wrapping fn.
    • no_run where the example opens a window or starts the event loop.
    • Platform or feature examples get a hidden #[cfg(...)] and run in the lane that has that target (R0036).
  • Add -p rune-motion to the documented doctest command and to T1 (R0030).
  • Add a ratchet file holding the count of ignore fences per crate. A script fails when a count rises. Each PR that converts fences lowers the ceiling, and it ends at 0.
  • Start with the examples an author reads first: App, the El builders, virtual_rows, memo and the kit's Button.
Done when
  • 0 ignore fences in rune, rune-kit and rune-motion.
  • rune-motion's doctests run in the documented command and in T1.
  • Target- or feature-gated examples run in their platform lane.
  • The ratchet script runs in T1, and its ceiling is 0.
How to check

T1 runs cargo test --doc for the three crates and the ignore-fence ratchet. The platform lanes run the gated examples. A renamed method used in a doc example then fails T1.

Depends on
Part of
  • Theme: T01
  • Tracked in R0204
  • Phase 1 · priority P1 · size M
R0038Docs: no lint requires a doc comment on public itemsP2Phase 1MT01
api-missing-docs · docs
What happens

Rustdoc coverage in rune is good in places, but nothing requires it. The workspace lints deny unsafe_op_in_unsafe_fn and unused_must_use and set several clippy lints. None of them is missing_docs, and no crate root sets it either. So a new public method, field or variant can land with no doc comment, and some have. El::label, which every accessible control uses, has none.

An author or agent who hovers a method, or reads the generated docs, then gets a bare signature. The behaviour lives only in the guide, which is long and not always current.

Where
Why it matters

The docs target is "0 undocumented public items in rune, rune-kit and rune-motion on macOS, Windows, Linux and wasm32 with all features (missing_docs denied)". Agents read rustdoc and the generated API map (R0210) before they read the guide. An item with no doc gives them a name and a type and nothing about when to use it.

What would help

1. Add missing_docs = "warn" for rune, rune-kit and rune-motion. Put it in each crate's [lints] table, so other workspace crates are not affected. 2. Add a script that counts missing_docs warnings per crate with all features. It runs on the macOS, Windows, Linux and wasm32 targets, because many items are behind cfg(target_os) or a feature. 3. Check the counts in a ratchet file with a ceiling per crate and target that may only go down, as scripts/file-size-exceptions.txt does for file sizes. 4. Write docs for El, Tx, Cx, App and the kit builders first. These are what view code touches. 5. When a crate's count reaches 0 on every target, change the lint to deny for that crate and delete its ratchet row.

Done when
  • missing_docs warns in rune, rune-kit and rune-motion.
  • The ratchet runs in T1 and in each platform lane, and fails when a count goes up.
  • The count is 0 for every public item, field, variant and trait in the three crates, on all four targets, with all features.
  • missing_docs is denied in the three crates.
How to check

The ratchet script runs in T1 (R0030) and in the platform lanes (R0036). After the lint is denied, a normal build on each lane enforces it.

Depends on
Part of
  • Theme: T01
  • Tracked in R0204
  • Phase 1 · priority P2 · size M
R0039API: no checked-in public API listing per target, so a diff can't show what a change adds or removes on any OSP0Phase 1MT02
api-public-api-snapshot · infra
What happens

Rune's public surface is large: 268 pub use lines and 28 pub mod lines at the crate root. No file lists it. A reviewer can't see an API change in a diff, and an agent has no map of the API.

Part of the surface exists only on some targets or features:

  • NativeSurface::push takes a CoreVideo buffer on macOS. push_shared takes a D3D texture on Windows.
  • rune::hot exists only with the hot feature.
  • PhysicalKeyCode is winit's KeyCode, and raw_window_handle is re-exported from winit.

A listing or semver check run on one host sees only that host's cfg. Apps build on all three desktops, so a break on another OS reaches them first.

Where
Why it matters

The target asks for an "API snapshot diff in every PR that changes it". It also needs "0 undocumented public items in rune, rune-kit and rune-motion on macOS, Windows, Linux and wasm32", and "docs/api-map.md regenerates with no diff". The literal tests and the Breaking-fragment check read their field lists and removals from the snapshot.

What would help

Add scripts/api-snapshot. It runs cargo-public-api on a pinned nightly, because the rustdoc JSON format changes between toolchains. It writes api/<crate>.<target>.<features>.txt for rune, rune-kit and rune-motion:

  • for each target in scripts/ci-matrix.toml (R0036), with default features and with no default features
  • sorted, one item per line
  • with re-exports at the path an app writes
  • with #[deprecated] items showing their marker and note

T1 regenerates the snapshot and fails when the committed one is stale. The job's log shows the diff, and it uploads a patch file. Keep the rustdoc JSON as an artifact, so semver-checks can reuse it.

Add a check that flags winit:: paths in pub signatures, with an allow-list for the current ones. The list shrinks to empty once the platform event seam removes them.

Done when
  • Snapshots for the three crates, on every matrix target with both feature sets, are committed.
  • T1 fails when a PR changes the API on any target without updating its snapshot.
  • Deprecated items show their marker in the snapshot.
  • The script regenerates every snapshot in under 3 min locally with a warm cache.
  • A new winit:: path in a pub signature, outside the allow-list, fails.
How to check

The snapshot drift job runs in T1 on every PR and merge group. A fixture branch that changes only the Windows-only push_shared signature fails it.

Depends on
Part of
  • Theme: T02
  • Tracked in R0027
  • Phase 1 · priority P0 · size M
R0040API: no list ties the literal-built types to tests, and Span, LayerSpec and SurfaceDraw have no exhaustive-literal testP0Phase 1ST02
api-literal-compat-tests · infra
What happens

AGENTS.md lists 12 types that apps build as struct literals, so a new pub field breaks every app that builds one. The list and the tests are kept apart by hand.

Coverage today:

  • Dedicated compat tests. AppSpec, Env, Elevation, PaletteSeed and OverlaySpec each have a frozen, exhaustive literal.
  • Exhaustive by accident. TextStyle, ScrollSpec, ByteFrame and RunOptions are built exhaustively in tests or examples written for other reasons. A refactor of those files can drop the guard without anyone noticing.
  • No exhaustive literal. Span and LayerSpec are built only with .. in tests. The only SurfaceDraw literal is in examples/video-tiles, which the documented test command doesn't build.

So an agent can add a field to Span, fix the call sites in the repo in the same commit, and no test fails. Kit's Palette, Type, Radius, Motion and Kit are all-pub structs that apps also build, and no list names them.

Where
Why it matters

The target says "100% of the types in api/literal-types.list (AGENTS.md's 12 plus Palette, Type, Radius, Motion and Kit) have an exhaustive-literal test". It also asks for "12 of 12 literal types ... covered by frozen exhaustive-literal fixtures". A break in one of these types fails every app that builds it.

What would help
  • Add api/literal-types.list with the 17 types, and have AGENTS.md link to it rather than repeat it.
  • Add frozen exhaustive literals in crates/rune/tests/literal_compat.rs for the rune types, and in crates/rune-kit/tests/literal_compat.rs for the kit types. rune can't depend on rune-kit. Write each fixture once, at this rev, with its field list taken from R0039. Never regenerate it. A field change must edit the fixture, and that edit needs a Breaking fragment.
  • Add an agreement test: every listed type has exactly one fixture, and every fixture's type is in the list and the snapshot.
  • Don't add #[non_exhaustive]. It would forbid apps from building these types as literals at all.
Done when
  • All 17 listed types have a frozen exhaustive literal.
  • AGENTS.md links to the list and doesn't repeat it.
  • Adding a pub field to any listed type fails cargo test -p rune or cargo test -p rune-kit.
  • A type added to the list without a fixture fails the agreement test.
How to check

The tests run in T1. A fixture branch that adds a field to Span fails. Once R0046 lands, editing a fixture without a Breaking fragment also fails.

Depends on
Part of
  • Theme: T02
  • Tracked in R0027
  • Phase 1 · priority P0 · size S
R0041API: no semver check runs on changes to rune, rune-kit, rune-motion or the OpenCode themeP0Phase 1MT02
api-semver-checks · infra
What happens

Before merge, nothing reports a change that removes a method, changes a signature, or adds a field to an all-pub struct. AGENTS.md guards the 12 literal-built types with a written rule. Other all-pub structs that apps build, such as Kit's Palette with 68 pub fields, have no guard.

Much of the API sits behind cfg(target_os) and features. A check on one host would miss a change to a Windows-only signature or a feature-gated module. The repo has no semver tool in scripts/ or in the workspace.

Where
Why it matters

The target: "semver-checks required in T1 for rune, rune-kit, rune-motion and themes/opencode, for default features, no default features, and the macOS, Windows, Linux and wasm32 targets". It also requires that "100% of changes semver-checks marks major ship a **Breaking:** fragment naming the replacement".

What would help

Add a T1 job that runs cargo semver-checks --baseline-rev <sha> for the four packages, on macOS, Windows, Linux and wasm32, each with default, all and no-default features.

  • Baseline. Fix the baseline SHA when the run starts, and print it in the log. Use the merge base. The records also propose the latest verified rev. Keep the merge base until per-PR break attribution exists. Without it, a lagging baseline reports a break merged after it again in every later PR.
  • Targets. Two ways to cover the four targets:

1. Run on a runner of each OS, and pass --target wasm32-unknown-unknown on Linux. 2. Feed the rustdoc JSON that R0039 already builds per target through --baseline-rustdoc and --current-rustdoc.

Option 2 is recommended. It shares one pinned toolchain with the snapshot and avoids building the same docs twice.

  • Override. A finding marked major passes only with a semver-ok label and a **Breaking:** fragment, and the job checks both.
  • Rollout. The job is advisory for one week, then required.
Done when
  • The job is a required check on PRs and merge groups. The run log names the baseline SHA.
  • A fixture PR that adds a pub field to TextStyle fails.
  • A fixture PR that changes a Windows-only or feature-gated pub signature fails.
  • A fixture PR that adds a builder method passes.
  • A fixture PR with the label but no Breaking fragment fails.
  • The whole matrix finishes in under 15 min on hosted runners.
How to check

Fixture branches with known breaks, one per target and feature set, run against the job. The dev ruleset lists it as required.

Depends on
Part of
  • Theme: T02
  • Tracked in R0027
  • Phase 1 · priority P0 · size M
R0042Repo: dev has no merge queue or required check, so PRs merge before their checks finish and commits are pushed straight to devP0Phase 1ST02
tooling-merge-queue · infra
What happens

The dev ruleset holds only the non_fast_forward and deletion rules. No status check is required, and there is no merge queue.

  • PRs merge seconds after they open. #208 opened at 13:49:13Z and merged at 13:49:24Z, 3 min before its www check finished.
  • #152 merged 14 s after it opened, while its www build was failing.
  • 41724a05 and 67ac4b1d reached dev with no PR at all.

No workflow has a merge_group trigger, so a queue would have nothing to run today. Even a green T1 workflow would not hold a merge.

Where
  • gh api repos/anomalyco/rune/rules/branches/dev returns non_fast_forward and deletion only.
  • .github/workflows/www.yml:6-25: push and pull_request triggers only.
  • AGENTS.md:20-21: "Work on dev". dev is fast-forward-only, and nothing says to enqueue.
  • gh api repos/anomalyco/rune/commits/<sha>/pulls returns no PR for 41724a05 or 67ac4b1d.
Why it matters

The target: "100% of dev commits covered by a green T1 verdict. 0 direct pushes. Every admin bypass has a green T1 on its SHA within 2 h." The platform target asks for 100% pre-merge coverage "with no non-admin bypass". Apps that pin dev then get revs that at least compile and pass the headless suite.

What would help

1. Record the live ruleset (gh api repos/anomalyco/rune/rulesets) in this issue. 2. Add merge_group triggers to the T1 workflow (R0030). 3. Turn on GitHub's merge queue for dev, with the T1 jobs as required status checks. 4. Choose the merge method. Options:

  • Squash. Recommended. Each PR lands as one commit, so every dev commit is a unit the queue tested.
    • Rebase. Keeps a PR's commits, but the commits in the middle are never tested on their own.

Both keep dev linear and fast-forward-only. 5. Batch up to 5 PRs, tested at the merge-group head. A failing group is split and tested again. 6. Let only admins bypass, for emergencies. Each bypass must get a green T1 on its SHA within 2 h. 7. Add scripts/verify audit-dev. It lists every dev SHA not covered by a green merge-group run, every commit with no PR, every bypass without a green run after it, and every red interval over 2 h. 8. Update AGENTS.md: push a branch, then run gh pr create --fill && gh pr merge --auto. Never push dev.

Done when
  • The ruleset requires the T1 checks and the merge queue, and only admins can bypass.
  • A PR with a failing required job can't merge, and a direct push to dev by a non-admin is refused.
  • The T1 workflow runs on merge_group events.
  • AGENTS.md says to enqueue and never push dev.
  • audit-dev has tests over fixture histories, and each of these is reported: a direct push, a bypass with no follow-up run, and a red interval over 2 h.
  • audit-dev runs weekly and reports 0 uncovered SHAs since the switch.
How to check

Quote the ruleset API output in the closing comment. A deliberately failing PR is refused by the queue. The weekly audit-dev job fails on any uncovered dev SHA.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P0 · size S
R0043API: no app outside the workspace builds against each change, so breaks in combined use show up at the next pin bumpP1Phase 1MT02
api-consumer-canary · infra
What happens

The only app CI builds is rune-www, on Linux, with rune's default features off. The flagship app lives outside the repo, and examples/opencode was dropped in d1634c68 (its Markdown goldens stayed as a rune-kit fixture test). No example in the repo uses virtual_rows, memo, menus, overlays, streamed Markdown and a diff together the way that app does.

Workspace crates share unified features and a lockfile, and they are edited in the same PR as a breaking change. So they cannot stand in for an outside app. And nothing builds code frozen at an older rev's literal syntax. A change can keep every test compiling and still break existing apps; that shows up when an app bumps its pin.

Where
Why it matters

App authors find integration breaks after the fact. The targets are "a flagship fixture app and a frozen legacy app build in T1 and the platform lanes", and "a fixture canary app and a frozen legacy app build in T1 in their own workspace with their own lockfile". The canary is also the natural home for a transcript-scroll budget scene and a working example of the performance rules.

What would help

Add canary/ as its own workspace, with its own [workspace] table and Cargo.lock, listed in the root exclude. It depends on rune, rune-kit and the OpenCode theme by path, with default features. It holds two crates:

1. `canary/app`: a fixture-only, OpenCode-shaped app with synthetic data. It has a session list, a transcript on virtual_rows and memo, a composer, menus, overlays, streamed Markdown and a diff. A headless test drives it and passes on Linux without a GPU. 2. `canary/legacy-app`: code written against the API at the rev this lands, using full struct literals for every type on api/literal-types.list (R0040). It changes only in a PR that adds a **Breaking:** fragment (R0046).

One record put the legacy app in tests/legacy-app inside the workspace. Recommended: keep both crates in canary/, since a separate lockfile and feature set is what makes the build behave like an app's.

Both build in the pre-merge check (R0030) and later in each platform lane. No private names, hostnames or session content go in the fixtures.

Done when
  • canary/ builds with its own lockfile on every PR and merge group.
  • The fixture app's headless test passes on Linux without a GPU.
  • A fixture PR that adds a pub field to one literal type fails the legacy-app build.
  • A PR that edits canary/legacy-app without a **Breaking:** fragment fails.
  • Both crates appear in the test inventory.
How to check

Both are required targets in the pre-merge check, so every merge builds them. The fixture PR with a new pub field stays red as the gate's self-test.

Depends on
Part of
  • Theme: T02
  • Tracked in R0027
  • Phase 1 · priority P1 · size M
R0044Engineering: nothing counts Runtime fields, generic impl files, host request reads or kit thread_locals, so the structure can only growP1Phase 1MT02
arch-ratchet-script · infra
What happens

scripts/file-size.sh and scripts/folder-shape.sh stop god files and wide folders, and their ceilings only go down. Nothing does the same for the structure inside the files. AGENTS.md says new runtime state belongs in the owning subsystem's struct, not a flat Runtime field, but no check enforces it. Today:

  • Runtime<S> has 251 fields: 28 pub and 40 pub(crate).
  • 93 non-test files hold impl<S> Runtime<S>.
  • Window hosts read and clear runtime request fields directly, for example rt.minimize_request, rt.shell_request and rt.ime_reset.
  • rune-kit has 6 production thread_local! blocks that hold per-surface state.
  • rune-fx reads a rune shader through a cross-crate include_str!.

Each of these can grow by one in any PR, and no one sees it.

Where
Why it matters

The architecture work splits Runtime into subsystems, moves hosts onto one frame core and one request queue, and ties memory to the runtime that drew it. Without counters, a later PR can undo each step. The targets are "Runtime<S> has at most 8 fields" and "at most 15 non-test files hold impl<S> Runtime<S>", "0 per-surface mutable thread_locals in rune-kit and rune", "0 cross-crate include_str!", 0 hosts reading runtime request fields, and "0 playground references in runtime/frame.rs, runtime/commit* and runtime/input/*".

What would help

Add scripts/arch-ratchet.sh with ceilings in scripts/arch-ratchet.txt that only go down, refreshed with --update as the other lists are. It skips #[cfg(test)] items and test files by the same rule as file-size.sh, and it matches multiline items and use aliases. Counters:

  • Runtime<S> fields, by visibility;
  • files holding impl<S> Runtime<S>;
  • the longest frame-phase function;
  • calls to FrameClock::advance, Runtime::frame and frame_split outside the frame core;
  • host reads of runtime request fields;
  • non-private fields (pub, pub(crate), pub(super), pub(in ..)) on subsystem structs;
  • thread_local! blocks in rune and rune-kit that are not in the ARCHITECTURE.md table;
  • doc(hidden) rune items that rune-kit uses;
  • cross-crate include_str!;
  • playground mentions in runtime core files;
  • production eprintln!, and extern "C" functions not wrapped in the FFI guard.

Each counter has a fixture under scripts/arch-ratchet-fixtures/ that must raise it. The counters are tripwires. Module privacy and compile_fail tests do the real enforcement. When a pattern miscounts, fix the pattern and its fixture, not the ceiling. file-size.sh calls the script, so it runs wherever that does (R0030).

Done when
  • The script reports every counter in under 2 s.
  • Every counter has a fixture that raises it and fails the run.
  • Ceilings start at today's values, and any increase fails.
  • It runs in the pre-merge check through scripts/file-size.sh.
How to check

The fixture self-test runs with the script in the pre-merge check. A PR that adds one pub field to Runtime<S> fails.

Depends on
Part of
  • Theme: T02
  • Phase 1 · priority P1 · size M
R0045Changelog: 216 fragments are unfolded, entries carry no rev, and a breaking change carries no marker or migrationP1Phase 1MT02
tooling-changelog-lint · infra
What happens

The header of CHANGELOG.md says it lists changes "with the rev that introduced each". scripts/changelog-fold adds no rev. Only 4 old entries, at the bottom of the file, carry a hash. 216 fragments wait in changelog/unreleased/. Four of them hold more than one top-level bullet, against the one-bullet rule.

The fold has sharp edges. It finds the section with lines.index("## dev"), which raises if the heading is missing. It writes CHANGELOG.md and then deletes the fragments, with no check that the result is well-formed.

The breaking marker is informal. **Breaking: appears 3 times and **Breaking (visual): once, no guide names it, and no breaking entry says how an app should change its code. This plan will deprecate pub fields and old aliases, so apps need these entries to migrate.

Where
Why it matters

An app author who bumps a pin cannot tell which rev changed what, or how to migrate. The targets are "no fragment stays unfolded more than 7 days, and 100% of folded entries carry their rev", and "100% of Breaking fragments carry a migration: before-and-after code that compiles as a doctest, or a stated configuration or dependency change", with "scripts/rune-pin lists the breaking entries and migrations between two revs".

What would help

1. Lint fragments in the pre-merge check (R0030): one top-level bullet, a word limit, and a known marker. A breaking fragment holds a migration block: before-and-after Rust that compiles as a doctest, or a stated configuration or dependency change. 2. Fold safely: stamp each entry with the short rev of its fragment's first commit, fail clearly when ## dev is missing, and make a rerun change nothing. 3. Fold on a schedule: fold the backlog once, then weekly through a PR that goes through the merge queue like any other. 4. Add `scripts/rune-pin <from> <to>`, which prints the breaking entries and their migrations between two revs. 5. Document the markers in changelog/unreleased/README.md and AGENTS.md.

The records differ on the marker. One proposes front matter impact: breaking|output|none; another keeps the **Breaking: bullet prefix. Recommended: keep the prefix (**Breaking:**, **Breaking (behaviour):**), since readers see it in CHANGELOG.md and the fold copies text as is. Any other fragment counts as an output change, as AGENTS.md already says fragments are for. R0046 then ties semver and snapshot results to the marker.

Done when
  • The lint runs on every PR and fails fixtures with two bullets, a breaking fragment with no migration, and a migration that does not compile.
  • The backlog is folded, and every folded entry carries its rev.
  • Running the fold twice changes nothing, and a missing ## dev gives a clear error.
  • The weekly fold exists, and no fragment is older than 7 days.
  • scripts/rune-pin prints the migrations between two revs.
How to check

The lint and its fixtures run in the pre-merge check. The fold's history shows a weekly cadence. A test runs the fold twice on a fixture tree and diffs the result.

Depends on
Part of
  • Theme: T02
  • Tracked in R0027
  • Phase 1 · priority P1 · size M
R0046Changelog: a change that removes or alters public API needs no Breaking marker, migration or deprecation windowP1Phase 1ST02
api-breaking-fragment-check · infra
What happens

Apps pin dev revs and read CHANGELOG.md to learn what an upgrade costs. Of its 476 bullets, 4 are marked as breaking: three with **Breaking: and one with **Breaking (visual):. 216 more fragments wait in changelog/unreleased/. Nothing ties a removed or changed public item to a marker, a named replacement, a migration or a deprecation period. rune and rune-kit hold 3 #[deprecated] attributes in all. There is no PR template, so nothing asks whether visible behaviour changed.

So an app author who bumps a pin has to read every bullet, or find the break from compile errors.

Where
Why it matters

An app's build breaks on a pin bump with no note on how to fix it. The targets are that "100% of changes semver-checks marks major ship a **Breaking:** fragment naming the replacement", that "a renamed or removed stable item keeps a #[deprecated] alias for at least one fold and 30 days", that "an API-snapshot removal or change needs a **Breaking: fragment with a migration snippet", and that "0 breaking changes merged without a Breaking: fragment".

What would help

Add a step to the pre-merge check, next to the fragment lint from R0045. It fails a PR when:

1. R0041 reports a major change, or the snapshot from R0039 loses or changes an item, and the PR adds no fragment that starts with **Breaking:**, names the replacement and holds a migration that compiles. A semver-ok label, with a reason in the PR, overrides it for unstable-tier items as R0020 defines them. 2. A box in a new PR template says app-visible behaviour changes, and there is no **Breaking (behaviour):** fragment. 3. A #[deprecated] alias is removed before one fold and 30 days have passed, found from the snapshot history. 4. A #[deprecated] note names no earliest removal date.

The two targets differ on the window: one says one fold and 30 days, the other a removal date at least 14 days out. Recommended: require the removal date in the note and check it is at least 30 days after the alias appeared, which meets both. changelog-fold keeps the markers and lists breaking items first in each fold.

Done when
  • Fixture PRs fail for: a removal with no fragment, a changed signature with no fragment, a fragment that names no replacement, a checked behaviour box with no fragment, and an alias removed before its window ends.
  • The same PRs pass once fixed.
  • A #[deprecated] note with no removal date fails.
  • Folded sections list breaking items first.
  • The step runs on every PR and is required.
How to check

The fixture PRs run as the step's own test in the pre-merge check. Over time, scripts/rune-pin from R0045 lists every breaking entry between two revs, and each has a migration.

Depends on
Part of
  • Theme: T02
  • Tracked in R0027
  • Phase 1 · priority P1 · size S
R0047API: rune and rune-kit export different types named Theme, MenuItem, Keybind and TableP1Phase 1ST01
api-tok-theme-rename · refactor
What happens

Four short names each mean two different types:

NameOne typeThe other
Themerune::tok::Theme, 16 semantic colours from tok::theme(dark)rune::Theme, named tokens parsed from theme JSON
MenuItemrune::MenuItem, a native menu itemrune_kit::MenuItem, a drawn kit menu row
Keybindrune::Keybind, a key chordrune_kit::Keybind, a component that draws one
Tablerune_kit::Table, the data tablerune_kit::markdown::Table, a parsed GFM table

Each is documented. But an agent that writes the short name can't tell from the import which one it gets. The wrong one compiles until a method or field is missing, and the error then names the type, not the mix-up. tok::Theme is the worst case. It appears in examples as a bare Theme from use rune::tok::{self, Theme, ..}, as in todo's progress(done, total, t: Theme), while rune::Theme sits at the crate root.

Where
Why it matters

A short name should mean one thing, or the preludes (R0048) can't export it. The target: "every same-named public type pair is renamed (with a deprecated alias during its window) or listed with a one-line distinction in the API map", as part of "one import gives a view everything it needs, and a short name means one thing".

What would help
  • Generate the list of public type names that two different types share, from the public API listing (R0039), so a new collision shows up in review.
  • Rename the side that apps name less often:
    • tok::Theme becomes tok::Colors.
    • rune::MenuItem becomes NativeMenuItem.
    • rune::Keybind becomes Chord.
  • Keep each old name as a #[deprecated] alias that names its replacement, for the stability window. Each rename gets a **Breaking: changelog fragment with a migration line (R0046).
  • Keep pairs that are already module-qualified, such as markdown::Table. List each with a one-line distinction in the API map.
  • Add a short guide table: tok colours (tok::Colors), theme JSON (rune::Theme) and Kit, and when to use each.
  • Migrate the examples and kit to the new names.
Done when
  • The collision list is generated, and each entry is renamed or listed with its distinction.
  • Every rename has a deprecated alias and a changelog fragment with a migration line.
  • No example, kit or theme code uses a deprecated alias.
  • The guide has the colours, Theme JSON and Kit table.
How to check

A collision test reads the API listing in T1 and fails on a new unlisted pair. The T1 example build runs with deprecation warnings counted, and the count stays at 0.

Depends on
Part of
  • Theme: T01
  • Tracked in R0204
  • Phase 1 · priority P1 · size S
R0048API: no prelude, so each example imports between 4 and 25 names from rune one by oneP1Phase 1MT01
api-prelude · feature
What happens

rune's crate root re-exports 268 items flat, and neither rune nor rune-kit has a prelude. Every example lists its names by hand. hello imports 9 names on two lines. glass-panel imports 25 from rune::{..}, and launcher 22 plus tok and type_. A view needs about 25 common names, such as El, Cx, Tx, row, col, text, Spring, ScrollSpec, memo, Live and tok. An agent has to guess the module for each, and a wrong guess costs a compile round.

Two glob imports can't simply be added either. rune and rune-kit both export MenuItem and Keybind, which are different types, so use rune::*; use rune_kit::*; would be ambiguous.

Where
Why it matters

Import errors are cheap to remove, and they are a large share of an agent's first-try failures. The target is "one import gives a view everything it needs, and a short name means one thing": "100% of example and kit-gallery view files compile with rune::prelude::* and rune_kit::prelude::* plus at most one further rune or rune_kit use line", "each prelude holds 40 names or fewer, and neither shares a name with the other or with std's prelude", and "import errors cause at most 2% of Rune-Bench first-try compile failures".

What would help
  • Add rune::prelude with the names a view needs: El, Cx, Tx, the element functions, Spring, ScrollSpec, memo, Live, tok, AppSpec and run. Add rune_kit::prelude with Kit, the component builders, State and ControlSize.
  • Keep each prelude to 40 names or fewer. Neither exports a name the other exports, or one in std's prelude. Native-menu MenuItem and chord Keybind stay out of rune's prelude. R0047 settles those names first.
  • Choose the names from the public API listing (R0039) and from counts of what examples import today.
  • Migrate every example and kit-gallery view.
  • Add scripts/api-imports. It counts use rune… and use rune_kit… lines beyond the preludes in each file, and other crates don't count.
  • Add a snapshot test that fails when a prelude passes 40 names or shares a name with the other prelude or with std's.
  • Document that a local name wins over a glob import, so an app's own text or row is not shadowed.
Done when
  • Both preludes exist and are documented.
  • Every example and kit-gallery view file needs at most one further rune or rune_kit use line, and hello needs none.
  • A test fails if a prelude passes 40 names, or the two preludes, or a prelude and std's, share a name.
  • scripts/api-imports reports 0 files over the limit.
How to check

scripts/api-imports and the prelude snapshot test run in T1. Later, Rune-Bench's share of import-caused compile failures tracks whether the preludes hold the right names.

Depends on
Part of
  • Theme: T01
  • Tracked in R0204
  • Phase 1 · priority P1 · size M
R0049Examples: hello, where agents are told to start, builds its switch by hand in an always-dark themeP1Phase 1ST01
api-hello-rewrite · docs
What happens

The README tells agents to start from examples/hello. hello calls tok::theme(true), so it is always dark and ignores the system appearance. It also builds its switch from el() by hand: a knob element, a track with role, label, checked, focusable, size, radius, fill and motion, and a press handler, about a dozen chained calls. rune_kit::Switch::new(checked) does the same job in one builder. An agent that starts here learns two habits: hand-built controls and a fixed dark theme.

The always-dark call is common. There are 18 tok::theme(true) calls across 10 examples: background, drag-out, drop-files, hello, launcher, matched, rich-clipboard, todo, video-player and web-showcase. web-hello already does it right with tok::theme(cx.system_dark()).

hello's test runs only in dark (system_dark: true), so a light-mode regression can't show.

Where
Why it matters

hello is the most copied file in the repo. Two targets apply. The first: "hello uses only the preludes; each prelude holds 40 names or fewer". The second: "every Fast-apps rule maps to example code that a test exercises", as part of docs and examples that are "complete, compiled, tested and current". A light-mode user who runs an app built from hello gets a dark window, and an author who wants a switch builds one that misses kit's states and sizes.

What would help
  • hello:
    • Follow cx.system_dark().
    • Import only rune::prelude::* (R0048).
    • Keep the hand-built switch. It teaches el(), keys, roles and springs with no kit dependency. Add a comment pointing to hello-kit for real apps.
  • Add examples/hello-kit: the same app on rune_kit::Switch with the opencode theme, as kit-gallery uses it. It imports the two preludes.
  • Point README's "Use it with your agent" at both.
  • Move hello's test to a sibling file. It checks the background and label colours in light and dark, and that a press toggles the switch's checked state. hello-kit gets the same test. Update the two site snippet markers in the same PR.
  • Migrate the other tok::theme(true) examples to the system appearance. An example that needs a fixed look, such as a glass demo shot for the site, keeps it, and its row in the examples index gives the reason.
Done when
  • hello follows the system appearance and imports only the prelude.
  • hello's sibling test checks background and label colours in both appearances and a toggle.
  • hello-kit exists with the same test.
  • Every remaining tok::theme(true) is in an example whose index row gives the reason.
  • The site's hello snippets build.
How to check

The example tests run in T1. The snippet extraction step catches a moved marker. A grep for tok::theme(true) in examples/, checked against the index's reason column, keeps new fixed-dark examples from landing unexplained.

Depends on
Part of
  • Theme: T01
  • Tracked in R0205
  • Phase 1 · priority P1 · size S
R0050CI: workflows are not linted for injection or permissions, and nothing stops a self-hosted job from running untrusted codeP1Phase 1ST02
tooling-ci-hardening · infra
What happens

The repo is public. Its two workflows hold deploy secrets (CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID). www.yml also runs on pull_request. Its deploy step is limited to push, and permissions are set once for the whole workflow, not per job. Every action is pinned by a moving tag, such as actions/checkout@v5 and Swatinem/rust-cache@v2, not by commit SHA. No linter checks the workflows for script injection, broad permissions or unsafe triggers.

The merge-gate work adds more: a self-hosted Mac for Metal tests, a job that promotes a branch, and a bot that files issues. Nothing checks that a self-hosted job can never be reached from pull_request, pull_request_target or a dispatch on an untrusted ref.

The public-hygiene grep in AGENTS.md runs by hand, over a diff only. Run over the whole tree, it hits the .ts.net suffix in the vite dev-server configs, so it needs an allowlist.

Where
Why it matters

A self-hosted runner reachable from a fork PR runs a stranger's code on a machine that later builds dev. A tag-pinned action can change under the repo. The target: "0 high actionlint and zizmor findings. 100% of actions pinned by SHA. Every job declares its permissions. 0 self-hosted or credentialed jobs reachable from untrusted triggers or refs, checked by a scratch-branch drill. 0 hygiene hits in the diff and full tree outside a reasoned allowlist."

What would help

Add these to the ratchets job of R0030:

1. actionlint and zizmor, failing on any high finding. 2. A checker that fails when a job with runs-on: self-hosted sits in a workflow triggered by pull_request or pull_request_target, or by a workflow_dispatch not limited to dev by an if on github.ref and a protected environment. 3. A rule that every job declares permissions:, and that every uses: names a full commit SHA, with the tag in a comment. 4. The hygiene scan over the full tree, with a committed allowlist where each row has a reason (the three vite lines first).

In repo settings, keep the promotion and issue-filing tokens in protected environments usable only from dev. Limit the self-hosted runner group to the post-merge and merge_group workflows, and run its jobs as an isolated user with no stored secrets (R0051). An OpenSSF Scorecard run each week can be recorded for information.

This must land before the first self-hosted runner is registered.

Done when
  • actionlint and zizmor run on every PR with 0 high findings.
  • Every action is pinned by SHA, and every job declares its permissions.
  • A draft PR that adds pull_request to a self-hosted workflow fails the check.
  • A dispatch of a self-hosted workflow on a non-dev ref is refused, shown once on a scratch branch.
  • Promotion and issue tokens are usable only from protected environments on dev.
  • The full-tree hygiene scan runs, and every allowlist row has a reason.
How to check

The ratchets job runs the linters and the trigger checker on every PR. The scratch-branch drill is repeated whenever a self-hosted workflow changes.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P1 · size S
R0051CI: the self-hosted Mac would run approved PR code from the merge queue on the same persistent account that keeps caches for later dev jobsP0Phase 1MT02
tooling-runner-isolation · infra
What happens

Today every job runs on GitHub-hosted ubuntu-latest, which starts clean each time. The plan for the macOS T1 tests (R0058) allows a self-hosted Mac that runs only on merge_group events, so Metal GPU tests can run before merge. The post-merge lanes would also run dev code on reserved Macs.

R0050 keeps self-hosted jobs off pull_request. But a merge-group candidate is still PR code. Its build scripts, proc macros and tests run as the runner's user. A persistent account keeps a lot between jobs:

  • the cargo registry and target directories
  • the rust-cache directories
  • login items and launch agents
  • the keychain

A candidate could poison a cache entry, or leave a launch agent behind. A later dev job on the same account, one that holds a deploy, signing or issue-filing token, would then run that code with the token. The hardening drill covers only pull_request and dispatch, so it wouldn't catch this.

Where
Why it matters

The target is that CI "is safe to run in a public repo", with "0 self-hosted or credentialed jobs reachable from untrusted triggers or refs, checked by a scratch-branch drill". A runner that carries state from a candidate into a credentialed job breaks that, even though no single job looks unsafe.

What would help
  • Run candidate and dev code on the self-hosted Mac as a dedicated macOS user with no secrets, no keychain items and no login items.
  • Key caches by trust level (merge group or dev), and never restore a merge-group cache into a dev or release job.
  • Reset the account on a schedule and after any failed or cancelled job. Wiping the home directory from a clean template is enough.
  • Run promotion, signing and issue filing only on hosted runners. Those jobs take the Mac's results as artifacts and check them against a schema before acting on them.
  • Extend the hardening drill with a malicious merge-group candidate.
Done when
  • Self-hosted jobs run candidate code as a user that can read no secret.
  • Caches are keyed by trust level, and the workflow never restores a candidate cache into a credentialed job.
  • The account resets on a schedule and after failures, and the reset is logged.
  • Promotion, signing and filing run only on hosted runners, and they reject artifacts that fail schema validation.
  • In the drill, a malicious merge-group candidate can neither read a secret nor leave a file that the next job sees.
How to check

The scratch-branch drill from R0050 gains the merge-group case, and it runs again after any change to the runner or workflow. The macOS T1 tests don't become required until it passes.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P0 · size M
R0052Deps: rune-taffy transmutes Taffy's private CompactLength and the macOS shell patches winit classes, under caret versions apps resolve themselvesP1Phase 1ST02
tooling-dep-pins · bug
What happens

Apps take Rune as a git dependency, so Rune's Cargo.lock never applies to them. Their own lockfile picks versions within Rune's requirements, and cargo update can move them.

  • Taffy. rune and rune-taffy require taffy = "0.15", which allows any 0.15.x. rune-taffy's pack_raw_len transmutes Taffy's private CompactLength, a tagged word, to and from usize. The transmute fails to compile if the size changes. It does not notice a release that keeps the size but moves the tag bits or changes the value encoding. Then every packed length is misread, with no error. The round-trip tests run only in Rune's workspace, against the locked 0.15.0. rune-taffy also implements Taffy's low-level layout traits, which can change between releases.
  • winit. rune requires winit = "0.30.13", which allows any later 0.30.x. The macOS shell looks up winit's Objective-C classes by name (WinitView, WinitWindowDelegate) and patches them. If a release renames one, the lookup returns None and the hook quietly does nothing.

Rune already pins its other depended-on internals exactly: subsecond and dioxus-devtools at =0.7.10, and wgpu with ~30.0.1.

Where
Why it matters

An app's cargo update can turn layout into silent undefined behaviour, or turn off a Mac shell hook, with no Rune change at all. The targets are "taffy required as =0.15.0 with a compile-time encoding check" and "0 safe calls that read unchecked memory", and pins for depended-on internals as part of the required gate.

What would help

1. Pin taffy = "=0.15.0" in rune and rune-taffy, and winit = "=0.30.13" in rune. One exact requirement holds the whole graph, so rune-light's caret winit can stay. 2. Replace the transmutes with Taffy's public CompactLength constructors and accessors where 0.15 has them. Where it does not, keep the transmute and add a check next to it:

  • Option A (recommended): a const assertion that packs a length, a percent and auto and compares them with the expected words, so an encoding change fails to compile in every downstream build.
    • Option B, if Taffy's constructors are not `const`: a test that builds every CompactLength variant through the public API, reads it back through the packed path and compares it with Taffy's accessors, plus a debug assertion on first use.

3. Add a **Breaking:** fragment: an app that resolves another 0.30.x winit or 0.15.x taffy now gets a resolver error. 4. Write a pin-upgrade checklist in rune-taffy's crate docs: representation tests, differential tests, the parity lane, Miri, then the fragment.

A canary for the winit class hooks belongs with the macOS shell work, not here.

Done when
  • taffy is =0.15.0 in both manifests, and winit is =0.30.13 in rune.
  • cargo tree -i taffy in a fresh app that depends on Rune by git shows only 0.15.0.
  • No transmute remains, or the check from option A or B covers every CompactLength variant, and changing one expected tag makes it fail.
  • The fragment and the upgrade checklist are present.
How to check

The check runs in the pre-merge workspace build. With option A it also runs in every app's build. A scheduled latest-dependencies lane shows when an upstream bump is available, so a bump becomes a deliberate PR.

Part of
  • Theme: T02
  • Phase 1 · priority P1 · size S
R0053Tests: tests in one binary share process-global caches and env, and cargo's harness gives CI no partitions, retry record or JUnitP1Phase 1ST02
tooling-nextest · infra
What happens

cargo test runs all the tests of one binary as threads in one process. The rune lib binary alone holds about 1,700 #[test] functions. Rune keeps process-wide state in statics: font and GPU caches, counters and OnceLocks. rg 'static .*: (OnceLock|Mutex|AtomicU|LazyLock)' crates/rune/src finds 75 sites. One example is is_headless, which caches the process's arguments on first call. One test in rune-mac sets HOME for the whole process.

So a test's result can depend on which tests ran before it in the same process. A failure can show up in one order and vanish in another.

CI needs more than cargo's harness gives:

  • partitions, to keep the pre-merge check under 15 min;
  • a retry record, so a test that passes only on retry is flagged as flaky instead of hidden;
  • JUnit output that a flake ledger can read.

The repo has no .config/nextest.toml.

Where
Why it matters

Order-dependent tests fail at random, and people learn to rerun until green. The targets are a check with "p50 at most 15 min and p95 at most 25 min", and "flaky runs at most 0.1% of executions over 30 days" with a quarantine of "at most 10 entries, each linked to an issue". Neither can be measured without per-test processes, retries and machine-readable results.

What would help

Adopt cargo-nextest with .config/nextest.toml:

  • one process per test, its default;
  • a ci profile with JUnit output, retries = 1 and 3 partitions;
  • a rule that a test passing only on retry passes the run but writes a flake record.

Run nextest beside cargo test in the workflow from R0030 for one week. File an issue for every test whose result differs between the two, then switch the check to nextest. Keep cargo test --doc as its own step, since nextest does not run doctests. harness = false targets keep their own step (R0054).

Process-per-test costs more for a binary with about 1,700 tests. Measure it, and use test groups or per-binary settings if the shards miss their time.

Done when
  • .config/nextest.toml defines the ci profile with JUnit, retries = 1 and 3 partitions.
  • The pre-merge check runs nextest in 3 partitions and uploads JUnit.
  • A pass-on-retry shows as flaky in the run summary and in the JUnit artifact.
  • The one-week comparison lists every test whose result differs, each with an issue.
  • Doctests still run, and the rune-mac HOME test no longer shares a process with other tests.
How to check

The test job in the pre-merge check. A fixture test that fails on its first attempt and passes on retry must show as flaky in the summary. The JUnit artifacts feed the flake ledger.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P1 · size S
R0054CI: Windows-only unit tests and harness = false targets never run before merge, and no run records how many tests ran per OSP1Phase 1MT02
platform-ci-desktop-tests · infra
What happens

No CI job runs Rune's tests on Windows, and none runs its harness = false targets anywhere.

  • Windows-only code is compiled only on Windows: the win32 platform module, the Windows shortcut service, and the DXBC shader path with its tests. Those tests check that the precompiled Windows shader is used, and #182 shows it is not today: its WGSL hash was taken from a CRLF checkout.
  • The 19 `harness = false` targets in rune are GUI tests. They need a desktop session and RUNE_GUI_TESTS=1, and nextest does not run them as it runs libtest binaries (R0053). accessibility_windows, the UI Automation test, is one of them.
  • No run counts tests. If a cfg change or a renamed feature drops a module's tests on one OS, the run still passes, with fewer tests.

Linux-only unit tests (X11 and XWayland event reading, portal file-dialog formats, layer-shell keysyms) need a Linux job; R0030 adds it.

Where
Why it matters

Windows users get regressions that a Windows run would have shown, and a test that quietly stops running looks the same as one that passes. The targets are "every supported target builds and tests before merge" and "0 inventory targets unrun, including feature-gated and harness = false targets", within a check whose p95 is at most 25 min.

What would help

1. Add a windows-latest job that runs scripts/verify t1 with nextest partitions, so each shard stays under 10 min. Include the DXBC freshness test once #182 lands. 2. Run harness = false targets in their own cargo test --test <name> step on Linux, macOS and Windows, with RUNE_GUI_TESTS=1 where the runner has a session. On Linux, run them under a virtual display. 3. Record the executed-test count per OS in each run's summary and as an artifact. A drop fails unless the PR changes a test file or adds a changelog fragment. 4. A test a hosted runner cannot run is listed with a reason and counted. That count has a ceiling that only goes down.

The target triples and features come from R0036; this issue adds the test runs on top.

Done when
  • The documented test command passes on Windows on every PR and merge group, each shard under 10 min.
  • harness = false targets run in their own step on each of the three desktop OSes.
  • The executed-test count per OS is recorded each run, and a fixture PR that drops a module's tests fails.
  • Tests a hosted runner cannot run are listed with reasons, under a ceiling.
  • The DXBC test runs on Windows once #182 is fixed.
How to check

The Windows and harness = false jobs are required in the dev ruleset. The test inventory shows each target with its OS. The per-OS counts are kept as run artifacts, so a later drop is visible.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P1 · size M
R0055Scripts: the Python test suites for the motion audit, rune-dev and the Mac installer never runP1Phase 1ST02
tooling-script-tests · infra
What happens

scripts/ holds 29 .py files, two extensionless Python tools (rune-dev, changelog-fold) and 4 test files. Those tests cover the motion audit's analyzer, the hot-reload launcher rune-dev and the Mac app installer. No workflow runs any of them. The only workflows are site.yml and www.yml, and www.yml runs cargo test -p rune-www and nothing under scripts/.

AGENTS.md asks every motion change to pass scripts/motion-audit. If a change breaks analyze.py, the audit gives wrong verdicts and nothing notices. The same is true for a break in rune-dev's file watcher or in the installer's argument handling. The planned motion, hot-reload and bench work all edit these scripts.

The suites come in two shapes. test_analyze.py is a script: main() runs plain asserts and prints ok. The other three use unittest. Two of them import a sibling module, so they need the script's folder on sys.path. python3 -I turns on safe-path mode, which leaves that folder off, so those two fail with an ImportError under -I.

Where
Why it matters

An agent or contributor trusts the motion audit's verdict. If the analyzer is broken, that verdict is wrong. The Tier-1 target needs "0 inventory targets unrun, including feature-gated and harness = false targets and all 4 scripts/ suites". The motion audit target needs "100% of the scenarios in run.sh's inventory gate T1", and that is only worth something if the checker itself is tested.

What would help
  • Add each test file to the test inventory from R0030, using the command its README documents: python3 -B scripts/motion-audit/test_analyze.py, and python3 -B <file> for the three unittest suites. Run them from the repo root. Don't use -I, because it breaks the sibling imports. The other option is to make each suite add its own folder to sys.path and run it with -I. That is more code and gives no benefit for scripts this repo owns.
  • Make each suite report how many checks it ran. unittest already prints Ran N tests. Give test_analyze.py a small check() helper that counts assertions and prints the total. The job fails on a nonzero exit or on a count of 0.
  • Run mac_app_install_tests.py in the macOS job from R0058.
  • Add lint steps, each with a findings ceiling that only goes down: ruff for the Python files, shellcheck for the 8 .sh files and the extensionless shell scripts (rune-hot, app-audit, motion-audit/gate), and node --check for the 5 .mjs smoke scripts.
Done when
  • All 4 test files run in T1, and each reports a nonzero check count.
  • A count of 0 or a failing assertion in test_analyze.py turns T1 red.
  • The installer test runs in the macOS T1 job.
  • ruff, shellcheck and node --check ceilings are committed at today's counts and only go down.
How to check

The T1 ratchets job runs the four suites and the lints. Check it once with a scratch PR that breaks one assertion in test_analyze.py and confirm T1 fails. The test inventory step keeps all four files listed as targets.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P1 · size S
R0056Tests: about 100 tests print 'skip' and pass when a font, GPU or desktop session is missing, and no run counts themP1Phase 1MT02
tooling-strict-skips · infra
What happens

When a test needs a resource the machine lacks, it prints a message and returns, so it counts as passed. The resource can be a GPU adapter, a CJK or system font, a logged-in desktop session or a WebGPU adapter. rg 'eprintln!\("skip' crates finds 38 such sites, and rg 'println!\(".*skip' crates finds 62 more. Some tests skip only part of their cases and still pass.

16 integration tests return early unless RUNE_GUI_TESTS is set. Many of these are harness = false binaries, and crates/rune/Cargo.toml declares 19 such targets. The web smoke test logs available: false and moves on when headless WebKit has no WebGPU adapter.

No run counts any of this. A CI lane that should have a GPU and fonts, but lost them through a driver or cache change, reports green while text, pixel and GPU tests do nothing. Not every site is a missing resource. Some skip on CPU contention or on a missing Valgrind. Those should be counted too, but kept apart from resource skips.

Where
Why it matters

A green run should mean the tests ran. The targets this serves:

  • "0 skips for declared resources under RUNE_TEST_STRICT".
  • "All 5 platforms and 8 variants run on 100% of dev pushes with 0 skips for the resources each lane declares".
  • "Every environment skip goes through skip!; T1 Linux skips 0 tests that need a resource it declares, and T2 lanes have skip ceilings that only go down".
What would help
  • Add skip_unless!(resource, reason) with named resources: gpu, metal, cjk-fonts, desktop-session, accessibility-permission and webgpu, plus a timing class for contention skips. Two homes are possible. One is a #[doc(hidden)] macro in rune. The other is a small dev-only crate with no Rune dependency. The dev-only crate is the better choice, because rune-kit, rune-ref and the harness = false binaries can all use it, and nothing is added to rune's public API.
  • Each skip appends one JSON line to a per-process file under target/test-skips/. nextest runs each test in its own process, so an in-memory counter would lose records. A summary step merges the files and prints the skip count for each resource.
  • Each lane declares the resources it provides in scripts/ci-matrix.toml and exports them as RUNE_TEST_STRICT. A skip for a declared resource fails the run. For example, T1 Linux declares gpu (lavapipe) and cjk-fonts (a pinned Noto pack, which adds about 100 MB to the CI cache).
  • Skips for undeclared resources count against lane ceilings that only go down.
  • Convert one folder per PR. A ratchet on the count of raw print-and-return sites keeps new ones out.
Done when
  • skip_unless! exists, and both of the rg counts above are 0.
  • Every lane sets RUNE_TEST_STRICT and reports 0 skips for the resources it declares.
  • A lane that declares gpu but gets no adapter fails, shown by a fixture run.
  • A test that skips in two parallel processes is counted twice, shown by a test.
  • Every T1 and T2 run prints skips by resource against committed ceilings.
How to check

The T1 summary step and the T2 lane summaries enforce this. The raw-skip-site ratchet stops regressions. Check strict mode with a scratch run that hides the adapter (WGPU_ADAPTER_NAME=none or an empty ICD path) and confirm T1 Linux goes red.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P1 · size M
R0057CI: a Linux CI job has no guaranteed GPU adapter, so the headless suite's rendering tests could skip or fail in T1P0Phase 1ST02
tooling-t1-gpu-lavapipe · infra
What happens

The headless runner asks wgpu for a device and exits if it gets none. On Linux, Rune compiles wgpu with only the vulkan and dx12 backends, so there is no GL fallback. A hosted Linux runner has no GPU, and nothing in CI installs or checks a software Vulkan driver. www.yml installs only libxkbcommon-dev.

Without a driver, each rendering test either fails or takes a print-and-return skip and passes. crates/ has 38 eprintln!("skip sites. A T1 job could be green while it checks no pixels.

The rune-ref CPU-against-GPU differential sits behind rune-ref's gpu feature. The documented command never runs it.

Some lavapipe knowledge already exists in the repo. scripts/kit-diff.py points VK_ICD_FILENAMES at lavapipe, and GPU setup is serialized because parallel GPU tests on lavapipe crashed the Vulkan loader.

Where
Why it matters

Linux on lavapipe is the only place T1 can check pixels on every PR at hosted cost. The gate requires "the whole headless suite on a real software GPU on Linux" with "0 GPU skips in the Linux T1 job (lavapipe)", and "T1 p50 at most 15 min and p95 at most 25 min". The CI target requires "0 skips for declared resources under RUNE_TEST_STRICT".

What would help

In every Linux T1 test job:

1. Install mesa-vulkan-drivers, and point VK_ICD_FILENAMES at the lavapipe ICD. Find it with a glob, since Debian-based images may name it per architecture. 2. Run a preflight that creates an adapter and prints its name and driver before any test. The job fails if the adapter is not lavapipe. 3. Set RUNE_TEST_STRICT to include gpu, so a missing adapter fails the job instead of skipping. This needs the skip helper from R0056. Neither the helper nor the variable exists yet. 4. Run the headless --snap tests and cargo test -p rune-ref --features gpu --test differential. 5. Print the adapter name and the per-job skip count in the run summary.

If GPU tests push T1's p95 past 25 min, measure them and give them their own nextest partition (R0053). Per-test processes also avoid the parallel-init crash that GPU_INIT works around.

Done when
  • The preflight names the lavapipe adapter in every Linux T1 test job.
  • The run summary reports 0 GPU skips.
  • A headless --snap test and the rune-ref differential run in T1 on Linux.
  • With GPU tests on, T1's p95 is at most 25 min over 20 runs.
How to check

The preflight is the first step of the required Linux T1 job. A drill run with the ICD removed must fail the job, not pass with skips.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P0 · size S
R0058CI: macOS-only tests never run before merge, though macOS is the flagship platform and the default Metal backend lives thereP0Phase 1ST02
tooling-t1-macos-tests · infra
What happens

No workflow runs on macOS. The only Rust job in CI is cargo test -p rune-www on ubuntu-latest. But macOS is where Rune's default renderer lives: with the default metal-backend feature, a Mac app draws with Rune's native Metal backend, not wgpu.

16 of rune's integration-test targets are macOS-only: accessibility_macos, default_menu_macos, help_macos, launcher_wakes, macos_appearance_kvo, macos_drag_out, macos_overlay_cursor, macos_overlay_drag_out, macos_overlay_source, macos_window_corners, menu_key_equivalent_macos, open_activates, overlay_gpu_lifecycle, popup_menu_macos, shortcut_layout_macos and video_gui. On other OSes each one compiles to an empty main and passes. On macOS they are harness = false GUI tests that print "skipped" and pass unless RUNE_GUI_TESTS=1 is set. macos_overlay_cursor also needs the non-default macos-background-cursor feature, so the documented test command never builds it. The installer script test (scripts/mac_app_install_tests.py) runs nowhere either.

So a change that breaks the Mac shell, menus, AppKit accessibility or the Metal path reaches dev and the apps that pin it.

Where
Why it matters

Mac app authors get the regression first, and only when they bump a pin. The target is that "the macOS suites run before merge, with Metal GPU tests on a hosted or merge_group-only self-hosted Mac and 0 skips", inside a pre-merge check with a p95 of at most 25 min, and that "every supported target builds and tests before merge". A red macOS result found after merge also blocks the post-merge lanes that decide which rev apps may pin.

What would help

Add a required job on macos-latest that runs scripts/verify t1 (R0029) with default features. It runs the rune and rune-kit suites, the 16 macOS-only targets with RUNE_GUI_TESTS=1, macos_overlay_cursor with --features macos-background-cursor, and the installer script test.

First measure what the hosted runner gives, and record it in the PR: a Metal adapter, and a GUI session in which AppKit windows open and AX calls answer.

  • Option A (recommended if the adapter is there): run the Metal GPU tests on the hosted runner with strict skips that include metal (R0056). It needs no secrets and can run on pull_request.
  • Option B: run the Metal GPU tests on the self-hosted Mac as a merge_group-only job, never on pull_request. It must run as an isolated user with no stored secrets and no caches shared with post-merge jobs (R0051), behind the trigger checks in R0050.

The job summary lists the resources each target needs and every skip.

Done when
  • A macOS job runs on every PR and merge group and is required for dev.
  • All 16 macOS-only targets and scripts/mac_app_install_tests.py run in it, macos_overlay_cursor included.
  • The PR records whether macos-latest gives a Metal adapter and a GUI session.
  • Metal GPU tests gate before merge on one of the two runners, with 0 skips.
  • A draft PR that breaks one macOS-only test turns the check red.
  • The job's p95 is at most 25 min over 20 runs.
How to check

The job is listed as required in the dev ruleset. The test inventory from R0030 shows each macOS target as run on macOS. A fixture PR that fails a macOS-only test stays blocked.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P0 · size S
R0059CI: accessibility unit tests and Kit's accessibility goldens never run on a pull requestP1Phase 1ST02
a11y-ci-required · infra
What happens

CI runs cargo test -p rune-www and the site build. None of Rune's accessibility suites run on a pull request:

  • Runtime unit tests. In test builds, every tree update checks that the tree sent to the OS equals a whole rebuild (a11y_check_sent). That check exists only under cfg(test), so it only helps when the tests run.
  • Kit's 26 accessibility goldens in crates/rune-kit/tests/a11y/golden. A golden differs only when it fails. RUNE_BLESS=1 rewrites it.
  • Web mirror tests. They compile in native test builds, so a Linux job can run them, but none does.
  • Platform tests accessibility_macos and accessibility_windows. These are GUI targets that skip without RUNE_GUI_TESTS=1.

Apps pin dev, so a broken role, name or action reaches assistive-technology users with the next pin bump.

Where
Why it matters

Screen-reader users notice a lost label or a dead button. Developers do not, unless a test runs. The target is that "every accessibility suite is a required check on the merge path to dev", covering "runtime unit, Kit goldens, golden coverage, web mirror, parity, audit, keyboard walk, reflow lint, contrast tokens, WCAG matrix".

What would help

Name the accessibility suites as required inventory targets in the pre-merge check, so the inventory step from R0030 fails if one stops running:

  • the rune a11y module tests with the accessibility feature, on the Linux job, the macOS job (R0058) and the Windows job (R0054);
  • the rune-kit a11y target with its 26 goldens;
  • the web mirror tests on Linux;
  • accessibility_macos and accessibility_windows with RUNE_GUI_TESTS=1, where the runner allows AX or UI Automation.

CI never sets RUNE_BLESS. A changed golden lands only with its reviewed JSON diff in the PR. The parity, audit, keyboard-walk, reflow, contrast and WCAG-matrix suites join the same list as their owners add them. Each one arrives already required.

Done when
  • The four groups above are named inventory targets and run on every PR and merge group.
  • A PR that changes one Kit golden's expected output, without the golden, fails the check.
  • A PR that breaks a11y_check_sent fails the check.
  • No CI job sets RUNE_BLESS, and a lint on the workflows enforces it.
  • The dev ruleset requires the jobs that run these targets.
How to check

The inventory step lists each accessibility target with its job. Two fixture PRs, one with a golden diff and one with a sent-tree mismatch, stay red. A workflow grep for RUNE_BLESS returns nothing.

Depends on
Part of
  • Theme: T02
  • Tracked in R0028
  • Phase 1 · priority P1 · size S
R0060Issues: no template asks for the rev, platform or a headless repro, though the contributing model runs on agent-filed issuesP2Phase 1ST02
tooling-issue-template · docs
What happens

The README says Rune takes no pull requests. It asks people to have an agent open an issue that describes the bug or idea. Issues are the only way work comes in from outside, but .github/ holds only workflows/site.yml and workflows/www.yml. There are no issue forms, no SECURITY.md and no CONTRIBUTING.md.

So what a report contains depends on whoever writes it. Some reports leave out the rev, so a maintainer can't tell whether the bug is already fixed on dev. Some leave out the platform and GPU, and a renderer bug can depend on the backend. Few include a repro that runs headless. Rune already has the tools for that: --script drives input on the virtual clock, and --tree and --snap print the result. A report that includes them can be replayed and turned into a test the same day. A report without them needs a round trip first. There is also no private way to report a security problem, so the only route is a public issue.

Where
  • README.md:59-62: the Contributing section. No pull requests, agents open issues.
  • .github/: contains only workflows/.
  • crates/rune/README.md:2339: "Agent tooling (headless, no window, same renderer, fixed virtual clock)". These are the flags a repro would use.
  • crates/rune/README.md:1258: headless --script input.
  • #204 is an example of a report that is easy to act on: the window size, refresh rate, input rate and measured numbers, with a table.
Why it matters

Maintainers and their agents read every incoming issue. Each missing rev or repro costs a round trip before work can start. The targets this serves:

  • "a bug report is a replay": a window's input, initial state and seed record to the --script format.
  • The agent's docs are true, with "100% of documented headless commands in the crate README and examples/README" backed by a fixture that runs in T1.

A form that asks for the headless command connects incoming reports to those fixtures.

What would help
  • Add .github/ISSUE_TEMPLATE/bug.yml, an issue form with these fields:
    • rev (git rev-parse HEAD or the pinned rev in the app's Cargo.lock);
    • platform, OS version, GPU and backend (RUNE_GPU_BACKEND if set);
    • a minimal app or scene;
    • a --script file and the --tree output (or a recording, once input recording lands);
    • expected and actual behaviour;
    • the headless command that shows it.

Every field accepts "not available" with a reason, so a report about a windowed-only bug can still be filed.

  • Add .github/ISSUE_TEMPLATE/feature.yml with these fields: the use case, the API the app would write, and what it does today.
  • Add config.yml linking to the docs site.
  • Add SECURITY.md with a private reporting route, such as GitHub private vulnerability reporting, so it shows in the repository's Security tab.
Done when
  • Bug and feature forms exist, and every field accepts "not available" with a reason.
  • The bug form asks for the rev, platform and GPU, and a headless command or --script repro.
  • SECURITY.md names a private reporting route, and GitHub shows it in the Security tab.
How to check

Check it in the PR. File one test issue through each form and confirm the fields render. Open the Security tab and confirm the policy shows. Once agent-filed issues use the form, read a sample of the next 10 bug reports and count how many include a rev and a runnable repro.

Part of
  • Theme: T02
  • Phase 1 · priority P2 · size S
R0061CI: the macOS GUI tests run only when someone sets RUNE_GUI_TESTS=1 by handP1Phase 1MT03
platform-ci-macos-gui · infra
What happens

macOS has more GUI tests than any other platform. They cover panel adoption, overlay source reattachment, appearance KVO, window corners, menus and key equivalents, drag out, pop-up menus, video, help and the overlay GPU lifecycle. These tests guard the AppKit hooks that are most likely to break silently. Nothing runs them.

crates/rune/Cargo.toml declares 19 harness = false test targets. 18 of them do work on macOS (all but accessibility_windows). 15 return at once unless RUNE_GUI_TESTS is set, and print a skip line that still exits 0. The other 3 (default_menu_macos, menu_key_equivalent_macos, shortcut_layout_macos) need no flag, but they need a Mac, and no workflow runs on one. macos_overlay_cursor also needs --features macos-background-cursor.

The default Mac backend is Rune's native Metal, and RUNE_GPU_BACKEND=wgpu switches to wgpu's. The two present paths differ, and neither runs in CI.

Where
Why it matters

Mac app teams find a broken panel, menu or overlay after they pin the rev. The targets: every supported target is tested, post-merge results arrive within 2 h of every push, and a red result opens an issue. 0 jobs may fail and 0 tests may be quarantined. Every lane runs with 0 skips for the resources it declares. Rune owns its shell seam, so no out-of-band winit hook goes unchecked. These tests are the checks for those hooks.

What would help
  • Use a self-hosted Mac with a logged-in GUI session. The workflow triggers on push to dev and on dispatch only, never on pull_request. Enforce that with workflow conditions and a runner group (R0050). Use a separate account and cache from the one that keeps caches for later jobs (R0051).
  • Build and run every harness = false target with RUNE_GUI_TESTS=1, once on the default native Metal backend and once with RUNE_GPU_BACKEND=wgpu. Add --features macos-background-cursor for the cursor test.
  • Make a skip line a failure in this lane. A test that skips here has lost its session or its flag.
  • Take the test list and the per-OS test counts from R0054, so a new GUI target joins the lane without a workflow edit.
  • On red, open one issue with the failing test, the backend and the commit range, through R0249.
  • overlay_soak runs here but reads 0 MB on macOS. R0247 fixes that.
Done when
  • Every harness = false target that does work on macOS runs on every push to dev, on both backends, and reports within 2 h.
  • The lane fails when any test prints a skip line or the runner has no GUI session.
  • A failing run opens an issue with the test, the backend and the commit range.
  • The runner takes no pull_request job. A test PR from a fork confirms it.
How to check

The workflow file and runner labels, with results per push. Break a hook on a branch (for example, stop reattaching the overlay source) and dispatch the lane: macos_overlay_source must fail on both backends. A weekly report counts runs and tests per backend.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 1 · priority P1 · size M
R0062CI: the web smoke tests never run, cover only web-hello, and WebKit skips every check when it has no WebGPU adapterP1Phase 1MT03
platform-ci-web-browsers · infra
What happens

scripts/web-smoke.mjs and scripts/web-input-smoke.mjs drive web-hello in headless Chromium. They cover rendering, the idle check, touch, text input, composition, clipboard, links, theme and resize. No workflow runs them. www.yml builds the site's wasm and runs cargo test -p rune-www, and nothing else.

The scripts cover full-viewport mode only. Document mode, embedded canvases, image fetch and fonts by URL have no browser test. Firefox is never launched. In WebKit with no WebGPU adapter, the script logs available: false and exits 0 without running any check, the input smoke included. A WebKit run passes whatever it would have found.

The www.yml path filter leaves out examples/**, but the page embeds examples/hello/src/main.rs with include_str!. It leaves out scripts/web-*.mjs as well.

Apps found two bugs that this job would catch. #166: frames are drawn at rest when a compositor is attached, and two per live value change. #121: Return does not press the focused button.

Where
Why it matters

Web users find these bugs first, and people on phones pay in battery. The targets: the web build is a first-class target in every browser engine. Every engine passes, and a missing engine fails. Every case passes with 0 submits at rest. Post-merge results arrive within 2 h of every push, and lanes run with 0 skips for the resources they declare. At rest: 0 presents and 0 submissions on every host.

What would help
  • Add a post-merge job. It builds web-hello with scripts/web-build.sh and runs both scripts under Playwright in Chromium with WebGPU, in Firefox and in WebKit. Run WebKit on a macOS runner as well as on Linux. Build on R0036 and R0030.
  • Split GPU checks from input and DOM checks. In Chromium, a missing adapter fails the job. In an engine without an adapter, the input and DOM checks still run, and the summary lists each GPU check as not applicable with its reason. No engine exits 0 with no checks run.
  • New cases: document mode (band scroll, mirror links, the static swap), embedded canvas mode, image fetch, fonts by URL. Run the 600 ms idle check (0 submits, 0 rAF callbacks) in every engine. Add an idle check with a compositor attached, and one live value change that draws exactly one frame (#166). Add a Return-on-focused-button case (#121).
  • Add examples/** and scripts/web-*.mjs to both path filters.
  • WebGL2 and cross-backend pixel checks belong to R0268. Mobile Safari and Chrome belong to R0248.
  • One record made Chromium a required pre-merge check. Recommended: start post-merge, then promote Chromium under R0028 once it is stable.
Done when
  • The job runs in Chromium, Firefox and WebKit on every dev push and reports within 2 h.
  • Chromium without a WebGPU adapter fails the job.
  • Each engine's summary marks every check passed, failed or not applicable with a reason.
  • Full-viewport, document and embedded modes each have cases.
  • The #166 cases fail on a build that redraws, and stay quarantined, linked to #166, until it is fixed. The #121 case runs.
  • An edit under examples/** triggers the job.
How to check

On a branch, make an idle page request a frame, and confirm that every engine fails the idle check. Lane status feeds R0169.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 1 · priority P1 · size M
R0063CI: no Windows window, overlay, title bar, DPI or input path runs anywhere automaticP1Phase 1MT03
platform-ci-windows-gui · infra
What happens

No CI job runs any Windows code. The README says Windows builds are checked with cargo xwin clippy only. That leaves a large shell untested:

  • The custom frame. Rune draws its own caption buttons and answers WM_NCHITTEST over them as HTMINBUTTON, HTMAXBUTTON and HTCLOSE, so that Windows 11 shows the snap layouts flyout.
  • The first-frame cloak, which keeps a window off screen until it has drawn.
  • Overlay styles (WS_EX_NOACTIVATE, WS_EX_TRANSPARENT) and click-through.
  • Pop-up menus, the tray, and drags across displays with different scales.
  • Touch and pen, which arrive through winit's touch path and are timed on a clock that starts at the first touch.

The one Windows GUI test, accessibility_windows, returns at once unless RUNE_GUI_TESTS is set. ARM64 is never built. #47 (live resize), #130 (frameless move and resize) and #181 (caption theme) were found by apps.

Where
Why it matters

Windows users see a white flash, a dead maximize button or a blurry window after a monitor move before anyone in the project does. The targets: Windows apps behave like native Windows 11 apps on every DPI, GPU and input device. Post-merge results arrive within 2 h of every push, a red result opens an issue, 0 jobs may fail, and 0 tests are quarantined. Every lane runs with 0 skips for the resources it declares.

What would help
  • Add a GUI lane on hosted Windows x64 runners with WARP, and on ARM64 runners, after merge. Take the binaries and per-OS test counts from R0054 and the workflow rules from R0050.
  • The job first checks that it has an interactive desktop session, and fails if not. It installs an indirect display driver to add a second virtual display at 150%, and fails if it cannot.
  • Cases:
    • A window stays cloaked until it draws.
    • Hovering maximize opens the snap layouts flyout, found with UI Automation.
    • Caption buttons and resize edges answer WM_NCHITTEST.
    • The caption colour and the dark-mode attribute, read with DwmGetWindowAttribute, follow the app theme (#181).
    • A WS_EX_NOACTIVATE overlay toggles click-through.
    • A pop-up menu item is picked, and a tray icon appears.
    • A window moved to the 150% display redraws at the new scale with 0 wrong-scale frames after WM_DPICHANGED.
    • Touch and pen injected with InjectSyntheticPointerInput arrive with their phases.
    • accessibility_windows runs. R0240 extends it.
  • WARP has no real vsync and no device removal. Cadence, resize capture and fault injection run on R0402.
  • Whether the x64 job also becomes a required pre-merge check is decided with R0028.
Done when
  • Every case passes on x64 and ARM64 and reports within 2 h of each push.
  • The lane fails, and does not skip, without an interactive session or a second display.
  • The mixed-DPI case counts 0 wrong-scale frames.
  • A red result opens an issue with the case, the architecture and the commit range.
How to check

Results per push. On a branch, answer HTCLIENT over the maximize button and confirm the snap layouts case fails. Remove the cloak hold and confirm the cloak case fails.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 1 · priority P1 · size M
R0064CI: motion gate tests are not part of any required check, so a motion finding never fails a mergeP0Phase 1ST04
motion-gate-required-in-ci · infra
What happens

The only Rust tests CI runs are cargo test -p rune-www, in the www workflow. That workflow starts on changes under www/ or crates/ and tests the page, not the framework. No workflow runs rune-motion's tests, and no workflow runs the motion gate tests in rune and rune-kit. Those tests are the gate_rows and gate cells for menus, rolling text, the scroll bar and anchored zoom. gate_rows already panics when a finding has no allow row. But nothing runs it before a merge, so a change that adds a one-frame jump to a transition merges green.

The 36 scenarios in scripts/motion-audit/run.sh are release builds that a shell script drives. They are not tests yet, so they join this job only as they are ported into gate tests.

Where
Why it matters

Users notice motion faults at once: a sheet that pops in, or a row that jumps a frame before it glides. Apps pin dev revs, so a regression reaches them on their next bump. The motion audit's target is "100% of scenarios in the required merge check", "0 unallowed findings" and "test execution <= 3 min on a 4-core hosted runner". The perf target is that "count budgets [are] required ... on every merge" and that a violation "fails the lane". The 120 Hz target needs continuous motion to present on "every refresh". A regression that no check catches works against all three.

What would help
  • Add a motion-gate job to the required workflow from R0030. It runs on pull_request and merge_group on a hosted Linux runner and is required for dev.
  • The job runs cargo test -p rune-motion -p rune -p rune-kit --features rune-kit/markdown filtered to the motion tests. Or it runs the whole documented command with the motion tests reported on their own. We recommend a separate job named for the gate, so branch protection can require it by name and its time can be read on its own.
  • Time cargo test --no-run and the test run as two steps, and print both.
  • Gate on findings and counts only. No step compares wall-clock time. Cells that need GPU pixels run in a post-merge GPU lane.
  • Print the number of cells and frames from the gate's summary line, so a test that stops running shows up.
  • Each scenario from run.sh joins as it becomes a gate test, under R0252.
Done when
  • A required job runs on pull_request and merge_group and blocks merges to dev.
  • It runs rune-motion's tests and every gate and gate_rows test in rune and rune-kit.
  • Its log shows compile time and test time apart, and the median test time over 5 runs is under 3 min on a 4-core hosted runner.
  • A PR that plants a one-frame jump in a gate scenario fails the job, and that PR is linked here.
  • No step in the job reads wall-clock time as a pass condition.
How to check

The required check itself, plus the planted-regression PR. The job summary prints the cell and frame count, so a drop in coverage is visible on every merge.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 1 · priority P0 · size S
R0065Perf: the scenes PLAN §8 and the open perf issues name have no single scripted suiteP0Phase 1MT04
perf-canonical-scenes · infra
What happens

Some perf scenes exist as separate examples. They are gpu_springs, long_note, window_scroll_cost and interaction_cost in crates/rune/examples, and layout_text_cost and scroll_bench in crates/rune-kit/examples. Each has its own arguments and output. Other scenes were measured with apps outside the repo: the board long-card scroll, #204's table and body scrolls, #205's hover sweep and #203's growing list. There is no 1M-row list, no 100 MB file and no shared fixture format. So nothing runs these scenes as one suite, and no budget or matrix row can name them.

Where
Why it matters

Every perf target needs a scene before it can be held. These are the targets:

  • worst-case frames: "p95 <= 4 ms and 0 frames over 8.3 ms per run" on the reference Mac;
  • typing: "p95 <= 1 ms at 50 KB, <= 2 ms at 200 KB, <= 4 ms at 1 MB";
  • rest: "0 presents, 0 submissions";
  • large lists: "scroll CPU p95 <= 1 ms (fixed) and <= 2 ms (variable)", and "first viewport <= 100 ms";
  • live resize: "frame CPU p95 <= 8.3 ms with 50 KB of text".

Without one suite, every pass rebuilds its own scene, and numbers from different passes can't be compared.

What would help

Add examples/perf-scenes as the one entry point, with --scene NAME and --list-scenes. Wrap the existing examples, and add the missing scenes:

  • board long-card scroll;
  • 100k-row table at 4, 32 and 600 pt per frame (#204), and the syntax-coloured body;
  • hover sweep (#205), and growing list (#203);
  • typing at 50 KB, 200 KB and 1 MB, including a single-paragraph fixture, and md-open at 50 KB;
  • 1M-row fixed and variable list, and the 100 MB file;
  • 10 s idle, and resize with 50 KB of text;
  • hello and settings launch.

Fixtures come from a seed and regenerate byte for byte. Each scene states whether it runs headless, windowed or both. Each scene ships a real-frames.py config. A README table maps each PLAN §8 row, and each row of R0066, to a scene. The suite also serves as a large example of virtual_rows and memo.

Done when
  • Every scene above runs with --profile perf and writes a frame record log.
  • Every PLAN §8 row maps to a named scene in the README table.
  • Fixtures regenerate byte-identically from their seed, checked by a test.
  • The required merge check builds the suite, and runs each headless scene for at least one frame.
How to check

The merge check builds and smoke-runs the scenes. The lanes and count budgets under R0520 run them by name.

Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 1 · priority P0 · size M
R0066Perf: no committed table maps each performance target to a scene, a probe and a failing checkP0Phase 1ST04
perf-budget-matrix · infra
What happens

PLAN §8 lists the performance targets, and the open perf issues each name their own metrics. Nothing ties a target to the scene that exercises it, the probe that measures it, the statistic and sample size, the machine, and the check that fails. scripts/real-frames.py and scripts/bench-startup.py run scenarios and print numbers, but they hold no thresholds. A lane that only publishes numbers can't hold a target. A target with no row is never checked, and nobody can tell from the repo which targets are enforced.

Where
Why it matters

Regressions in frame time, latency and memory reach apps on their next rev bump, and are found by hand-run research passes. The target is that "100% of rows [are] enforced or marked failing with an open issue", that "count budgets [are] required ... on every merge", and that wall-clock suites run nightly on the macOS, Windows, Linux, web and iOS lanes. It also asks for "tail statistics pooled over at least 5 paired runs with frame counts stated", and that each published number record its "rev, backend, device and date". Without one table, none of that can be audited.

What would help

Add perf/matrix.toml with one row per target and platform. Each row has these fields:

  • target (the PLAN §8 metric or issue it comes from), scene, device, backend, probe;
  • statistic (p50, p95, p99 or max, pooled over at least 5 paired runs, with the frame count);
  • threshold (absolute), and an optional peer and ratio;
  • lane (merge check, nightly or weekly), and status (enforced, failing with an issue, or unsupported with an issue).

A checker reads a lane's results and fails the run on any enforced or failing row it misses. A schema test in the required merge check fails in these cases:

  • a PLAN §8 metric has no row;
  • a row names a scene that R0065 doesn't define;
  • a row names a probe that doesn't exist;
  • a non-enforced row has no issue link.

Thresholds start from PLAN §8 and from the issues' stated targets. Count budgets from R0520 are rows whose lane is the merge check.

Done when
  • perf/matrix.toml has at least one row per platform for every PLAN §8 metric.
  • Every unsupported or failing row links an open issue.
  • A lane run with a seeded violation of an enforced row exits non-zero and names the row.
  • The merge check fails when a metric loses its last row, or a row points at a missing scene or probe.
  • The README of perf/ says how to add a row.
How to check

The schema test runs in the required merge check from R0030. Each lane has one seeded-violation run, kept as a test of the checker.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 1 · priority P0 · size S
R0067Layout: only Markdown fixtures have rect goldens, so a change that moves a kit component's layout lands unnoticedP1Phase 1MT04
layout-rect-goldens · infra
What happens

crates/rune-kit/tests/golden holds rect goldens for 9 Markdown fixture files, read by markdown_fixture.rs, and RUNE_BLESS=1 accepts a change. crates/rune-kit/tests/a11y/golden holds 26 accessibility trees, and those strip bounds on purpose. No kit gallery story and no example has a rect golden. Kit parity is checked by hand with scripts/kit-diff.py. So a change that moves a Button's padding, a Select's popup or a Sidebar row by half a point passes every test. Apps pin dev revs, so the moved rect reaches them on their next bump with no changelog line.

Where
Why it matters

App authors find layout changes in their own screenshots after a bump, not in the changelog. The layout target is that "every rect change in a story, an eligible example or a scripted interaction is caught at merge and declared". It asks for "100% of stories, eligible examples and checkpoints gated", "0 golden changes without a matching fragment", "CI never writes goldens" and "0 failing layout tests on dev".

What would help
  • Add a test that runs every examples/kit-gallery story, and every example listed in a manifest, headless at scales 1 and 2. It uses bundled fonts only, a fixed scene time and a fixed viewport. It compares --tree rects with goldens in the Markdown fixture format, and accepts changes with RUNE_BLESS=1.
  • The manifest lists every example. It marks the ones that need files, network, a GPU or a native surface as skipped, with a reason. A new story or example fails until it is listed. The manifest later seeds the canonical scene manifest under R0253.
  • Add a check to the required gate from R0028. A PR that changes a golden must add or edit a changelog/unreleased/ fragment that names the changed story or example.
  • CI only compares and never runs with RUNE_BLESS set.

Text rects depend on fonts. With system fonts, goldens differ by machine, so bundled fonts are required, not optional.

Done when
  • Every gallery story and every eligible example has goldens at scales 1 and 2. A new one fails until it is in the manifest.
  • Moving one Button's padding by 0.5 pt fails the test.
  • A PR that changes a golden without a fragment naming that story or example fails.
  • No CI job sets RUNE_BLESS. A check fails if a workflow does.
  • The test runs in under 2 min in the required check.
How to check

The golden test and the fragment check run in the required merge check. One seeded padding change is kept as a test that the golden diff fires.

Depends on
Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 1 · priority P1 · size M
R0068Motion gate: one 454-line check function holds every rule, so porting the missing rules would push check.rs over the capP1Phase 1MT04
motion-gate-check-split · refactor
What happens

motion_gate::check runs from line 323 to line 776 of check.rs, 454 lines in one function, in a 784-line file. The file has a 3-line test module, so it holds about 781 non-test lines, 19 under the 800-line cap. The rules share indexes that the function builds inline: per-element series, input times, loads and loops. So adding or porting a rule means editing the middle of one function. The analyzer still has kinds the Rust rules lack: stall, step, sibling-jump, dog-leg, latency, invisible-work and idle-frames. Porting them into check() would take the file past the cap and make every motion change collide in one place.

check/ already has nine submodules (commits, evidence, kicks, loops, paint, painted, raster, regions, series) with 1,442 lines between them. They show the direction, but the core rules still live in check().

Where
Why it matters

The motion target is "one rule set", with "findings ... only from the Rust rules, with every kind analyze.py had". That means every analyzer kind has to land in the Rust checker. It also wants test execution kept to "<= 3 min on a 4-core hosted runner". A shared index built once per recording keeps the added passes cheap. Without the split, each port is a risky edit to one large function, and it breaks the file-size rule.

What would help
  • Build one indexed view of a Recording once: per-element series, input times, intents, loads and loops.
  • Turn each rule family into a pass over that view, with one module per family under check/. Families could be mount and exit, geometry (jump, jerk, reversal, overshoot, jiggle), opacity, text, scroll, loops and wakes, and paint.
  • check() becomes a loop over the passes, then the existing sort.
  • Land the split in its own PR with no change in behaviour, before any rule is added or ported.
Done when
  • check() is a loop over passes, with one module per rule family.
  • Every gate test, and every run.sh scenario's .gate.txt, gives byte-identical findings before and after. The PR shows the comparison.
  • check.rs and each new module stay under 800 non-test lines, and scripts/file-size.sh passes.
  • Gate test time doesn't rise by more than 5% (median of 5 paired runs).
How to check

The gate tests in the required merge check (see R0064) compare findings. scripts/file-size.sh keeps the files under the cap.

Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 1 · priority P1 · size M
R0069Commit: nothing counts view runs, measure passes, layout solves or rows built per commit, or commits per frameP1Phase 1MT04
perf-view-runs-counter · feature
What happens

FrameStats has four fields: commits, layout_nodes, glyphs and shaped. One commit can measure up to 9 times: the first measure, two layout-read settles, then a focus re-measure and a caret re-measure, each with up to two settles of its own. Each measure can make up to 9 passes, and every pass re-runs the app's view. A ninth pass falls back to a full measurement. solve() makes 1 to 3 compute_layout calls, for aspect_fit and anchored_fit. A frame also commits once for each routed key that follows a state change.

None of this is counted. Headless tooling counts commits per frame only under frame-profile. layout_text_cost counts view runs with its own thread_local. So a settle loop, a virtual-estimate retry or a key burst that runs the view nine times looks like one commit, and no test or budget can catch it.

Where
Why it matters

Users feel these blowups as a dropped frame when a field takes focus, or as lag while typing. The layout target asks for "at most 3 view runs in any commit", "at most 1 view run in >= 99% of commits in each scene", and "commits with >= 2 compute_layout calls ... <= 5%". The resize target asks for "0 root view runs after the first frame". The frame target says that "nodes visited <= the counted definition". It also says that "debug checks change neither the commit count ... and diagnostic view runs are counted separately". All of these need exact counts.

What would help

Add one CommitCounters record, owned by the commit subsystem, with these fields:

  • measure invocations by cause (first, settle, focus, caret);
  • root view runs, across all invocations, discarded ones included;
  • diagnostic view runs (the debug live check), counted apart;
  • passes by cause (virtual short, force fallback);
  • compute_layout calls, Taffy hits and misses, and measure-callback calls;
  • texts laid out and nodes placed;
  • virtual rows built across retries, key calls, fallback mounts, and layout reads that reach PASSES or ECHOES.

Fast paths (resize-only, virtual-only) count zero view runs and say which path ran. Add commits per frame to FrameStats. Expose the record through accessors such as Runtime::commit_counters(), the frame log and --trace, and print it in layout_text_cost. Allocate nothing. In debug builds, perf_warn once when a commit passes 3 root runs, or a frame passes 4 commits, and name the CommitWhy bits.

Done when
  • Each field has a test that triggers it, including one with a discarded measurement.
  • A doc comment says when each counter increments across retries and fast paths.
  • A layout-read feedback loop test sees a count above 3 and the warning with its CommitWhy bits.
  • test_alloc shows 0 added allocations per commit.
  • Overhead is at most 1% of commit time on layout_text_cost's stack case (paired --profile perf runs).
How to check

Unit tests in the required merge check. Count budgets under R0520 read these counters on the scenes from R0065.

Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 1 · priority P1 · size M
R0070procwatch: footprint, threads and CPU are read only on macOS, so no memory or idle-CPU gate can run on Windows, Linux or webP1Phase 1MT04
platform-procwatch-cross-platform · feature
What happens

procwatch reads footprint, resident size, CPU and per-thread names and CPU through libproc on macOS only. Elsewhere, snapshot() and snapshot_of() return None, usage() returns every field None, and watch does nothing. A test pins this as usage_is_unknown_off_macos. The counting allocator and gauges work everywhere, but nothing reads what the OS charges the process. So the hidden-window memory check, the covered-window CPU check for #139 and every idle-CPU check can run on macOS only. On web, only Rune's own gauges exist.

Where
Why it matters

Users on Windows and Linux notice an idle window that keeps a core busy, or memory that grows, as fan noise and battery drain. The platform target asks for "Hidden: at most 1% of a core", "growth over 100 cycles ... under 1 MB", footprint "within 5% of the warmed baseline 1 s after a hide", and "the thread count returns to baseline", on every platform. The memory target asks for Windows and Linux hello "within 1.2x of a native hello on the same machine". None of these can be measured off macOS today.

What would help

Add backends behind the same API, with raw FFI declarations so the crate keeps libc as its only dependency.

  • Windows: GetProcessMemoryInfo (private usage and working set), GetProcessTimes, and thread enumeration with CreateToolhelp32Snapshot, GetThreadTimes and GetThreadDescription.
  • Linux: /proc/self/status and /proc/self/smaps_rollup for footprint (Pss and private bytes) and resident size, and /proc/self/task/*/comm and stat for thread names and CPU. Count open files from /proc/self/fd.
  • Web: expose gauges and heap counts. Use performance.measureUserAgentSpecificMemory where the page is cross-origin isolated.

Document which Snapshot and Usage field each platform fills, and what "footprint" means on each. Definitions differ by OS, so gates use owned counters exactly and footprint with margins.

Done when
  • snapshot() returns footprint, resident size, thread names and CPU on Windows and Linux.
  • A test that allocates and touches 64 MB sees footprint rise by at least 60 MB on macOS, Windows and Linux.
  • A test that starts and joins a named thread sees the thread count rise by 1, then fall back, with the name present while the thread runs.
  • watch and serve work on Windows and Linux.
  • The crate docs list the fields each platform fills.
How to check

The unit tests run in the desktop test lanes on all three OSes from R0054. The idle and soak checks under R0520 read procwatch on every lane.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 1 · priority P1 · size M
R0071CI: no Linux window, overlay, tray or portal path runs anywhere automaticP1Phase 1LT03
platform-ci-linux-gui · infra
What happens

No automatic job runs Rune's Linux shell code. That code covers layer-shell overlays on their own Wayland queue, XWayland and X11 overlays, the SNI tray, portals and global shortcuts. The README says overlays were checked under headless sway, and nothing more. The only Rust job in CI runs cargo test -p rune-www on Ubuntu.

Apps found each of these on a desktop the authors had not run: #20, #85, #139 (a covered GNOME window spins a core and its poll stops), #140 (global shortcuts need an app id), #142 (a hidden overlay keeps its images), #143 (the portal folder chooser's Select does nothing) and #169 (a layer surface the compositor stops painting blocks the event loop in vkQueuePresentKHR). Nothing runs KDE, GNOME, Hyprland or a fractional scale. procwatch reads footprint only on macOS, so no Linux memory or thread check is possible yet.

Where
Why it matters

Linux users on GNOME, KDE or Hyprland at 125% or 150% hit these bugs first, and report them after the rev is pinned. The targets: post-merge lanes report within 2 h of every push, a red result opens an issue, and 0 tests are quarantined. Every lane runs with 0 skips for the resources it declares. On Linux, every cell passes on every declared desktop, or it carries a documented protocol limit in the capability registry. A machine without Vulkan sees 0 panics.

What would help
  • Five lanes on hosted Linux with lavapipe from R0057: headless sway, Hyprland's headless backend, mutter --headless, kwin_wayland --virtual and Xvfb with a window manager. Run each at scales 1, 1.25 and 1.5.
  • A session D-Bus with xdg-desktop-portal test backends, an SNI watcher, a notification daemon, and logind and UPower fakes.
  • Cases: open, resize and close a window. Show, hide and reshow an overlay (layer shell on wlroots and KDE, the XWayland fallback on GNOME). Register a tray item. Open and answer a file dialog and a folder dialog. Register a global shortcut. Check that an AccessKit tree appears on AT-SPI (R0237 does the full check). Replay recorded libinput scroll deltas. A covered window keeps running its poll and timers (#139). A layer surface that stops being painted does not block the loop (#169). Add pop-up menus, drag in and out, and IME as those land.
  • Read footprint and threads through R0070. Take the test binaries from R0054 and the workflow rules from R0050.
  • Schedule: one record made the sway lane a required pre-merge check. Recommended: run all five post-merge first. Promote sway to a required check under R0028 after 2 weeks without a flake.
  • A case for an open bug may be quarantined only with its issue number (#139, #142, #169), and the run prints the quarantine count.
Done when
  • All five lanes run at all three scales on every dev push and report within 2 h.
  • Every case passes, or is quarantined with an open issue. The count is printed, and it is 0 when this issue closes.
  • A missing compositor, portal backend or adapter fails the lane instead of skipping.
  • A hidden overlay's thread count returns to baseline after 50 show and hide cycles.
  • A red result opens an issue with the case, desktop, scale and commit range.
How to check

Lane results per push. Break the layer-shell configure wait on a branch and confirm the sway, Hyprland and KDE lanes fail. Headless compositors and test portals differ from real sessions, so keep the per-release device checklist with real portals.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 1 · priority P1 · size L
R0072Render: no single count of a renderer's GPU bytes; LayerStats leaves out backdrops, the blur pyramid, instance buffers and imagesP1Phase 1MT04
render-gpu-bytes-accounting · infra
What happens

Apps and tests can't see where GPU memory goes. LayerStats reports layer targets, their bytes, extra passes and allocations, and nothing else. These are not counted:

  • backdrop copies and the blur pyramid;
  • instance buffers, and the 2 spares the native Metal backend keeps per written buffer;
  • image pages, glyph pages and staging;
  • native-surface textures and compositor targets.

No procwatch gauge is registered for any of them. #80's numbers came from wgpu's allocator report, and the native Metal backend returns None for that report. So on the backend most Mac apps use, there is no GPU byte count at all.

Where
Why it matters

Users see GPU memory as footprint in Activity Monitor and Task Manager, and as jetsam kills on iPhone. The render target asks that "every pool is counted", and that, with one renderer on the device, "its logical total is within 5% of the allocator's allocated bytes". It also asks that "a hello window [hold] <= 8 MiB" and that "a hidden window frees at least 90% of its transient bytes within 2 s". The memory target asks for "Mac hello <= 30 MiB footprint", and that "a hidden window holds no full-size drawables". None of these can be checked without a per-pool count.

What would help
  • Add Renderer::gpu_bytes() -> GpuBytes, with a field per pool and a total, in logical bytes (the sizes of the textures and buffers Rune created).
  • The owner that creates a resource counts it. Objects shared per device, such as shared glyph pages or the embed GPU, are counted once, under the device.
  • Drawables are a separate surface field. Imported external textures count as zero bytes, with a count of imports.
  • Compositors report their own targets through a Frame gauge.
  • Register a procwatch gauge per pool, and show the pools in --trace and headless stats.
  • On DX12 and Vulkan, compare with generate_allocator_report's allocated bytes, and keep reserved blocks as a separate number.
Done when
  • A scene with text, an image, a blurred layer, a backdrop blur and video reports non-zero bytes in each matching pool, and 0 in the others.
  • On lavapipe, with only one renderer allocating on the device, the logical total is within 5% of the allocator report's allocated bytes.
  • Two windows that share a device count shared objects once.
  • The pools appear as gauges in procwatch JSON and in headless stats.
How to check

A test on lavapipe in the required merge check. The soak check under R0520 reads gpu_bytes() per cycle and compares the end with cycle 1.

Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 1 · priority P1 · size M
R0073Render: nothing counts pipeline creations per frame, so a compile on the UI thread can't be caught by a testP1Phase 1ST04
render-pipeline-counter · infra
What happens

Rune creates many pipelines lazily, the first time a frame needs them:

  • an extra target format;
  • the first isolated layer;
  • the first plus-lighter blend;
  • the backdrop blur, layer blur, video and alpha-surface helpers.

Pipeline compiles are the largest one-off render stalls, tens of milliseconds on a cold cache. No counter reports how many pipelines a frame created, or on which thread. The native Metal backend counts table misses for the whole process (precompiled_misses), not creations per frame. Other backends return None. first_use_ms times each helper once in a lab, but no test can assert that a steady frame creates nothing, or that a prewarm covers a scene.

Where
Why it matters

Users see a cold pipeline compile as a hitch the first time a sheet blurs or a layer fades. The render target asks for "0 UI-thread pipeline creations after the first frame". It asks that "no scenario adds more than 2 ms of render or media work to the UI thread", and that "every built-in pipeline is precompiled or cached on macOS, iOS and Windows". The frame-cost target asks for "0 GPU allocations in a steady frame on every path". A count per frame and per thread is the only way to hold these in a test.

What would help
  • Count render and compute pipeline creations in Renderer, in the compositor helpers (backdrop blur, layer blur, native surface, alpha surface, springs), and in the native backend's runtime MSL compiles. Report builtin hits and misses as well.
  • Split the counts by UI thread and other threads, decided at the call site.
  • Expose pipelines_created_ui and pipelines_created_other through FrameStats accessors, the frame log and --trace.
  • Keep precompiled_misses as it is, and add the per-frame split beside it.
Done when
  • FrameStats exposes UI-thread and other-thread pipeline creations per frame.
  • A test confirms that a steady frame reports 0.
  • A test confirms that a first fade without prewarm reports its layer pipelines on the UI thread, and that the same fade after prewarm reports 0.
  • The native Metal backend reports runtime compiles in the same counters.
How to check

Unit tests in the required merge check. Count budgets under R0520 assert 0 UI-thread creations after the first frame in every scene from R0065.

Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 1 · priority P1 · size S
R0074rune-ref: a new instance kind can ship with no oracle arm and no test failsP1Phase 1ST04
render-ref-kind-guard · infra
What happens

render.rs defines 14 instance kinds, KIND_RECT (0) through KIND_BACKDROP_BLUR (13), as loose f32 constants. rune-ref's validator accepts only kinds 0-4 and 8-12. It rejects segments (5), triangles (6), images (7) and backdrop blurs (13). Kinds 5 and 6 landed while the oracle was being published, and 7 and 13 came later. Nothing ties the constants to rune-ref. So each new kind silently widens the gap between what the GPU draws and what the oracle can check, and no test fails.

Where
Why it matters

The oracle is how Rune proves that its shader draws what the scene asks for. A kind with no oracle arm can regress on any backend unseen. Users see it as a misdrawn image corner or a blur edge on one GPU. The render target asks for "14 of 14 kinds and 2 of 2 blend modes". It requires that "a new KIND_* constant with no oracle arm fails a test, with no bypass". This issue adds the guard. Arms for 5, 6, 7 and 13 come under R0519.

What would help
  • Export one KINDS: &[(f32, &str)] array from rune, next to the constants.
  • Add a rune test that scans render.rs for pub const KIND_ and fails if any constant is missing from KINDS.
  • In rune-ref, under the gpu feature, add a test that every entry in KINDS is generated by the scene generator, accepted by validate, and evaluated by the scalar evaluator. The only exceptions are in a committed allowlist file that starts as {5, 6, 7, 13}.
  • The allowlist may only shrink, and a ratchet check fails if an entry is added. A new kind lands with its oracle arm in the same PR. There is no bypass flag.
Done when
  • Adding a KIND_* constant without adding it to KINDS fails a rune test.
  • Adding a kind to KINDS without an oracle arm fails the rune-ref test.
  • Adding an entry to the allowlist fails the ratchet check.
  • Removing a kind from the allowlist without an arm fails the rune-ref test.
How to check

Both tests and the ratchet run in the required merge check. The allowlist's length is the open coverage gap, and it reaches 0 when the parent's arms land.

Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 1 · priority P1 · size S
R0075Headless: a scripted resize in a --desktop run is silently ignoredP1Phase 1ST04
tooling-desktop-resize · bug
What happens

In a single-window headless run, a script's resize event drives the window's size over a spring on the virtual clock. In a --desktop run, the dispatcher has no arm for Resize. The event falls into the catch-all pointer arm and goes to Desk::pointer_input. That sends it to the window under the pointer through Member::input. Member::input has no Resize arm either, so it calls canvas_input, which returns false for any kind it doesn't know. The window never resizes, its runtime viewport stays the same, and nothing warns. The same script gives different trees in the two modes.

Where
Why it matters

A multi-window app's resize behaviour, such as a sidebar collapsing or text rewrapping in one window, can't be scripted. An agent that writes a resize script gets a green run that tested nothing. The harness target is that "100% of script event kinds (about 35) give equal per-window results in single-window, --desktop and session runs", and that "0 accepted flag pairs [have] no effect". A dropped event breaks the first, and a silent drop hides it.

What would help
  • In the desktop dispatcher, route Resize explicitly to the targeted member. Use the key window, or the one the event's position or key names. Drive its frame spring on the virtual clock, as step_resize does for one window, and update its runtime viewport.
  • Check every other kind that canvas_input does not handle, and route each one explicitly.
  • Make the fallback in Member::input fail with the event's name when canvas_input returns false, instead of dropping it.

The shared host under R0255 later removes the second dispatcher. This fix is needed now, and its test becomes part of that work's parity matrix.

Done when
  • A --desktop script that resizes one of two windows changes that member's frame and runtime viewport over the spring, checked at three times during the spring and once at rest.
  • The other window's frame and viewport stay unchanged.
  • The final per-window tree for that window equals the single-window run's tree for the same resize.
  • An event kind the desktop runner can't handle fails the run with its name.
How to check

A test in the required merge check runs the two-window resize script. A second test sends a kind with no handler and expects the named error.

Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 1 · priority P1 · size S
R0076Motion audit: run.sh records every scenario but never fails on a finding, and no allowlist is committedP1Phase 1ST04
tooling-motion-audit-fail · bug
What happens

scripts/motion-audit/run.sh builds the apps in release, then runs 36 scenarios. For each, it writes a trace, an end tree and the Rust gate's findings (<name>.gate.txt). Then it ends with ls. It never calls analyze.py --fail, and it never reads the .gate.txt files. So a run with findings exits 0. No allow.json is committed, so a finding someone accepted has no reason on record. analyze.py only prints unused allow rules, and doesn't fail on them. If a build or a scenario fails to write its trace, the run still looks complete.

Where
Why it matters

The audit is the only check that covers the 36 app-level scenarios: settings toggles, gallery modals, shell resize and reorder, and scroll anchoring. A regression there shows to users as a pop or a jump in a real screen. The motion-audit target is that "a finding fails unless a bounded, reasoned allow row covers it as a checker false positive or intended behaviour", with "0 unallowed findings" and "0 unused rows". It also asks that "every false-positive row links an open checker issue".

What would help
  • End run.sh by passing every trace it wrote, each with its script, to analyze.py --fail --allow scripts/motion-audit/allow.json.
  • Also fail when any .gate.txt holds a finding that the allowlist doesn't cover.
  • Fail when the trace set is empty, or smaller than the number of run lines.
  • Make an unused allow row an error in analyze.py.
  • Commit allow.json. Each row names its scenario, a bounded match (element and frame range), and one of two reasons. A checker false positive links an open issue to fix the checker. Intended behaviour says what makes it intended. Real findings are fixed in Rune, as AGENTS.md asks, not allowed.
  • Run run.sh in the self-hosted macOS lane until the scenarios move into gate tests under R0252.

Existing findings must be fixed or allowed with reasons before the exit code turns on.

Done when
  • run.sh exits non-zero on an unallowed finding, from either the analyzer or a .gate.txt.
  • run.sh exits non-zero on an empty or short trace set, and on an unused allow row.
  • allow.json is committed, and every row has a scenario, a bounded match and a reason.
  • Every checker-false-positive row links an open issue.
  • The macOS lane runs run.sh and fails on a planted finding.
How to check

The self-hosted macOS lane runs run.sh. A test_analyze.py case covers the unused-row and short-set failures.

Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 1 · priority P1 · size S
R0077Tooling: no shared redaction step keeps secure-field text, home paths and tokens out of recorded scripts and fixturesP1Phase 1ST04
tooling-recording-redaction · infra
What happens

Rune is adding recorders that turn a live session into a --script fixture or a bug report: an input recorder, and an IME recorder for composition sessions. These recordings are meant to be committed as public fixtures and attached to public issues. A recorder that writes key events, pasted text, IME strings, file-drop paths and the environment will capture whatever the user typed. That includes passwords in secure fields, home folder paths, user and host names, and tokens pasted into a field.

--tree already drops a secure field's text, and marks the element secure. Nothing applies the same rule to recorded input, and no check stops a committed fixture that contains such data. The repo's own rules keep home paths, hostnames and tokens out of history. Today, only the person committing enforces that, with a grep.

Where
Why it matters

One leaked password or token in a public fixture stays in history for good. The agent-loop target asks that "a window's input, initial state, seed and setup results record to the --script format", with "at least 10 recorded replays [matching] at every checkpoint". So recordings will be routine. The CI-safety target asks for "0 hygiene hits in the diff and full tree outside a reasoned allowlist". The secure-field target says that "secure fields expose nothing beyond what the platform's native secure field exposes". A recording that keeps a password's length already exposes more than that.

What would help
  • Add one redaction step in the tooling module that every recorder calls before it writes.
  • Never record secure-field text: no characters, and no length. Record a single placeholder event that keeps the timing.
  • Replace home paths with ~, and user names and hostnames with fixed placeholders such as host.example.ts.net. Replace token-shaped strings (long base64 or hex runs, known key prefixes) with a marker.
  • Write a redacted count into the recording's header, so a reviewer knows something was removed.
  • Add a check to the required merge check that scans committed recordings and scripts, and fails on any of these patterns.

The planned recorders under R0521 use this step from their first version.

Done when
  • A recorded login form keeps no password characters and no password length.
  • A seeded home path and a seeded token in a committed fixture fail the merge check.
  • Every recorder in the repo calls the shared step, and a test fails if a recorder writes without it.
  • Replaying a redacted recording gives the same tree as the original run, except for the secure field's content.
How to check

Unit tests for the redaction step, a fixture-scan check in the required merge check, and one seeded-leak fixture kept as a test of the scan.

Part of
  • Theme: T04
  • Tracked in R0521
  • Phase 1 · priority P1 · size S
R0078Kit: no check that every exported component has an accessibility goldenP2Phase 1ST04
a11y-kit-golden-coverage · infra
What happens

crates/rune-kit/tests/a11y/golden holds 26 accessibility goldens: buttons, toggles, fields, menus, select, combobox, dialog, table, toast, tree, shell, markdown, diff and others. They cover the main controls, but nothing ties them to what Kit exports. lib.rs re-exports about 100 items. The public modules shell, diff, markdown, notes, popover and syntax export more components beyond that list, and some of them sit behind the markdown and mermaid features. A new component ships with semantics nobody has looked at. So does a new state of an old one (disabled, invalid, mixed, expanded, open). No test fails.

Where
Why it matters

Screen reader users meet a Kit control with a missing name, a wrong role or a state that is never announced, such as a disabled button read as active. The accessibility target is that "every control states its name, role, value, state and actions completely and truthfully" (WCAG 1.1.1, 1.3.1, 2.5.3, 4.1.2). It asks for "0 findings in Kit stories with an empty allowlist", and for "100% of exported Kit components, public submodules and feature-gated ones included, [to] have goldens for every declared state".

What would help
  • Add a coverage test that lists public component types from lib.rs and from the public submodules, with all features on. Use a committed list that a second test keeps in sync with lib.rs. Fail for any type that no a11y scene builds.
  • Each component declares the states it supports, as a const list beside the component or in one table in the test. The test requires a golden node for each declared state.
  • Keep a short exemption list for types that are not visual (Kit, Palette, Type, style structs). Each entry needs a reason.
  • Add the missing scenes and goldens in the same PR, or list them as exemptions that link the issue adding them. The list may only shrink.

Fixes for what the new goldens show stay with R0472.

Done when
  • The coverage test runs in the required merge check with all rune-kit features.
  • Every exported component, feature-gated ones included, has a golden node for each state it declares.
  • Adding a public component without a scene fails the test.
  • Adding a declared state without a golden node fails the test.
  • The exemption list holds only types that are not visual, each with a reason.
How to check

The rune-kit tests in the required merge check, run with all features. The exemption list's length is the open gap, and it can only go down.

Part of
  • Theme: T04
  • Tracked in R0472
  • Phase 1 · priority P2 · size S
R0079Headless: wgpu runs queue up to 2,048 command buffers, so headless memory numbers misleadP2Phase 1ST04
perf-headless-pacing · bug
What happens

The headless runner submits each frame and goes on to the next one. It waits for the GPU only when a compositor is attached, so that the compositor's async readbacks land between frames (crates/rune/src/tooling/headless.rs:387-390). Without a compositor, nothing paces submission. Renderer::submit returns a SubmissionIndex (crates/rune/src/render.rs:1096-1099), and the headless loop drops it (crates/rune/src/tooling/headless.rs:371).

wgpu allows 2,048 command buffers in flight, so an unpaced run gets hundreds of frames ahead of the GPU, and each frame holds its own buffers. research/34 measured this. A headless scroll benchmark that submits about 1,650 frames a second for 900 frames reached 325 MB footprint on Rune's Metal queue and 1,956 MB on wgpu. Both runs took 0.55 s. Rune's Metal queue keeps Apple's default limit of 64 buffers and blocks at encode. A window paces frames to the display, so neither queue fills there. The 1.6 GB gap was a property of the headless run, not of the backend. The same lag makes encode_ms read 0.35 ms on Metal against 0.19 ms on wgpu, because encode_ms is elapsed time.

The trace header records size, rate, scale and clock, but not the backend (crates/rune/src/tooling/trace.rs:55-59). A reader can't tell which queue a number came from.

Where
Why it matters

Anyone who compares memory from a headless run gets numbers that depend on how far the CPU outran the GPU. The memory target is "Mac hello <= 30 MiB footprint" with "drift <= 2 MiB", and a headless footprint that grows with frame count can't be checked against it. The verification target asks that "each published number records rev, backend, device and date".

What would help

Pace every headless frame as a display link does. Keep the SubmissionIndex of the last two frames, and before encoding frame k, wait on frame k-2's index with device.poll. This applies with or without a compositor. The compositor case can keep its full wait. The virtual clock sets what each frame shows, so pacing changes memory and wall time, not output.

Add the GPU backend (Rune's choice and the adapter's backend) to the trace header and to the summary line, so footprint and encode_ms numbers say where they came from.

Done when
  • A headless test on wgpu counts outstanding submissions over 600 frames and asserts it never exceeds 2.
  • Hello's headless footprint on wgpu after 6,000 frames is within 2 MB of its footprint after 600.
  • Trace headers and the headless summary name the GPU backend.
  • research/34's unpaced scroll benchmark is re-run with pacing, and the note records the new footprints on both backends.
How to check

The submission-count test runs in the default test command on Linux and macOS. The 600-frame and 6,000-frame footprint comparison runs under --profile perf with procwatch's footprint reading, as part of the nightly memory checks.

Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 1 · priority P2 · size S
R0080Tests: ten separate counting allocators count allocations in slightly different waysP2Phase 1ST04
tooling-alloc-unify · refactor
What happens

Allocation budgets need one definition of an allocation. procwatch has one: procwatch::alloc::Counting is libc-only, counts per thread, and documents that a realloc counts as one allocation of its whole new size (crates/procwatch/src/alloc.rs:43-62, crates/procwatch/src/alloc.rs:105-140). Nine other GlobalAlloc impls in the workspace define their own counts, and they disagree:

So "allocations per frame" from a test, a cost example and a frame profile can be three different numbers for the same work.

Where
Why it matters

Count budgets only work if a count means one thing. The target is "frame cost is gated by exact counts on canonical and worst-case scenes on every merge", with "a seeded regression in each counter family" failing the merge gate. An allocation budget taken from one allocator and checked with another can pass or fail on the counting rule alone.

What would help

1. Write the rule down in procwatch's module docs and test it there. Allocations, reallocations and frees are counted separately. Bytes are the requested size. Say whether realloc growth counts as the new size or as the difference, and give a helper for each. 2. Add helpers for per-thread and per-scope counts (scope(|| ..) -> Counts), so tests stop re-deriving them. 3. Use procwatch::alloc::Counting as the global allocator in every test and cost binary. A probe that needs more, such as stack attribution in layout_text_cost, wraps Counting<A> with its own inner allocator instead of counting by itself.

This is the counting half of R0158, so it lands first.

Done when
  • Every GlobalAlloc impl under crates/ and examples/ is procwatch's Counting or wraps it.
  • The counting rule is in procwatch's docs, with a unit test for alloc, alloc_zeroed, realloc up, realloc down and dealloc.
  • Every existing allocation assert still passes with the shared allocator.
How to check

A ratchet in the merge checks counts GlobalAlloc for outside procwatch that are not wrappers of Counting, and fails above 0. procwatch's own tests pin the rule.

Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 1 · priority P2 · size S
R0081Diagnostics: GPU, surface and image failures reach only stderr, which Finder-launched and Windows GUI apps never showP1Phase 1MT05
arch-diagnostics-channel · feature
What happens

Rune reports most runtime failures with eprintln!. Files under crates/rune/src that are not test files hold 107 calls (a few of them in inline #[cfg(test)] modules). They cover a surface that refuses its configuration, adapter fallbacks, the DX12 choice, transparency fallbacks and a failed blend switch. log is only a dev-dependency, so library code can't use it.

A macOS app launched from Finder sends stderr nowhere. A Windows app built for the GUI subsystem has no stderr, and wasm drops it. The app itself is never told. Some failures do reach apps as typed values (ImageError, an overlay's failure state), so an app sees some failures and not others. Several planned fixes (checked configure, surface recreation, the image size limit, the Metal OS floor, Latest failures) each need one place to send a typed failure, and none exists. Also, eprintln! panics when the write fails (for example EPIPE). In a callback that can't unwind, that panic aborts the app.

Where
Why it matters

Users of a shipped app see a blank or frozen window with no message, and the app can't log, show or report the cause. The failure model asks for "one report path" per failure class and "0 production eprintln! outside diag! and the tooling writer". The rendering target asks for "0 silent paths: a test per path asserts one diagnostic and a non-zero counter, and the counter counts each occurrence". Device-loss and surface recovery also need a typed GPU-unavailable or terminal report to send.

What would help
  • Add a typed rune::Diagnostic with kinds such as GpuLost, UncapturedError, SurfaceRefused, SurfaceLost, Fallback { kind }, ImageTooLarge and DecodeFailed.
  • Add an internal diag!(level, area, ..) macro that goes through log, moved into [dependencies]. With no logger installed, it writes to stderr on native and to console.* on wasm, and it never panics on a failed write.
  • Add an App::on_diagnostic builder method. AppSpec is built as a literal by apps, so this must not be a new pub field. Deliver each kind once per surface. Catch a panicking subscriber and disable it.
  • Count each kind in FrameStats.
  • Move the GPU, surface and image sites to diag! here. Other subsystems move later onto the same channel, not a second one.
  • Ratchet the production eprintln! count with R0044.

The records disagree on release output with no logger: one keeps stderr as the fallback, the other writes nothing. Recommended: keep the stderr or console fallback, because a terminal launch is still the first place a developer looks.

Done when
  • log is a normal dependency.
  • Under an injected configure refusal, a test's on_diagnostic gets exactly one SurfaceRefused, and a decode test gets one DecodeFailed.
  • Tests cover delivery with a logger, with no logger, and with a panicking subscriber, with 0 aborts.
  • The render, window, overlay, GPU, native surface and image modules have 0 eprintln! calls outside tests.
  • FrameStats counts each kind, and a test reads a non-zero count.
  • The production eprintln! count has a ceiling that only goes down.
  • A changelog fragment describes App::on_diagnostic.
How to check

T1 tests for delivery and counters, driven by the fault switch from R0087 once it lands. The eprintln! ceiling runs in the structure ratchet on every merge.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 1 · priority P1 · size M
R0082Failure model: a panic ends a shipped app in a way that depends on platform and on which callback was runningP1Phase 1LT05
arch-failure-policy · feature
What happens

The ApplicationHandler methods and the AppKit entry points have no panic boundary. What a panic does depends on where it starts. In winit's run-loop observer, an AppKit callback such as live resize or drawRect:, or a launch callback, the app either exits, or aborts without the original message, or traps on web. #150 shows one case: a RefCell already borrowed panic inside an accessibility callback ends as a SIGABRT during static teardown, which hides the first message.

The only recovery from a view panic is under the hot feature. Non-test code has 19 catch_unwind sites, and every one silently needs panic = "unwind". Non-test code also defines about 55 extern "C" fn callbacks. A panic that reaches one of them can't unwind and aborts. Apps get no hook to save state or report the crash.

Where
Why it matters

A user loses unsaved work with no message, and the developer gets a crash report that doesn't name the panic. The target is "one failure model": "app panics tear down the surface and are never resumed mid-commit", with the same outcome on macOS, Windows, Linux, web and LayerHost, and "panic = \"abort\" builds are documented as uncatchable and print a launch diagnostic".

What would help

1. Reproduce a panic in view, handler, poll, launch and one AppKit callback on macOS, Windows and Linux. Record each outcome. 2. Write docs/failure-model.md with today's outcome and the target outcome for each callback class, including the non-unwinding extern callbacks that still abort until they get a guard. 3. Add one boundary in the ApplicationHandler and one in each AppKit entry point Rune owns. The host module that installs a boundary owns it. 4. The boundary catches the panic and stores the payload. It tears down the affected surface, or exits cleanly when it was the last one. It never resumes a surface, because a partial commit can break invariants. It writes a PanicReport (phase, location, message) to an App::on_panic builder method and to a local crash file. Where the platform needs it, it resumes unwinding after the event loop returns. 5. A panic inside on_panic is caught and goes to the crash file only. 6. Document the dependency callbacks that can't be caught from outside. 7. Under panic = "abort", print a launch diagnostic and document that no crash file is written.

Reports go through R0081.

Done when
  • The recorded outcomes before the change are in the failure-model doc.
  • Injection tests for a panic in view, handler, poll and launch give the documented outcome on macOS, Windows and Linux.
  • A panic in an AppKit callback that Rune owns doesn't abort on macOS.
  • App::on_panic gets the report, and a panicking on_panic doesn't abort.
  • A panic = "abort" build prints the launch diagnostic.
  • A changelog fragment describes App::on_panic.
How to check

Headless injection tests in T1, each run in a child process so the test harness survives. Platform injection tests on the macOS, Windows and Linux T2 lanes.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 1 · priority P1 · size L
R0083Hot reload: a panicking patched poll, key or IME handler is retried with the original against the state it half-wroteP2Phase 1ST01
tooling-hot-panic-no-retry · bug
What happens

With the hot feature, app_call! routes poll, on_key and the app's IME handlers through patched_or_original!. If the patched code panics, the macro catches it and calls the startup function with the same arguments. Its doc comment and the guide both say that side effects of the panicked call stay.

These calls take &mut S. A patched on_key that pushes to a Vec and then panics leaves the push in place. Then the original runs and pushes again. The state is now in a shape neither version of the code produces, and no report says so. The outer failure boundary never sees the panic, so the dev session goes on with corrupted state.

Views are different. They take &S, and view_or_original discards the failed view's context writes before it calls the original. That fallback is sound and should stay.

Where
Why it matters

This affects only dev builds with hot. But the edit loop is where an author tries half-finished code, so a panicking handler there is common. The author then sees a bug that the code does not have, and may chase it after the next patch. The failure target says "app panics tear down the surface and are never resumed mid-commit". The edit-loop target asks that "100% of measured edits keep app state and scroll". A retry over half-written state breaks the first and makes the second meaningless.

What would help

Split the macro by receiver.

  • Calls with &S (views) keep the fallback.
  • Calls with &mut S (poll, on_key, app IME handlers) do not retry. They report the panic through the report path from R0082, with the callback name and the patch generation. Then they follow that policy. There are two options:

1. Stop the surface behind a dev overlay that shows the panic until the next patch arrives, then resume. State is unchanged from the panic. 2. Restart the app from AppSpec::init.

Recommended: option 1. It keeps the author's place, and the next patch is usually the fix. Option 2 is the fallback when the policy says the state cannot be trusted.

Update the macro's doc comment and the guide paragraph to match.

Done when
  • A patched on_key that pushes to a Vec and panics leaves exactly one element, and the original is not called.
  • The same holds for poll and an app IME handler.
  • A panicking patched view still renders the original view.
  • The panic is reported once through the failure-model path, with the callback name.
  • The guide no longer says that a panicking poll or on_key falls back to the startup callback.
How to check

Add a hot-feature test that runs a patched handler that panics after it writes state, and asserts the state and the report. It runs in T1 with --features hot. The edit-loop smoke test in scripts/test-rune-dev.py gets a panicking-handler case.

Depends on
Part of
  • Theme: T01
  • Tracked in R0502
  • Phase 1 · priority P2 · size S
R0084Markdown: nesting depth is uncapped, so deep quotes and lists grow the parser's stack and overflow the recursive rendererP1Phase 1ST05
arch-markdown-depth-cap · bug
What happens

Kit Markdown keeps an explicit stack of open containers while it parses. Every block quote, list and list item pushes one entry, and nothing limits the depth. The renderer then walks the block tree recursively: a quote renders its inner blocks, and a list renders each item's blocks, one Rust stack frame or more per level. Rune sets no cap on blocks per document or on table columns either.

Model output is untrusted input. A reply with 100,000 nested > markers is a few hundred KB, and it is plausible from a broken or hostile model. It grows the parser's stack in memory, and the recursive render can overflow the thread stack. A stack overflow aborts the process, and catch_unwind can't stop it.

Where
Why it matters

A chat app that streams a reply into kit Markdown can crash on one message. The user loses the session. The trust target says "every inventory input has a budget and an adversarial test that fails in under 100 ms of main-thread time on the reference Mac". The streamed-Markdown target asks that rendered content is "safe on hostile input".

What would help
  • In the parser, flatten quote and list depth past 32: deeper containers append to the level-32 container. Render and block-map walks then never see more than 32 levels, so they stay recursive.
  • Cap blocks per document and columns per table. Pick each cap from the largest real documents in the kit tests, with a wide margin, and document it.
  • Make the caps constants in one place, so streamed and whole-document parsing agree.
  • Add adversarial tests: 100,000 >, 100,000 -, a 10,000-column table, and 1 MB of *.
Done when
  • Each adversarial test passes without overflow in under 100 ms of main-thread time on the reference Mac.
  • Nesting deeper than 32 renders as level 32, with all text kept.
  • Existing kit Markdown tests pass unchanged.
  • The caps are documented in the Markdown docs.
  • A changelog fragment states the caps.
How to check

T1 kit Markdown tests (cargo test -p rune-kit --features markdown) with the adversarial cases. The Markdown fuzz targets in R0294 keep it proven.

Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 1 · priority P1 · size S
R0085Release: shipped native apps parse Rune's dev CLI and start the interaction exporter from an ambient OTEL variableP1Phase 1ST05
arch-release-dev-surface · bug
What happens

By default every native app parses its command line with Args::parse in App::try_run. App::args lets an app pass its own list, but most don't. So a release binary accepts --script, --snap, --trace and the other dev flags, and clap exits with code 2 on a bad value. extra_args parses the process arguments the same way.

The interaction exporter turns on in any build when OTEL_EXPORTER_OTLP_ENDPOINT names a loopback address. It then samples stacks and sends span data. A variable set for some other tool on the user's machine turns it on in a shipped app.

Several environment variables that change release behaviour aren't documented in the README. Examples are RUNE_DIRS_ROOT, RUNE_PREFS_DIR, RUNE_METAL_CAPTURE and RUNE_DISABLE_DXBC. The README has no single table of variables. It names some of them inline.

Where
Why it matters

A user who opens a file with a name like --snap from a shell, or a launcher that passes unknown flags, can make a shipped app exit or change behaviour. A developer's OTEL setup sends a shipped app's stacks to a local collector without the app asking. The trust target says "release builds ignore Rune's dev argv and an ambient OTEL endpoint unless the app opts in through a builder method". The shipping target says "a release binary ignores Rune argv unless the app opts in (test)".

What would help
  • Add an App::dev_tooling builder method.
  • In release builds, parse Rune flags and start the exporter only when the app calls it. An environment variable alone doesn't turn them on. Unknown arguments pass through to extra_args.
  • Debug builds keep today's behaviour.
  • Document in the README that agents driving a release build need the app to opt in.
  • Add one README table that lists every RUNE_* variable read in production code, with its effect and the builds that read it.
Done when
  • A release binary of a fixture app ignores --snap and doesn't exit on a bad flag.
  • The same binary built with App::dev_tooling honours --snap.
  • The exporter stays off in release with only OTEL_EXPORTER_OTLP_ENDPOINT set.
  • The README table lists every RUNE_* variable read in production code.
  • A changelog fragment describes the change and the opt-in.
How to check

A T1 test that builds the fixture in release and runs it with and without the opt-in. A doc-claims probe compares the RUNE_* reads in production code with the README table on every merge.

Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 1 · priority P1 · size S
R0086Images: an SVG can read local files through an href, hang a decode thread on a FIFO, inflate SVGZ without a cap and expand <use> to a million nodesP1Phase 1MT05
arch-svg-decode-bounds · bug
What happens

svg_rgba caps encoded input at 32 MiB, then parses with usvg::Options::default(). That has four costs.

  • usvg's default href resolver reads any existing local path in <image href>. An SVG from Markdown, a web response or a chat message can embed the user's local images. A path such as /dev/zero or a FIFO hangs or exhausts a decode thread, and catch_unwind can't stop that.
  • usvg inflates SVGZ to the end with no cap. A few KB of gzip can inflate to gigabytes.
  • <use> fan-out can reach usvg's 1,000,000-element limit from a few KB of input. Rendering that tree takes seconds.
  • The 4096 px clamp applies only when px == 0. url_set passes the listed width as the raster size. A 20000w entry asks for a pixmap of about 1.6 GB, and the 8192 px mip check rejects it only after it is drawn.

On wasm, a fetched SVG rasterises on the browser's main thread in one piece. Only the mips after it are sliced.

Where
Why it matters

An attacker who can put an SVG in a model reply can read local image files into the app, hang a decode thread, or use gigabytes of memory. The trust target asks that "every inventory input has a budget and an adversarial test that fails in under 100 ms of main-thread time on the reference Mac". The media target says each hostile case "ends in a safe result within 30 s", that "no thread hangs, and no local file is read", and that a raster is "clamped to the device's maximum texture size".

What would help
  • Keep the 32 MiB encoded cap.
  • Add an ImageHrefResolver that accepts only data: images by default. Count each one against a decoded-pixel budget. Add a builder method for apps that trust their SVGs.
  • Inflate SVGZ before parsing, through Read::take(64 MiB).
  • After parsing, count the expanded tree and refuse more than 100,000 nodes before rendering.
  • Clamp every output to 4096 px and to the device's maximum texture size, url_set included.
  • Rasterise off the main thread on every platform, wasm included.
Done when
  • An SVG with a local-file href renders without reading the file.
  • A FIFO href blocks no thread.
  • An SVGZ bomb, <use> fan-out and an oversized embedded data: image each return an ImageError.
  • The fan-out case is refused in under 100 ms of main-thread time on the reference Mac.
  • A 20000w url_set entry rasterises at the clamped size.
  • A changelog fragment describes the data:-only default and the opt-in.
How to check

T1 adversarial tests in the image module. The SVG fuzz target in R0294 keeps it proven.

Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 1 · priority P1 · size M
R0087Render: there is no way to inject a GPU device loss or surface failure in a testP1Phase 1MT05
render-gpu-fault-injection · infra
What happens

Device loss, refused configures and lost surfaces are rare on developer machines. They depend on drivers, GPU switches and compositors. #72 was found downstream on NVIDIA under XWayland. Rune can't cause any of them on purpose. No RUNE_GPU_FAULT or similar switch exists. The only fault source is a noop wgpu device on Linux whose surfaces refuse every configuration, used by one window::configure test. So the Lost path, device loss, acquire timeouts and out-of-memory have no test, and no recovery fix can be kept working.

The native Metal backend ignores both the device-lost callback and the uncaptured-error handler, so it can't report a loss even when one happens.

Where
Why it matters

Every recovery issue needs a repeatable fault to prove it. The device-loss target is "0 panics and 0 unresponsive windows on 9 of 9 configurations" and "a correct frame (<= 2/255 per channel against the pre-loss golden) within 500 ms on native and 1,000 ms on the web", with "3 losses in a row" recovering. The surface target is "0 panics, and no acquire result ends the app". The failure model asks that "each class has a passing injection test" on macOS, Windows, Linux, web and LayerHost.

What would help
  • Add RUNE_GPU_FAULT, read in debug and test builds and with the dev feature, and compiled out of a plain release build.
  • Values: lost@<frame>, configure-refused@<frame>, surface-lost@<frame>, acquire-timeout@<frame>, oom@<frame> and cb-error@<frame>.
  • Use two mechanisms, named separately in the docs:
    • A real loss calls Device::destroy(), so wgpu's own lost callback runs.
    • Configure, acquire and present results are injected at Rune's wrappers around those calls. These test Rune's handling, not the driver.
  • On native Metal, mark the shared state lost and fail the next commit with an error status.
  • Add a tooling::fault harness. It runs a scene through a fault on a real window surface (lavapipe under Xvfb, and macOS on both backends) and on a headless target, and returns frames for comparison with a golden.
  • List the variable, its values, and which values are real device events in the README.
Done when
  • Each fault kind reproduces in a windowed test on lavapipe under Xvfb, on macOS with each backend, and in a headless test.
  • A test shows the switch is compiled out of a release build without the dev feature.
  • The README lists RUNE_GPU_FAULT, its values, and which are real device events and which are injected results.
  • At least one recovery test elsewhere uses the harness.
How to check

T1 unit tests for each fault kind. The recovery issues R0088 and R0091 use the harness for their own tests, so a broken switch fails them too.

Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 1 · priority P1 · size M
R0088Render: window creation, resize, the launch reconfigure, LayerHost and the web call the raw Surface::configure, so a refused configure panicsP1Phase 1ST05
render-checked-configure · bug
What happens

window::configure exists so that a surface the driver refuses costs only its owner, not the whole app (#72). It wraps Surface::configure in validation and internal error scopes and returns the error. Overlays, blend switches and Outdated recovery use it.

Five other paths call Surface::configure directly: window resize, the first window configure, the macOS launch-drawables reconfigure about 1 s after launch, LayerHost (3 sites) and the web host (3 sites). A refusal there reaches wgpu's default error handler, which panics. On wasm, window::configure itself calls configure and returns Ok without checking anything, so even the checked paths miss a refusal.

The overlay drops its surface on a refusal. A window doesn't: it keeps the refused surface, and wgpu panics on its next drawable.

Where
Why it matters

On Linux under XWayland and on multi-GPU machines, a refused configure ends the app on resize or launch. #72 was found that way in a downstream app. The surface target is "0 panics, and no acquire result ends the app". The failure model says "a refused or Lost surface recovers within 500 ms or ends in one terminal report after 5 attempts". The frame-core target lists "refused" among the scenarios every host handles the same way.

What would help
  • Send every configure through window::configure.
  • On an error, mark the surface unconfigured, start the recreate path in R0091, and report once through R0081.
  • On wasm, push an error scope around configure and resolve the pop asynchronously. Mark the surface unconfigured when the pop returns an error, and don't acquire from it until then.
  • Add a source test that fails on any .configure( call on a wgpu::Surface outside the helper.
  • Land this with or after PR #56, so a normal configure no longer races a submission.
Done when
  • The source test finds 0 raw Surface::configure calls outside window::configure.
  • With an injected configure refusal on resize, window creation and launch drawables: 0 panics, and the window recovers or reports once.
  • Window, overlay, LayerHost and web each have a refusal test.
  • A noop-backend test that refuses every configure ends in the terminal report, not a panic or an endless loop.
  • The configure-during-timestamp-resolve case from PR #56 has a regression test.
How to check

The T1 source test, plus fault-injection tests from R0087 on the noop backend, on lavapipe, and in the web lane.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 1 · priority P1 · size S
R0089Images: image pages are created without checking the device's maximum texture sizeP1Phase 1ST05
render-image-max-dimension · bug
What happens

The image atlas accepts a frame up to 8192 × 8192 pixels. upload_images creates a page texture of exactly the page size and never checks the device's max_texture_dimension_2d. Devices take the adapter's own limits. Some WebGL2 contexts, downlevel adapters and older mobile adapters report 4096 or less. On those, a large image is a wgpu validation error, which panics in the default handler and ends the app.

The decoders also stop at 8192 px a side, a fixed number, not the device limit. Video import already checks the device limit, so the check exists in one path but not in the image path.

Where
Why it matters

On a WebGL2 browser or a weak adapter, one large photo in a chat or document ends the app. The rendering target asks for "0 panics on unsupported descriptors or failed allocations that the API can report" and "0 silent paths: a test per path asserts one diagnostic and a non-zero counter". The media target asks for "a bounded result such as a raster clamped to the device's maximum texture size".

What would help
  • Pass max_texture_dimension_2d from the device to the atlas.
  • When an image is larger than the limit, draw the largest decoded mip that fits. A Pixels frame without mips is downscaled once, off the render thread if possible.
  • Report one ImageTooLarge diagnostic per image through R0081, and count each one.
  • Never create a texture larger than the limit.
Done when
  • With a forced 2048 limit on lavapipe, a 4096 × 4096 image draws downscaled with no validation error and one diagnostic.
  • In the WebGL2 lane, an image larger than the reported limit draws downscaled.
  • A 16384 × 16384 image draws downscaled on every lane, or fails with one readable error where the decoder limit stops it.
  • The ImageTooLarge counter counts each occurrence.
How to check

A T1 test with forced device limits on lavapipe, and the web lane on WebGL2.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 1 · priority P1 · size S
R0090Metal: the native backend is the macOS default but has no macOS 13 floor, so older macOS panics at the first pipelineP1Phase 1ST05
render-metal-os-floor · bug
What happens

The native Metal backend is the macOS default when the metal-backend feature is on. It needs MSL 3.0, which needs macOS 13. Its precompiled libraries are built with -mmacosx-version-min=13.0. Nothing checks the OS before choosing it.

On macOS 11 or 12, msl_version maps the version to MSL 3.0, the precompiled libraries fail to load, and the runtime compile fails. Pipeline creation then panics with the compile error. The default path never falls back to wgpu, although other code still supports macOS 11 and 12: the wgpu uber library is built for 11.0. The README states no minimum macOS for either backend.

Where
Why it matters

An app built with the default features crashes at launch on a Mac that runs macOS 11 or 12. The user sees no window and no message. The rendering target asks that "no rendering path degrades silently" and for "0 panics on unsupported descriptors or failed allocations that the API can report".

What would help
  • Choose native Metal by default only on macOS 13 or later, or when the device supports the Metal 3 family. Otherwise use wgpu and say why in describe().
  • When RUNE_GPU_BACKEND=metal forces native on an unsupported OS, or a built-in library fails to load, fall back to wgpu with one typed diagnostic through R0081. Don't panic.
  • Make the OS version an input to the backend decision, so a test can set it.
  • State the minimum macOS for each backend in the README.
Done when
  • A unit test of the backend decision with versions 11, 12, 13 and 26 picks wgpu, wgpu, native and native.
  • With the version set to 12 by a test hook and RUNE_GPU_BACKEND=metal, a window opens on wgpu and one diagnostic is reported.
  • With a test hook that makes the built-in library fail to load, the app draws on wgpu or a runtime compile, with 0 panics.
  • The README lists the minimum macOS for each backend.
  • A changelog fragment describes the fallback.
How to check

T1 unit tests of the backend decision, and the version-hook and library-failure tests on the macOS lane.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 1 · priority P1 · size S
R0091Surfaces: a Lost surface is reconfigured every 250 ms forever and never recreated, and LayerHost spins and caches a failed GPU for the processP1Phase 1MT05
render-surface-recreate · bug
What happens

Acquire maps Lost to Outdated. Windows and overlays then reconfigure the same wgpu::Surface every 250 ms, with no limit. A truly lost surface (Vulkan SURFACE_LOST, a removed output, a destroyed layer) can't be fixed by configuring it again. When the checked configure refuses, the window gets Unconfigured. It retries on the same 250 ms timer with the same surface, and nothing makes a new one.

LayerHost is worse. On Outdated or Lost it reconfigures on every tick and returns animating: true, which keeps the host's display link running. Its shared GPU is a OnceLock that caches an Err for the life of the process, so one failed device creation means no embedded surface can ever draw again.

Where
Why it matters

On Linux Vulkan and Wayland, unplugging a display can leave a window blank for good, with a timer firing forever. An embedded view keeps a display link running at full rate while drawing nothing. The surface target asks that "a recreated surface draws within 2 frames of a restoration event", that "after the first 3 tries, at most 1 retry per second", and that "no surface call blocks the UI thread for more than 1 refresh period". The failure model says "a refused or Lost surface recovers within 500 ms or ends in one terminal report after 5 attempts". The performance target asks that every window draws "a correct frame within 500 ms of the device or display being available again".

What would help
  • Give Lost its own Missed variant, apart from Outdated. Keep the occluded backoff separate.
  • On Lost or Unconfigured, drop the wgpu::Surface and create a new one from the window handle. Pick the adapter again if the new surface is unsupported on it. Configure through the checked path from R0088.
  • Retry at once on each restoration event: resize, occlusion end, display change, visibility. Otherwise try 3 times at the frame rate, then at most once per second.
  • After 5 failures, stop drawing that surface and send one terminal report through R0081. Keep the app running, and try again on the next restoration event.
  • In LayerHost, return animating: false while backing off and rearm through its next wake. Replace the cached Err with a slot that retries on the same schedule.
  • Count retries in surface stats.
  • When the shared surface host lands, this code moves into it so every host shares one path.
Done when
  • With an injected surface loss, the window draws again within 2 frames on lavapipe and on macOS.
  • An injected transient loss recovers within 500 ms on window, overlay and LayerHost.
  • When recreation keeps failing: 0 panics, at most 1 attempt per second after the first 3, and one terminal report after 5.
  • After the cause clears, the window draws within 2 frames of the next restoration event, or within 1 s without one.
  • LayerHost's display link stops while backing off and draws again after a later success.
  • A failed shared-device creation is retried on the schedule.
How to check

Fault-injection tests from R0087 on the noop backend in T1, and the Linux lavapipe T2 lane for a real SURFACE_LOST.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 1 · priority P1 · size M
R0092Latest: a job that panics settles with no answer and no wake, so a view can keep showing a stale pending stateP2Phase 1ST05
arch-latest-failed-state · bug
What happens

The Latest pool runs each job inside catch_unwind. A panic is dropped, and the generation is passed to land with nothing to land. land sets settled and returns without waking the UI. The same happens for a job that returns None.

is_pending becomes false, but no frame is requested. A spinner or pending row already on screen stays until something else commits, which can be never in an idle window. No API tells the app that the work failed, so it can't show an error or offer a retry. The panic message is printed by the panic hook and then lost.

Where
Why it matters

A search box or preview that uses Latest shows a spinner forever after a bug in one job, and the user can't tell it failed. The failure model says "a failed Latest job wakes and reports failed()", with one report path for every failure class.

What would help
  • Record a failure for the generation, with the panic message when the payload is a string.
  • Wake the UI, so the view rebuilds and is_pending is read again.
  • Expose the failure through an additive method such as Latest::failed() -> Option<&str>. Don't add a variant to an enum apps match on.
  • Clear the failure when a new request starts.
  • Keep newest-generation suppression: a failure for a superseded generation is dropped and changes nothing.
  • Report the failure through R0081.
  • Decide whether a job that returns None should also wake. Recommended: wake on None too, since is_pending changes in both cases, but don't report None as a failure.
Done when
  • A panicking job for the newest generation wakes poll and failed() returns its message (test).
  • A panicking job for a superseded generation changes nothing (test).
  • A new request clears failed() (test).
  • No public enum gains a variant.
  • A changelog fragment describes Latest::failed.
How to check

T1 unit tests in the latest module, using the existing pool with a job that panics.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 1 · priority P2 · size S
R0093Focus: removing a focused control leaves focus on nothing unless the app set focus_returnP1Phase 1ST06
a11y-focus-on-removal · bug
What happens

After each commit, sync_requested_focus picks the new focus. It restores focus for a removed control in only three cases: the removed node declared El::focus_return, a modal closed and its saved path still exists, or a text field asked for focus. In every other case it keeps the old focused path only if a node with that path is still shown and focusable. When the focused control itself is gone, focus becomes None.

So deleting the focused row of a list, closing a focused tab from the keyboard, or removing a toast that holds focus leaves the window with no focus. A screen reader falls back to the window, and the next Tab starts again at the first stop. focus_return is opt-in, so an app has to remember it on every removable row to avoid this.

Where
Why it matters

Keyboard and screen reader users lose their place after every delete. Someone clearing a list with the keyboard must Tab back from the top after each row. The target is that every control works from the keyboard alone, with "a logical order" and "focus that survives content changes", and that 100% of stories pass with 0 allowlisted failures by the end of phase 2.

What would help

When the focused path no longer exists and no earlier rule chose a path, pick from the old tree's Tab order:

1. the next surviving enabled stop in the same focus group; 2. else the previous one; 3. else the first stop of the nearest surviving ancestor group, walking parent in the old nodes.

Match old stops to new nodes by path, and skip disabled, inert and hidden stops (the shown check already exists). Keep the keyboard_focus flag as it was, so the ring shows only if it showed before. The order of rules becomes: a new field request, then focus_return, then the modal restore, then the neighbour, then None.

This changes behaviour for apps that relied on focus clearing after a delete, so ship a changelog fragment. Apps no longer need focus_return on every removable row.

Done when
  • Deleting the focused middle row of a list focuses the next row.
  • Deleting the focused last row focuses the previous row.
  • Removing the whole list focuses the first stop of the nearest surviving ancestor group.
  • Disabled stops are skipped, and nested groups resolve to the innermost surviving group.
  • focus_return and the modal restore still win over the neighbour rule (tests).
  • The accessibility update after the deletion names the new focus.
  • A changelog fragment describes the change.
How to check

Runtime tests beside the existing ones in crates/rune/src/runtime/tests/, run in the merge gate: one per case above, plus one that reads the accessibility tree update after the delete. The Kit keyboard-walk stories cover lists and tabs that remove their focused item.

Part of
  • Theme: T06
  • Phase 1 · priority P1 · size S
R0094Build: the compile-time and code-size cost of Runtime<S> being generic over app state is unmeasuredP1Phase 1ST06
arch-compile-cost-baseline · research
What happens

Runtime<S> is generic over the app's state type. 93 non-test files in crates/rune/src hold an impl<S> Runtime<S> block, and many of those methods never touch a value of type S. Each window or overlay state type an app opens (App::window<T>, App::overlay<T>) can instantiate that code again.

Nobody has measured how much this costs in LLVM IR, incremental rebuild time or binary size. The planned split into a non-generic core (R0533) has no before number to beat, and #124, which reports slow builds, has no data.

The only numbers today are indirect. The hot-reload section of the README measures a median save-to-GPU time of about 8 s for Settings. research/04 sets a target of an incremental cargo build under 1.2 s.

Where
Why it matters

App authors and agents feel every rebuild after a view edit. The target is that "an app pays for Rune's runtime once, not once per state type, and an incremental rebuild after a view edit stays interactive": a second state type adds at most 5% to rune-owned LLVM lines, and an incremental rebuild takes at most 1.2 s. Without a baseline, the core split cannot show it helped, and a regression cannot be caught.

What would help

Add scripts/compile-budget with a pinned setup: the rust-toolchain.toml compiler, aarch64-apple-darwin, default features, the dev profile, and in-repo fixtures (examples/hello, plus a new fixture with two window state types). It records:

  • rune-owned LLVM lines from cargo llvm-lines, filtered to Rune's crates, for one and for two state types. The difference is the per-state duplication.
  • clean and incremental build times from cargo build --timings. The incremental case is a one-line view edit, 7 runs, median, on the reference Mac.
  • release binary size of both fixtures.

It writes perf/budgets/compile.json. T1 (R0030) gates only the LLVM-line counts, which are deterministic, with ceilings that only go down. Timings are noisy, so the macOS lane records them without failing. Write the setup, method and first numbers in a research note and post them on #124.

Done when
  • A research note gives the numbers, the setup and the method.
  • scripts/compile-budget gives identical rune-owned LLVM-line counts on reruns with the pinned setup.
  • T1 fails when rune-owned LLVM lines rise above the ceiling.
  • The macOS lane records the incremental-rebuild median.
  • The one-state and two-state numbers are posted on #124.
How to check

scripts/compile-budget runs in T1 for the LLVM-line counts. The macOS lane runs the timing mode and keeps the history. Rerun the script twice on the same rev to confirm the counts are stable.

Depends on
Part of
  • Theme: T06
  • Phase 1 · priority P1 · size S
R0095Accessibility: a disabled element can still take focus and presses, and a read-only field still takes editsP2Phase 1ST06
a11y-disabled-wins · bug
What happens

El::disabled(true) sets the accessibility flag and sets focus.enabled to false. El::focusable sets focus.enabled too, so disabled(true).focusable(true) is focusable again. The result depends on builder order. A text input with editor access stays focusable either way, because can_focus also accepts any node whose input has access.

Disabled never blocks presses. Its doc asks authors to leave the press handler off as well. Pointer dispatch and a11y_action do not read the flag, so a click or an assistive Click on a disabled control runs its handler. Increment, Decrement and SetValue run too.

El::read_only(true) sets the read-only state in the accessibility node. But the node still offers SetValue and ReplaceSelectedText whenever the input has editor access, and a11y_action accepts them. A screen reader is told a field is read-only and can still edit it.

Where
Why it matters

Screen reader users hear "dimmed" or "read-only" and then find the control acts anyway. Keyboard users can Tab to a disabled control. The targets are that every control "offers and accepts only the actions its state allows", with 0 findings in Kit stories and an empty allowlist, and that every control works from the keyboard alone with a logical order.

What would help

Make the existing a11y.disabled flag the one source of truth:

  • can_focus returns false for a disabled node, including editable inputs.
  • Pointer press dispatch and a11y_action drop presses, Click, SetValue, Increment, Decrement, step and text edits on a disabled node. Check at dispatch time, so actions queued before the element became disabled are dropped too.
  • For read-only, node.rs stops offering SetValue and ReplaceSelectedText, and a11y_action and the edit path refuse them. Focus, SetTextSelection and copy keep working.

This changes behaviour for apps that press a disabled control to show why it is disabled. Ship a changelog fragment. If apps need that pattern, a separate El::disabled_look (looks dimmed, still pressable, not reported as disabled) can follow.

Done when
  • disabled(true).focusable(true) and focusable(true).disabled(true) are both not focusable, for a plain element and a text input.
  • A pointer press, Click, SetValue and step on a disabled element run nothing, including an action queued before disabling.
  • A read-only field offers no SetValue or ReplaceSelectedText, refuses them if sent, and still takes focus and SetTextSelection.
  • Kit disabled-state tests and goldens pass.
  • A changelog fragment describes the change.
How to check

Unit tests in crates/rune for both builder orders, pointer and assistive actions, and the read-only action list, run in the merge gate. The Kit accessibility audit covers the disabled and read-only states of every component that has them.

Part of
  • Theme: T06
  • Phase 1 · priority P2 · size S
R0096Input: a modal that opens during a drag ends the drag without a Phase::UpP2Phase 1ST06
a11y-modal-cancels-drag · bug
What happens

A modal can open while a drag is held, for example from a timer, a poll or a network reply. When it does, sync_modals sets capture, secondary_capture and hovered to None. It never calls cancel_drag. The drag handler never hears that the drag ended, so a slider can stay in its dragging state, and a canvas tool can keep a half-drawn stroke.

Every other way a drag can end early already uses cancel_drag, which queues one Phase::Up with cancelled set and makes the later release do nothing: Escape, a physical Escape key, and cancel_pointer (touch cancel and window hide).

Where
Why it matters

A user dragging a slider sees it stuck after a dialog appears, and app state can stay in a "dragging" mode the user cannot leave. App authors can't rely on on_drag always ending. This is part of the target that every control works from the keyboard and pointer with no trap, and that 100% of stories pass with 0 allowlisted failures by the end of phase 2.

What would help

In sync_modals, call self.cancel_drag() before clearing capture, on the branch that pushes a new modal. cancel_drag needs capture to find the node, so the order matters. Keep the existing clears afterwards for the cases cancel_drag skips (no drag handler, a drag-out, an input click capture). Also clear the remaining press state the same way cancel_pointer does, so the release that follows can't count as a click.

The queued Action::Drag must reach the handler even though the dragged element is now behind the modal. Confirm in the test that dispatch does not drop it as blocked.

Done when
  • A test opens a modal mid-drag and sees exactly one Phase::Up with cancelled true.
  • The later physical release reaches neither the drag handler nor a drop target.
  • A press with no drag handler under the modal still clears without a handler call.
  • Existing Escape and touch-cancel drag tests pass unchanged.
How to check

A unit test beside crates/rune/src/runtime/tests/pointer_drag.rs, run in the merge gate. It drives a pointer down and move on a slider, opens a modal from state in the next commit, then releases, and counts handler calls and phases.

Part of
  • Theme: T06
  • Phase 1 · priority P2 · size S
R0097Layout: nothing proves incremental layout equals a fresh one, and rune-taffy's safe API can read unchecked memoryP1Phase 1XLT07
commit-and-layout-correctness · tracking
What happens

Rune lays out incrementally. LayoutStore keeps Taffy's caches across commits and decides for itself which nodes are dirty. Above it, the runtime reuses memo subtrees, relays out a resize without running the view, remounts virtual windows, and refits aspect-fit and anchored elements. Any of these can leave a stale size. Today five hand-written scenarios compare the store with upstream Taffy, and nothing generates trees or edit sequences. One stale case is already known: a text leaf's measure fingerprint misses its block format.

The safe API has gaps too. LayoutStore's safe accessors read unchecked memory for a bad SlotId. The length setters pass NaN and infinity to Taffy. View-side text measure rounds differently from layout. Six app mistakes panic in release builds.

This tracker covers the phase 1 work that makes layout checkable before later phases change how a commit runs. The oracles (fuzz, differential, Miri) and the bugs they guard are separate pieces of work. The known bugs land first, so the fuzz starts green.

Where
Why it matters

A layout bug that depends on commit history shows as a field with the wrong height, or a row in the wrong place, until something unrelated forces a fresh layout. Users see a glitch that nobody can reproduce. The target is that "a retained commit lays out exactly as a fresh layout given the same app state and runtime inputs": 0 mismatches in at least 2,000 sequences of at least 20 commits per merge run and in 100,000 sequences nightly, Miri clean nightly, and 0 safe calls that read unchecked memory. Layout must also give "no non-finite geometry, and no panic or stack overflow in release from app-supplied structure or values". PLAN.md's tenets ask that every hard subsystem has "an obviously correct reference that is differential-tested on generated inputs on every merge".

What would help

Land the fixes first: R0099, R0098, R0105, R0101 and R0106. Then add the oracles: R0100, R0102 and R0104. The fuzz generator takes non-finite values and block-format edits as inputs, so it keeps those fixes in place.

Done when
  • Every child is closed.
  • The incremental fuzz runs at least 2,000 sequences of at least 20 commits per merge run and 100,000 nightly, with 0 mismatches.
  • Miri passes on rune-taffy nightly.
  • No safe LayoutStore call reads out of bounds for any SlotId value.
  • The misuse tests show 0 panics in release.
How to check

The fuzz, the differentials and the misuse tests run in the required merge check (R0028). Miri and the long fuzz run nightly.

Issues
Part of
  • Theme: T07
  • Phase 1 · priority P1 · size XL
R0098Layout: LayoutStore's safe accessors read unchecked memory for a stale or made-up SlotId, and exiting nodes keep stale onesP1Phase 1ST07
layout-exiting-slot-ids · bug
What happens

SlotId is a public tuple struct, pub struct SlotId(pub u32), and LayoutStore is exported. LayoutStore::style and LayoutStore::box_layout are safe pub fns that index the slot array with get_unchecked, behind a debug_assert! only. Safe code that passes SlotId(u32::MAX) reads out of bounds in a release build. By Rust's rules that is unsound, whatever Rune's own callers do.

Inside Rune, nodes that still play an exit transition go after the present nodes and keep their old Node.taffy slot. finish_flatten freed those slots. Compaction remaps only present nodes, so it can drop or reuse them. Today every runtime caller avoids exiting nodes: the resize-only path requires live_count() == nodes.len(), and the web export skips exiting subtrees. The first new reader of nodes[i].taffy for an exiting node will read another node's layout, or read out of bounds.

Where
Why it matters

Exit transitions are where motion code wants a node's last layout. A reader there today gets wrong numbers and no error. The target is a sound safe API, with "0 safe calls that read unchecked memory", and "node identity is unambiguous".

What would help

Make the safe API sound. There are two options: 1. Make SlotId's field private with pub(crate) construction, and keep unchecked access only behind an unsafe fn. 2. Bounds-check style, box_layout and compute_layout's root in release builds, one compare each.

Option 2 is recommended: it fixes soundness with one compare per call and does not break outside users. Option 1 can follow if the compare shows up in profiles. Either way, add a generation or a SlotId::NONE sentinel, so that a freed id cannot alias a new node. Give exiting nodes the sentinel when they leave the layout tree, and let readers get Option<BoxLayout>, so an absent layout is a value, not a panic. If the field becomes private, add a changelog fragment, because outside users of rune-taffy who build ids by hand break.

Done when
  • No safe call on LayoutStore with any SlotId value reads out of bounds or returns another node's data, in debug or release.
  • A runtime test reads the layout of an exiting node after compaction and gets None.
  • Store-level lifecycle tests (remove, compact, reuse a slot, a made-up id) exist and run under Miri.
  • Commit time on the stack scene changes by at most 1% in paired --profile perf runs.
How to check

The rune-taffy unit tests and the runtime exit test run in the required merge check (R0028). R0104 runs the lifecycle tests under Miri nightly.

Part of
  • Theme: T07
  • Tracked in R0097
  • Phase 1 · priority P1 · size S
R0099Layout: a text field keeps its old height when only a line's block format changesP1Phase 1ST07
layout-measure-fingerprint-blocks · bug
What happens

Layout reuses a text leaf's cached size while its measure fingerprint stays the same. The fingerprint is the shape key XORed with some flag bits. The shape key covers the text, spans, style, scale, wrap_anywhere and pills. But line breaking also depends on the line's blocks (break_key hashes them), and the height depends on exact_lines. Neither is in the fingerprint.

Pressing Tab in a list item, or toggling a bullet or a quote, changes only the block level and indent. Taffy keeps the old size. The final text layout draws the indented lines, which can wrap onto more lines, so the text runs past its box until something else remeasures it. Text inputs never go through memo reuse, so every rich text_input is exposed.

The flag bits also overlap: max_lines << 2 shares bits with the revealed flag (bit 3) and wrap_anywhere (bit 4). No stale layout from that overlap has been shown, because wrap_anywhere is also in the shape key and redacted text always remeasures. But the next flag added can alias an old one. No test covers any of this.

Where
Why it matters

People who write in an editor indent and outdent list items all the time. A stale height draws text past the field or over the next block. The target is that "a retained commit lays out exactly as a fresh layout given the same app state and runtime inputs", with 0 mismatches in the incremental fuzz.

What would help

Hash spec.blocks (when any block is not a plain paragraph) and exact_lines into the fingerprint. Pack the flags in disjoint bits, or hash the whole tuple, so that a new flag cannot alias an old one. Add a runtime test that indents a list item with Tab and checks its height in the same commit.

Done when
  • A multi-line text_input list item indented with Tab has, in the same commit, the height that a fresh runtime gives the same state.
  • Toggling exact_lines changes the laid-out height in the commit where it lands.
  • A unit test shows distinct fingerprints for every combination of max_lines 0 to 8, revealed, wrap_anywhere, truncate and wrap with the same shape key.
  • R0100 generates block-format and exact_lines edits.
How to check

Runtime tests under crates/rune/src/runtime/tests run in the required merge check (R0028). The incremental fuzz keeps checking that the fingerprint is complete.

Part of
  • Theme: T07
  • Tracked in R0097
  • Phase 1 · priority P1 · size S
R0100Layout: nothing checks that incremental layout equals a fresh layout on generated treesP1Phase 1MT07
layout-incremental-fuzz · infra
What happens

LayoutStore keeps Taffy's caches across commits and decides dirtiness itself in sync_node. Its differential tests against upstream TaffyTree are five hand-written scenarios. Above the store, the runtime adds memo reuse, rekeying, resize-only relayout, virtual remounts, aspect-fit refits and anchored fits. Any of them can leave a stale cache, and only an app that happens to hit the exact sequence would notice. The block-format gap in the measure fingerprint (R0099) is older than LayoutStore, and no test found it. Nothing generates trees or edit sequences.

Where
Why it matters

Later phases change how a commit runs: a cap on view runs, virtual retries in place, and relayout in O(changed). Each change needs an oracle that says the result still matches a fresh layout. The target: "a retained commit lays out exactly as a fresh layout given the same app state and runtime inputs", with 0 mismatches in at least 2,000 sequences of at least 20 commits per merge run and in 100,000 sequences nightly. Resize and virtual scrolling must "relayout without running the app view whenever the retained structure is unchanged", and that is safe only if the fast path gives the fresh answer. The oracle matrix asks for "at least 256" generated cases for layout on every merge.

What would help

Build a seeded, deterministic, in-tree generator of El trees that uses every public layout builder: row and col, grow and shrink, wrap, gaps, min and max, percent, aspect_ratio, aspect_fit, absolute and pin, equal_columns and grid_cell, scroll and scroll_x, virtual_rows, memo, anchored, and text with spans, blocks, max_lines and truncate. Add non-finite and huge lengths when R0105 lands. Generate edit sequences: style changes, inserts, removals, reorders, text edits, block-format and exact_lines toggles, resizes and scrolls.

After every commit, build a fresh Runtime and give it the same runtime inputs: viewport, scale, fonts, focus, scroll offsets, and the measured heights of each virtual list. Then compare three ways: 1. The same node set, with the same paths and keys. 2. Each node's target rect and text size, bit for bit. Compare target rects, not presented ones, so animations cause no false failures. 3. LayoutStore against BaselineLayoutStore on the same tree.

Shrink each failure to a minimal tree and print it as Rust. If the oracle carries over too little runtime input, legitimate differences look like bugs, so document the transfer and test it.

Done when
  • At least 2,000 sequences of 20 or more commits run per merge check, in under 60 s in debug.
  • 100,000 sequences run nightly.
  • There are 0 mismatches at merge.
  • A failure prints a self-contained Rust reproducer.
  • Reverting the fingerprint fix makes the merge-check seed set fail.
  • The runtime-input transfer is documented, and a test shows that it removes the virtual-list height-history difference.
How to check

The test runs in the required merge check (R0028) and as a nightly long run. A nightly failure files an issue with the seed and the reproducer.

Depends on
Part of
  • Theme: T07
  • Tracked in R0097
  • Phase 1 · priority P1 · size M
R0101Text: view-side measure, content_widths and layout round text widths three different ways, and a Markdown table test fails on itP1Phase 1MT07
layout-view-measure-scale · bug
What happens

Views size things from text in three ways, and each rounds differently:

  • text::measure lays out at scale 1 and rounds the width up to whole points.
  • text::content_widths returns unrounded widths.
  • The runtime's measure callback lays out at the window's scale and rounds up to device pixels.

Markdown tables size their columns from unrounded content_widths plus 0.01 pt. The test that checks a column against measure() fails at this commit: the assertion at crates/rune-kit/tests/markdown.rs:420 gets 49.421875 where it expects 50.0. At scale 2 that column can be narrower than the width layout gives its own text, by up to one device pixel. Whether that makes the text wrap or overflow has not been shown yet. The Markdown list-marker gap is the difference of two whole-point measures, so it can be off by up to 1 pt. And measure() uses a per-thread TextSystem built from the most recent fonts, not the window's own.

Where
Why it matters

A table cell, a diagram node or a column header sized from measure() can wrap its last word, or overflow by a pixel, at one scale and not at another. The targets are "no clipped or overflowing text at any tested width, text scale or locale", and a scene that lays out the same on every platform at equal scale, with at most 1 device px per text edge between scales and "0 failing layout tests on dev".

What would help

First, write a reproducer: a table cell at its column's natural width, at scales 1, 1.25, 1.5, 2 and 3, checked for wrapping and for overflow past the cell. Then pick one rule for view-side measure: the width layout gives at the current window's scale, rounded as layout rounds it. Take the scale from Cx, or from a scale argument for code outside a view. Keep unrounded widths only where a browser algorithm needs them (table min-content and max-content), and round the final column width as layout does. Measure the list-marker space directly. Measure with the window's own fonts. Make the failing table test assert the chosen rule.

This moves every view that sizes from measure(), so gate it with rect goldens and add a changelog fragment.

Done when
  • crates/rune-kit/tests/markdown.rs passes.
  • For 1,000 strings across the bundled fonts at scales 1, 1.25, 1.5, 2 and 3, measure() at that scale equals layout's width exactly.
  • A table cell at its natural width never wraps and never overflows its cell at any of those scales.
  • Two runtimes with different fonts on one thread each measure with their own fonts.
  • A changelog fragment describes the change.
How to check

Unit tests run in the required merge check (R0028) on every platform lane. Rect goldens catch views that the new rule moves.

Part of
  • Theme: T07
  • Tracked in R0097
  • Phase 1 · priority P1 · size M
R0102rune-taffy: parity with upstream Taffy is checked on five hand-written trees, and the baseline-taffy digests are never comparedP1Phase 1MT07
tooling-layout-differential · infra
What happens

rune-taffy is compared with upstream Taffy in five hand-written tests. They cover flex, grid, out-of-flow, scroll, text, baselines, reorder, removal, aspect fit, anchored fit and memo reuse, each as a fixed script. Incremental mutation and cache reuse, where store bugs hide, get no generated coverage.

The baseline-taffy feature builds the whole runtime on upstream TaffyTree instead of LayoutStore. taffy_adapter_bench prints RECT_DIGEST lines on both builds for a manual diff, and nothing compares them. The digest covers two steps of one kitchen-sink scene, rounded to 0.01 pt. No workflow runs Rust tests outside the web build, so the feature can stop compiling and nobody notices.

Where
Why it matters

LayoutStore is Rune's own retained tree over Taffy's algorithms, with its own cache rules. A cache bug that shows only across many mutations in a large tree would ship to every app. The target is that "a retained commit lays out exactly as a fresh layout given the same app state and runtime inputs". PLAN.md's tenets ask for "an obviously correct reference that is differential-tested on generated inputs on every merge", with "at least 256" cases for layout.

What would help

One job with two parts.

1. A generated store differential. A bounded style-tree generator, in the style of rune-ref's 32-byte records, drives LayoutStore and BaselineLayoutStore through builds and mutation sequences: insert, remove, reorder, style change, measure change, and a re-solve with cached nodes. Run it under proptest (rune-ref already uses it) with persisted regressions. Cover flex, grid and block. Assert cache hits on unchanged subtrees. For the comparison there are two options: within 1/64 pt, or bit for bit. Bit for bit is recommended, as layout_store_carries_cache_across_commits_and_matches_upstream_bit_for_bit already asserts; list any known upstream divergence with a reason. 2. A runtime digest gate. Build rune with and without --features baseline-taffy, run the bench's runtime suite (--runtime-only) with a short step count on both, and fail if any digest differs. Print digests at full precision, so a sub-0.01 pt drift shows. Later, run the runtime layout tests on the baseline build in the nightly lane.

Done when
  • At least 256 generated cases run per merge check, each with at least 8 mutations.
  • Each mutation kind and each layout mode appears in at least 10% of cases.
  • A minimized failure is saved and replayed.
  • The digest job fails when one digest differs, shown once with a deliberately broken cache entry on a test branch.
  • baseline-taffy compiles at every merge.
  • The job runs in under 3 minutes.
How to check

Both parts run in the required merge check (R0028). The persisted regressions replay on every run.

Depends on
Part of
  • Theme: T07
  • Tracked in R0097
  • Phase 1 · priority P1 · size M
R0103Web: the static first frame drops grid tracks and content-size keywords, so an equal_columns segmented control draws as one column until the wasm arrivesP2Phase 1MT07
layout-html-export-grid · bug
What happens

The web build writes a static HTML first frame from the native layout (--html), and the wasm takes over when it loads. The CSS writer emits display: grid for a grid element, but no grid-template-columns, grid-template-rows, auto-flow or placement. Its length writer returns None for every keyword except auto, so min-content, max-content and fit-content sizes are dropped. It rounds every length to 0.01 px. It skips input elements entirely.

rune-kit's Segmented control with Width::Fit uses equal_columns. On the static first frame its segments stack in one column. They jump into a row when the wasm takes over. The same gaps keep the export from serving as a reference for a browser parity check.

Where
Why it matters

A web visitor sees the static frame first. A control that changes shape when the wasm arrives looks broken, and it is a layout shift. The target is that "flex and grid results match a browser's for every layout builder Rune exposes", with the export equal to the live layout on a generated corpus of at least 500 trees.

What would help
  • Export grid-template-columns and grid-template-rows, grid-auto-flow, and grid-column and grid-row placement from the style.
  • Export min-content, max-content and fit-content sizes.
  • Write lengths with enough precision to round-trip an f32 (up to 4 decimals).
  • Export inputs as placeholder boxes with their laid-out size, so the layout around them holds.
  • Add export conformance tests that lay out the exported HTML in headless Chromium and compare its rects with the live layout.

Pages exported before this change keep their old static HTML until they are exported again.

Done when
  • A Segmented control with Width::Fit has the same rects in the static first frame as in the live frame, within 0.01 pt.
  • Every grid and content-size style that a builder can set appears in the export.
  • An input's placeholder box has the input's laid-out size.
  • Export conformance tests run in the browser parity lane.
How to check

Unit tests on the exported CSS run in the required merge check (R0028). The Chromium conformance tests run in the parity lane that R0540 adds.

Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 1 · priority P2 · size M
R0104Layout: rune-taffy's 21 unsafe blocks never run under MiriP2Phase 1ST07
layout-miri-rune-taffy · infra
What happens

rune-taffy has 21 unsafe blocks:

  • 4 in store.rs: get_unchecked indexing, guarded only by debug_assert!.
  • 6 in view.rs: unchecked slot and child access for Taffy's traversal.
  • 11 in style/mod.rs: CompactLength transmutes, from_raw calls, and Rect values read as [u64; 4].

Nothing runs them under Miri. The transmutes depend on how Taffy encodes CompactLength on 64-bit targets, and Cargo.toml asks for taffy = "0.15", so any compatible 0.15.x release could change that encoding without a build error. The lock file has 0.15.0 today. The existing tests use handles correctly, so even under Miri they would not cover stale handles, compaction while handles are held, or a handle from another store. The workspace sets clippy::undocumented_unsafe_blocks to warn, not deny.

Where
Why it matters

These blocks run in every commit of every app. Undefined behavior there can show as a wrong rect in one release build and nowhere else. The target is "Miri clean nightly; 0 safe calls that read unchecked memory; taffy required as =0.15.0 with a compile-time encoding check", and the oracle matrix asks for "Miri green nightly on rune-taffy".

What would help
  • Add a nightly job that runs cargo +nightly miri test -p rune-taffy on x86_64-unknown-linux-gnu with a pinned nightly, with smaller sizes under cfg(miri). The later nightly workflow reuses this job.
  • Add lifecycle tests: remove and compact while ids are held, reuse a slot, and pass an id from another store. These depend on R0098, so they test defined behavior.
  • Check that all 21 blocks have a SAFETY comment that names the invariant (most do), and deny undocumented_unsafe_blocks for rune-taffy, so a new block without one fails clippy at merge.
  • Require taffy = "=0.15.0", and add a check that each CompactLength tag round-trips through pack_raw_len and back, so a Taffy upgrade fails loudly.
Done when
  • Miri passes nightly on all rune-taffy tests, the lifecycle tests included.
  • The job records its toolchain date and target.
  • Every unsafe block has a SAFETY comment.
  • An undocumented unsafe block in rune-taffy fails clippy at merge.
  • Taffy is required at an exact version, and the encoding check fails when the encoding changes.
How to check

The nightly Miri job, and clippy in the merge workflow (R0030).

Depends on
Part of
  • Theme: T07
  • Tracked in R0097
  • Phase 1 · priority P2 · size S
R0105Layout: size, padding and inset setters pass NaN and infinite values straight to TaffyP2Phase 1ST07
layout-nonfinite-lengths · bug
What happens

El::w and El::h hand any f32 to Taffy. So do the padding, margin, gap, absolute and pin setters. aspect_ratio and aspect_fit, by contrast, drop non-finite or non-positive ratios. Apps compute these values from state: a width divided by a count that is zero, a progress bar at NaN percent, a drag delta.

Env::scale is a public f32 with no check, and text layout divides by it. Nothing tests what a NaN or infinite length, or a huge sum of finite ones, lays out to. Nothing tests whether a NaN rect reaches hit testing, scroll extents or the GPU instance buffer. Pixel snapping checks finiteness only for stroke widths.

Where
Why it matters

One bad value from app state should not blank a window, break hit testing or send NaN to the GPU. The target is "no non-finite geometry, and no panic or stack overflow in release from app-supplied structure or values", with 0 non-finite geometry in the misuse tests and the fuzz.

What would help

Start with a test. Put each length setter, with NaN, +inf, -inf, -1 and 1e30, inside a row of normal siblings. Build deep chains whose finite offsets sum past f32 range. Pass scales of 0, NaN and 1e9. Commit, and check every node's rect, scroll extent and instance for finite values.

Then sanitize each property as CSS drops invalid values:

  • NaN or infinite sizes become auto.
  • Negative sizes, paddings and gaps become 0.
  • NaN or infinite margins and insets become 0. Finite negative margins and insets stay valid.
  • A non-finite or non-positive scale falls back to 1.
  • Placement clamps coordinates to a finite range before paint.

A debug warning names the call site once. Add the values to R0100. Add a changelog fragment, since apps that pass negative sizes today lay out differently.

Done when
  • No non-finite rect, scroll extent or GPU instance results from any generated value, from accumulated offsets, or from any scale value.
  • The siblings of a bad node lay out as they would with the fallback value.
  • Finite negative margins and insets lay out as before (test).
  • A debug warning names the call site once per site.
  • Sanitizing adds at most 1% to build time on the stack scene in paired --profile perf runs, and allocates nothing.
How to check

The generated test runs in the required merge check (R0028). The incremental fuzz keeps covering the values.

Part of
  • Theme: T07
  • Tracked in R0097
  • Phase 1 · priority P2 · size S
R0106Layout: six misuses of virtual rows and live_text panic in release builds and name no call siteP2Phase 1ST07
layout-virtual-misuse-no-panic · bug
What happens

Release builds panic on six app mistakes in the layout path. window_tree panics when: 1. .virtualize has no .growth; 2. the virtual stack is not the direct child of a scroll viewport; 3. its padding is not in points; 4. virtual_rows also has children; 5. a .virtualize child has no key.

flatten also panics when live_text has wrap, spans, truncate or an input. So a misbuilt list or label ships as a crash. Duplicate row keys already degrade with a warning instead. The panic messages name the node path, but not the app's call site, which debug builds already record for .virtualize and use in other warnings.

Where
Why it matters

A shipped app should not crash because a list was built slightly wrong. The targets: "Misuse is reported at the call site with the fix, and neither a builder mistake nor content an app passes in crashes a release build"; in debug, a message that names the app's file and line and the fix; in release, warn once and degrade, with 0 panics. The fallback must stay within the commit budget: "Rows built across all retries are <= viewport + 400 per commit".

What would help

virtual_rows implies growth(GrowthSpec::default()) when growth is unset. For the other mistakes, debug builds keep a hard error that names the call site and the fix. Release builds warn once per site and degrade:

  • With no scroll parent, mount only the rows that fit the stack's own laid-out height, at most 200.
  • With a scroll ancestor that is not the direct parent, virtualize against the nearest one, at most viewport + 400 rows.
  • Padding not in points counts as 0.
  • When virtual_rows also has children, drop the children and keep the rows.
  • A keyless row gets an index key, as duplicate keys are renamed now.
  • live_text that breaks its rules draws as static text.

All rows stay reachable by scrolling. Internal invariants use debug_assert!. The panic inventory and its debug and release harness come from R0035. Add a changelog fragment, because release behavior changes.

Done when
  • Each of the six misuses has a test that fails in debug and names the call site and the fix.
  • In a release-mode test, each misuse renders without a panic, mounts at most 200 rows with no scroll parent and at most viewport + 400 otherwise, and scrolling reaches the last row.
  • virtual_rows works without an explicit growth.
  • No assert!, expect or panic! on app-supplied structure remains in window_tree or flatten.
  • A changelog fragment describes the release fallbacks.
How to check

The misuse suite runs in debug and in a release test profile in the required merge check (R0028).

Depends on
Part of
  • Theme: T07
  • Tracked in R0097
  • Phase 1 · priority P2 · size S
R0107Text: a flying text's source glyphs draw with coverage exponent 1.0, so text changes weight when its flight startsP1Phase 1ST08
text-flight-gamma · bug
What happens

A text flight draws two sets of glyphs. The source glyphs are captured when the flight starts and fade out. The landed glyphs fade in. The landed glyphs go through glyph_or_image, which sets the instance's coverage exponent (params[3]) from TextSystem::coverage_exponent. The source glyphs are built with glyph() directly, which hard-codes the exponent to 1.0.

With FontSmoothing::Off the exponent runs from 1.12 for black text to 0.45 for white text, keyed by the text's luminance. Off is the default on Linux, the web and iOS, and an app can choose it on macOS. So white text on a dark surface draws at its resting weight, and on the first frame of its flight it draws with raw coverage: an edge pixel at 50% coverage drops from about 73% ink to 50%. The text thins when it takes off and thickens again as the crossfade hands over to the landed glyphs.

pixel_compare also builds its instances with glyph(). So the FontSmoothing::Off comparison against Core Text measures exponent 1.0, not the exponent apps draw with.

Where
Why it matters

Shared-element and hero transitions move labels and titles. Light text on a dark theme is where the exponent is furthest from 1.0, so a dark-mode app on Linux, the web or iOS shows a visible weight flicker at the start of every flight. The target is that text in motion is drawn with the same coverage rules as text at rest: flight and rest use the same coverage exponent and mask path, and during a scale animation ink changes by at most 3% between consecutive frames beyond the geometric change. The parity target (ink ratio 0.97-1.03, MAE at most 0.5 levels) also needs the Off comparison to measure what apps draw.

What would help

Two options:

1. Route flights and pixel_compare through glyph_or_image. Flights skip colour glyphs on purpose, because the image atlas can move them during the flight, so this needs an alpha-only path anyway. 2. Recommended: add one helper that builds an alpha-glyph instance with the exponent already set, for example text_glyph(q, text, fill, clip, fade). Call it from glyph_or_image, flights.rs and pixel_compare, and make glyph() private to it, so no call site can skip the exponent.

Done when
  • A resting glyph instance and the same glyph's flight source instance carry the same params[3], for white and for black text with FontSmoothing::Off (unit test).
  • No glyph instance is built outside the helper with a literal exponent.
  • The Off Core Text comparison draws with the exponent apps draw with.
  • On the first frame of a flight of white text on a dark surface, ink inside the text's box changes by at most 3% beyond the geometric change (test).
How to check

Unit tests in cargo test -p rune beside the existing flight tests. Add a flight scenario with light text on a dark surface and smoothing Off to scripts/motion-audit, as for any motion change, and run the Core Text comparison tests in crates/rune/src/text/coretext_match_tests.rs on macOS.

Part of
  • Theme: T08
  • Tracked in R0559
  • Phase 1 · priority P1 · size S
R0108Text fields: editing keys follow the build target, so a browser on a Mac or Windows and an iPad keyboard get the wrong bindingsP1Phase 1ST08
text-key-bindings-platform · bug
What happens

TextEdit chooses its key bindings with cfg!(target_os = "macos"). That is false in a wasm build and in an iOS build. So in Safari or Chrome on a Mac, and with an iPad's hardware keyboard:

  • Home and End move to the line edge instead of the document edge.
  • Ctrl-A, Ctrl-E and the other Emacs bindings (abefpndhk) do nothing.
  • Cmd+Y redoes, which no Mac field does.
  • Option and Ctrl word motion use the PC rules.

KeyPlatform::current already detects an Apple device in the browser from navigator.platform, and shortcut chords use it. But the editing code never asks it. On wasm it also maps every non-Apple browser to Linux, Windows included, so chord labels and any later Windows-only rule are wrong there.

PageUp and PageDown do nothing in a multi-line field on any platform. The runtime marks them as keys the field does not handle.

Where
Why it matters

A Mac user who opens a Rune web app gets PC editing keys in every field, and an iPad user with a keyboard does too. The target is that caret movement, selection and deletion follow the bindings of the platform the user is on, a browser on any OS and an iPad keyboard included, with 100% of cases passing under each mapping. KeyPlatform must be detected at run time in every build: Windows in a browser on Windows, Mac in a browser on an Apple device, and Mac on iOS.

What would help
  • On wasm, make KeyPlatform::current return Windows when navigator.userAgentData.platform or navigator.platform names Windows.
  • Give TextEdit an internal entry point that takes a KeyPlatform, and have the runtime pass KeyPlatform::current(). The public TextEdit::key keeps its signature and calls the same code, so tests can choose the platform on one host.
  • Replace every cfg!(target_os = "macos") in edit/ and in runtime/input/keys.rs with the passed platform.
  • Give PageUp and PageDown each platform's behaviour in multi-line fields. On the Mac they scroll without moving the caret, and Option+PageUp/PageDown moves it. Elsewhere they move the caret by one viewport.
Done when
  • The edit tests run under all three KeyPlatform values on one host, with no #[cfg(target_os)] gate.
  • With KeyPlatform::Mac in a wasm build, Home goes to the document start and Ctrl-E to the line end (test).
  • A Windows user agent on wasm gives KeyPlatform::Windows (test).
  • PageDown in a 200-line field follows each platform's rule (test, later also caret corpus cases).
  • No cfg!(target_os = "macos") is left in edit/ or runtime/input/keys.rs.
  • The public key API is unchanged.
How to check

Unit tests in cargo test -p rune. Add a case to scripts/web-input-smoke.mjs that overrides navigator.platform before load and checks Home and Ctrl-E in a field. R0357 then runs every case under each mapping.

Part of
  • Theme: T08
  • Tracked in R0356
  • Phase 1 · priority P1 · size S
R0109Text: the long-note bench stops at 200 KB by default and has no rich, single-paragraph, preedit or accessibility caseP1Phase 1ST08
text-long-note-bench · infra
What happens

long_note is the bench behind the typing numbers in research/27. It drives one multi-line text_input holding a generated Markdown note, headless, and times typing, Return, Backspace, a 2 KB paste, undo, undo depth, scrolling and caret moves. By default it runs at 5, 50 and 200 KB. --sizes takes larger sizes, but no recorded run uses them.

It has no case for:

  • a rich field, with marks and blocks;
  • a single long paragraph (prose, minified JSON, or mixed Arabic and Latin with no newline);
  • an IME preedit update: every typed character is an Ime::Commit;
  • a commit in the middle of a typing run;
  • a 100 KB paste or a select-all delete;
  • a run that builds the accessibility tree each frame, as a running screen reader makes it.

research/27's tables come from one run on an M4 Pro Mac mini and carry no rev or date. Its explanation names TextSystem::layout_blocks, which now forwards to layout_keyed, and a 64 KB stale-layout budget that is now 3 MiB. So the typing targets at 1 MB, in rich fields, with the accessibility tree on and in one long paragraph have no number to compare with, and the composite layout work has no baseline.

Where
Why it matters

The typing targets need these cases to be measurable: keystroke p95 at or below 2 ms at 50 KB and at or below 4 ms at 1 MB, plain and rich, with AccessKit on; at or below 4 ms in each 200 KB single-paragraph case; a 100 KB paste and a select-all delete at 1 MB each at or below 8 ms; at most 0.3 ms extra per keystroke at 200 KB with a reader active. Undo must keep 100 of 100 steps at 1 MB, and typing must stay at or below 4 ms p95 at 10 MB.

What would help
  • Make the default sizes 5, 50, 200 and 1,000 KB, and keep --sizes for 10 MB runs.
  • Add rich, single_paragraph (three 200 KB fixtures: prose, minified JSON, mixed Arabic), preedit_update, commit_in_run, paste_100k, select_all_delete and an --a11y flag that builds the accessibility tree after each frame.
  • Report p50 and p95 from paired, alternating runs, and bytes shaped per keystroke beside the existing shaped count.
  • In research/27, record a table with rev, date and machine, each threshold beside its number, and the current function names and budgets.
Done when
  • Every case runs with --profile perf at the default sizes.
  • The output has p50, p95 and bytes shaped per keystroke for each case.
  • research/27 has a dated table at a named rev, with each threshold beside its number, and names layout_keyed and the 3 MiB budget.
How to check

Run target/perf/examples/long_note as research/27 describes. A PR that changes text/, edit/ or selection/ updates the table, and reviewers check it.

Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 1 · priority P1 · size S
R0110Text fields: is_pristine stays true after typing in a plain field with no on_input_changeP1Phase 1ST08
text-pristine-fastpath · bug
What happens

TextEdit::is_pristine says whether the field still holds the value the app last set. It is true until mark_edited runs. Three places call mark_edited, and a plain field without on_input_change reaches none of them:

  • apply_text_and_attr_replace has a plain-text fast path for a field with no marks, no soft breaks and only paragraph blocks. It returns before the mark_edited call at the end, which only the rich path reaches.
  • replace marks the field edited only on its secure branch and on its no-op branch, where the new text equals the old.
  • The runtime marks the field edited after a key only when the field has an on_input_change handler.

So a plain field without that handler still reports pristine after typed characters, a newline and a paste. Every pristine test uses a secure field, so none catches it.

Where
Why it matters

An app that checks is_pristine before it replaces a field's value with a newer one, or before it shows an unsaved-changes marker, overwrites or ignores what the user typed. The fields target is that text fields meet a fixed list of behavioural contracts, with a passing test in rune and in kit TextInput, TextArea and TextField where it applies, and every listed issue closed by a test that reproduces it.

What would help

Call mark_edited on the plain-text fast path, just before its return. The rich path already does this. Then add tests for plain and rich fields, each with and without on_input_change, that type a character, a newline and a paste and check is_pristine after each.

Check that the fix keeps the hidden multi-line secure behaviour, where the first insertion replaces the whole value while the field is pristine. That path is secure, so it already marks itself edited, but the tests at crates/rune/src/edit/tests.rs:190 should still pass.

Done when
  • is_pristine is false after one typed character, after a newline and after a paste in a plain field without on_input_change.
  • The same holds for a rich field and for both kinds with on_input_change.
  • The new plain-field tests fail on the current code.
  • The kit TextInput, TextArea and TextField wrappers report the same state (test).
How to check

Unit tests in crates/rune/src/edit/tests.rs (or a split file from R0111) and in rune-kit, run by cargo test -p rune -p rune-kit --features rune-kit/markdown.

Part of
  • Theme: T08
  • Tracked in R0356
  • Phase 1 · priority P1 · size S
R0111Text editing: edit.rs, edit/html.rs and text.rs are over the 800-line cap, and the composite layout and IME work must edit themP1Phase 1MT08
text-split-edit-text-files · refactor
What happens

scripts/file-size.sh --warn-only at this commit reports three text files over the 800-line soft cap, and two edit test files over the 1,000-line test cap:

The repo's rule is to move the area you touch into its own module, in its own PR, before adding to a file over the cap. The composite layout work changes layout_keyed in text.rs and the replace path in edit.rs. The IME work changes caret motion and replace in edit.rs. Without a split first, each of those PRs either breaks the rule or mixes a move with a behaviour change, and they collide in the same files.

Where
Why it matters

The typing target, keystroke p95 at or below 2 ms at 50 KB and at or below 4 ms at 1 MB, depends on the composite layout work in these files. The architecture target is that scripts/file-size.sh fails on errors and on a soft-cap warning count above its ceiling, ending at 8 or fewer warnings, down from 23, and on any test file over 1,000 lines. These five files are five of those warnings.

What would help

Move code, change no behaviour:

  • Move caret and word motion out of edit.rs into edit/motion.rs, and the replace path into edit/replace.rs.
  • Turn edit/html.rs into edit/html/ with parse.rs (parse_html and its helpers) and serialize.rs (serialize_html, serialize_inline, serialize_marks).
  • Move layout_keyed and its shaping helpers out of text.rs into text/shape.rs.
  • Split edit/tests.rs and edit/rich_tests.rs by topic into *_tests.rs siblings, for example history, pristine, motion and HTML.

Land this before the composite layout and IME changes start. runtime/commit/apply.rs (882 lines) and recorder/mod.rs (812 lines) are also over the cap, but no text work touches them, so they stay with the other soft-cap splits.

Done when
  • edit.rs, each file in edit/html/ and text.rs are each under 800 non-test lines.
  • No edit test file is over 1,000 lines.
  • scripts/folder-shape.sh passes for edit/ and text/.
  • cargo test -p rune passes with the same number of tests as before.
  • The public API is unchanged.
How to check

scripts/file-size.sh lists none of these files. Compare the test list from cargo test -p rune -- --list before and after the split.

Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 1 · priority P1 · size M
R0112Text fields: a recorded edit deep-copies the undo history that the view's copy of the field sharesP2Phase 1ST08
text-history-copy · perf
What happens

text_input clones the app's TextEdit into the element it returns. The clone shares the field's Arc<History>. On the next edit, record_change calls Arc::make_mut on the app's history. The view's copy still holds a reference, so the strong count is 2 or more and make_mut copies the whole history.

Each step in the history is a Change with a before and an after Snapshot. The snapshot text is in an Arc, so it is shared. But each snapshot's marks, blocks and soft_breaks vectors are cloned. A plain field keeps one Block per line, so every snapshot's blocks vector is as long as the field's line count. With the 128-step limit full, one keystroke can allocate up to 128 x 2 x 3 vectors.

Today the 1 MB history byte limit keeps depth low on large fields: research/27 kept 9 steps at 50 KB and 2 at 200 KB. Once undo stores ranges instead of whole texts, depth rises to the full 128 steps, and this copy grows with it. The comment above History says the view never copies the undo stack, which is not what the code does.

Where
Why it matters

The undo target is 100 of 100 steps kept at 1 MB, with history bytes per step at most 2x (changed text bytes + 32 B per changed formatting record) + 256 B. The typing target is keystroke p95 at or below 2 ms at 50 KB and at or below 4 ms at 1 MB. A keystroke that copies every history step works against both as depth grows.

What would help

The view's copy needs the text, marks, blocks, selection and preedit, not the history. The runtime reads the node's history only as an identity, for focus tracking.

  • Recommended: in text_input, give the clone an empty history and carry the field's identity in a separate token, such as a Weak<History> or a field id that same_model and matches_history compare. TextEdit::clone keeps its public meaning.
  • Alternative: a private render snapshot type in place of the clone. It is cleaner, but every runtime reader of input.edit would change.

Either way make_mut finds a unique Arc. Fix the comment to say what the code does.

Done when
  • One keystroke in a field with 128 undo steps allocates nothing per history step (counting allocator test).
  • Undo and redo give the same documents as before (test).
  • Focus moves between fields as before (existing focus tests pass).
  • The History comment describes what the code does.
How to check

A test in cargo test -p rune with procwatch's counting allocator, which long_note already uses. The memory case in long_note shows the heap after typing.

Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 1 · priority P2 · size S
R0113Text input: no platform-neutral protocol lets an input method read or replace a range of the fieldP0Phase 1LT09
text-ime-protocol · feature
What happens

Desktop IME reaches Rune as winit's four events, Preedit, Commit, Enabled and Disabled, pushed one way into Runtime::ime. Nothing answers an input method's questions: the selected range, the marked range, the text in a range, the rect of a range, or the character at a point. Nothing accepts an insert or set-marked with a replacement range, and nothing tells the input method that the text or selection changed. So press-and-hold, reconversion, emoji-picker replacement and dictation cannot work as they do in a native field, and every platform adapter would have to invent its own model.

The web runtime has the nearest shape. It mirrors up to 512 UTF-16 units on each side of the selection and rejects stale browser edits with base and expected. But it has no field identity, it copies the whole selection, and it converts offsets with encode_utf16().count(). A 900 KB selection in a 1 MB field costs a full scan per sync.

Ime is a public enum with no #[non_exhaustive], and App::on_ime takes it, so adding data to it would break apps that match on it.

Where
Why it matters

CJK, Korean and Vietnamese users, and anyone using dictation or press-and-hold accents, notice wrong or lost text. The target is that "every supported input method talks to a Rune-owned document protocol" with "UTF-16 selected and marked ranges, the text around the caret, insert and set-marked with a replacement range, clause attributes, reconversion, and a rect for any range", at "at most 4,096 units per query" and "under 1 ms per query" at any document size.

What would help

Add crates/rune/src/runtime/text_input/ with a main-thread TextInputClient, implemented once over TextEdit by generalizing the web Mirror.

1. Offsets are UTF-16 and document-relative. text_in(range) returns at most 4,096 units and reports the range it actually returned, as actualRange and TSF partial reads allow. 2. Convert UTF-16 to byte offsets through an index of UTF-16 prefix counts per chunk, updated on each edit, so a conversion is O(log n). TextEdit.text stays a String. The rope in PLAN.md:213 is a separate decision; do not tie this to it. 3. Every request and notification carries the focused field's id and a text revision. A stale revision or a defocused field is rejected and changes nothing. 4. Edit sessions: begin and end group a TSF lock, a text-input-v3 done or a UIKit batch, apply atomically and send one notification. 5. Calls: selected_range, marked_range, text_in, set_marked(text, selected, replacement, clauses), insert(text, replacement), unmark, first_rect(range) in window points, index_at(point), command (doCommandBySelector-style), purpose and secure. Secure fields return no text. 6. Notifications: text changed, selection changed (shared with #129) and geometry changed. One helper converts window points to screen points. 7. No offset may split a surrogate pair or a UTF-8 character. Offsets inside a grapheme are allowed, for jamo and combining marks. 8. The winit path and the web Mirror run on it. App-drawn editors (El::ime_cursor) opt in through a trait set by a builder method. Ime and App::on_ime keep their shape.

Check the shape against NSTextInputClient, ITextStoreACP2, text-input-v3, EditContext and UITextInput before merging. The iOS RuneView depends on this issue.

Done when
  • Headless tests cover every method.
  • On a 1 MB field with a 900 KB selection, each query reads at most 4,096 units beyond its range (counted) and answers in under 1 ms on the reference Mac.
  • A stale revision or a defocused field id is rejected with no change (test).
  • A batched session applies atomically with one text and one selection notification (test).
  • A range splitting a surrogate pair is rejected; one inside a Hangul syllable is accepted (tests).
  • Press-and-hold, emoji replacement and reconversion sequences pass headless.
  • first_rect is right across wrapped lines, pills and scrolled fields, and the screen conversion is tested at 100, 125, 150 and 200%.
  • The winit and web paths run on the protocol, and scripts/web-input-smoke.mjs passes unchanged.
  • The Ime API snapshot is unchanged, and a changelog fragment describes the new trait.
How to check

Unit tests in crates/rune/src/runtime/text_input/tests.rs in T1, including a fuzz of the offset index against a plain scan. Work counts run in the same suite. The API snapshot gate covers Ime.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 1 · priority P0 · size L
R0114Text input: IME is tested only with hand-written Preedit and Commit eventsP0Phase 1MT09
text-ime-replay-tests · infra
What happens

Every IME test builds Ime::Preedit or Ime::Commit by hand. No test replays what a real input method sends. Kotoeri reconversion, Korean jamo editing, press-and-hold replacement, dictation and the emoji picker are not covered, and neither are clause styles or undo after a composition. The web smoke test fires one synthetic composition in Chromium. Even the long-note benchmark types through Ime::Commit. IME regressions reach users first, and an agent changing text input has nothing to run without a real input method.

Where
Why it matters

The target is that "no sequence of input-method events, app edits, focus changes and window events loses, duplicates or misplaces text", with "100% of the scenarios that apply to each adapter" passing headless, and that "a failure becomes a replay fixture, and the release waits until it passes". It also asks for "at most 4,096 units per query". None of that can be shown without recorded sequences.

What would help

1. A JSON fixture format under crates/rune/tests/ime/: a field's starting text and selection, then calls to the R0113 client as a platform makes them (NSTextInputClient calls, TSF edit sessions, text-input-v3 events, DOM composition and beforeinput events, UITextInput calls), then the expected text, selection, marked range, clause styles and undo stack. 2. A headless replay harness that loads every fixture, drives the protocol with no window or GPU, and checks each expectation. Adding a scenario takes one JSON file and no Rust. 3. At least 40 scenarios: ja, zh-Hans, zh-Hant, ko, vi, dead keys, press-and-hold, the emoji picker, dictation placeholders, secure fields, and 1 MB fields that count the UTF-16 units each query reads. 4. A recorder behind RUNE_IME_RECORD=path that each adapter reuses, so a lane failure becomes a fixture. Recordings pass through R0077 before they are written: secure-field text, home paths and tokens never reach a committed fixture. 5. A driver contract for the OS-facing side: a trait each adapter issue implements to issue the same fixture calls through its native surface in its own lane (AppKit window and non-activating panel, TSF window and WS_EX_NOACTIVATE overlay, text-input-v3 window and layer surface, IBus and Fcitx5 on X11, web textarea and EditContext). This issue ships the contract and the headless driver; the adapters fill in theirs.

Drivers simulate input methods. The real-IME lanes stay the check that real ones behave the same.

Done when
  • At least 40 fixtures cover every listed language and input path, including the 1 MB work-count cases.
  • All fixtures pass headless in T1 in under 30 s, with no GPU.
  • A new scenario needs one JSON file and no Rust change (shown by adding one in the PR).
  • RUNE_IME_RECORD writes a fixture the harness replays unchanged, and a recording of a secure field holds no field text.
  • The driver trait is documented, and the headless driver implements it.
How to check

The replay suite runs in the T1 required gate with cargo test -p rune. A test round-trips a recorded session through the recorder, redaction and replay. Each adapter issue adds its driver to its lane and fails that lane on any failing fixture.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 1 · priority P0 · size M
R0115Overlays: a field in a winit-backed overlay cannot compose CJK text, and a password field there never claims macOS secure inputP1Phase 1MT09
text-ime-overlays · bug
What happens

Only the window host turns the input method on and claims secure input. Its sync_platform calls set_ime_allowed, set_ime_cursor_area from rt.ime_area, and SecureInput::set. The overlay host does none of this. Its event match has no WindowEvent::Ime arm, and nothing under crates/rune/src/overlay/ refers to secure_input or has_secure_focus. On blur it cancels composition, but nothing ever starts one.

Two things follow. A field in a command palette, launcher or popover overlay takes plain keys only, so Japanese, Chinese, Korean and dead-key accents cannot be typed there. And a password typed into a login popover or palette overlay goes without EnableSecureEventInput, so other processes can observe the keystrokes.

Secure input is also tracked per host as one bool. A focus move from a secure window field to a secure overlay field can release the window's claim before the overlay takes its own.

Where
Why it matters

The target is that "every supported input method talks to a Rune-owned document protocol, in windows, overlays, palettes and app-drawn editors", with "the candidate window within 2 pt where the OS places it at the anchor", and that text input works "in windows, overlays, panels and mobile views". Fields must also get secure entry wherever the native field does. A palette that cannot take CJK text, or a password popover open to key logging, fails both.

What would help

1. Move the IME and secure-input parts of sync_platform into one helper both hosts call. The window host's behaviour does not change. 2. In the overlay host, while the overlay is key and a field or ime_cursor surface has focus: call set_ime_allowed, follow rt.ime_area with set_ime_cursor_area, and forward WindowEvent::Ime to rt.ime. Turn IME off on blur, hide and destroy. An overlay that never takes key focus never turns IME on. 3. Replace the per-host bool with one process-wide claim count for EnableSecureEventInput. A host claims while it is key, visible and has a focused secure field, and releases on hide, blur, close and destroy. A failed native claim is reported and leaves the count balanced.

Layer-shell overlays need their own text-input-v3 client, which comes with the Wayland adapter. On macOS, panels adopt RuneTextView with the macOS adapter.

Done when
  • A host-level test feeds WindowEvent::Ime into the overlay host and sees the preedit drawn.
  • Through a fake window, the same test sees IME on while a field has focus, the cursor area following the caret, and IME off on blur, hide and destroy.
  • With a fake secure-input backend, a secure overlay field claims, then releases on each of hide, blur, close and destroy.
  • Moving focus from a secure window field to a secure overlay field keeps the claim held throughout.
  • Claims and releases stay balanced across 100 show and hide cycles, and after a failed claim.
  • A winit-backed palette overlay composes Japanese on macOS and Windows with the candidate window within 2 pt of the caret.
How to check

Host-level and fake-backend tests in T1. The candidate-window step runs on R0189 and on the Windows real-IME lane; a secure overlay step on the macOS lane checks IsSecureEventInputEnabled while focused and after close.

Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 1 · priority P1 · size M
R0116Text input: fields never tell the platform what they hold (password, email, URL, number, search, code)P1Phase 1MT09
text-ime-purpose · feature
What happens

A Rune field has no input purpose. Rune never calls winit's Window::set_ime_purpose, which in winit 0.30.13 knows only Normal, Password and Terminal. On the web, the textarea sink sets inputMode to text (or none on a coarse pointer) and never carries a purpose, autocomplete or enterKeyHint. The password sink hard-codes autocomplete="off".

So touch keyboards cannot show an email, number or URL layout. An input method cannot turn itself off for a code field. Password managers and browsers cannot tell a username from an email or a new password from the current one. #109 lists this as a WCAG 1.3.5 failure on the web.

Where
Why it matters

People on phones get the wrong keyboard. People who rely on autofill get no suggestion. The targets are that Rune fields offer "input purpose and keyboard type" and "password and one-time-code autofill" in the same matrix the native field does, with 100% of cells filled, and that each field carries "its own name, purpose for autofill" on all 5 targets, "or the matrix cell is n/a with a reason".

What would help

1. Add InputPurpose: Text, Name, Username, Email, CurrentPassword, NewPassword, OneTimeCode, Phone, Url, PostalCode, Number, Decimal, Search, Code. Mark it #[non_exhaustive]. 2. Add autocapitalize (none, words, sentences, characters) and autocorrect (on, off) hints. 3. Set them with builder methods, El::input_purpose, El::autocapitalize, El::autocorrect, and the kit TextInput, TextArea and TextField equivalents. No new pub fields on types apps build as literals. 4. Expose the purpose as the node's autocomplete property in the AccessKit tree. 5. Map it now where Rune can: CurrentPassword and NewPassword to winit Password, Code to Terminal. On the web sink, set inputMode, autocomplete, enterKeyHint and autocapitalize while the field has focus, and reset them on blur. 6. Through R0113, purpose() hands the value to the later adapters: TSF input scopes, text-input-v3 content purpose and hints, NSTextContentType, UITextInputTraits. 7. Add a docs table with one row per purpose and one column per platform. Each cell holds the platform value, or names the adapter issue that supplies it, or says n/a with a reason.

A Code field turns autocorrect and autocapitalize off wherever they exist.

Done when
  • The enum and builders exist in rune and kit, with a changelog fragment.
  • The AccessKit node of each field carries its purpose (headless tree test).
  • The web sink carries the documented inputMode, autocomplete, enterKeyHint and autocapitalize for every purpose, and clears them on blur.
  • On Wayland, a password field sends the password content purpose through winit (lane log).
  • A Code field turns autocorrect and autocapitalize off on every platform that has them.
  • The docs table has no empty cell.
How to check

Unit tests in T1 for the builders and the AccessKit property. scripts/web-input-smoke.mjs gains one step per purpose that reads the sink's attributes. A docs test fails when an InputPurpose variant has no table row.

Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 1 · priority P1 · size M
R0117Web: an autofilled password is appended to what was typed, and the password field turns autofill offP0Phase 1ST09
a11y-web-autofill · bug
What happens

On the web, a secure Rune field takes its input through one hidden <input type="password">. Its input handler reads the element's whole value, clears the element and sends the value to Rust as typed text. Rust turns that into a Key::Text key at the caret. This works for typing one character at a time. It breaks when the browser or a password manager sets the whole value at once: the filled value is inserted next to what the person already typed. #109 measured it. A 13-character fill on a password field that holds 8 typed characters leaves 21 characters in the app, so the sign-in fails.

The same element sets autocomplete="off", so most password managers never offer to fill it.

Where
Why it matters

People who rely on autofill or a password manager cannot sign in to a Rune app in a browser. Many of them rely on it for motor or cognitive reasons. The target is that "autofill leaves exactly the filled value", and that Rune fields offer "password and one-time-code autofill" wherever the platform's native field does, with 100% of the services matrix filled. An independent WCAG 2.2 A and AA audit must find no criterion failing because of Rune.

What would help

1. In the password input handler, look at event.inputType. Treat insertReplacementText, an input event with no inputType, and an element that matches :autofill (or :-webkit-autofill) as a fill. Send a new secure_replace message for a fill, and keep secure for typed text. 2. Add web_secure_replace beside web_secure. It applies the same focus and secure checks, replaces the whole field's text with the value as one undo step, and never caches, logs or traces it. Zeroize the incoming String, as Ime does on drop. 3. Keep clearing the DOM value in the same task, as today. 4. Take autocomplete from R0116: username, current-password, new-password or one-time-code. A secure field with no purpose gets current-password, not off. A focused Username field sets autocomplete="username" on the textarea sink, so a password manager sees a login pair. 5. Paste keeps its own path (bridge.js intercepts paste and the model replaces its selection). Add a test so it stays that way.

iOS AutoFill and SMS one-time codes come with the iOS text input. The macOS AutoFill result is recorded by the macOS RuneTextView adapter.

Done when
  • Playwright fill() with 13 characters on a password field holding 8 typed characters leaves exactly the 13 (#109's repro).
  • Filling a non-empty field twice leaves only the second value.
  • A paste over a selection in a secure field replaces only the selection.
  • A saved-password fill from the browser's own password manager lands exactly the saved value in Chromium and in Safari, and the DOM holds no secret after the fill task.
  • The sink's autocomplete follows the field's purpose for Username, CurrentPassword, NewPassword and OneTimeCode.
  • The existing secure tests pass, and a test asserts the filled value appears in no log, trace, mirror item or cached Mirror field.
How to check

Web runtime unit tests beside crates/rune/src/runtime/web/runtime.rs in T1 cover replace, double fill and no caching. scripts/web-input-smoke.mjs gains the fill() steps. The password-manager fills run as web lane steps on Chromium and WebKit.

Depends on
Part of
  • Theme: T09
  • Tracked in R0571
  • Phase 1 · priority P0 · size S
R0118Text fields: every IME event breaks the undo group, and each commit is its own undo stepP1Phase 1MT09
text-ime-undo-group · bug
What happens

TextEdit::ime calls sync_invariants and break_history_group on every event, preedit updates included. A commit then goes through insert, which calls replace with typing false, and that breaks the group again. Plain typing coalesces only for Key::Text without a newline.

So each dead-key accent, CJK conversion, dictation chunk and emoji-picker insert becomes its own undo step, and it splits the typing run around it. Cmd+Z after typing a Japanese sentence undoes one clause at a time, then one Latin run, then the next clause. The history holds 128 steps, so a few sentences of composed text push older work out.

sync_invariants counts newlines over the whole text, so every preedit keystroke in a 1 MB note pays an O(n) pass even when the text did not change.

Native fields group composed text with the typing around it. The exact rules differ by platform and have not been recorded.

Where
Why it matters

Anyone who types with an input method, dictation or the emoji picker notices that undo goes back in odd small steps. The target is that undo "groups edits as the platform's native field does, including IME commits, dead keys, dictation and emoji insertion", with "100% of recorded grouping sequences" matching on each platform and "100 of 100 steps kept at 1 MB".

What would help

1. Record first. In NSTextView on macOS and a Chromium textarea on Windows, record the undo steps after: a kana conversion inside a typing run, a dead-key accent, an emoji-picker insert, a dictation insert, a commit that replaces a selection, and a cancelled composition. Name the OS and app versions. Commit them as test expectations. 2. Preedit updates leave history alone. 3. Commits join the typing run by the recorded rule for the active KeyPlatform, through a replace call with typing set as the rule says. 4. Skip sync_invariants when the text has not changed since the last check. TextEdit.text is a pub String that apps write directly, so the check cannot rely on a revision Rune bumps. Options: (a) keep the last validated length and a cheap content fingerprint, and rescan on mismatch; (b) bump an internal revision on Rune's own edits, and treat any mismatch between that revision and a stored length as an app write. Recommended: (a), since it catches an app write that keeps the length only when the fingerprint changes, and costs O(1) per event when a fingerprint over the edited window is enough. An app write before an IME event must still be checked.

Done when
  • Recordings for at least 6 scenarios each on macOS and Windows are committed, with their source named.
  • Rune's undo steps match each recording (tests per KeyPlatform).
  • A Preedit event with no text change does no whole-text pass (count test).
  • An app write to edit.text before an IME event is still checked by sync_invariants (test).
  • 100 of 100 undo steps are kept after IME commits in a 1 MB field.
How to check

Unit tests in crates/rune/src/edit/tests.rs and grouping scenarios in the R0114 suite in T1. The real-IME lanes compare the same scenarios against the native field when they land.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 1 · priority P1 · size M
R0119Web: the hidden text field sits at the page's top-left, so the IME candidate window and emoji picker open thereP1Phase 1MT09
text-ime-web-caret · bug
What happens

The web build takes text through a hidden textarea and a hidden password input. Both are position:fixed 1 px by 1 px elements at left 0, top 0, and they never move. sync sets only their value and selection. Browsers anchor the CJK candidate window and the OS emoji picker to the focused element's caret, so both open in the page's top-left corner, far from the field. A screen reader's focus highlight and a magnifier go to the same corner.

The runtime already knows where the caret is: desktops pass rt.ime_area to winit. The web sync just never sends it. research/05 planned to place the textarea at the caret.

Where
Why it matters

Anyone typing Japanese or Chinese, or picking an emoji, in a Rune web app sees the picker in the wrong place. The targets: the candidate window "within 2 pt where the OS places it at the anchor"; "the web's focused element carries the field's own name and sits on the field's rect outside composition"; and the web build is "a first-class target in every browser engine, desktop and mobile".

What would help

1. Send the field rect and the caret's line rect with each sync, in CSS px, offset by the band in page mode. 2. Outside composition, the focused sink sits on the field rect, which R0377 needs. 3. On compositionstart, on focus and on caret moves (the emoji picker can open at any of them), move the sink's top-left to the caret line, with the line's height and a width to the field's right edge, so its own caret is at its top-left. On compositionend, return to the field rect. 4. Move it with a CSS transform only, so a caret move causes no layout. 5. Keep pointer-events:none, opacity:0 and preventScroll on focus. Keep a computed font size of at least 16 px and match the line height with a transform scale, so iOS Safari never zooms on focus.

EditContext on Chromium is a separate adapter and is not part of this issue.

Done when
  • A Playwright test finds the sink's top-left within 1 CSS px of the runtime caret during composition, and on the field rect otherwise, after focus, typing, caret moves and a scroll, in Chromium, Firefox and WebKit.
  • Page mode and embedded mode pass the same test.
  • A Chromium trace of 100 caret moves shows no Layout event caused by the moves.
  • Focusing a 12 px field in iOS Safari leaves visualViewport.scale at 1, checked on the mobile web lane.
  • With a real input method on macOS, the candidate window opens within 2 pt of the caret, checked on R0189.
How to check

scripts/web-input-smoke.mjs gains the rect and trace checks and runs on all three engines through R0062. The iOS Safari zoom check is owned by the mobile web lane. The real-IME candidate check is a step on the macOS lane.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 1 · priority P1 · size M
R0120Docs: the site has no page that explains Rune's motion model, gestures and reduced motionP2Phase 1ST10
motion-docs-motion-page · docs
What happens

The docs site has seven routes: Overview, How it works, Launch fast, Fast apps, Principles, Architecture and Roadmap. None of them covers motion. App authors learn springs, tokens, transitions, matched geometry, scroll physics, reduced motion and the motion gate from two places. One is the 2,830-line crates/rune/README.md. The other is rune-motion's README. The two disagree in places (R0021).

rune-motion's README has a SwiftUI name-mapping table. Nothing checks it, and it doesn't say which rows have a working example or a gate scenario. Most app authors and agents come to Rune knowing SwiftUI's animation vocabulary, so this table is where they start.

Where
Why it matters

Rune's motion API should cover a fixed set of SwiftUI animation capabilities, each with an example and a gate scenario that checks the behaviour. All of the fixed rows count, with none marked out of scope, and the docs site has a Motion page that links each row. Without the page, an author can't see what is covered, and nothing fails when a row loses its example. The motion audit should also cover the whole public motion surface. A checked table is one place where an uncovered API shows up.

What would help

Add a Motion route and page with these sections:

1. The model: views state targets, and springs retarget while keeping their velocity. 2. The tok::motion tokens, and how they differ from the SwiftUI Spring constants. 3. Per-element and per-change motion (El::motion, Tx::animated, Tx::instant). 4. Transitions and presence. 5. Matched geometry and flights. 6. Scroll and gestures. 7. Reduced motion. 8. How to add a gate scenario.

Cut code samples from examples through site/scripts/snippets.ts, so they compile and fail the build when moved.

Keep the SwiftUI parity table as a data file, for example site/src/motion-parity.json. Start from the README mapping. Each row names the SwiftUI API, the Rune API path, an example file and a gate scenario. The fixed rows include springs, withAnimation with completion, transitions (asymmetric and combined), matchedGeometryEffect, PhaseAnimator, KeyframeAnimator, scroll deceleration, paging, scroll-linked effects, drag velocity and reduced motion. A row whose API doesn't exist yet stays in the table, marked failing with an issue link. Add a test that reads the file and fails when a row's API path is not in the public docs, or its example file or scenario file is missing.

Done when
  • The site has a Motion page linked from the navigation.
  • Every row of the fixed set is in the parity data file. Each row has a Rune API path, an example and a gate scenario, or is marked failing with an issue link.
  • A test fails when a row's API path, example file or gate scenario doesn't exist.
  • Every code sample on the page comes from a compiled example or doc test.
  • rune-motion's README table points to the page instead of keeping a second copy.
How to check

bun run build in site/ fails on a moved snippet. The parity-table test runs in the framework's required check before a merge to dev, so a renamed API or a deleted scenario fails the merge.

Depends on
Part of
  • Theme: T10
  • Phase 1 · priority P2 · size S
R0121Frames: interaction timing stops at the scheduled refresh, so no frame records when it reached the screenP0Phase 1MT11
perf-frame-record-ring · feature
What happens

Interaction timing (on with RUNE_PERF=1 or a loopback OTLP endpoint) times an input from arrival to present. But Tracker::finish takes the present as the refresh the display link aimed the frame at, or the submit time when no link paced it. Latency is measured to the aim, not to the screen. FrameEncoded::presents_at() reports the same scheduled refresh (#175), and it is None off macOS.

Metal's presented handler exists, but a window installs it only when it is traced or re-samples its shadow. Untraced, it keeps only the newest drawable on screen, not when it got there. No frame keeps its pace wait, drawable wait, GPU start and end, or real present time. So outside --trace, a missed refresh leaves no trace.

Where
Why it matters

The target is input-to-present latency from real present times: p50 <= 8.3 ms and p95 <= 16.7 ms on the 120 Hz reference Mac and ProMotion iPhone, dispatch-to-submit p95 <= 4 ms (PLAN.md section 8), with probe error under 0.5 ms. A platform with no real present source fails it. Motion should present on >= 99% of refreshes with < 0.1% missed at 120 Hz. GPU time should be recorded on 100% of presented frames. Retained paint and the shared frame core both need before and after numbers. Today an app developer cannot see a missed vsync at all.

What would help
  • A fixed 256-entry ring per surface, allocated when the surface is made, keyed by frame id (the drawable sequence on macOS, a host counter elsewhere).
  • Stamps: input arrival (reuse the input-to-frame association in runtime/interaction.rs), frame start, update phases, pace wait, drawable wait, encode, submit, GPU start and end slots (filled by R0129), and the present time. Keep actual, predicted and proxy present times in separate fields (R0128).
  • Install the presented handler on every macOS window. Write (seq, presentedTime) into a lock-free slot array, not the traced path's Mutex<Vec>. Convert with instant_at.
  • Present times arrive late and out of order. Match them by id. Mark a drawable with presentedTime 0 as missed. Mark a record with no present after SETTLE (150 ms) as never presented.
  • Derive input-to-present p50 and p95, a presents-per-refresh histogram, and missed and doubled presents. End interaction timing's present_wait at the real present when one arrives.
  • For #175: FrameEncoded reaches the hook before its present. Options: (a) a late report keyed by FrameEncoded::seq() that carries presented_at(); (b) delay every report until its present arrives. Recommended: (a), because (b) changes when existing hooks run. Add no pub fields to literal-built types, and add a changelog fragment.
Done when
  • A counting-allocator test shows that recording a frame allocates 0 bytes.
  • Synthetic-stamp tests cover wraparound, a present after later frames, out-of-order presents, a skipped drawable, a frame never presented and clock conversion, and derive the right latency and histogram.
  • On the ProMotion reference Mac, without --trace, a spring scene reports input-to-present p50 and p95 and missed presents.
  • Its present times agree with the presentDrawable swizzle from #204 within 0.5 ms, and its missed counts within 1%.
  • An app reads a frame's real present time (#175).
  • Headless records report CPU phases and leave the GPU and present fields empty.
How to check

Unit tests for matching and the derivations run in the required check. The macOS lane reads the histogram on every run and compares it with the swizzle probe.

Part of
  • Theme: T11
  • Tracked in R0395
  • Phase 1 · priority P0 · size M
R0122Headless: a native macOS window never replays a script, so no latency run can use OS-injected inputP0Phase 1MT04
tooling-native-script-macos · infra
What happens

Args::headless() sends any run with --script to the offscreen runner, unless --native is set. With --native, the app opens a real window, but nothing replays the script in it. The script path changes only whether links open natively. So no scripted run goes through the OS event path, the window server and real presentation. A latency number from a headless run leaves out event delivery, compositing and display timing. A number from a hand-driven window can't be repeated.

Where
Why it matters

The latency target is that input-to-present is measured "on reserved 120 Hz hardware ... with OS-injected input in a real window". It asks for "input-to-present p50 at most 8.3 ms and p95 at most 16.7 ms", and "missed presents under 0.1% of refreshes during scroll". The 120 Hz Mac and ProMotion iPhone targets ask for "p50 <= 8.3 ms, p95 <= 16.7 ms, dispatch-to-submit p95 <= 4 ms". None of these can be measured until a script can drive a real window.

What would help

This issue covers macOS only.

  • With --native --script S.json, replay the script's events in the window on the display-link clock, at their scripted times.
  • Add --inject os (macOS). Instead of calling the runtime directly, build each pointer, wheel and key event as a CGEvent and post it with CGEventPost. Stamp the post time into the frame record from R0121 as the input's arrival time.
  • Without --inject os, events go into the runtime at the same times, so the two runs can be compared.
  • If the process lacks permission to post events, fail with a clear message before frame 0. Don't fall back silently.
  • Update a_script_alone_replays_headless_unless_native and the --native help text.

The shared host for every runner, and Windows SendInput, stay with the later native-script work under R0255.

Done when
  • A 300-event script of scroll, hover and typing replays in a native macOS window with --native --script.
  • With --inject os, every injected event appears in the frame record, joined to the frame that presented its response.
  • The final --tree of the native run equals the headless run's tree for the same script.
  • A run without event-posting permission exits non-zero before frame 0 and names the permission.
How to check

A test on the self-hosted macOS lane runs the 300-event script both ways and compares the trees. The macOS latency lane uses --inject os for its windowed scenarios.

Depends on
Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 1 · priority P0 · size M
R0123Overlays and web: a compositor gets no effect marks, because neither host sets track_marksP1Phase 1ST11
arch-overlay-compositor-marks · bug
What happens

Runtime::marks holds the El::mark / rune::effect tag of each instance. The runtime fills it only while Runtime::track_marks is set. The window, desktop, headless and LayerHost hosts set the flag when a compositor is attached. The overlay host and the web host do not.

The overlay host builds its runtime, stores the compositor, and passes rt to it on every frame, but it never sets the flag. The web host does the same. A compositor in either host reads an empty rt.marks, so it cannot tell its effect slots apart. #167 reproduced this in Chrome with real WebGPU: a compositor that draws fire for rune::effect(2) and electric for rune::effect(1) drew the electric fallback for both, because both slots read as unmarked. Natively each slot draws its own effect.

Where
Why it matters

Anyone who puts a per-slot effect in an overlay or a web app sees the wrong effect, with no error. The target is one shared frame core in which quiet skip, track_marks, report frames and wake computation live for window, overlay, web, LayerHost, desktop and headless. rune-fx and rune-light should draw within 2/255 of their goldens on every native and WebGPU target. The web build should be a first-class target.

What would help

This is a stopgap until R0195 sets the flag in one place.

  • Overlay: set rt.track_marks = compositor.is_some() after Runtime::with_text at overlay.rs:398.
  • Web: set rt.track_marks = compositor.is_some() after playground::attach at web.rs:420. This is the fix #167 uses.
  • Test each host through its own construction path, not by setting the flag by hand. The overlay test runs natively. For the web, add a check to scripts/web-smoke.mjs, because platform/web.rs builds only for wasm32. Or move the runtime setup into a function that compiles on both targets and test that.
Done when
  • An overlay built through the overlay host with a compositor has rt.marks.len() == rt.instances.len(), and each marked instance carries its tag.
  • The same holds for a web app with a compositor.
  • Both tests fail without the fix.
  • A two-effect compositor draws each slot's own effect in an overlay and in Chrome.
How to check

The overlay test runs in the required check. The web check runs in the web smoke lane. Once the frame core lands, its parity suite covers marks for every Backing.

Part of
  • Theme: T11
  • Phase 1 · priority P1 · size S
R0124Frame timing: nothing reports hitch-time ratio, cadence or motion frames lost to a busy main threadP1Phase 1MT11
motion-hitch-metrics · infra
What happens

PLAN.md and research/15 define the smoothness metrics Rune should report. Hitch-time ratio is the excess present interval over the expected one, divided by the animation's duration, in ms/s. Apple's guidance: under 5 ms/s is good, 5 to 10 is a warning, and over 10 is critical. The other metrics are cadence deviation and input-to-photon. PLAN.md also asks that each hitch be charged to the phase that ran long.

None of these is computed. The surface meter counts redraws, presents and misses as totals and per-second rates, with no intervals or refresh periods. Present times exist only on macOS under --trace. Input arrival stamps are never joined to them. No metric counts motion frames lost while the main thread was busy, and that number decides whether a presenter thread is worth its cost.

Where
Why it matters

The targets: hitch-time ratio <= 5 ms/s in the reference scenarios. >= 99% one-period frames on the ProMotion Mac and iPhone. A busy main thread drops <= 0.5% of motion frames in every flagship workload. Direct manipulation presents within p50 <= 1 refresh + 1 ms and p95 <= 2 refreshes (9.3 ms and 16.7 ms at 120 Hz). Busy-main misses <= 1% of motion refreshes on every lane platform. Without these numbers, a stutter in a scroll or a spring can't be told apart from a slow app, and the presenter decision has no data.

What would help

Compute these from R0121, per surface, with no allocation per frame:

  • Hitch-time ratio over animating intervals, from the frame a track starts to the frame motion settles.
  • Present-interval histogram in refresh periods, with standard deviation and maximum.
  • Input-to-present: each input carries a sequence id to the first frame whose commit consumed it.
  • Main-busy motion drops: a refresh missed while motion ran and main-thread work (view, commit, layout or a handler) overlapped the admission deadline.

Charge each hitch to the phase that ran long. On the web, compute the same metrics against requestAnimationFrame timestamps and label them as a proxy. A proxy counts toward no real-present-time row. Expose the metrics through an accessor and in --trace output.

Done when
  • The four metrics are available per surface on macOS, Windows, Linux and web through an accessor, and web values are labelled as a proxy.
  • A headless test with a scripted 30 ms commit at a known phase reports the missed refreshes the frame clock predicts for that phase and queue state, charged to the commit phase.
  • A test checks that an input's latency is joined to the first frame that consumed it.
  • An allocation test shows 0 allocations per frame.
How to check

Headless tests with a fake clock run in the required check. The reference-device lanes publish the metrics per run, and the nightly flagship scripts read the main-busy rate.

Depends on
Part of
  • Theme: T11
  • Tracked in R0395
  • Phase 1 · priority P1 · size M
R0125macOS: no reserved ProMotion Mac measures input-to-present, cadence and missed presents in a real windowP0Phase 1LT03
perf-lane-macos · infra
What happens

Every number about how Rune feels in a real macOS window comes from a hand run. #204 found a virtual_rows scroll at 53 to 90 fps on a 120 Hz Mac, where GPUI Fast held 119 to 120 fps on the same events. research/26 found that a moving Glass window presents only 70% of its frames one period after the last. Both reached dev and the apps that pin it first.

Headless runs cannot see this. real-frames.py says its numbers leave out GPU execution, presentation, display timing and the window server. The tools in scripts/native-pacing/ exist, but nothing schedules them, and check-native-pacing.py only asserts that no gap is under half a refresh.

Two gaps block a lane today. A native window never replays a script: Args::headless sends --script to the offscreen runner unless --native is set, so there is no OS-injected input in a real window. Real present times exist only on macOS, and only under --trace.

The display link handles a display change and the Low Power Mode cap. The native-pacing findings show that Low Power Mode holds a ProMotion panel at 60 Hz while both display links report 120 Hz. Nothing measures either case.

Where
Why it matters

People on ProMotion Macs see stutter before any check does. The targets:

  • Input-to-present p50 at most 8.3 ms, p95 at most 16.7 ms, dispatch-to-submit p95 at most 4 ms (PLAN §8).
  • At least 99% one-period frames and under 0.1% missed presents at 120 Hz on AC and battery, Glass and #204's scrolls included. A move from 120 to 60 Hz paces at the new rate within 2 refreshes with 0 doubled presents. Low Power Mode holds 60 Hz with at least 99% one-period frames.
  • Frame p95 at most 4 ms with 0 frames over 8.3 ms. Sample-to-present p95 at most 1 ms. Hitch-time ratio at most 5 ms/s.
  • At least 5 windowed scenarios per verified candidate. A paired regression over 10% and above the noise floor turns the lane red. No wall-clock number gates a hosted runner.
What would help
  • Reserve an Apple-silicon MacBook Pro with a ProMotion panel and an external 60 Hz display, used for nothing else. It runs on push to dev and on dispatch, never on pull_request, under R0051 and R0050.
  • Inject input with CGEventPost through R0122. Read present times from R0121, scenes from R0065, limits from R0066 and hitch metrics from R0124. Add a windowed mode to real-frames.py that reads frame record logs.
  • Scenarios, --profile perf, at least 300 events each, on native Metal and on RUNE_GPU_BACKEND=wgpu: #204's table and body scroll, a hover sweep, typing, a Glass window, an overlay show and hide, the 1,000-spring scene, and idle.
  • Per dev push: the short set, in paired alternating runs against the head of verified. Nightly: at least 10,000 animating frames per scenario, on AC and battery with powermetrics, a window move between the displays, and Low Power Mode.
  • Each run reports input-to-present p50/p95, the one-period share, missed and doubled presents, the hitch ratio and sample-to-present error, with a manifest (model, OS, panel rate, power source, rev, backend).
  • Fail on any absolute limit, or on a paired regression over 10% that also exceeds the metric's noise floor from 20 baseline runs (research/09 §C4). Fixed deltas (p95 +1 ms, one-period share -0.5 points) serve only until those runs exist.
  • Advisory for 2 weeks, then required for verified. R0402 and the other devices reuse this harness.
Done when
  • Each dev push gets results from at least 5 windowed scenarios on both backends within 2 h.
  • The nightly run checks every macOS row of the perf matrix on AC and battery and fails on any violation.
  • The 120-to-60 Hz move and Low Power Mode scenarios run nightly and fail when their limits are missed.
  • Noise floors from 20 baseline runs are committed per metric.
  • Each frame record links an OS-injected event to its present.
  • The workflow refuses pull_request for this runner.
How to check

A seeded 3 ms stall in the scroll scenario turns the lane red. #204's rev fails the scroll scenarios. The per-rev JSON results and the nightly report keep it proven.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 1 · priority P0 · size L
R0126Web and LayerHost: frames that change nothing still acquire, draw and presentP1Phase 1ST11
perf-layerhost-quiet · bug
What happens

Windows and overlays build a timer-woken frame before they take a drawable. If Presented::unchanged says the build draws what is already on screen, they take no drawable and present nothing. The web host and LayerHost have no such check.

LayerHost::frame always steps, acquires, renders and presents, and returns drew: true. An embedder that calls frame() on a 30 Hz wake_after draws 30 identical frames a second. On the web, a due wake_after requests a redraw, and every RedrawRequested acquires the canvas texture, draws and presents. #166 measured an iPhone at rest at 29.9 frames a second (59.8 requestAnimationFrame calls and 64 ms of frame CPU a second), and a desktop Chrome app at 60 draws a second for about 47 changes. This issue fixes the idle half: frames whose build draws what is already shown.

Where
Why it matters

An idle web app or embedded iOS view spends GPU time and battery to draw the same pixels. The targets: zero cost at rest on every host, which means 0 presents, 0 submissions and CPU <= 0.1% of one core. 0 presents a second at rest beyond the caret or media rate. A frame that changes nothing is not presented. The web passes with 0 submits at rest.

What would help

This is a stopgap until the hosts move onto the shared frame core (R0198, R0195).

  • After clock.advance and before get_current_texture, check Presented::unchanged against the last presented frame. Pass next_tick as None, because neither host runs Rune's display link.
  • After each present, call Presented::record.
  • LayerHost: on an unchanged frame, return drew: false and keep wake_after_secs and animating as they are.
  • Web: on an unchanged frame, still flush the clipboard and handle requests, but skip sync_band, acquire and present.
  • same already refuses a frame with a compositor, SurfaceDraw content or a pending upload. So a running compositor, a new video frame and changed pixels still present. A resize or scale change also still presents, because the surface config differs.
Done when
  • A LayerHost at rest with a 30 Hz wake_after whose poll returns false presents 0 frames a second.
  • An idle web app with a 30 Hz wake_after that changes nothing submits 0 times in 10 s.
  • Tests: an unchanged frame reports drew == false. A frame with changed pixels, a new video frame, a running compositor, or a resize or scale change still presents.
  • The window and overlay quiet paths are unchanged.
How to check

Add the wake-without-change case to scripts/web-smoke.mjs, which already counts GPUQueue.submit calls and asserts 0 at rest. Test LayerHost on macOS, where platform/embed.rs also builds. The iOS lane takes an idle sample.

Part of
  • Theme: T11
  • Phase 1 · priority P1 · size S
R0127macOS: a frame that takes over 4.2 ms of CPU skips the next refresh, so Glass windows run near 80 fpsP1Phase 1ST11
perf-pacing-frame-start · bug
What happens

The macOS display link refuses a tick that comes less than half a refresh period after the last present (permits). The present is stamped after submit and present, so the gate counts the frame's own CPU time. At 120 Hz, a frame that takes more than about 4.2 ms of CPU makes the next tick skip. A window with the system Glass material takes about 3.2 ms of CPU (median) plus transaction work, and it runs near 80 fps. In one trace, 192 of the 219 frames over that line were followed by a skip. Skipped frames let the CPU clock down, which makes the next Glass layout slower.

research/26 measured the fixes with env-gated experiments, since removed:

Pacing changeFrames one period after the last
Drop the half-period check97%
Measure the half period from the last frame's start98.5%
Frame start, and wait for the GPU before presenting99%

The GPU wait matters because wgpu's presentsWithTransaction path waits only until the command buffer is scheduled, so a drawable can join the transaction before it has rendered. With the stock pacer, the wait alone lowered cadence to 62%.

Where
Why it matters

Glass windows visibly stutter on a ProMotion Mac. The target is >= 99% one-period frames and < 0.1% missed at 120 Hz on the reference Mac, Glass windows included, with no regression at 60 Hz.

What would help
  • Pass the previous frame's start to presented (or a new started) and measure the half-period gate from it. Keep the 3/4-period spacing between targets.
  • For presentsWithTransaction frames, wait for GPU completion before presenting, bounded at one period. On a timeout, present anyway and count it.
  • Update late_frames_and_idle_restarts_cannot_catch_up_in_a_burst for the new rule.
  • Keep the old rule behind RUNE_PACING=present for one release, and add a changelog fragment, because this changes every macOS app's frame timing.
  • This needs no new telemetry. scripts/native-pacing/run.py already reads Metal presentedTime.
Done when
  • Glass windows present >= 97% of frames one period after the previous one at 120 Hz on the ProMotion reference Mac, with 99% as the target.
  • A synthetic 5 ms CPU frame scene presents at 120 Hz with < 0.1% missed.
  • A test with a slow GPU stub shows the GPU wait never exceeds one period.
  • The one-period share on a 60 Hz display does not drop.
  • RUNE_PACING=present restores the old rule, and a changelog fragment says so.
How to check

Pacer unit tests in the required check. A scripts/motion-audit scenario with a 5 ms frame. scripts/native-pacing/run.py on ProMotion and 60 Hz displays, in paired, alternating runs against the old rule. Extend scripts/check-native-pacing.py to read present_ms too, because today it checks only submit gaps.

Part of
  • Theme: T11
  • Phase 1 · priority P1 · size S
R0128Frames: no note says which backends and browsers expose a real present time, so a labelled proxy can stand in for oneP1Phase 1MT11
perf-present-source-audit · research
What happens

Rune reads a real present time in one place: Metal's presentedTime in a traced macOS window. Its own module doc says other platforms "have no reliable source and write neither". The planned work will record present times on Windows, Linux, web and iOS. But no note says which source each backend and browser offers, how accurate it is, or what to do where there is none. Without that note, a web lane can record the next requestAnimationFrame as a labelled estimate, and present-time sampling can close on that proxy. A page has no API that says when a canvas frame reached the screen.

Where
Why it matters

The latency target is measured from real present times on every platform. That means p50 <= 8.3 ms and p95 <= 16.7 ms at 120 Hz, and p50 <= 16.7 ms and p95 <= 25 ms on the 60 Hz Windows, Linux and web references, with probe error < 0.5 ms. A platform with no real present source fails it. Motion should be sampled at presentation time, with sample-to-present p95 <= 1 ms. Every criterion should be checked continuously, with each number recording rev, backend, device and date. If a proxy fills the actual field, a lane can pass while measuring nothing real.

What would help

Write a note under research/ with one row per backend and browser. Each row gives the source, how Rune reaches it through wgpu 30.0.1, its clock, its measured error, and what to use if it is missing. Candidates:

  • macOS and iOS: CAMetalDrawable presentedTime through addPresentedHandler.
  • Windows DX12: IDXGISwapChain::GetFrameStatistics, reached through wgpu::Surface::as_hal and the dx12 surface's swap chain in wgpu-hal 30.0.1.
  • Linux Vulkan: VK_KHR_present_id with VK_KHR_present_wait, or VK_GOOGLE_display_timing.
  • Wayland: wp_presentation feedback. X11: the Present extension's completion events.
  • Web: what a page can read. Then try external sources: a browser-process present trace, and the photodiode rig.

Split the frame record's present time into actual, predicted and proxy fields in R0121, so no host can write a proxy into the actual field. For each platform with no source, write a probe plan or a proposed revision of the latency target. The four per-platform issues (R0401, R0417, R0413, R0416) build on this note.

Done when
  • Every platform in the latency target has a named real present source, or "none", with its clock and measured error.
  • The frame record keeps actual, predicted and proxy present times in separate fields.
  • A test shows a proxy never fills the actual field.
  • Each platform with no source has a probe plan or a proposed target revision.
  • The web lane counts its proxy toward no latency row.
How to check

The field-separation test runs in the required check. Each per-platform present-time issue cites its row in the note, and its lane reports the source name with every number.

Depends on
Part of
  • Theme: T11
  • Tracked in R0395
  • Phase 1 · priority P1 · size M
R0129Render: windows record no GPU time per frame outside testsP1Phase 1MT11
render-gpu-time-telemetry · infra
What happens

Native devices already request TIMESTAMP_QUERY when the adapter offers it. Renderer::draw_timed accepts timestamp writes, and the video path keeps its own pool of timestamp queries. But no window, overlay, web or LayerHost frame writes timestamps for its frame pass, layer passes, effects or compositor passes. Only a test helper reads GPU time. So the GPU cost of a scene, an effect or a blur doesn't show up in --trace or in a running app, and the GPU targets in PLAN.md section 8 can't be measured. The web device requests only the compositor's features, so it never asks for timestamps.

Where
Why it matters

The target is GPU time on 100% of presented frames where the device has TIMESTAMP_QUERY, including the last frame before idle, with 0 GPU allocations in a steady frame. GPU p99 should be <= 4 ms for 1,000 spring quads and the effects scene on the reference Mac and iPhone, and <= 6 ms for worst-case glass. On the reference Mac, GPU p95 should be <= 4 ms. Without per-frame GPU time, a slow blur and a slow layout look the same in a trace.

What would help
  • Keep a per-surface pool of timestamp query pairs. Write begin and end timestamps for the frame pass, layer passes, backdrop and effect splits, and compositor passes. Compositors get them through a Frame helper.
  • Resolve without waiting and read back 2 frames later. When the loop goes idle, drain pending readbacks with one poll, so the last frame is recorded too.
  • Store GPU ms per pass in the GPU slots of R0121.
  • On native Metal, use gpu/metal/query.rs. On the web, add TIMESTAMP_QUERY to the requested features when the adapter has it.
  • Order resolve submission with surface configures, as PR #56 does for native surfaces.
  • Timestamps can split passes on some tiled GPUs, so let a surface opt out.
Done when
  • --trace and headless stats report gpu_ms for 100% of presented frames, including the last frame before idle. This holds on windows, overlays and LayerHost, on native Metal, wgpu Metal, DX12, Vulkan and WebGPU, wherever the device has TIMESTAMP_QUERY.
  • Compositor passes appear in the per-pass breakdown.
  • The allocation test shows 0 allocations per frame.
  • Paired runs show CPU overhead <= 0.05 ms per frame.
How to check

A lavapipe test in the required check covers the plumbing and the 100% coverage, including last-before-idle. The macOS lane covers the native Metal backend. Overhead comes from --profile perf paired, alternating runs, compared by median.

Depends on
Part of
  • Theme: T11
  • Tracked in R0395
  • Phase 1 · priority P1 · size M
R0130macOS: the window's sRGB colour tag is dropped on every surface reconfigure, including the one about 1 s after launchP1Phase 1ST12
render-srgb-tag · bug
What happens

pin_contents_top_left tags a window's CAMetalLayer with kCGColorSpaceSRGB. With the tag, the compositor colour-matches Rune's sRGB-encoded pixels to the display, as it does for AppKit's own drawing. The function's comment says wgpu's reconfigures keep the tag. They don't:

  • On the native Metal backend, every configure calls layer.setColorspace(None).
  • On the wgpu Metal path, wgpu-hal 30.0.1 sets the layer's colorspace on every configure and maps SurfaceColorSpace::Srgb to nil.

Rune tags the layer at only two sites: a window's first configure and an overlay's configure when it attaches a surface. Every other configure leaves the layer untagged: a resize, an overlay scale change, Outdated recovery while acquiring a frame, a blend switch, and the launch-drawables reconfigure. That last one runs when a window first rests, or 1 s after its first frame. So every window loses the tag soon after launch, even if nobody resizes it. The test reads the tag once, before any reconfigure. The iOS LayerHost path never sets a colorspace.

Rune's comment says an untagged layer looks oversaturated on a wide-gamut display. wgpu-hal's comment says a nil colorspace is treated as sRGB. Nobody has checked which is true on a P3 display. The screenshot check below settles it.

Where
Why it matters

On a wide-gamut Mac or iPhone, colours can shift a second after a window opens, and the window stops matching the AppKit drawing beside it. The colour target begins with "kCGColorSpaceSRGB after 6 of 6 configure paths". The surface target says that after a display move, "the next frame draws at the new scale with the colour tag kept". Later colour checks, such as matching Chromium within 1/255 per channel and keeping P3 values within 1/255, all assume the tag holds.

What would help
  • In the native backend's configure, set kCGColorSpaceSRGB for Srgb and Auto instead of nil.
  • On the wgpu Metal path, tag again inside window::configure after every configure. Send the resize and launch-drawables paths through that helper, or tag after them too.
  • Do the same on iOS LayerHost after each configure.
  • Fix the comment in pin_contents_top_left.
  • Extend the test to every configure path on both backends.
Done when
  • On native and wgpu Metal, a test reads kCGColorSpaceSRGB after each of 6 paths: first configure, resize, launch drawables, blend switch, Outdated recovery and overlay reattach.
  • A test reads the sRGB tag on a LayerHost layer after a resize on the iOS simulator.
  • On a P3 display, a screenshot of #FF0000 taken after a resize is within 2/255 of what AppKit draws for the same colour.
How to check

The macOS test runs with cargo test -p rune on a Mac, and in the macOS lane once that lane exists. The LayerHost test runs by hand on the iOS simulator until an iOS CI lane picks it up. The P3 screenshot is a one-off check recorded in the PR.

Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 1 · priority P1 · size S
R0131Video: a surface waker that reads Player state deadlocks, because frames are pushed while the player's lock is heldP1Phase 1ST13
render-player-waker-deadlock · bug
What happens

Every path that hands a frame to a Player's NativeSurface does it while holding the clip's ctl mutex. NativeSurface::replace then runs the surface's waker on the same thread, at once. Player::surface() and NativeSurface::set_waker are public, so an app can install a waker that reads the player. If that waker calls Player::state, Player::time or Player::is_playing, it locks ctl again. std::sync::Mutex isn't re-entrant, so the thread hangs for good. On macOS that thread is the main thread, so the window freezes.

Four paths do this:

  • the display-link pull on macOS (pull locks ctl, then calls push_oriented);
  • the poster that lands before the first play (take_poster runs inside pull with ctl held);
  • the headless virtual-clock pull (pull_virtual);
  • the grey placeholder push for a failed clip, which runs on every platform without a backend.

The last one means the hang isn't macOS-only: on Windows, Linux and the web a waker that reads state() hangs on the first frame that draws the placeholder.

Where
Why it matters

An app author who wires a progress label to the video's surface waker gets a frozen app with no error, from two calls that are both documented. The target is that video plays on every platform and "no public callback can deadlock playback", and that Player work on every platform ends in a safe result, with "no thread hangs".

What would help

Collect the frame under the lock, drop the guard, then push. Concretely:

1. In pull, take_poster and pull_virtual, take the frame id and the buffer or bytes while ctl is held, release ctl, then call surface.push_*. A push error re-locks ctl to record the failure. 2. In Shared::pull (video/mod.rs), set c.placeholder under the lock and call push_placeholder after the guard drops. 3. Add a debug-only thread-local flag that is set while a player lock is held, and a debug_assert! in NativeSurface::replace and clear that it isn't set.

The other option the records raise, having NativeSurface defer the waker until the push returns, also works but changes when every surface's waker runs, camera and app producers included. Fixing the callers is smaller and keeps replace simple.

Done when
  • A test installs a surface waker that calls Player::state, Player::time and Player::is_playing, and plays 600 frames without hanging.
  • The same test passes on the placeholder path on a platform without a backend.
  • The debug assertion that no push_* runs while a player lock is held passes across all existing video tests.
How to check

The waker test runs headless with the virtual clock in crates/rune/src/video/tests.rs, so it runs in cargo test -p rune on every OS. On macOS, the macOS lane adds a display-clock run of the same waker. The debug assertion keeps the rule enforced in every later test run.

Part of
  • Theme: T13
  • Phase 1 · priority P1 · size S
R0132Platform: winit is a caret dependency while Rune patches its classes, and a hook that fails to install is silentP0Phase 1MT14
platform-winit-pin-hook-canary · infra
What happens

crates/rune/Cargo.toml asks for winit 0.30.13 with a caret requirement, so cargo update in an app can pull in any later 0.30.x. wgpu, two lines up, is held to ~30.0.1, and a comment says why.

Rune does more than call winit's API. At run time it changes winit's objects and shares winit's connections:

  • macOS: it adds methods to winit's window and view classes for panel adoption. It adds menu actions to WinitView, and the reopen and Dock menu methods to winit's app delegate. It also replaces winit's KVO observer on WinitWindowDelegate.
  • Windows: it installs subclass procedures on winit's HWNDs for input, the frame, DPI drags, accessibility and pop-up menus.
  • Linux: layer-shell overlays and activation open their own Wayland connection on winit's wl_display.

Most of these hooks look up a class or selector by name and return without a word when it is missing. If a winit patch renames WinitView or drops its KVO override, a fix turns off with no error and no log. The KVO wrap is the worst case. Without it, the process aborts on NSNull when screen capture rebuilds a window's frame view, as the module docs of appearance.rs explain.

Where
Why it matters

An app's users notice it after a routine cargo update. Clicking the Dock icon stops reopening the window, menu key equivalents stop reaching the view, or the app aborts when screen recording starts. Nothing in Rune's tests or logs points at the cause. The target is: "Rune owns its shell seam: no out-of-band hook into winit goes unchecked." That means an exact = pin, every hook covered, and 0 call sites missing from the inventory.

What would help

1. Pin winit = "=0.30.13" and add a changelog fragment marked Breaking. It tells apps on another 0.30.x how to align. 2. Commit a hook inventory that lists every out-of-band hook by OS and by the feature that enables it. 3. Add a pre-merge scan of crates/rune/src for class_addMethod, method_setImplementation, method_exchangeImplementations, object_setClass, SetWindowSubclass and from_foreign_display. It fails when a call site is not in the inventory. 4. At run time, each hook records Installed or Skipped(reason). A debug build logs a skipped hook once at startup. 5. Add a canary test to each OS's GUI lane. It opens a window and an overlay with every feature on and asserts that the installed set equals the inventory. Then it runs one behaviour check per hook. For example: a reopen is delivered, an appearance change does not abort, and a non-activating panel takes keys.

Done when
  • winit's requirement in crates/rune/Cargo.toml starts with =, and a changelog fragment marks the change Breaking.
  • The scan finds 0 hook call sites missing from the inventory, and a new unlisted call site fails it.
  • The canary fails when any inventoried hook is Skipped or fails its behaviour check, in the macOS, Windows and Linux GUI lanes.
How to check

A unit test reads Cargo.toml and checks that winit's requirement starts with =. The scan runs with the pre-merge checks. The canary runs in R0061, R0063 and R0071.

Depends on
Part of
  • Theme: T14
  • Phase 1 · priority P0 · size M
R0133Web: the generated page blocks pinch zoomP1Phase 1ST14
a11y-web-zoom · bug
What happens

The page that scripts/web-build.sh writes sets maximum-scale=1,user-scalable=no in its viewport meta tag. It also styles html and body with touch-action:none. Either one stops a phone user from pinch-zooming a Rune page. Every app that keeps the default page inherits this.

The host adds more blocks. A full-viewport canvas gets touch-action:none. An embedded canvas gets none unless it uses fit_content_height. Outside fit-height mode, the bridge also cancels Safari's gesturestart. Document mode already allows it: its canvas and its accessibility layer use touch-action:pan-y pinch-zoom. So pinch zoom works in one mount mode and is blocked in the others.

Where
Why it matters

Low-vision users on phones zoom with two fingers. On a Rune page nothing happens, which fails WCAG 1.4.4 (Resize Text). An auditor marks the app as failing because of Rune, not because of the app. The targets are: "An app built on Rune and Kit can pass an independent WCAG 2.2 A and AA audit on macOS, Windows, Linux, web and iOS, with no criterion failing because of Rune or Kit", and "Rune follows the system's accessibility settings on every target and applies a change live: ... on the web text spacing and pinch zoom (WCAG 1.4.4, 1.4.10, 1.4.12)."

What would help

1. In web-build.sh, drop maximum-scale and user-scalable=no, and remove touch-action:none from html and body. 2. Give the full-viewport and embedded canvases touch-action:pinch-zoom, so Rune keeps one-finger gestures and the browser keeps pinch. Keep pan-y where the canvas fits its content height. 3. Cancel gesturestart and two-finger touch events only when the element under the gesture has its own magnify handler, so Rune's own pinch handlers keep working. 4. Read visualViewport.scale and its offsets in the input mapping, so a tap at 2x zoom lands on the element under the finger.

Zoomed canvas pixels can look soft. If text goldens or manual checks show that, render at devicePixelRatio times the visual scale while zoomed.

Done when
  • A real two-finger pinch zooms the generated page in an iOS Simulator Safari test.
  • A tap at 2x visual zoom hits the right element in a WebKit test.
  • An element that declares a magnify handler still gets the pinch.
  • The generated page has no user-scalable=no, no maximum-scale and no touch-action:none on html or body.
How to check

The web smoke cases and the web lane run the pinch, tap-at-zoom and magnify-handler cases. A unit test on the page template fails if the blocking viewport values come back.

Part of
  • Theme: T14
  • Tracked in R0725
  • Phase 1 · priority P1 · size S
R0134Platform: no single table says which service works on which OS, and nothing checks the docs against the codeP1Phase 1LT14
platform-capability-matrix · feature
What happens

What works where is spread across module docs, README sections and per-service checks:

  • popup_menu_supported() is false off macOS and Windows.
  • Tray::new returns TrayError::Unsupported on macOS.
  • Native menus return Unsupported on other platforms.
  • The web host cancels pop-up menus, refuses file dialogs and ends the app on a native surface.
  • drag_out is ignored everywhere but macOS.

No table lists all of this. The docs drift from the code, and an app finds a gap only at run time. Some support also depends on the session, not only the OS: whether the compositor has layer-shell, the portal interface version, or which D-Bus services a desktop runs. That is about 25 services across 7 platforms (macOS, Windows, Linux X11, Linux Wayland, web, iOS, Android), and several feature flags change the answer.

Where
Why it matters

An app author reads a README, ships, and then hears from a Linux user that a feature does nothing. A reviewer cannot tell which statements are current. The targets are: "Desktop app services match Electron on macOS, Windows and Linux, and every platform claim in the docs comes from a checked registry", with 0 hand-written claims and every generated table matching the registry. Every Linux cell must pass on each declared desktop, "or carries a documented protocol limit in the capability registry". Each supported target must also build and test before merge.

What would help

Add rune::platform::capabilities(). For each service and each of the seven platforms, an entry gives:

  • a maturity: Native, Fallback(what happens), Unsupported(reason) or Planned(issue);
  • the feature flag that gates it;
  • an optional run-time probe, for example "layer-shell present" or "portal FileChooser version 4 or later";
  • the name of the test that proves a Native cell.

The registry also holds the minimum OS and browser versions (R0137). Apps can query it at run time.

A pre-merge test regenerates the platform tables inside marked blocks in README.md, crates/rune/README.md, WEB.md and the site, and fails on any difference. A lint fails on known support phrases ("only on macOS", "unsupported on", "supported on") outside generated blocks, with an allow-list for roadmap text in PLAN.md. Each GUI lane writes a results file that lists the tests it ran. A post-merge check fails when a Native cell's test did not run and pass in that OS's latest lane.

Done when
  • capabilities() covers every desktop app service and every web service on all seven platforms, with feature gates, session probes and OS floors.
  • The generated tables in README.md, crates/rune/README.md, WEB.md and the site differ from the registry by 0 lines.
  • The lint finds 0 support claims outside generated blocks.
  • Every Native cell names a test that passed in its OS's latest lane, and a check fails otherwise.
How to check

Unit tests for the registry and the docs lint run with the pre-merge checks. The post-merge results check reads each GUI lane's results file. R0007 fixes the current wrong statements first, so the first generated tables start from true text.

Depends on
Part of
  • Theme: T14
  • Phase 1 · priority P1 · size L
R0135Web: App::on_ready and on_window refuse to start the app, and on_frame_encoded and on_frame_drawn are silently ignoredP1Phase 1ST14
platform-web-on-ready · bug
What happens

Rune's launch rule tells apps to start slow work (network, indexing, status items) from on_ready, after the first frame. On the web, an app that sets on_ready or on_window gets an Err from run and never starts. A windowless app (open false) gets the same error. So an app that follows the launch rule on desktop cannot run on the web without a cfg.

on_frame_encoded and on_frame_drawn are accepted on the web and never called. Their rustdoc says so ("the web never call it", "only desktop windows call it"), but nothing warns at run time, and WEB.md mentions none of these hooks. An app's frame meter shows nothing on the web, and its author has to find out why.

Where
Why it matters

An app that wants one codebase for desktop and web hits this first: it either drops its launch work on the web or forks its startup. The target is: "The web build is a first-class target in every browser engine, desktop and mobile". That includes 0 App hooks without a stated web behaviour, where "a new hook without a stated web behaviour fails".

What would help

1. Give the web a canvas-backed WindowHandle. Size, scale and focus work. Window-only methods (position, level, title bar) are documented no-ops that log once. 2. Run on_window with that handle before the first frame, and on_ready after the first present. 3. Call on_frame_encoded and on_frame_drawn from the web frame path on every drawn frame. 4. A windowless app on the web still fails, but with a readable error that names its cell in R0134. 5. Add a pre-merge test that lists every App hook with its web behaviour (runs, runs with limits, or refused with a reason). It fails when a new hook has no entry. 6. Generate the WEB.md list of hooks from the registry, and add a changelog fragment, since run now succeeds where it returned an error.

Done when
  • An app with on_ready or on_window starts on the web, and each hook runs once at its documented time.
  • on_frame_encoded and on_frame_drawn run on every drawn frame on the web.
  • The hook test lists every App hook and fails when a new hook has no stated web behaviour.
  • WEB.md lists which App hooks run on the web, from a generated block.
How to check

A headless test of the web host checks hook order: on_window, first frame, first present, on_ready, then one frame-hook call per drawn frame. A browser smoke case starts examples/web-hello with on_ready set and checks that it ran once.

Depends on
Part of
  • Theme: T14
  • Tracked in R0725
  • Phase 1 · priority P1 · size S
R0136macOS: rune_mac::remember_frame gives every window the same autosave name, overlay panels includedP2Phase 1ST14
platform-macos-remember-frame · bug
What happens

rune_mac::remember_frame(name) asks AppKit to save the app's window frame, so a rebuilt app's new window lands over the old one. It walks NSApp.windows and calls setFrameAutosaveName: with the same name on every window. That list includes overlay panels, launchers and the source windows that panel adoption leaves behind.

AppKit lets only one window hold a given autosave name. Which window ends up with it depends on the order of NSApp.windows. With an overlay or a launcher open, the frame AppKit saves can belong to the panel, and the next launch puts the main window at the panel's place and size. The function also returns true as soon as any window exists, so the caller's poll stops asking even when the main window did not get the name.

Where
Why it matters

A developer who uses scripts/mac-app with an overlay app sees the rebuilt window jump to the overlay's place, or to a tiny size, after each rebuild. A user of a shipped app that uses remember_frame sees the same at launch. The target is: "Desktop app services match Electron on macOS, Windows and Linux". Saving and restoring a window's frame is one of those services, and the shared window-state work in R0667 builds on a correct per-window name.

What would help

1. Add a form that takes the target window: a WindowHandle, or the main window's number when none is given. Set the autosave name on that window only. 2. Return true only when that window reports the name back from frameAutosaveName. 3. Keep remember_frame(name) as a deprecated wrapper that targets the main app window, so current callers keep compiling. Add a changelog fragment. 4. Skip NSPanel windows when there is no handle and the wrapper picks the main window.

Done when
  • With an overlay and a launcher open, only the main window has the autosave name.
  • remember_frame returns false until the target window has the name.
  • A GUI test with two windows and an overlay passes, and it fails against the current loop.
How to check

A macOS GUI test in R0061 opens a main window, an overlay panel and a second window, calls the new function, and reads frameAutosaveName from each window.

Depends on
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 1 · priority P2 · size S
R0137Platform: no supported minimum macOS, Windows, Linux, iOS or browser version is stated or testedP2Phase 1MT14
platform-min-os-versions · infra
What happens

Rune states no supported OS or browser versions. The macOS install script writes LSMinimumSystemVersion 13.0 into the bundle, but nothing else agrees with it. No deployment target is set, and no lane runs an older OS.

Some newer APIs already have a run-time check. The DirectWrite factory that needs Windows 10 1803 is optional, and the Metal shading language version is picked per OS. Others have no audit yet, such as SF Symbols in menus (macOS 11) and the planned NSGlassEffectView (macOS 26). A call that needs a newer OS can reach every app that pins dev, and users on older systems find out when the app fails at launch.

Where
Why it matters

An app author cannot tell users which systems the app supports, and a regression on an older OS shows up only in user reports. The targets are: "Every supported target builds and tests before merge, and every supported OS version is tested on a schedule", weekly and before every changelog fold, all passing. Another target is that every platform claim in the docs comes from a checked registry.

What would help

1. Choose a floor for each platform and state it in R0134: a macOS version, a Windows build, a glibc version and Ubuntu LTS, an iOS version, an Android API level, and browser versions. 2. Set MACOSX_DEPLOYMENT_TARGET and IPHONEOS_DEPLOYMENT_TARGET in the build. Make mac_app_install.py read the same macOS floor instead of a literal. 3. Audit each version-gated API. List it as mandatory at the floor, or as optional with a run-time check and a fallback. Commit the list. 4. Assert that the stated floors equal the oldest-version runners that the weekly lanes use. Add a self-hosted VM where no hosted runner exists.

Raising a floor later breaks users, so treat it as a Breaking changelog entry.

Done when
  • The floors appear in the generated platform table, and the bundle script uses the same macOS floor.
  • The audit list is committed, and each optional API has a run-time check.
  • A test asserts that the stated floors equal the oldest-version runner list.
  • The oldest-version lanes run weekly and before each changelog fold, and pass.
How to check

The floor-list test runs with the pre-merge checks. The oldest-version lanes build on R0036 and run on a weekly schedule.

Depends on
Part of
  • Theme: T14
  • Phase 1 · priority P2 · size M
R0138Web: the static export keeps only six widths and the narrowest tree, and document mode removes a page-owned canvas on quitP3Phase 1ST14
platform-web-document-mode · bug
What happens

The --html static exporter has six range prefixes (a to f). It cuts the list of widths to six and drops every width past the sixth without a message. It also writes only the narrowest width's tree as the page body. Content that exists only at a wider width, such as a sidebar that appears on desktop, never reaches the static page. The wider widths contribute styles only.

In document mode, mount moves the canvas into a clipper element (the band) so the browser scrolls Rune's pixels with the page. On quit, destroy removes the band, and the canvas goes with it. give_back puts the canvas's style and attributes back but not its place in the page. WEB.md says the opposite: "a passed-in canvas stays, with its own style and attributes back, for the page to remove."

Where
Why it matters

A site that exports a page at eight breakpoints loses two with no warning. Readers on wide screens, search engines and screen-reader users of the static page miss content that only the wide layout has. A single-page app that swaps routes loses its own canvas on quit and must rebuild it, which WEB.md tells it not to expect. The target is: "The web build is a first-class target in every browser engine, desktop and mobile".

What would help

1. Generate range prefixes for any number of widths (for example a, b, ... z, then two letters). If there must be a limit, fail the export with a clear error past it. 2. Merge nodes that exist only at wider widths into the body, in tree order, hidden by default and shown by their width's rule. 3. In document mode, record the canvas's parent and next sibling at mount. On destroy, move a page-owned canvas back there before the band is removed. A canvas Rune made is still removed.

Done when
  • An export with eight widths keeps all eight, or fails with a message.
  • Content present only at the widest width appears in the static page and shows at that width.
  • After quit in document mode, a passed-in canvas is back at its original parent and position.
How to check

Export unit tests cover eight widths and a node that exists only at the widest width. A browser smoke case mounts a page-owned canvas in document mode, quits, and checks its parent and sibling.

Part of
  • Theme: T14
  • Tracked in R0725
  • Phase 1 · priority P3 · size S
R0139Secure fields: a revealed field sends its plaintext, and a masked one its length, to accessibility text runsP0Phase 1ST15
text-secure-a11y-leak · bug
What happens

a11y_text_nodes decides whether a node gets TextRun children with runs = n.input.is_some() || (spec.selectable && !n.is_secure()). The secure check applies only to selectable text. Every input gets runs, secure inputs included.

Each run's value comes from a11y_drawn_text, which returns input.edit.display().0. For a secure field, display() returns:

  • the plaintext when the field is revealed;
  • one • per character when it is masked and single-line;
  • a fixed mask when it is masked and multiline.

So a revealed password goes to AccessKit as plaintext in the run values. A masked one exposes its exact length, and every run also carries per-character lengths, positions, widths and word starts.

The field node keeps its own value out of the tree (text.rs:186). The El::revealed docs promise "no ... accessibility text", and the README says secure text is "never exposed". The tests miss the leak because --tree, accessibility_json and the goldens all drop text runs.

Where
Why it matters

Any accessibility client can read the runs: a screen reader, an automation tool, or any process the user has granted accessibility access. A revealed password, or the length of a masked one, leaves the app through that path. The targets: "Secure fields expose nothing beyond what the platform's native secure field exposes", and secure entry uses "each platform's native text protocol".

What would help

The two source records offer two options:

1. Emit no TextRun children for a secure input, revealed or masked. The node keeps its role (PasswordInput) and actions, and its value stays unset. 2. Emit runs that always hold a fixed mask.

Option 1 is recommended. A fixed-mask run still gives away the length through its character arrays, and with no runs nothing in the subtree is derived from the secret. Make runs false whenever n.is_secure(), and keep a11y_drawn_text from returning display() for a secure input. Then record what each platform's native secure field exposes (VoiceOver with NSSecureTextField, UIA with a password edit box, AT-SPI with a GTK password entry). If a platform does expose a mask or a length, match it on purpose, not by accident.

Done when
  • A test walks the whole Runtime::accessibility_tree() subtree of single-line and multiline secure fields, masked and revealed, and finds no plaintext in any value, label or description, and no TextRun.
  • A test that reveals and then conceals a field finds no plaintext and no run in either update.
  • dump::json with runs turned on shows no runs under a secure field.
  • The per-platform native baseline is written down next to the test.
How to check

Unit tests in crates/rune/src/a11y/tests.rs in the merge gate. The platform accessibility lanes read the secure field through AX, UIA and AT-SPI and compare it with the native baseline.

Part of
  • Theme: T15
  • Tracked in R0676
  • Phase 1 · priority P0 · size S
R0140Accessibility: a box with only on_hover or on_drag is announced as a button that does nothingP1Phase 1ST15
a11y-dead-button-role · bug
What happens

A box counts as pressable for accessibility when Handlers::has_primary() is true. That is true for on_press, and also for on_double_press, on_hover, on_drag and drag_out. The role map then makes a Button out of:

  • any pressable plain box (group);
  • any pressable box with an unknown role string.

Click is added only for on_press or an input. So these boxes are read as buttons, and activating them does nothing:

  • a hover trigger;
  • a drag handle with no role, such as a reorderable sidebar row's drag binding;
  • a box with only on_double_press.

The web mirror decides "button-like" from on_press alone, so the two trees already disagree.

Where
Why it matters

A VoiceOver or NVDA user hears "button", presses it, and nothing happens. Voice Control and automation drivers see buttons they can't press. The target: "Every control states its name, role, value, state and actions completely and truthfully, and offers and accepts only the actions its state allows".

What would help

Split the flag in RoleCtx into "presses" and "interactive":

  • on_press makes a Button with Click, as today.
  • on_double_press alone also makes a Button, and gets Click, which runs the double press. The role stays truthful.
  • on_hover, on_drag and drag_out never make a Button. A drag-only box keeps Group or its own role (separator, slider). A hover-only box joins its parent.

The unknown-role fallback in roles.rs:103 uses the press flag only. The debug warning for unknown role strings belongs to R0143.

Add an invariant to the Kit golden harness: every enabled Button or DefaultButton node has Click. Disabled buttons are exempt.

Done when
  • A box with only on_hover and a box with only on_drag are not Buttons.
  • A box with only on_double_press exposes Click, and Click runs it.
  • The golden harness fails when an enabled Button has no Click.
  • The PR lists every Kit golden that changed.
How to check

Unit tests in crates/rune/src/a11y/tests.rs, plus the golden-harness invariant in crates/rune-kit/tests/a11y, both in the merge gate. The audit rule "enabled Button with no Click" in R0144 keeps it checked across stories and examples.

Part of
  • Theme: T15
  • Phase 1 · priority P1 · size S
R0141Accessibility: no WCAG matrix says what Rune meets on each platform and which test proves itP1Phase 1MT15
a11y-wcag-matrix · docs
What happens

#109, #110 and #111 ask for repeatable checks for every WCAG row a machine can test, and a list of what needs a person. No document maps the WCAG success criteria to Rune, Kit or the app on each platform. No file in the repo outside demo/ mentions WCAG at all.

The README's Accessibility section lists what the tree exposes, but it ties no claim to a test. Some claims are already wrong: it says secure text is never exposed, and R0139 shows it is.

The issues ask for WCAG 2.1, but 2.2 is the current W3C Recommendation. 2.2 adds rows Kit already fails. For example, 2.5.7 Dragging Movements: sidebar reordering and table column resizing work by drag only.

Where
Why it matters

An app team that needs a WCAG audit can't tell which criteria Rune and Kit cover, which the app owns, or what evidence backs either. The target: "An app built on Rune and Kit can pass an independent WCAG 2.2 A and AA audit on macOS, Windows, Linux, web and iOS", with "0 Rune or Kit cells 'fails' or 'partial' by the end of phase 3 for desktop and web, and by the end of phase 4 for iOS". Also: "every machine-testable Rune or Kit cell names a test that passed in the latest run", and "each human check is less than 6 months old". It also serves the target that "every enumerated claim matches the code".

What would help

Add the matrix as JSON in the repo, plus a site page rendered from it.

  • Rows: the 55 WCAG 2.2 A and AA success criteria. A column marks the 49 that 2.1 shares. A separate 2.1-only row holds 4.1.1 Parsing, so the matrix gives the 2.1 view that #109 to #111 ask for.
  • Columns: macOS, Windows, Linux, web and iOS.
  • Cells: an owner (Rune, Kit or app), a status (meets, partial, fails, or n/a with a reason), and either test ids or a human-check note with its date.

A merge-gate test parses the file. It fails when:

  • a test id doesn't exist, or didn't pass in the latest run;
  • a "meets" cell has no evidence;
  • a human check is older than 6 months;
  • a Rune or Kit cell is "fails" or "partial" after its target phase (phase 3 for desktop and web, phase 4 for iOS).

The page states that the matrix covers Rune's and Kit's part. It is not a conformance claim for any app.

Done when
  • The matrix covers all 55 criteria on 5 targets, with the 2.1 view.
  • The gate checks test ids against the latest results, human-check dates and phase deadlines.
  • The site renders the matrix, and the README's Accessibility section links to it.
  • Accessibility PRs that change a cell's evidence update the matrix in the same PR.
How to check

The merge-gate test, run on every change to dev. The site build renders the page from the same JSON, so the page and the gate can't differ.

Part of
  • Theme: T15
  • Phase 1 · priority P1 · size M
R0142Web: mirror links take the pointer from Rune outside page mode, and the static export turns link ids into broken hrefsP1Phase 1ST15
a11y-web-mirror-links · bug
What happens

Mirror links. The web build keeps a DOM mirror of the tree above the canvas. Mirror items for El::href elements get pointer-events:auto in every mode. Buttons, text and images get pointer-events:none, and inline link runs get auto only in page mode. Only page mode forwards pointer moves from the mirror to Rune.

So in full-viewport and embedded apps, hovering an El::href element moves the pointer off the canvas:

  • its hover and pressed looks never show;
  • a click goes to the browser's anchor instead of Rune's on_press;
  • a relative href navigates the tab.

Mirror buttons route their activation to Rune through a11y_press. Mirror links have no such handler.

Export. The --html export writes <a href="id"> for every rich-text link. Link ids are app ids that El::on_link handles, such as mentions and file chips, not URLs. The static page gets broken relative links such as href="user-42".

Where
Why it matters

A mouse user in a full-viewport web app sees links that don't react to hover and don't run the app's handler. The static export ships dead links. The targets: one semantic tree whose "host kinds expose their expected content and working actions", an app that can pass a WCAG audit on the web, and a web build that is "a first-class target in every browser engine".

What would help
  • Outside page mode, give link items pointer-events:none, as buttons have. The canvas keeps the pointer, and Rune runs hover, press and on_press. Real URLs open through Rune's open path.
  • Keep link items focusable. Add a click listener that calls preventDefault and sends a11y_press (or a link equivalent), so keyboard and assistive activation also run on_press once and don't navigate the tab. pointer-events doesn't block those synthetic clicks.
  • In the export, write an href only for a URL that passes #195's classifier (http, https, mailto, safe relative paths). Render other link ids as text with role="link" and no href.
  • When #118 generates the mirror from AccessKit, it keeps the same rule.
Done when
  • In a full-viewport app, a Playwright hover over an El::href element shows Rune's hover look.
  • A pointer click runs on_press once, and keyboard or assistive activation runs it once, in page, embedded and full-viewport modes.
  • A real https link still opens its URL.
  • An exported page holds no href built from a non-URL link id.
How to check

Browser smoke cases in full-viewport and embedded modes, from R0062. Mirror and export unit tests next to crates/rune/src/runtime/web/a11y_tests.rs, in the merge gate.

Depends on
Part of
  • Theme: T15
  • Phase 1 · priority P1 · size S
R0143Accessibility: an unknown role string such as "swich" silently becomes a group or a buttonP1Phase 1ST15
api-role-typed · feature
What happens

El::role takes a &'static str. The role map's catch-all arm turns any string it doesn't know into Button (when the box is pressable) or into Group, with no message.

Keyboard routing also compares role strings. There are 19 role == "..." comparisons in crates/rune/src outside tests, plus the VERTICAL_ROLES, TYPE_SELECT_ROLES and LIST_ROLES arrays in focus.rs. A typo such as "swich" or "listbx" changes what a screen reader hears. It also changes how the arrow keys and type-to-select behave. Nothing reports it.

Where
Why it matters

A misspelt role gives screen reader users the wrong control type. Keyboard users get the wrong arrow-key behaviour, and the author never hears about it. The targets: "Identity is typed or checked, not a silent string convention", where role constants "cover every mapped role, unknown strings warn in debug, and custom roles use a documented constructor". And misuse "is reported at the call site with the fix".

What would help
  • Add a rune::role module with a &'static str constant for every role the map knows (role::SWITCH, role::LISTBOX, ...). The signature of El::role stays, so existing apps build.
  • Add role::custom("x") for a role the map lacks. It maps to Group and doesn't warn.
  • In debug, warn once per call site at flatten for an unknown string. Name the app's file:line and the closest constant.
  • Use the constants for the keyboard-routing arrays and comparisons.
  • Move rune-kit onto the constants.
  • A test checks that every constant maps to a role other than the fallback, and that every role string used in routing is a constant.

The warning is one case in R0035.

Done when
  • A misuse case for "swich" warns in debug with the call site, and release builds don't panic.
  • Every mapped role has a constant, and the map-and-routing test passes.
  • rune-kit uses only constants.
  • role::custom raises no warning.
How to check

The misuse suite in R0035, and the a11y unit tests and Kit goldens, in the merge gate. The audit rule for unknown roles in R0144 reports any that remain in stories and examples.

Depends on
Part of
  • Theme: T15
  • Tracked in R0206
  • Phase 1 · priority P1 · size S
R0144Accessibility: nothing fails a test when a control has no name, a dead role or a label that hides its visible textP1Phase 1MT15
a11y-audit · infra
What happens

The only way to find these accessibility mistakes today is to read goldens and the --tree output by hand:

  • a focusable control with no name;
  • a Button that offers no Click;
  • an unknown role string;
  • a label that doesn't contain the control's visible text, which breaks speaking that text to Voice Control (WCAG 2.5.3).

The role map turns an unknown string into Button or Group without a word. Debug builds already report one mistake class: sibling keys used twice under one parent. No such check exists for accessibility. PLAN.md asks for a per-scene accessibility pass and layout-linter rules, and neither exists.

Where
Why it matters

Screen reader and Voice Control users hear a control with no name, or say a word and nothing happens. Kit authors and agents get no signal until a person reads the tree. The target: "Every control states its name, role, value, state and actions completely and truthfully", with "0 findings in Kit stories with an empty allowlist". Examples reach 0 by the end of phase 3, and "each audit rule has a failing fixture". The audit also flags pointer-only controls, which serves "every control works from the keyboard alone".

What would help

Add Runtime::accessibility_audit() -> Vec<Finding>. Each finding names the rule, the node's key and path, and the call site. Rules:

  • A focusable or actionable node with no name. Text runs, rows named by their content, and unnamed containers that take no action are exempt.
  • An enabled Button with no Click.
  • An unnamed image that is not hidden.
  • An unknown role string (after R0143).
  • A name that does not contain the visible text.
  • Invalid with no error relation (after R0457).
  • An adjustable node (a slider, or a separator with a value) with no Increment and Decrement.
  • Automation ids used twice under one parent.
  • A control that only a pointer can reach.

Disabled controls are exempt from the action rules. Debug builds print each finding once per call site. Kit's tests run the audit over every story and example. Start with rules that give 0 false positives on the gallery, so nobody is pushed to allowlist.

Done when
  • accessibility_audit exists, documented in the README's Accessibility section.
  • Every rule has one fixture that fails it and one that passes.
  • Kit stories report 0 findings with an empty allowlist.
  • Examples report 0 findings, or allowlisted ones with an issue link, and the allowlist is empty by the end of phase 3.
How to check

A merge-gate test over the Kit stories and examples, next to the Kit goldens in crates/rune-kit/tests/a11y. The fixture tests sit in crates/rune/src/a11y.

Depends on
Part of
  • Theme: T15
  • Phase 1 · priority P1 · size M
R0145Kit: no test proves every gallery control works by keyboard aloneP1Phase 1MT16
a11y-keyboard-walk · infra
What happens

Kit has keyboard tests for single components: Select, List, Combobox, SegmentedControl and the Popover focus return. No test walks every gallery story. The gallery's own test builds each scene in both themes and appearances, but it presses no key.

So these defects got through:

  • The inline Select draws no focus ring.
  • The clear and copy buttons in fields can't take focus.
  • A plain Popover closes on its button and on outside presses, but not on Escape.
  • Sidebar row reorder, tab reorder and table column resize work only by dragging.

Nothing checks that focus lands on a stop when the focused element is removed. Nothing checks that a later-painted overlay or sticky header doesn't fully cover the focused control (WCAG 2.2 2.4.11).

Where
Why it matters

Keyboard, switch and screen reader users find these gaps one control at a time, often after an app ships. The target: "every control works from the keyboard alone, in the platform's way, with no trap, a logical order, a visible focus indicator, and focus that survives content changes", with 100% of stories passing and 0 allowlisted failures by the end of phase 2. It also feeds the WCAG 2.2 A and AA audit, where no criterion may fail because of Rune or Kit.

What would help

Add a headless harness in kit-gallery, beside every_story_builds, driven by a keyboard contract for each component. A contract lists the component's stops, its keys and their effects, and any platform key rules. For each scene the walk:

  • collects the Tab cycle and checks that every actionable node is a Tab stop, or is reachable by arrows inside its group;
  • activates each node with its contract's keys and checks that the handler ran;
  • fails any node with on_drag that has no keyboard path;
  • opens each overlay, presses Escape, and checks that it closes and focus returns to the trigger;
  • checks that a Tab cycle inside a modal returns to its start;
  • fails if a later-painted opaque node fully covers the focused control;
  • removes the focused element where the story allows it, and checks that focus lands on a stop;
  • checks that the focused control draws an indicator with at least 3:1 contrast against its adjacent surface. A caret, a selection or a composite's active-item highlight counts when the contract names it.

Run it once with Full Keyboard Access on and once off. Start with the interactive components. Check in an allowlist where each entry names its fix issue, and shrink it to empty.

Done when
  • The walk runs over 100% of SCENES.
  • Each allowlist entry has a reason and an issue, and the list is empty by the end of phase 2.
  • Fixtures with a drag-only node, a fully covered focused control, focus lost after a removal and an overlay without Escape each fail the walk.
  • The walk runs with Full Keyboard Access on and off.
How to check

The kit-gallery tests run the walk in the required merge gate, so a new story or component without a passing contract fails there. When the browser lane exists, the same walk runs there too.

Part of
  • Theme: T16
  • Tracked in R0472
  • Phase 1 · priority P1 · size M
R0146Kit: the Checkbox focus ring ignores border_focus, and the inline Select draws no focus ringP1Phase 1ST16
a11y-kit-focus-rings · bug
What happens

The kit README says focus rings are a neutral blue and that setting k.c.border_focus changes them. Checkbox ignores this. It draws both its focus-state border and its focus ring in border_active. from_palette sets border_active to a grey lightness step, so a palette's focus colour, or PaletteFocus, never reaches a checkbox.

The inline Select appearance calls no_focus_ring() and has no focus branch, to match the web outline: none. A keyboard user who tabs onto it sees no change (WCAG 2.4.7). The Field appearance does draw a ring in border_focus.

tests/focus_ring.rs checks only that no kit control adds the default system-accent ring. It doesn't check the ring's colour, width or contrast, or that a disabled control draws none.

Where
Why it matters

A keyboard user loses their place on an inline Select. An app that sets a brand focus colour gets grey rings on its checkboxes. The targets: every control has "a visible focus indicator", with 100% of stories passing the keyboard walk by the end of phase 2. Default themes have "0 failing meaningful pairs" for contrast. Kit components "read only theme tokens".

What would help
  • Checkbox: draw the focus border and the ring in border_focus.
  • Inline Select: add a ring that shows only on keyboard focus (focus-visible). Pointer focus and the resting parity references then stay unchanged.
  • Extend tests/focus_ring.rs. For every focusable kit control, a keyboard focus must draw a ring in border_focus, at least 1 pt wide, with at least 3:1 contrast against the page. A disabled control must draw none. Set a custom border_focus in the test so a hard-coded colour fails.
  • Re-bless the kit focus snapshots. Record the small parity change for the inline Select in the kit README.
Done when
  • Setting border_focus, or building with each PaletteFocus, changes the Checkbox ring (test).
  • A keyboard-focused inline Select draws a ring, and a pointer-focused one draws none (test).
  • focus_ring.rs checks colour, width of at least 1 pt, 3:1 contrast and the disabled case for every focusable kit control.
How to check

crates/rune-kit/tests/focus_ring.rs runs in the required merge gate. The keyboard walk, R0145, checks the 3:1 indicator on every gallery story.

Part of
  • Theme: T16
  • Tracked in R0472
  • Phase 1 · priority P1 · size S
R0147Kit: TextArea, Select, RadioGroup and TextField show an error by colour only and don't set the invalid stateP1Phase 1MT16
a11y-kit-invalid · bug
What happens

Rune has El::invalid, which maps to aria-invalid. Only TextInput sets it. TextArea, Select and RadioGroup take .invalid(true) and draw a red ring, a red fill or red text, but their accessible element is not marked invalid. TextField takes .error(msg). It uses the message as the editor's description and announces it in an assertive live region, but it doesn't set the invalid state either.

The visual cue is colour only on every control except TextField. TextInput's plain appearance says so in its doc: "an invalid field only as red text". A screen reader user moving through a form doesn't hear which fields are wrong. A user who can't tell red from grey doesn't see it (WCAG 1.4.1, 3.3.1).

Where
Why it matters

Forms are where audits look first. The targets: every control states "its name, role, value, state and actions completely and truthfully", with 0 findings in kit stories. Fields carry "required and invalid states with an error relation". "Every kit control that shows invalid, indeterminate, checked or selected draws it distinctly and reports it in its golden."

What would help

1. Set El::invalid on the accessible element of every control that takes .invalid or .error: TextInput, TextArea, TextField, Select and RadioGroup. 2. Add .error(msg) to TextInput, TextArea, Select and RadioGroup, in the shape TextField has. It draws the message below the control with an error icon, describes the control with it, and implies invalid. 3. Make .invalid(true) without a message draw an error icon, so colour is never the only cue. 4. When field relations land, link the message with an error-message relation, not only a description.

The invalid parity stories (field_invalid, select_invalid) will change pixels. Re-bless them and note the change in the kit README.

Done when
  • Every kit control with .invalid(true) or .error(..) reports invalid in its a11y golden. A test loops over every such builder.
  • Every error look draws a text message or an icon, shown in a snapshot test.
  • Where error text is shown, it is the control's description.
  • fields.json, select.json and radios.json show invalid and the description.
How to check

The kit a11y goldens and snapshots run in the required merge gate. After field relations land, the audit rule "invalid without error relation" keeps it proven.

Part of
  • Theme: T16
  • Tracked in R0472
  • Phase 1 · priority P1 · size M
R0148Kit: the clear and copy buttons in fields and the sidebar row's close button can't be reached by keyboardP1Phase 1ST16
a11y-kit-textinput-buttons · bug
What happens

TextInput's clear and copy buttons and TextField's copy button have role button and a label, but they never take focus. Core focus is opt-in through El::focusable, and these buttons don't call it. A keyboard user can still select and delete or copy text with keys. They can't use the button's own action: copying the whole value in one step, or clearing a search field.

The sidebar row's close button is focusable(false) on purpose, so the list's arrow keys step rows. The row has no key that closes it, so a keyboard user can't close a row at all (WCAG 2.1.1).

Where
Why it matters

A keyboard user can't clear a search field in one step or close a session in a sidebar. The target: "every control works from the keyboard alone, in the platform's way, with no trap, a logical order, a visible focus indicator", with 100% of stories passing and 0 allowlisted failures by the end of phase 2.

What would help
  • Field action buttons: when enabled, make them focusable and put them right after their field in Tab order. Space and Return press them. Keep the platform rule: on macOS without Full Keyboard Access, Tab visits only fields and lists, as the runtime already does.
  • Sidebar rows: keep the arrows stepping rows. Add Delete, and Cmd+W on macOS or Ctrl+W elsewhere, on a focused closable row to call its close binding. Let an app override the keys. When custom accessibility actions exist, also offer "Close" as one.
  • Draw the kit focus ring on the buttons when they have keyboard focus.
Done when
  • Tab from a TextInput with a clear or copy button reaches that button next, and Space and Return press it (test).
  • Tab from a copyable TextField reaches its copy button, and Space presses it (test).
  • A disabled field's buttons are not Tab stops (test).
  • Delete on a focused closable sidebar row calls its close binding once, and so does the platform close shortcut (test).
  • The keyboard walk passes for the field and sidebar stories.
How to check

Kit keyboard tests run in the required merge gate. The keyboard walk, R0145, fails any later actionable node with no keyboard path.

Part of
  • Theme: T16
  • Tracked in R0472
  • Phase 1 · priority P1 · size S
R0149Kit: menu radio items read as checkboxes, and an indeterminate Checkbox draws a checkP2Phase 1ST16
a11y-kit-menu-radio · bug
What happens

MenuItem::checked always gives the role menuitemcheckbox. A group of mutually exclusive menu choices, such as theme or sort order, is read as independent checkboxes. The gallery's ui-menu--with-radio story builds its Light, Dark and System choices this way. Rune already maps menuitemradio, and El::position_in_set exists.

An indeterminate Checkbox reports the mixed state to accessibility, but draws the same check glyph as a checked one. A sighted user can't tell mixed from checked (WCAG 1.3.1, 1.4.1). The kit already has a dash glyph, k.glyph.dash, used only by card placeholders.

Where
Why it matters

A screen reader user hears "checkbox" for a one-of-many choice and can't tell that picking one clears the others. A sighted user reads a partly selected group as fully selected. The targets: every control states "its name, role, value, state and actions completely and truthfully", with 0 findings in kit stories. "Every kit control that shows invalid, indeterminate, checked or selected draws it distinctly and reports it in its golden."

What would help
  • Add MenuItem::radio(selected: bool). It sets role menuitemradio and the checked state, and draws the same check mark as today. Set position_in_set within the item's group, counted between separators or group labels. Move the ui-menu--with-radio story to it.
  • Checkbox: when indeterminate, draw k.glyph.dash in place of the check. A custom glyph still applies to the checked state only. Check the reference's indeterminate look first, so the parity reference matches.
Done when
  • Radio menu items report menuitemradio, checked, and their position in their group in menu.json.
  • The radio story uses MenuItem::radio.
  • An indeterminate Checkbox draws the dash in a pixel snapshot, and its tree shows the dash glyph, not the check.
  • toggles.json still reports mixed for the indeterminate Checkbox.
How to check

The kit a11y goldens (menu.json, toggles.json) and the checkbox snapshot run in the required merge gate.

Part of
  • Theme: T16
  • Tracked in R0472
  • Phase 1 · priority P2 · size S
R0150Kit: Dialog::build draws nothing when on_close is missing, and says nothingP2Phase 1ST16
api-dialog-on-close · bug
What happens

Dialog::build returns early when no on_close was set: let Some(close) = self.close else { return; };. An open Dialog without on_close adds nothing to the layer list. There is no doc, no debug warning and no panic. The author sees an empty window and has to read the source to find out why.

A dialog that must not be dismissed, such as a blocking confirmation or a progress step, has to pass a no-op on_close. Its close button still shows, and Escape and outside presses still call the no-op.

Where
Why it matters

An app author loses time to a silent failure, and an agent writing kit code can't tell what went wrong. The target: "misuse is reported at the call site with the fix, and neither a builder mistake nor content an app passes in crashes a release build". Every app-misuse entry warns with the app's file and line in debug, and degrades with 0 panics in release. Kit components also "show and report every state", and a dialog that can't be dismissed is a state the kit doesn't draw today.

What would help
  • Add .dismissible(false). It needs no on_close, draws no close button, and ignores Escape and outside presses. The app closes it by no longer building it, or by passing open(false), and focus returns as for any modal.
  • In debug, when an open Dialog has no on_close and is not marked dismissible(false), warn once with the call site and the fix: "add on_close, or dismissible(false)". Take the site with #[track_caller] on Dialog::new. In release, keep today's behaviour and add no panic.
  • Document both in the Dialog docs and the kit README.
  • Add the case to the misuse suite, R0035.

R0480 will give Popover, Menu, Select and Dialog one set of dismiss options. Make dismissible(false) the Dialog form of that policy, not a separate switch.

Done when
  • An open Dialog with no on_close and no dismissible(false) warns once in debug with the app's file and line.
  • A dismissible(false) Dialog with no on_close renders, with no close button, in an a11y golden.
  • Escape and an outside press leave it open (test).
  • Not building it closes it and returns focus to the element focused before it opened (test).
  • The kit README documents both cases.
How to check

The misuse suite case and the kit a11y golden dialog.json run in the required merge gate.

Depends on
Part of
  • Theme: T16
  • Tracked in R0473
  • Phase 1 · priority P2 · size S
R0151Kit: TextInput and TextArea do not forward on_input_paste, so a composer cannot take pasted imagesP2Phase 1ST16
text-kit-paste-forward · bug
What happens

The core text field has on_input_paste. It hands the app the clipboard content (images, files, HTML) before the editor inserts text, and the app returns true to consume it. Kit's TextInput and TextArea collect their editor handlers in EditActs. That struct forwards only edit, submit, key and change. TextField forwards only edit.

A chat composer built from kit can't take a pasted screenshot or file. The app has to drop down to the core text_input element and rebuild the kit look by hand, or wrap the kit field and lose its keys.

Where
Why it matters

Chat and notes apps are Rune's main users, and pasting an image into a composer is a basic step there. The target: "text fields meet a fixed list of behavioural contracts that notes, chat and code apps need, in rune and in each kit wrapper the contract applies to". Every contract has a passing test in rune and in kit TextInput, TextArea and TextField where it applies.

What would help

Add a paste entry to EditActs, pushing e.on_input_paste(f) into its handlers. Add on_paste to TextInput, TextArea and TextField with the core signature:

pub fn on_paste<S: 'static>(mut self, f: impl Fn(&mut S, &rune::ClipboardContent, &mut Tx) -> bool + 'static) -> Self

EditActs::apply already skips handlers on a disabled field, so a disabled field ignores pastes as before. Document that a handler that returns false lets the editor insert the text as usual.

This adds methods only. No pub field changes, so app builds keep compiling. Add a changelog entry under changelog/unreleased/.

Done when
  • TextInput, TextArea and TextField each have on_paste, forwarded to core on_input_paste.
  • A kit TextArea test pastes a PNG, and the handler receives it and consumes it.
  • A kit TextInput test pastes text, the handler returns false, and the text is inserted.
  • A field without the handler behaves as before (test).
  • A disabled field doesn't call the handler (test).
How to check

The kit text field tests run in the required merge gate, as part of the field contract list.

Part of
  • Theme: T16
  • Phase 1 · priority P2 · size S
R0152Markdown: H5 and H6 headings report level 4 to apps and screen readersP2Phase 1ST16
text-markdown-heading-levels · bug
What happens

The Markdown parser maps H1, H2 and H3 to levels 1 to 3, and every deeper heading to 4. The renderer reports the parsed level to accessibility. A screen reader's heading list shows H5 and H6 as H4, so the document outline is wrong (WCAG 1.3.1).

Apps that read Block::Heading through parse_cached also get 4 for H5 and H6, so an app's own outline or table of contents can't tell them apart.

The style table holds four heading styles. The renderer already clamps the style index to 1..4, so the parser's fold isn't needed for styling.

Where
Why it matters

Screen reader users move through long replies by heading level, and an outline with H5 shown as H4 misleads them. The targets: Markdown content is "correct, safe on hostile input and accessible", and "H1 to H6 report their own level". Every control states "its name, role, value, state and actions completely and truthfully".

What would help
  • Keep the source level, 1 to 6, in InlineKind::Heading and Block::Heading.
  • Leave the renderer's style clamp as it is, so H5 and H6 draw with the H4 style unless the theme defines more steps. Keep the muted colour rule for level 4 and deeper.
  • Report the true level through .level().
  • Document on Block::Heading that the level is the source level, 1 to 6.

Apps that match Block::Heading(4, _) see 5 and 6 after this change, so add a changelog entry under changelog/unreleased/.

Done when
  • An H5 and an H6 report levels 5 and 6 in the a11y tree (test), and markdown.json shows them.
  • parse_cached returns Block::Heading(6, _) for an H6 (test).
  • H4 to H6 draw the same pixels as today when the theme defines no extra styles (snapshot).
  • The tree golden shows H5 and H6 with the H4 style.
How to check

The kit Markdown tests and a11y goldens run in the required merge gate. The fuzz and spec work in the content tracker, R0692, keeps heading levels in its spec cases.

Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 1 · priority P2 · size S
R0153Kit: diff/state.rs and diff/view.rs are over the 800-line cap and keep inline test modulesP2Phase 1ST16
text-split-diff-files · refactor
What happens

scripts/file-size.sh warns on two kit diff files at this commit: diff/state.rs has 885 non-test lines and diff/view.rs has 862, both over the 800-line soft cap. These two files, plus diff/model.rs, diff/myers.rs, syntax.rs and budget.rs, keep inline #[cfg(test)] modules instead of sibling test files.

The incremental highlighting work for streaming diffs must edit the highlight chunks in state.rs. The repo rule is to move the area you touch into its own module, in its own PR, before adding to a file over the cap.

Where
Why it matters

Two efforts will edit these files at once: incremental highlighting and the diff fence cap. Large files cause edit collisions. The targets: a streaming reply costs "work proportional to the new text", and that work lands in these files. Module shape is "enforced by the required gate": the soft-cap warning count ends at 8 or fewer, down from 23.

What would help

A move-only PR with no behaviour change:

  • Move the highlight chunk code (Chunk and the methods that fill, look up and evict it) from diff/state.rs into diff/highlight.rs.
  • Move row building (View and its helpers) from diff/view.rs into a sibling module, such as diff/rows.rs, so DiffView keeps its builder and Look.
  • Move each inline test module into a sibling file: diff/state_tests.rs, diff/view_tests.rs, diff/model_tests.rs, diff/myers_tests.rs, syntax_tests.rs and budget_tests.rs. Keep each under 1,000 lines.
  • Keep public paths unchanged.
Done when
  • diff/state.rs and diff/view.rs are each under 800 non-test lines.
  • No inline test module remains in the six files listed.
  • Kit tests pass with the same test count as before.
  • scripts/file-size.sh shows two fewer warnings.
  • The public API of rune_kit::diff is unchanged.
How to check

scripts/file-size.sh, with scripts/folder-shape.sh inside it, runs in the required gate. Compare cargo test -p rune-kit test counts before and after.

Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 1 · priority P2 · size S
R0154Render: render.rs holds Gpu creation, instance packing, kinds and the macOS prewarm tests in 1,416 lines, near the 1,500 capP2Phase 2aST02
render-move-gpu-out-of-render-rs · refactor
What happens

crates/rune/src/render.rs is 1,416 lines. scripts/file-size.sh counts 1,401 of them as non-test code. That is the largest soft-cap warning in the repo, and 99 lines under the 1,500 hard cap. The file holds parts that change for different reasons:

  • the KIND_* instance kinds, Blend and LayerSpec;
  • EffectSite, EffectPhase and the effect hook type that compositors use;
  • Instance and its fade and clip packers;
  • Gpu, with wgpu instance, adapter and device selection (about 245 lines);
  • the prewarm entry points, Renderer and Offscreen;
  • a 132-line macOS test module.

The macOS test module counts as production code. file-size.sh treats only a literal #[cfg(test)] line as the start of test code, so #[cfg(all(test, target_os = "macos"))] does not match. The tree has 29 #[cfg(all(test, ...))] attributes under crates/. Some are inline modules, for example in platform/app_icon.rs and platform/embed.rs.

The next changes to Gpu will make the file bigger. Device-loss recovery has to recreate Gpu, and today nothing handles a lost device: the native Metal backend's set_device_lost_callback does nothing. #115's fix also changes Gpu::wgpu_instance_on.

Where
Why it matters

Recovery from a lost device has to meet this target: "0 panics and 0 unresponsive windows on 9 of 9 configurations" and "a correct frame ... within 500 ms on native". That work goes into Gpu, and so does #115. If Gpu stays in this file, every such change touches the same 1,400 lines and the file gets close to the hard cap. The architecture target also asks the gate to fail when the soft-cap warning count goes above a ceiling that "ends at 8 or fewer, down from 23". This file is one of the 23.

What would help

One PR, with no behaviour change and every public path kept through pub use in render.rs:

1. Move Gpu and its instance and adapter selection to render/gpu_device.rs. 2. Move the KIND_* constants, Instance and its packers to render/instance.rs. This module is the part a shared ABI crate would take later, so keep it free of wgpu device types. 3. Move EffectSite, EffectPhase and the compositor-facing frame types to render/effect_site.rs. 4. Move the macOS prewarm tests to render/prewarm_tests.rs. 5. Teach file-size.sh that an item under #[cfg(all(test, ...))] is test code. Do not do this for any(test, ...), because that code also builds outside tests.

Land it before the device-loss work and #115, so that those diffs touch only the new gpu_device.rs.

Done when
  • scripts/file-size.sh reports render.rs under 800 non-test lines.
  • file-size.sh counts #[cfg(all(test, ...))] items as test code, and a fixture with such a module proves it.
  • The public API snapshot has no diff. rune::render::Gpu, Instance, EffectSite, LayerSpec and the KIND_* paths still resolve.
  • The headless and kit golden suites pass with no golden changed.
  • No new prefix-family or folder-breadth warning in render/.
How to check

scripts/file-size.sh and the API snapshot diff run in T1 (R0030, R0039). The macOS prewarm tests still run in the macOS T1 job. Their count in the test inventory stays the same after the move.

Depends on
Part of
  • Theme: T02
  • Tracked in R0223
  • Phase 2, milestone 2a · priority P2 · size S
R0155CI: no model says whether the reserved machines can run every push, paired perf runs, bisection and nightly jobs within the 3 h verified lagP1Phase 2aMT03
tooling-lane-capacity · infra
What happens

The planned post-merge work shares a few machines. Lanes on every push, paired perf runs, bisect steps that run each failing test 3 times, and nightly suites all want the self-hosted Mac and the other reserved machines. dev takes about 55 commits a day: 1,642 in the 30 days to this commit. Nothing measures how long each lane takes, how long jobs wait, or whether the machines can test every pushed SHA and still promote within 3 h.

The planned perf lanes also name different low-end machines: an Iris Xe laptop in one place and a UHD 620-class GPU in another. Without one committed manifest of machines, OS versions and browsers, numbers from different lanes are hard to compare.

Where
Why it matters

If lanes queue behind each other, the verified branch lags, and apps wait for fixes. The targets: "All 5 platforms and 8 variants run on 100% of dev pushes" with "Dev-to-verified lag p95 at most 3 h"; wall-clock suites run nightly with "Tail statistics pooled over at least 5 paired runs"; and latency is measured "for every verified candidate" on reserved 120 Hz hardware.

What would help

1. Record service time and queue wait per lane and per machine, for each SHA. 2. Reserve slots on each shared machine for promotion runs, bisection and nightlies, so a bisect never starves the every-push lanes. 3. Batch merges when needed, but still test every pushed SHA that promotion might pick. A batch must not skip the SHA that becomes verified. 4. Commit one manifest of machines, OS versions, GPUs, displays and browser versions. Use a UHD 620-class GPU as the low-end reference, and have every lane read its machine from it. 5. Publish a weekly report of lag p95, queue wait and bisect delay.

Done when
  • Service time and queue wait are recorded for every lane run.
  • The manifest is committed and names one low-end reference.
  • For 30 days, every lane runs on every pushed SHA with dev-to-verified lag p95 at most 3 h.
  • Bisection delays promotion by at most one batch.
How to check

The weekly lag report from R0169's promotion log. A drill that starts a bisect during a busy hour shows whether promotion still moves within one batch.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2a · priority P1 · size M
R0156Motion gate: stalls, dog-legs, latency, hitches and script expectations are checked only by the Python analyzerP1Phase 2aMT04
motion-gate-port-analyzer-kinds · infra
What happens

The Rust RULES table has 27 finding kinds (crates/rune/src/motion_gate/check.rs:37-65). analyze.py reports kinds Rust lacks (scripts/motion-audit/analyze.py:1-30, scripts/motion-audit/README.md:22-44):

  • invisible-work, idle-frames, step, sibling-jump, stall, dog-leg, latency, hitch;
  • the script expectation kinds: not-instant, lags-hand, wrong-exit, expect-missing, and snap for a failed smooth expectation.

snap has two meanings. In Rust it is a painted property stepping in one frame. In analyze.py it is an element that should travel over several frames covering most of its move in one (scripts/motion-audit/analyze.py:925-929). Run::act takes no expectation, so a gate test can't say "this input should be instant" or "this drag should follow the hand" (crates/rune/src/motion_gate/mod.rs:189-193).

So a Rust gate test misses a stall or a laggy drag that the audit would have found, and a finding can pass one checker and fail the other.

Where
Why it matters

The gate can only be one rule set if it catches everything the old one did. The targets: "findings come only from the Rust rules, with every kind analyze.py had", and "1 checker (the Rust RULES), with equal findings to the old analyzer on shared fixtures or listed differences". Direct manipulation needs "0 latency and lags-hand findings in gate scenarios". Busy-main frames count against "busy-main misses <= 1% of motion refreshes".

What would help

1. Generate the list of kinds analyze.py can emit from its source, and commit it as a fixture. 2. Add each missing kind to RULES, with analyze.py's thresholds, in the split rule modules from R0068. A kind that only makes sense on native traces (for example hitch on real frame CPU) is listed as native-only, with the lane that runs it. 3. Rename the expectation kind to not-smooth, so each kind has one meaning. 4. Let Run::act take an expectation: instant, follow, smooth or leaves. 5. Give each ported rule a recording it must flag and one it must pass. Add synthetic scenarios with a 5 ms frame during motion and a 30 ms stalled commit, which must fail. 6. Run both checkers on all 36 recorded scenarios, and explain every difference in the PR. Fix Rust false positives instead of allowing them.

Done when
  • A test compares RULES with the generated kind list and fails on a kind that is missing or has two meanings.
  • Every ported rule has a positive and a negative test.
  • Run::act supports the four expectations.
  • The 5 ms frame and 30 ms stalled-commit scenarios fail the gate.
  • On all 36 scenarios, each difference between the checkers is listed in the PR with its cause.
How to check

The rule tests and the kind-inventory test run with the gate tests in the required merge check.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 2, milestone 2a · priority P1 · size M
R0157Headless: native runs fall back to system fonts for missing families and glyphs, so a golden's line breaks depend on the machineP1Phase 2aMT04
tooling-canonical-fonts · feature
What happens

Native builds always bundle Inter. On wasm32 a family slot ends in the bundled faces. Off wasm32 the slot is only the requested family, and system font discovery fills gaps for missing families and glyphs: symbol families, CJK and script fallbacks, and fallbacks loaded on first use. A machine that lacks a family, or has a different version of one, silently changes shaping and wrapping. Scene-tree goldens record rects that depend on those metrics, so a golden made on one Mac can fail on another Mac, on Linux or on Windows with no code change.

Where
Why it matters

Contributors and CI runners on different machines get different goldens. People then re-bless goldens to make tests pass, and real layout changes slip through. The target is a canonical headless lane that is deterministic across machines: every manifest scene "has a byte-identical payload on the 3 desktop OSes", with "1 golden set and 0 per-OS goldens", and every artifact records its environment.

What would help

1. Add --canonical and RUNE_CANONICAL=1, and a test-support constructor for tests. Do not add a pub field to Env, since apps build it as a literal. 2. A canonical run:

  • uses a committed font set only, and its hash goes in the provenance envelope from R0266;
    • turns off system discovery and fallback;
    • fixes scale, blend mode and font smoothing;
    • uses the CPU glyph rasterizer path.

3. A missing glyph draws the bundled notdef and is reported by codepoint. A request for a family that is not bundled fails with its name. 4. Canonical scenes avoid scripts the bundle lacks, or the bundle adds a subset. List what it covers.

Done when
  • A canonical run on Linux and Windows gives the same tree, glyph ids and CPU PNG as on a Mac for every manifest scene.
  • A missing glyph is reported with its codepoint.
  • A family that is not bundled fails with its name.
  • Env gains no pub field.
  • The committed font set's hash is in every canonical artifact.
How to check

A T1 test runs a canonical scene with an unbundled family and a missing glyph and checks both errors. R0275 compares canonical payloads across macOS, Linux, Windows and wasm32 and keeps them equal.

Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 2, milestone 2a · priority P1 · size M
R0158Perf: no canonical or worst-case scene has a count budget that a merge must meetP1Phase 2aLT04
perf-count-budgets · infra
What happens

Rune counts some frame work. FrameStats has commits, layout nodes, glyphs and shaped runs (crates/rune/src/runtime/types.rs:442-448). The frame profile reads procwatch's per-thread allocation count (crates/rune/src/tooling/headless.rs:233, crates/rune/src/tooling/headless.rs:379). Nothing gates on any of it. There is no perf/ directory and no budget file. PLAN wants each scene's cost "counted exactly", with "CI fails if a scene exceeds the 8.33 ms budget model" (PLAN.md:390).

The zero-allocation tests cover only frames that don't commit (crates/rune/tests/alloc.rs:20-143). The cuts made by hand in research/31 to 38 can come back with no test failing. The worst cases apps hit have no counted cost: typing in a large text field, appending to a long list (#203), a long streamed transcript, a hover sweep (#205).

Where
Why it matters

Agent commits land fast, and a count budget is what stops one from quietly undoing a cut. The targets: "count budgets required in T1 on every merge"; "at least 12 scenarios with budgets, including a 10k-row virtual_rows append and filter, a 200 KB text field and a 100k-token Markdown stream; a seeded regression in each counter family fails T1; any rise fails without --allow-raise, a fragment and a Raised: trailer"; and "0 pipelines built and 0 fonts registered on main after the first frame".

What would help

One shared mechanism, which R0257 and R0256 also use:

  • perf/budgets/<scene>.json per scene, run headless with a pinned configuration: canonical fonts, fixed scale and size.
  • Per phase: view runs, commits by reason, layout nodes solved, nodes visited by paint, shaped runs and bytes, glyph rasterizations, instances, upload bytes, pipeline compiles on main after the first frame, allocation count and bytes for committing and non-committing frames, and peak atlas and layer bytes.
  • scripts/verify budgets fails on any rise. Lowering rewrites the file. Raising needs --allow-raise, a changelog fragment and a Raised: trailer. CI never raises a budget.
  • Where a target is countable (bytes shaped per keystroke at most the edited paragraph, O(1) key calls per append, nodes visited at most dirty plus ancestors plus visible), the budget is the target, and the scene is listed as failing until it meets it. Elsewhere the budget starts at today's count.

Scenes, from R0065: settings bench.json, a Markdown session, a 100k-token stream, kit gallery stories, a long transcript scroll, 1k and 10k virtual_rows scroll, 10k-row append and filter, a hover sweep, and typing in 50 KB and 200 KB fields. Counts only, never wall clock on hosted runners.

Done when
  • At least 12 scenes have budgets seeded from the current rev, including the four worst cases.
  • The merge gate fails when a scene exceeds a budget.
  • A seeded regression in each counter family (an extra commit, shape, upload, allocation) fails.
  • Raising without the flag, a fragment and the trailer fails.
  • Budgets tied to targets are listed as passing or failing.
How to check

scripts/verify budgets runs in the merge gate on every merge. Each counter's seeded regression test keeps it honest.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2a · priority P1 · size L
R0159Text: no count budget catches a keystroke that shapes or copies the whole documentP1Phase 2aMT04
text-editing-budget · infra
What happens

long_note times typing, pasting, undo and scrolling in a large note and prints wall-clock numbers. Nothing fails when a change makes a keystroke reshape or copy the whole field again. research/27 measured that case: at 50 KB every keystroke reshaped the whole note, at 12 ms a keystroke, and shaping costs about 0.22 ms per KB. A regression back to that is seen only when someone runs the example by hand. Hosted runners are too noisy to gate on time, so a count is the only check that can run on every merge.

Where
Why it matters

People who write in a notes app or an editor notice a field that lags as the document grows. The typing targets are "keystroke p95 at or below 2 ms at 50 KB and at or below 4 ms at 1 MB, plain and rich, with AccessKit on", "bytes shaped per keystroke at most the reshaped paragraph or window plus 1 KB" and "at most one whole-text copy and one whole-text scan per keystroke". Undo must keep "100 of 100 steps at 1 MB". The perf targets add p95 <= 1 ms at 50 KB and <= 2 ms at 200 KB.

What would help

1. Add editing counters behind a test feature: bytes shaped, layouts built, whole-text copies, whole-text scans, allocations, undo steps kept, history bytes and accessibility runs rebuilt. 2. Add headless scenarios at 50 KB and 1 MB, in a plain field and a rich field with one mark per 40 bytes, each with AccessKit on:

  • a keystroke;
    • a preedit update;
    • a commit inside a typing run;
    • a 100 KB paste;
    • a select-all delete;
    • a keystroke in one 200 KB paragraph.

3. Register them as scenes in R0158. Lowering a budget is free. Raising one needs --allow-raise, a changelog fragment and a Raised: trailer. 4. Add the undo-depth assertion now, marked as a known failure until delta undo lands.

Done when
  • A keystroke that shapes more than its paragraph or chunk plus 1 KB fails T1.
  • A keystroke with more than one whole-text copy or more than one whole-text scan fails T1.
  • A keystroke that rebuilds accessibility runs for more than 2 paragraphs fails T1.
  • Undo depth below 100 of 100 at 1 MB fails T1 once delta undo lands.
  • The scenarios run in under 20 s in a debug build.
How to check

The scenarios are required in T1 through R0030. A seeded regression that reshapes the whole field on each keystroke must fail. Wall-clock numbers stay in long_note with --profile perf.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2a · priority P1 · size M
R0160rune-ref: the GPU differential tests whichever backend Gpu::instance picks, and its tolerances predate the native Metal backendP1Phase 2aST04
tooling-ref-backends · bug
What happens

rune-ref's GPU lane calls Gpu::instance(). On a Mac that is the native Metal backend by default, and wgpu's own backends elsewhere. The lane prints the adapter only to stderr. check-reference.sh does not pin a backend, and Difference records the maximum channel delta, outlier count and first pixel, but not the backend or adapter.

The measured maxima in research/24 came from wgpu's Metal path on an M4 Pro, before the native Metal backend landed. The note says to "measure Vulkan/D3D12 before claiming their budget", and those maxima were never measured. The test uses one budget of 2 levels for each of 5 kinds, shared by every backend. So a backend that regresses within 2 levels, or one that never ran, looks the same as one that passes.

Where
Why it matters

Apps ship on native Metal, wgpu Metal, Vulkan and DX12. A drawing bug on one backend reaches users on that platform only, and the differential cannot see it if it never ran there. The target: "per-kind ceilings that only go down on 4 backends (native Metal, wgpu Metal, Vulkan lavapipe, DX12 WARP), each asserting its adapter". The renderer target holds every backend to "<= 2/255 per channel with 0 outlier pixels".

What would help

1. Run the differential once per backend: native Metal and wgpu Metal on macOS, lavapipe Vulkan on Linux, DX12 WARP on Windows. 2. Each run asserts the backend and adapter name it asked for, and fails if another was used. 3. Record backend and adapter in each Difference and in the failure JSON. 4. Commit per-kind ceilings per backend, starting from measured maxima. A ceiling only goes down. A maximum above its ceiling fails. 5. Update research/24 with the four measured tables.

Done when
  • The four backends run in their lanes, each asserting its adapter.
  • A run that gets a different adapter fails and names both.
  • Difference and the failure JSON report backend and adapter.
  • Per-kind ceilings per backend are committed and enforced.
  • research/24 records measured maxima for all four backends.
How to check

The macOS, Linux and Windows lanes run check-reference.sh --gpu for their backends. A test that lowers one ceiling below its measured maximum must fail.

Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 2, milestone 2a · priority P1 · size S
R0161CI: no macOS lane runs the renderer on both the native Metal and wgpu Metal backends with 0 skipsP1Phase 2aLT03
render-lane-macos · infra
What happens

macOS has two GPU paths. The native Metal backend is on by default. The wgpu Metal backend is what iOS and builds without default features use. They differ in command-buffer shape, error reporting, present worker use and memory. On native Metal the overlay present worker is skipped and error scopes catch nothing.

The tests that compare them exist: pixel equivalence, metallib freshness, the builtin-table test and the CoreText pixel references. They run only on developers' Macs. The CoreText references skip and pass without an adapter. The only Rust CI job runs on Ubuntu, so neither macOS backend has CI coverage. A fix checked on one path says nothing about the other.

Where
Why it matters

macOS is the main platform, so most apps run on native Metal. The targets: "11 of 11 lanes green on every verified rev, with 0 skipped GPU tests and the expected adapter in each manifest"; "every built-in pipeline is precompiled or cached on macOS"; and every failure class has "an injection test on every platform", with a parity suite that passes "for every Backing".

What would help

Add scripts/verify lane macos-gpu and run it on the self-hosted Mac from R0061 on push to dev, never on pull_request (R0050). Under RUNE_TEST_STRICT=1, once with RUNE_GPU_BACKEND=metal and once with =wgpu, run:

  • cargo test -p rune;
  • the rune-ref differential, with the adapter override from R0160, and rune-fx blend;
  • the CoreText pixel references;
  • metallib freshness and the builtin-table test;
  • the failure-injection tests and the frame-core parity suite.

Report the adapter and skip count per backend. List the intended differences between the backends (present worker, error scopes, occlusion lookup) in a committed doc, such as a section of crates/rune/README.md, with a probe test for each. Running both backends doubles the GPU time, so split the run if it passes 30 min.

Done when
  • Both backends pass on every push to dev, with 0 skips and the adapter named per backend.
  • A stale metallib or a builtin-table miss fails the lane.
  • The failure-injection tests and the parity suite pass on both backends.
  • Each intended difference is listed and has a probe test.
  • A deliberate Metal-only regression on a dispatched branch turns the lane red.
How to check

The lane result per push, fed into R0169. Run the dispatched Metal-only regression when the lane first lands and after any lane change.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2a · priority P1 · size L
R0162CI: Windows tests, the DX12 renderer and the DXBC freshness check never run on an LF checkoutP1Phase 2aMT03
render-lane-windows · infra
What happens

No Windows test run is on record. Large Windows features land without one, such as the DirectWrite glyph path in #193.

The DXBC freshness test compiles only on Windows. Its hash was taken from a CRLF checkout, so on the LF text that cargo git checkouts see, the hash check fails without a message. Then dxbc::uber returns None, and wgpu compiles the uber shader on the main thread at every launch (#182). No machine runs uber_dxbc_is_fresh or renderers_load_the_precompiled_uber_shader on an LF checkout, so the miss went unseen.

The rune-ref differential tests whichever adapter it picks, so it cannot prove it ran on WARP.

Where
Why it matters

Windows users pay a shader compile on every launch, and nobody is told. The targets: "every built-in pipeline is precompiled or cached on macOS, iOS and Windows"; "11 of 11 lanes green on every verified rev, with 0 skipped GPU tests and the expected adapter in each manifest"; and per-kind ceilings on "DX12 WARP, each asserting its adapter".

What would help

A post-merge windows-latest job with core.autocrlf=false, so the checkout matches what cargo sees. It runs after #182 is fixed, so it is green from the first run.

1. Run scripts/verify t1 from R0029 with default features under RUNE_TEST_STRICT=1. That includes dxbc_tests, so a stale blob fails. 2. Run the renderer integration tests on WARP. 3. Use the adapter override from R0160 to select the WARP adapter by name. The job fails when another adapter is in use. 4. Measure WARP per-kind maxima, then run the rune-ref differential and gate on them. WARP may differ by more than 2/255 in some kinds, so set its ceiling per kind, never above 3/255.

Window, DPI and input paths run in R0063. Real-GPU checks need reserved hardware.

Done when
  • The job runs on every push to dev with 0 skips.
  • dxbc_tests pass on an LF checkout, and a stale DXBC blob fails the job.
  • Renderer tests pass on WARP, and the job names the WARP adapter.
  • WARP per-kind maxima are committed and reported per run.
How to check

The lane result per push, fed into R0169. A dispatched branch that edits shader.wgsl without regenerating the blob proves the freshness check fails.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2a · priority P1 · size M
R0163Headless: flag combinations that do nothing are accepted with no warningP2Phase 2aST04
tooling-flag-combinations · bug
What happens

Args parses each of its about 40 flags on its own. Three pair checks exist (--variant needs --playground, --crop KEY needs --snap, --whole-window needs both). Nothing else declares which flags conflict or depend on each other. Two combinations are known to drop flags without a word:

  • --native --script opens a real window and ignores the script. The native window reads args.script only to decide whether to open URLs natively.
  • --snap-on-patch returns before the headless runner. Its loop reads the size, scale, theme, scroll bars and hot-control path, and drops --script, --trace, --tree, --video and --at.

Both were found by reading code. Others may exist. An agent cannot tell that its flag did nothing, so it reads an empty trace or an unscripted frame as a result.

Where
Why it matters

Agents drive Rune through these flags, often in combinations nobody wrote a test for. A silent no-op costs a whole debugging loop. The harness target is one driver: no flag is accepted and ignored, measured as 0 accepted flag pairs with no effect, from a test generated from the flag table.

What would help
  • Declare in one table in args.rs, for each flag: the modes it applies to (window, native, headless, desktop, snap-on-patch, html), the flags it conflicts with, and the flags it needs.
  • Parsing rejects a combination the table forbids, naming both flags, and exits 2.
  • Reject --native --script and --snap-on-patch with --script, --trace, --tree, --video or --at until they work. Lift each rejection when the runner honours the flag.
  • Generate a test from the table that runs every allowed pair of flags on a tiny app. Each accepted flag must change an output (a file, a line or a tree field) or be listed as a documented no-op. Pairs grow quadratically, so run the tiny app in-process and sample by mode if the test passes 1 min.
  • The generated reference in R0289 reads the same table.

The test needs the merge workflow from R0030 to gate anything.

Done when
  • Every flag has an entry in the table.
  • A forbidden pair fails at parse time with both flags named.
  • --native --script and --snap-on-patch --script either work or fail with both flags named.
  • The generated pair test runs in the required merge check and reports 0 accepted flags with no effect.
  • The pair test runs in under 1 min.
How to check

The generated pair test runs in the required merge check. Adding a flag without a table entry fails a test that walks the parser's flag list.

Depends on
Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 2, milestone 2a · priority P2 · size S
R0164Hot reload: --snap-on-patch renders a partly configured runtime and silently drops --script, --trace, --tree, --video and --atP2Phase 2aST04
tooling-snap-on-patch-config · bug
What happens

In hot builds, --snap-on-patch leaves the headless runner at its top, before the script, timeline, trace, tree and video handling. rune::run apps reach it through run_host, which takes the same exit before it builds an App. Window apps reach it through snap_window. Both end in hot::headless.

hot::headless builds a runtime with runtime_for and then sets only three things: sRGB blending, font smoothing and system scroll bars. The ordinary headless path also attaches the playground, applies the chrome inset, and sets focus and IME hooks, transparency, fit_height, modifier keys and tab visits. It also opens the GPU with the compositor's features. hot::headless opens a plain Gpu::instance() and never takes the app's compositor.

So the PNG that --snap-on-patch writes can differ from --snap of the same app and scene. --script, --trace, --tree, --video and --at are accepted and do nothing. The tree goes to a JSON file next to the PNG, not to the --tree path.

Where
Why it matters

An agent that edits a view under hot reload trusts the --snap-on-patch PNG as the app's pixels. A transparent window, a compositor effect, a fit-height panel or a playground variant renders differently, so the agent chases a difference that does not exist on screen. A flag that is silently ignored looks like a script that passed.

The headless harness should be one driver where "no flag is accepted and ignored" (0 accepted flag pairs with no effect, from a test generated from the flag table). The inner loop should be fast and its docs true, with "100% of flags and events in a generated reference that T1 keeps fresh".

What would help

1. Split the configuration in headless_configured (lines 99-131) into one function that takes an App and returns a configured runtime and the GPU features. Call it from both paths, so a new setter cannot reach one runner and miss the other. 2. Give snap_window and run_host the whole App (or its configured parts), not just a Look tuple. 3. For every other headless flag, either honour it with --snap-on-patch or fail before frame 0 with a message that names the flag. Take the decision from the flag table that R0163 adds. --tree should write to its own path. --script and --video can be rejected until the unified host lands under R0255.

Done when
  • Six fixture apps give the same PNG bytes from --snap and from the first --snap-on-patch frame. They use a chrome inset, transparency, a compositor, fit_height, IME hooks and the playground.
  • hot::headless and headless_configured build their runtime through one shared function.
  • Every output and timing flag combined with --snap-on-patch either works or exits non-zero with a message that names it. A test generated from the flag table checks this.
  • --tree with --snap-on-patch writes to the given path.
How to check

The fixture PNG comparison and the generated flag-matrix test run in T1 under --features hot, which R0036 adds to the build matrix.

Depends on
Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 2, milestone 2a · priority P2 · size S
R0165Headless: the single-window, desktop, hot, --html and motion-gate runners each own a frame loop and input dispatchP1Phase 2aLT04
tooling-headless-host-unify · refactor
What happens

Five tools step the runtime, each in its own way:

  • the single-window headless runner, one function of about 420 lines;
  • the --desktop runner;
  • hot-reload headless;
  • the --html settle loop;
  • the motion gate.

Each owns its clock, its script feed, its request draining and its readback. Script events go through two dispatchers. So behaviour drifts. A scripted resize works in a single-window run and is ignored in --desktop, because only the single-window runner handles Kind::Resize. --snap-on-patch skips part of the runtime setup and drops --script, --trace and --tree. A bug fixed in one loop stays in the others. The session protocol and the motion scenarios planned for the harness need one driver to build on.

Where
Why it matters

Agents and CI trust headless runs to show what a real window does. When a flag or event behaves differently per runner, a passing test proves nothing about the other runners. The target: "100% of script event kinds (about 35) give equal per-window results in single-window, --desktop and session runs", and "a mid-run error leaves a flushed trace, complete PNGs and a finalised video". The architecture target is that every host drives frames, wakes and request dispatch through one shared frame core, with hosts as thin adapters.

What would help

Extract a HeadlessHost on a virtual clock that owns:

  • the script feed and one script dispatcher;
  • request draining;
  • output sinks for PNG, strip, video, tree, trace and the motion gate;
  • per-window members.

The GPU is an optional backend of the host. CPU-only runs (motion gate, --html, --cpu) never create a device. The single-window path becomes a one-member desktop, and hot reload and the motion gate drive the same host.

Move one runner per PR. Each PR has a byte-equality test of its outputs before and after. If a loop's timing must change, re-bless goldens in a commit that does nothing else.

Two designs were proposed: a new host type, or the existing fake Backing on a virtual clock. Build the host here with the same split of responsibilities as a Backing. Moving it onto the shared SurfaceHost frame core is a separate issue under the same tracker. R0075 and R0164 fix the two known drifts first.

Done when
  • One dispatcher handles script events for every runner.
  • A parity matrix runs every ScriptEvent kind through single-window, --desktop and session hosts and compares per-window trees, side effects and finished output files.
  • Motion-gate and --html runs create no GPU device (tested).
  • A mid-run error leaves a flushed trace and complete PNGs (tested).
  • headless.rs has no function over 150 lines.
How to check

The parity matrix runs in T1. Each migration PR carries its byte-equality test, and the matrix keeps the runners equal after.

Depends on
Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 2, milestone 2a · priority P1 · size L
R0166Motion gate: the 36 audit scenarios run only as release binaries from a shell script, so none of them can run as a testP1Phase 2aLT04
motion-audit-scenarios-as-tests · infra
What happens

run.sh builds 13 apps in release (todo, settings, kit-gallery, odometer, shell, tab_strip, growth_reorder, keep_stuck, sticky, scroll_keys, scroll_anchor, text_glide, one_snap) and drives 36 scenarios with JSON scripts at 120 fps (scripts/motion-audit/run.sh:9-11, scripts/motion-audit/run.sh:27-62). It writes traces and gate dumps for a person to read. None of it can run under cargo test, so none of it can gate a merge.

The pieces for tests exist. motion_gate::Run steps a runtime and has idle, play, act and tap (crates/rune/src/motion_gate/mod.rs:141-205). gate_rows runs cells in parallel and fails on any finding its allow rows don't cover (crates/rune/src/motion_gate/gate.rs:75-98, crates/rune/src/motion_gate/gate.rs:207-217). A few crate tests use it, such as crates/rune-kit/tests/menu_open.rs:69-72. But nothing drives Run from a script file, and AllowRow has a kind, element, cell, reason and an optional max, but no issue link (crates/rune/src/motion_gate/gate.rs:29-35).

Where
Why it matters

A motion regression should fail at the commit that causes it. The targets: "100% of the scenarios in run.sh's inventory gate T1 with no release build", "every allow row has a reason, a max and an issue link, and runs fail on unused or exceeded rows", "test execution <= 3 min on a 4-core hosted runner", and "a change under rune-motion or runtime motion code without a new or changed scenario fails unless it carries a Motion-scenario: none trailer with a reason".

What would help

1. Give Run a script driver that consumes the same ScriptEvent stream as the unified headless host (R0165), so a scenario means the same thing in both. 2. Port each scenario, in batches, to a debug gate_rows test beside its example or kit story, with the same script and 120 fps. 3. Make AllowRow require a reason, a max and an issue link. Lowering a max needs nothing; raising one needs an evidence note in the commit. Unused or exceeded rows fail a full run. 4. Generate the scenario list from run.sh and scripts/motion-audit/scenarios, and fail on a scenario with no test, whatever the test is called. 5. Add the path rule for motion changes in the merge-gate ratchets. 6. When the last scenario has moved, run.sh calls the tests, and stays only as a wrapper for traces from installed builds.

The gate runs on the virtual clock, so debug builds give the same findings, just slower. Split long scenarios and run cells in parallel to stay under 3 min.

Done when
  • Every scenario has a debug gate test, checked by the generated inventory test.
  • No release build is needed.
  • Every AllowRow has a non-empty reason, a max and an issue link.
  • A full run fails on an unused row and on an exceeded row.
  • Test execution, excluding compilation, takes at most 3 min on a 4-core hosted runner.
  • The path rule runs in the merge-gate ratchets.
How to check

cargo test in the required merge check runs every gate test. The inventory test fails on an unported scenario.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 2, milestone 2a · priority P1 · size L
R0167Headless: --native --script ignores the script, so scripted input never runs in a real windowP1Phase 2aMT04
tooling-native-script · bug
What happens

Args::headless sends --script to the offscreen runner unless --native is set. With --native, the window opens and the script is used only to stop it opening URLs. No event in it is replayed, and the flag combination is accepted with no warning. So native pacing and latency can be measured only with real input or by hand, and a bug such as #204's 120 Hz scroll cadence cannot be reproduced from a script in the repo.

R0122 adds replay in a native macOS window, with OS-injected input stamped into the frame record. That is a separate path from the headless dispatcher. Other platforms still ignore the script.

Where
Why it matters

Users feel latency and missed presents in real windows, not in an offscreen loop. The latency target needs "at least 5 windowed scenarios per verified candidate" on a reserved 120 Hz Mac and Windows PC, with OS-injected input in a real window and "input-to-present p50 at most 8.3 ms and p95 at most 16.7 ms". The harness target is that every script event and flag behaves the same in every run mode, and "0 accepted flag pairs with no effect".

What would help

1. Replay native scripts through the one dispatcher from R0165, so every event kind means the same thing in a window and headless. The macOS path from the phase-1 issue moves onto it. 2. Replay on the window's display-link clock. Stamp each event as input arrival, so frame records join input to present. 3. Add Windows to the --inject os mode, posting events with SendInput and stamping the OS event time. 4. Label each result with the mode that produced it: dispatched input-to-present or OS input-to-present. 5. Until a platform supports native replay, R0163 rejects --native --script there with a clear error.

OS injection needs accessibility permission on macOS. The reserved machine is set up once with it.

Done when
  • Every ScriptEvent kind is delivered in a native window on macOS and Windows, checked by a GUI test that compares the final tree with the headless run.
  • --native --script s.json --trace t.jsonl records each event's arrival and the frame that presented it.
  • The OS-injection mode works on macOS and Windows, and its results are labelled as OS input-to-present.
  • --native --script fails with an error on any platform without native replay.
How to check

GUI tests in the macOS and Windows lanes. The reserved latency lane runs its windowed scenarios through this path, so a break turns that lane red.

Depends on
Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 2, milestone 2a · priority P1 · size M
R0168CI: the Linux GPU path never runs, so the rune-ref differential and renderer tests run only by handP1Phase 2aMT03
render-lane-linux · infra
What happens

The rune-ref GPU differential, the backdrop-blur, clip and effect-slot integration tests and the rune-fx blend tests need a GPU adapter. They run only when someone runs them by hand. Lavapipe gives a deterministic Vulkan device on hosted Ubuntu runners, and scripts/kit-diff.py already documents it, but no workflow uses it.

No test opens a window under X11 or Wayland either. Linux was checked by hand: #2 (a missing glyph on stock Ubuntu) and #3 (a missing libxkbcommon-x11) were found that way. research/24 says Vulkan tolerances were never measured.

Where
Why it matters

Linux users meet startup and rendering bugs that no machine saw. The targets: "11 of 11 lanes green on every verified rev, with 0 skipped GPU tests and the expected adapter in each manifest"; "all 5 platforms and 8 variants run on 100% of dev pushes with 0 skips"; and per-kind ceilings "that only go down on 4 backends", Vulkan lavapipe among them.

What would help

A post-merge ubuntu-latest job, after R0057 gives T1 its adapter:

1. Install mesa-vulkan-drivers, point VK_ICD_FILENAMES at lavapipe, and assert the adapter name. 2. Run scripts/verify lane linux-gpu from R0029 under RUNE_TEST_STRICT=1 from R0056. It covers check-reference.sh --gpu with the adapter override from R0160, cargo test -p rune --tests, the rune-fx and rune-light goldens, render count budgets, and --snap of every example. 3. Launch every example windowed under Xvfb (X11) and weston --backend=headless (Wayland) with default features. Each takes a scripted tap through R0167 and exits with status 0. Examples that need fixtures or services are listed in the lane config with what they need. 4. Measure lavapipe per-kind maxima first and commit them in research/24.

Lavapipe certifies formulas and startup, not every Vulkan driver. Real GPUs need reserved hardware.

Done when
  • The job runs on every push to dev and finishes in under 30 min.
  • It reports the lavapipe adapter name and 0 skips.
  • Lavapipe per-kind maxima are committed in research/24.
  • Every example not listed as needing a service launches under X11 and Wayland, takes a tap and exits 0.
  • A seeded shader regression turns the job red.
How to check

The lane result per push, fed into R0169. A dispatched branch with a seeded shader change proves the lane fails.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2a · priority P1 · size M
R0169Pins: apps pin dev revs that no machine checked on their platform, and a red or skipped lane does not stop a rev from being marked verifiedP1Phase 2aMT03
tooling-verified-branch · feature
What happens

The README and CHANGELOG tell apps to pin a dev rev. No ref marks the revs that passed on every platform, so an app can pin a rev that never built on its OS. Adding lanes is not enough on its own. Today a GPU test skips and passes without an adapter, and the web smoke test treats a missing WebKit adapter as unavailable. So a lane can look green after testing nothing. Nothing collects the lane results for one SHA and decides.

Where
Why it matters

App authors want a rev they can trust on their platform. The targets: "verified advances only when every required variant passed on that SHA, fast-forward only. Dev-to-verified lag p95 at most 3 h", and "the verified branch fast-forwards only to a rev whose own artifacts passed every lane". Semver checks run "against the latest verified rev".

What would help

1. Each lane uploads a manifest: rev, backend, adapter, driver, and tests run and skipped. 2. A promote job runs when every lane has finished for a SHA. It reads the check runs for that exact SHA. It pushes $SHA:refs/heads/verified only when every required lane passed with 0 skips and the expected adapter. A red, missing, skipped or other-SHA result blocks it. Group runs per SHA with concurrency, so overlapping pushes cannot promote out of order. 3. Protect verified against force pushes. Git refuses a non-fast-forward push. 4. Bootstrap: the first promotion is the first SHA that passes every lane. The required set starts with macOS (R0161), Windows (R0162), Linux (R0168) and the browsers (R0062). iOS, the accessibility lanes, Safari and the hardware-GPU lanes join as they land. 5. Add scripts/rune-pin. It prints the latest verified rev and the changelog entries since an app's pin. 6. Tell apps to pin verified in the README and AGENTS.md, and answer #108.

The promotion job writes to the repo, so it follows R0050. Its timing depends on R0155.

Done when
  • verified exists and moves only forward.
  • Fixture runs show promotion refused for a red lane, a missing lane, a lane with skips, a wrong adapter and a result for another SHA.
  • The README tells apps to pin a verified rev.
  • scripts/rune-pin prints the rev and the entries since a given rev.
  • Dev-to-verified lag p95 is at most 3 h over 30 days.
How to check

The fixture runs in the promotion job's own tests. Branch protection forbids force pushes. A weekly report gives the dev-to-verified lag.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2a · priority P1 · size M
R0170Metal: the native backend never reads command-buffer status and nextDrawable has no bound, so a GPU fault can stall every frame for 1 s and teardown for 10 sP1Phase 2aLT05
render-metal-cb-status · bug
What happens

The native backend creates command buffers with unretained references. Resources stay alive in keep lists, which retire when one MTLSharedEvent reaches each buffer's stamp. Nothing reads a command buffer's status or error. If a GPU fault leaves the event unsignalled:

  • each pace() call waits up to 1,000 ms for the oldest frame in flight, so every frame holds the main thread for a second;
  • keep lists never retire, so memory grows;
  • dropping the device waits up to 10,000 ms in Shared::drop.

The device-lost and uncaptured-error hooks are empty, so nothing learns that the device is gone.

nextDrawable has no bound either. macOS layers turn off its timeout and rely on an occlusion check before they ask. A case the check misses, such as a display that sleeps mid-frame, blocks main with no limit. None of these waits is counted.

Where
Why it matters

After a GPU fault, a Mac app on the default backend can drop to one frame a second and take 10 s to quit. The performance target asks for "no main-thread wait over one refresh". The device-loss target asks for "Teardown <= 100 ms on the UI thread" and a correct frame within 500 ms. The rendering target asks for "0 silent paths". The failure model asks that device loss end in a redraw or "a terminal report within 10 s".

What would help

The two source proposals differ on how to learn a buffer's status:

  • (a) A completed handler on each command buffer that records status. It is simple, but it adds a block allocation and a driver callback every frame, the cost research/34 measured and removed.
  • (b) Keep a handle to each in-flight command buffer beside its stamp. Read the oldest buffer's status when it retires and when a pace wait times out. This has no per-frame cost. Recommended.

Then:

1. Bound pace() to one refresh period. On a timeout, skip the frame and count it. Don't advance the completion fence. Free keep lists only when each buffer reports Completed or Error, because an unretained buffer that is still running reads them. Two frames in flight stays the limit. 2. On MTLCommandBufferStatusError, or when an unsignalled event makes no progress for 500 ms, mark the device lost. Then run the stored callback, so implement set_device_lost_callback and on_uncaptured_error. Recovery is R0203. 3. On a lost device, Shared::drop doesn't wait for buffers whose status is terminal, so teardown is bounded. 4. After sleep, a wake or a display change, take drawables through a bounded path. One option is to turn the drawable timeout back on for the first frames after that notification. 5. Count bounded waits, timeouts and command-buffer errors in frame stats.

The first-frame wait stays in #164.

Done when
  • An injected command-buffer error reports the device lost within 1 frame. No later frame waits longer than 1 refresh period.
  • An unsignalled event reaches device-lost handling within 500 ms.
  • Dropping a lost device takes 100 ms or less.
  • A slow but healthy command buffer (a long compute pass) frees no keep-list resource before it completes.
  • After a timeout, at most 2 frames are in flight, and keep lists don't grow over 100 faulted frames.
  • pace, nextDrawable and present each have a fault test with no main-thread wait over one refresh.
  • The allocation tests still show 0 completion handlers and the same allocations per frame. Cadence on the macOS lane is unchanged.
How to check

Native backend tests with a command-buffer error and an unsignalled event injected through R0087, on the macOS lane. R0298 keeps the wait bounds.

Depends on
Part of
  • Theme: T05
  • Tracked in R0530
  • Phase 2, milestone 2a · priority P1 · size L
R0171Render: wgpu devices register no device-lost or uncaptured-error handler, so a loss is silent and a stray error panicsP1Phase 2aMT05
render-wgpu-loss-handlers · bug
What happens

Gpu::device_on creates every native wgpu device, and it never calls set_device_lost_callback or on_uncaptured_error. The web path in try_backend doesn't either. A search of crates/rune/src for either name finds only the empty stubs in the native Metal backend.

Two things follow:

  • wgpu's default uncaptured-error handler panics on any validation error raised outside an error scope. A compositor bug, or a resource that Rune sizes wrongly, panics a shipped app.
  • A real device loss doesn't reach that handler, so it gives no signal at all. An idle window draws no frame, so it doesn't notice the loss until the next input. Then it fails on acquire or submit.
Where
Why it matters

Users see either a crash from an error that only needed a report, or a window that freezes on its last frame after a driver reset. The device-loss target asks for "0 panics and 0 unresponsive windows" and a correct frame within 500 ms on native. The rendering target asks for "0 silent paths: a test per path asserts one diagnostic and a non-zero counter, and the counter counts each occurrence". The failure model asks that every failure class have "one report path".

What would help

Register both handlers on every wgpu device, native and web, in one place next to device creation.

  • The handlers set a shared health value, for example an Arc<AtomicU8> with a reason, which Gpu exposes as Gpu::health().
  • They wake the owning host's event loop through its Waker, so an idle window starts recovery within 100 ms.
  • Each uncaptured error goes once per message class to R0081 and is counted on every occurrence in FrameStats. It never panics. Debug builds and tests show the count in dev stats, so a swallowed error stays visible.
  • A loss that Rune caused, such as destroy() in the web host's close, is not reported as a loss.
  • Hosts check health() before they acquire. When it reports Lost, they start recovery (R0203).

The native Metal backend implements the same two hooks from command-buffer status in its own issue under this tracker.

Done when
  • With a loss injected through R0087, Gpu::health() reports Lost within 1 frame.
  • A loss injected while a window is idle, with no frame scheduled, starts recovery within 100 ms with no input.
  • A deliberate uncaptured validation error in a test is reported once, counted on each occurrence, and doesn't panic.
  • Normal teardown that destroys a device reports nothing.
  • The fault matrix shows 0 panics from wgpu's default handler.
How to check

T1 tests on lavapipe with injected loss and a deliberate validation error. The same cases run on the DX12 and Vulkan lanes.

Depends on
Part of
  • Theme: T05
  • Tracked in R0530
  • Phase 2, milestone 2a · priority P1 · size M
R0172Compose: no compositor rebuilds its resources when the device changes, though Compositor::render's contract asks for itP2Phase 2aST05
render-compositor-device-key · feature
What happens

Compositor::render's doc tells compositors that f.device can change between frames, for example when an overlay is shown again on another GPU. It says to keep resources made on the device with f.device_key(), to make them again when the key changes, and never to compare wgpu::Devices, since wgpu can give a new device the same id as the last one. Nothing in the repo follows that contract or helps with it. No example or library helper reads device_key; only render.rs and one window test use it.

The lab and cursed-settings rebuild their resources only on a size or format change, and keep a LightRenderer in an Option that is filled once. The showreel fills its FxRenderer once with get_or_insert_with. After a device change, each would draw with buffers, pipelines and textures from the old device. The result is a wgpu validation panic, or a blank window once R0203 swaps the device.

Where
Why it matters

The device-loss target: after a lost device or a GPU switch, the app redraws correctly on a new device and keeps its state, with a correct frame within 500 ms native and 1,000 ms web, and 0 panics and 0 unresponsive windows on 9 of 9 configurations. Host recovery can rebuild Rune's own renderer, but a compositor's resources belong to the app. If the pattern the examples teach is wrong, every app with a custom compositor fails recovery, as #72 did.

What would help

Add rune::compose::PerDevice<T> with get_or_rebuild(&mut self, frame, make) -> &mut T. It stores the DeviceKey next to the value and calls make again when frame.device_key() differs. An optional extra key, such as size and format, covers the rebuild the examples already do. The change is additive.

Use it in the lab, the showreel and cursed-settings, including their rune-fx and rune-light glue, so the examples teach the right pattern. Name it in the Compositor::render doc.

Done when
  • A test swaps the device under a compositor that uses PerDevice and sees its resources made again on the new device, once.
  • The lab, the showreel and cursed-settings use PerDevice for every device-owned resource.
  • The Compositor::render doc names PerDevice.
How to check

A unit test in cargo test -p rune with two noop devices, built as the existing key test builds them. The device-loss recovery tests in R0203 then run a compositor example through an injected loss.

Part of
  • Theme: T05
  • Tracked in R0530
  • Phase 2, milestone 2a · priority P2 · size S
R0173Kit: components keep cross-frame memory in thread_locals that every window and overlay shareP1Phase 2aXLT06
arch-component-store · tracking
What happens

Cx carries no component state, so rune-kit keeps the memory its components need across frames in thread_local! blocks. Every window and overlay runs on the main thread, so "per thread" means "shared by every surface".

Five production blocks hold mutable state that should belong to one surface:

  • RollingText keys its memory by label alone, so two windows with the same key diff against each other's text.
  • ScrollBar keys by runtime id but clears the whole map at 256 entries, so a window with many scroll areas resets every window's bars, including one mid-drag.
  • The Markdown parse and stream caches (16 MiB and 4 MiB), the table width cache (1 MiB) and the syntax cache (4 MiB) evict on commit_generation(), a counter that every window's commits advance.

A sixth block holds the immutable broken-image glyph. It can stay shared as a process-wide constant.

The kit also calls doc(hidden) Rune items, so a third-party component crate has no supported way to do what the kit does. Fixing this needs a new runtime API first, then one migration per cache, so it takes several issues.

Where
Why it matters

Users of multi-window apps see wrong roll animations, scroll bars that reset, and caches that thrash when two windows commit. The target is that "mutable component and runtime memory belongs to the runtime that drew it, has hard limits, and rune-kit uses only Rune's documented public API": 0 per-surface mutable thread_locals, 0 doc(hidden) items used by rune-kit, each store evicting on its own runtime's commits and reading 0 bytes after its runtime drops. It also serves the memory target that reclaimable bytes reach baseline within 1 s of a pressure warning.

What would help

Add the runtime-scoped component store (R0174), then move one kit cache per PR. Finish by putting the kit on public API only. List the broken-image glyph as a process-wide constant. Builder signatures stay the same.

Done when
  • Every child issue is closed.
  • The arch-ratchet kit thread_local count covers only listed immutable constants.
  • Two windows with the same keys keep independent RollingText, ScrollBar, Markdown and syntax state.
  • rune-kit references 0 doc(hidden) rune items.
How to check

The arch-ratchet thread_local and doc(hidden) counters in T1, the two-window and runtime-drop tests from each child, and the procwatch store gauges.

Issues
Part of
  • Theme: T06
  • Phase 2, milestone 2a · priority P1 · size XL
R0174Runtime: components have no runtime-scoped place to keep memory across framesP1Phase 2aMT06
arch-component-service-api · feature
What happens

A component has no API for state that belongs to the runtime drawing it, is evicted on that runtime's commits, and is freed when the runtime drops. research/06 planned cx.state("open", || false), but it was never built.

The pieces exist inside Rune. memo already resolves a per-window scope through a thread-local scope stack, and memo::snapshot gives a component its history as of commit start, so a discarded measure pass doesn't consume a change. But the only generation a component can see is commit_generation(), a thread-wide counter that every window's commits advance. The kit's Budget evicts entries the last two generations didn't use. So a window that commits fast ages out a slow window's entries. Components fall back to thread_local! blocks with no per-runtime lifetime and no byte reporting.

Where
Why it matters

Without it, multi-window apps share and thrash component memory, and outside component crates cannot cache at all. The target: "each store lives until its Runtime drops (a hidden window keeps its runtime), evicts on that runtime's commit generation, has hard entry and byte limits, and reports bytes", and "after a Runtime drops its store gauge reads 0". It also feeds the memory target that reclaimable bytes reach baseline within 1 s of a pressure warning, and the cache-correctness target of 0 stale hits in the sampled differential check.

What would help

Add a rune::component module:

  • with_store::<T: Service, R>(f: impl FnOnce(&mut T) -> R) -> R, resolved through the existing per-runtime scope, so it works inside builders without a cx argument.
  • trait Service: Default + 'static with const MAX_ENTRIES, const MAX_BYTES, fn commit_end(&mut self, generation: u64) and a required fn bytes(&self) -> usize.
  • A per-runtime commit generation. Entries an element didn't touch for one commit are evicted, and a store over either limit evicts down to it.
  • A store lives as long as its Runtime. A hidden window keeps its stores. Dropping the runtime frees them.
  • Per-runtime procwatch gauges for store bytes.
  • In a discarded measure pass, follow memo::snapshot's rule: history as of commit start.

Promote cached, digest, snapshot and the per-runtime generation to documented API in that module. Keep commit_generation() for one deprecation window, documented as thread-wide.

Done when
  • with_store works inside builders without a cx argument.
  • Two windows committing at different rates do not evict each other (test).
  • Dropping a runtime frees its stores, and their gauge reads 0 (test).
  • Tests cover nested scopes, a discarded measure pass, a panic unwinding out of a builder, and re-entry from inside with_store.
  • A store over MAX_ENTRIES or MAX_BYTES evicts down to its limit (test).
  • cached, digest, snapshot and with_store are documented, not doc(hidden), and in the API snapshot.
How to check

Headless lifecycle tests in T1 with two runtimes on one thread. The API snapshot shows the new module. The procwatch gauge is read in the runtime-drop test.

Part of
  • Theme: T06
  • Tracked in R0173
  • Phase 2, milestone 2a · priority P1 · size M
R0175Runtime: hover, press and capture state are flat Runtime fields that every module can writeP1Phase 2aMT06
arch-core-input-pointer-state · refactor
What happens

struct Runtime has 251 fields. The pointer families are about 20 of them, spread through the struct:

  • capture: pointer, capture, capture_button, secondary_capture, capture_inside;
  • hover: hovered, hover_within, hover_gone, hover_shown, hover_pending, hover_paused, hover_hold;
  • press: press_at, last_press, double_armed, press_clicks, press_repeat, press_down_t, press_moved, press_cancelled.

They are visible to every module in the runtime. A small sample of them is read in 14 non-test files and assigned in 6: pointer, hover, focus, gesture, text selection and the playground. Any module can leave them inconsistent, for example clearing capture without the press state that goes with it. Hover already has one small struct, HoverHold.

These families are the smallest and best tested, so they move first in the core split.

Where
Why it matters

Contributors can't tell which code owns pointer state, so input bugs like a modal clearing capture without ending the drag (R0096) are easy to write. The target is that "the runtime core is non-generic and split into subsystems whose state is private to their modules": Runtime<S> has at most 8 fields, and state-owning subsystem structs have 0 non-private fields, each with a passing compile_fail doctest.

What would help

Add a Pointer { hover, press, capture } subsystem in its own module under runtime/input/, with Default. Its fields are private to that module. Other modules call methods such as begin_press, capture, release, cancel and hovered(), which keep related fields consistent. Fold HoverHold into the hover part.

This is a mechanical move with no behaviour change. List the moved fields in the PR description. Lower the arch-ratchet field ceiling (R0044) in the same PR, and keep each new file under 800 lines.

Done when
  • At least 18 fields leave struct Runtime, and the arch-ratchet field ceiling is lowered to match.
  • Pointer's fields are private, and arch-ratchet's non-private subsystem field count is 0 for it.
  • A compile_fail doctest shows a field of Pointer can't be reached from another module.
  • All runtime tests pass unchanged.
  • No new file is over 800 lines.
How to check

The arch-ratchet field and privacy counts and the runtime tests in T1 (R0030). scripts/file-size.sh for the new files.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 2, milestone 2a · priority P1 · size M
R0176Kit: RollingText in two windows with the same key diffs each window against the other's textP1Phase 2aST06
arch-rolling-text-per-runtime · bug
What happens

RollingText rolls only the characters that changed. To know what changed, it keeps the last text and cluster ids for each label in a thread_local! store keyed by the label key alone, bounded at 512 labels and 256 KiB.

Every window and overlay runs on the main thread. A main window and an overlay that both build RollingText::new("status", ..) share one entry. Each one compares its new text against whatever the other drew last, so it rolls the wrong characters and plays the wrong entrance. The eviction is also shared: one window with many labels can push out another window's entries, which then roll in as new text.

The store already reads its history through memo::snapshot, so a discarded measure pass doesn't consume a change. That rule has to stay.

Where
Why it matters

Users see a status label in one window animate as if it took another window's text. The target is that "mutable component and runtime memory belongs to the runtime that drew it, has hard limits", with 0 per-surface mutable thread_locals in rune-kit, each store evicting on its own runtime's generation, and its store gauge reading 0 after its runtime drops.

What would help

Move Store onto component::with_store (R0174) as a Service. Keep the label key, now scoped to one runtime. Keep the commit-start snapshot behaviour. Report bytes() from the existing byte count, and keep the 512-label and 256 KiB limits as MAX_ENTRIES and MAX_BYTES. Remove the thread_local!. The builder signature stays the same.

Done when
  • A test with two runtimes on one thread, both using key status with different texts, shows independent cluster ids.
  • Dropping one runtime leaves the other's entries intact, and the dropped runtime's store bytes read 0.
  • The thread_local! in rolling_text.rs is gone.
  • Existing RollingText tests, including the discarded-pass case, pass unchanged.
How to check

The kit test in T1. The arch-ratchet kit thread_local count drops by one in the same PR.

Depends on
Part of
  • Theme: T06
  • Tracked in R0173
  • Phase 2, milestone 2a · priority P1 · size S
R0177Runtime: 28 pub fields let apps and tools write past invariants, and a write to reduced_motion is silently overwrittenP1Phase 2aMT06
arch-runtime-pub-accessors · refactor
What happens

struct Runtime has 28 pub fields: state, text, images, scene, env, viewport, transparent, t, reduced_motion, time_scale, poll, clock, wall_start, on_key, instances, marks, track_marks, surfaces, ime_area, copy_request, shell_request, animating, settled, events, stats, ambient, double_click_interval and help_delay.

Some are safe to read. Some writes do nothing lasting. reduced_motion is the clear case: a write doesn't reach scene, and the next commit copies the view's value back over it. The real input is the host preference, which already has set_system_reduced_motion. A test or tool that writes the field sees no change and gets no message. Other writes, such as to scene, t or instances, can break invariants the runtime keeps between them. Nobody has listed which fields behave which way.

Code outside crates/rune reads these fields directly: rt.instances about 30 times, rt.text about 19, rt.stats 16 and rt.copy_request 8. The pub fields also pin the struct layout that the core split (R0533) must change.

Where
Why it matters

Tool and test authors write a field, see nothing happen, and lose time. Apps can corrupt runtime state. The targets: "Runtime<S> has at most 8 fields: pub state: S, and the rest private", and "a public API break can't reach dev unannounced, and apps get time to migrate", with a #[deprecated] alias for at least one fold and 30 days. Misuse should be "reported at the call site with the fix".

What would help

1. Audit the 28 fields. On the Stability page, list each one as safe to read, safe to write, overwritten on commit, or invariant-breaking on write. 2. Give every field except state a read accessor, and a setter only where a write is legitimate. For reduced_motion, the read returns the value in effect, and the deprecation note points to set_system_reduced_motion, tested to take effect at the next commit. 3. Mark the fields #[deprecated], which warns and doesn't break, with the replacement in the note. 4. Migrate the examples, the kit and the tooling to the accessors.

The stability policy already puts Runtime fields in the unstable tier, but apps pin dev revs and read these fields, so the deprecation window still applies. Making the fields private is a separate phase-3 issue, gated on the consumer canary, with a Breaking fragment. The subsystem moves that take pub fields (motion, focus and IME, drag-out and clipboard, paint) wait for this issue, so they can move a field behind its accessor.

Done when
  • The audit list is on the Stability page.
  • Every pub field except state has an accessor, and is #[deprecated] with the replacement named.
  • A test shows the reduced_motion setter takes effect at the next commit and stays.
  • No in-repo code reads a deprecated field (-D deprecated passes for the workspace).
  • A changelog fragment names each accessor.
How to check

The API snapshot shows the accessors and deprecations, and the semver and Breaking-fragment checks run in T1 (R0027, R0046). An arch-ratchet count of non-deprecated pub fields reads 1.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 2, milestone 2a · priority P1 · size M
R0178Runtime: drag-out, clipboard and paste requests are flat fields drained by host codeP2Phase 2aMT06
arch-core-dragout-clipboard · refactor
What happens

Drag-out and clipboard requests are flat fields on Runtime, and host code reads and clears them directly.

  • Clipboard and paste use eight fields: copy_request (pub), paste_request, read_requests, clipboard_reads, pill_copy, next_clipboard_read, clear_secret_request, and clipboard (the memory clipboard for tests). The native and web Client::flush take each field with mem::take, and flush_memory does the same for the memory clipboard. Window and overlay hosts call flush at about a dozen points.
  • Drag-out uses six fields: os_drag, drag_out_armed, drag_out_threshold, drag_out_request, drag_ends and drags_open. Window and overlay hosts call take_drag_out inside the pointer move, because AppKit needs the drag session to start inside the mouse-dragged event. frame_step drops any request that no host took.

Each new platform host has to learn which fields to take and when. Each new request kind adds a field and a host read. Tests read rt.copy_request directly.

Where
Why it matters

Users notice only when it goes wrong: a lost paste, a drag that never starts on macOS, or a secret that is never cleared from the clipboard. The targets: subsystems whose state is private to their modules, and "every side effect the runtime asks of the OS is a typed request on one queue, dispatched at defined safe points. Hosts read no runtime request fields", with 0 such sites, FIFO side-effect requests, and headless tests that assert request streams. Clipboard and drag-out are the first families that queue will carry, so one owner for each keeps that later work small.

What would help
  • Move the clipboard family into a Clipboard subsystem struct and the drag-out family into a DragOut struct, both with private fields.
  • Give each one drain method that returns typed requests in order: copy, secret clear, paste, read, and drag-out start. The native, web and memory clipboards consume the drain instead of fields. These become the first variants that the planned HostRequest queue takes over.
  • Keep the timing. The host still drains the drag-out start inside the move event that asked for it, and a synchronous clipboard read on macOS keeps its order. A drag-out that no host takes is still dropped at frame start.
  • copy_request is pub, so R0177 gives it an accessor and deprecates the field first. Replace test reads of rt.copy_request with the drain or the memory clipboard.
Done when
  • The 14 fields leave struct Runtime, and the field-count ceiling drops by the same number.
  • No code outside the two subsystems reads or writes them. Hosts call one drain API.
  • Headless tests assert the request stream for copy, secret clear, paste, read and drag-out, including a hidden window that presents no frame.
  • On macOS, the drag session still starts inside the move event, and drag ends are delivered in the same order.
How to check

T1 runs crates/rune/src/runtime/tests/input_clipboard.rs, crates/rune/src/runtime/tests/secure_text.rs, the drag-out tests and the window key tests. The field-count and host-read ceilings in the arch ratchet keep the change in place. A macOS lane checks the drag session timing.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 2, milestone 2a · priority P2 · size M
R0179Runtime: focus, modal, typeahead, IME and selection state are 30-odd flat fieldsP2Phase 2aMT06
arch-core-focus-ime · refactor
What happens

About 30 flat fields on Runtime hold focus, modal, typeahead, IME and selection state:

  • Focus, modal and typeahead: focused, keyboard_focus, hover_focus, typeahead, held, modifier_keys, full_keyboard_access, tab_visits_controls, modal_stack, focus_before_commit, last_focused, unmounted_focused, modal_index, modal_members, key_focus and keys_held, plus the app's on_focus hook.
  • IME and caret: app_ime, ime_area (pub), ime_reset, ime_keys_down, ime_eat_key_up, caret, caret_watch and caret_follow.
  • Selection: text_sel, sel_snapshot, sel_heard and links.

Any runtime module can write them. Hosts read rt.ime_area and take rt.ime_reset directly in three places: the window's platform sync, the IME event handler and window creation. The text-input protocol needs one owner for this state, and today it has many writers.

Where
Why it matters

When IME state goes wrong, people typing Chinese, Japanese or Korean see a composition that resets or a candidate window in the wrong place. Today a fix means finding every writer. The targets: "the runtime core is non-generic and split into subsystems whose state is private to their modules", with 0 non-private fields on state-owning subsystems. Also, "persistent platform state (IME area, secure input, help regions) is one PlatformState value, and one-shot events (IME reset) are acknowledged requests", with hosts reading no runtime request fields.

What would help
  • Move focus, modal and typeahead state into a Focus subsystem, and IME, caret and selection state into a TextInput subsystem. Give both private fields and methods for what other modules do today: focus a path, push or pop a modal, set the IME area, take a selection change.
  • Hosts read a PlatformState value (IME area, IME allowed, secure input) after each frame. They take an IME reset as an acknowledged one-shot request instead of a mem::take on a field.
  • ime_area is pub, so R0177 gives it an accessor and deprecates the field first.
  • Coordinate with the text-input protocol work so the state moves only once. This issue moves it, and the protocol builds on the new owner.
Done when
  • These fields leave struct Runtime, and the field-count ceiling drops to match.
  • window/platform_sync.rs, window/events.rs and window/create.rs read PlatformState, not rt fields.
  • Focus, modal, typeahead, IME and selection tests pass without changes.
  • Each subsystem has a compile_fail doctest showing that its fields can't be reached from outside its module.
  • A headless test asserts the IME reset request after a focus change, including in a hidden window.
How to check

T1 runs the runtime focus, app_ime, text_keys, select-all and selection API tests, and the window key tests. The field-count and host-read ceilings in the arch ratchet keep the move in place.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 2, milestone 2a · priority P2 · size M
R0180Kit: Markdown parse, stream and table caches are per thread, and two committing windows evict each other's entriesP2Phase 2aMT06
arch-markdown-caches-per-runtime · bug
What happens

Markdown keeps three caches per thread:

  • CACHE holds parsed documents, with a 16 MiB budget.
  • STREAMS holds sources that are still arriving, with a 4 MiB budget.
  • WIDTHS holds table column widths, with a 1 MiB budget.

Each one is a kit Budget. It always keeps "what the last two commits used" and evicts the least recently used of the rest when it is over its byte limit. Here "commit" means rune::commit_generation(), one counter per thread that every window's commit increments. With two windows on a thread, a window that commits at 120 Hz moves the counter two steps in 16.7 ms. An idle window's documents drop out of the protected set after two of the busy window's commits, and they are the first to go when the budget fills.

Streaming has a second problem. CACHE and STREAMS each keep one last source, and a new string takes the incremental path only when it extends last. When two windows stream Markdown at the same time, last alternates between them, so neither one extends it. Each append parses the whole document again.

The broken-image glyph in markdown/image.rs is immutable, so it can stay shared.

Where
Why it matters

An app with a chat window and a second document window pays full parses for Markdown it has already parsed, and a streamed reply in two windows reparses on every token. The targets: "mutable component and runtime memory belongs to the runtime that drew it, has hard limits". Each store "evicts on that runtime's commit generation… and reports bytes", and its gauge reads 0 after its runtime drops. Memory must stay bounded and attributed, and reclaimable bytes must return to baseline within 1 s of a pressure warning.

What would help
  • Move each mutable cache onto a per-runtime service from R0174, in one PR per cache: parse, stream, then table widths.
  • Each service evicts on its own runtime's commit generation, has entry and byte limits, and reports bytes. Keep the current byte budgets as the starting limits.
  • Keep last per runtime, so each window's stream extends its own previous string.
  • List the broken-image glyph as an immutable constant in the thread_local table.
  • The md-same memo results must hold. Compare commit p50 before and after, with paired alternating --profile perf runs.
Done when
  • No mutable thread_local is left in crates/rune-kit/src/markdown/.
  • Two windows that stream Markdown in turn each keep the incremental path: the parse counter shows stream parses from the last block, not whole documents (test).
  • One runtime's commits don't evict another runtime's entries (test).
  • Dropping a runtime frees its caches, and the gauge reads 0.
  • Each cache reports its bytes and holds its entry and byte limits.
  • Commit p50 in the Markdown scenes is within noise of the baseline.
How to check

T1 runs the kit Markdown tests with --features rune-kit/markdown. The arch ratchet's count of kit thread_locals keeps the change in place. The paired perf runs record commit p50.

Depends on
Part of
  • Theme: T06
  • Tracked in R0173
  • Phase 2, milestone 2a · priority P2 · size M
R0181Kit: the 257th scroll area on a thread clears every window's ScrollBar state, including a bar mid-dragP2Phase 2aST06
arch-scroll-bar-per-runtime · bug
What happens

Kit ScrollBar keeps each bar's state in one thread_local HashMap<(u64, String), Rc<Bar>> keyed by (rune::current_runtime_id(), area). That state is the position, the fade, the glide, dragging and paging. When a new area arrives and the map already holds KEPT = 256 entries, kept clears the whole map.

The handlers attached in the last build still hold their Rc<Bar>, so nothing changes at once. On the next build, kept(area) makes a fresh Bar for every area and binds the new handlers to it. Every bar on screen, including one being dragged, loses its position, fade and glide in that commit.

The count covers every window on the thread. One window with many scroll areas, such as a list of code blocks that each scroll sideways, resets the bars in every other window. Entries for a closed window go only when the map is cleared. The key also needs current_runtime_id, which rune exports as #[doc(hidden)] for this one caller, so kit depends on an API that isn't public.

Where
Why it matters

A user dragging a scroll thumb sees it jump back and fade out when content elsewhere passes 256 areas. The targets: scroll containers match CSS and UIKit, with 100% of scroll scenarios passing. "Mutable component and runtime memory belongs to the runtime that drew it, has hard limits, and rune-kit uses only Rune's documented public API." That means 0 per-surface mutable thread_locals and 0 doc(hidden) rune items used by rune-kit. Each store evicts on its own runtime's commit generation, reports bytes, and reads 0 after its runtime drops.

What would help
  • Move bar state into a per-runtime component service from R0174, keyed by area within that runtime.
  • Evict areas that no commit of that runtime has used for a generation, the least recently used first. Never clear the map all at once, and never evict a bar that is dragging or paging.
  • Drop a runtime's entries when the runtime drops. A hidden window keeps its runtime, so it keeps its bars.
  • Keep an entry limit and report bytes.
  • Deprecate current_runtime_id. Remove it from the public re-exports after the deprecation window, with a changelog entry.
Done when
  • scroll_bar.rs has no thread_local.
  • A test with 300 areas across two windows, which rebuilds every frame, keeps a mid-drag bar's state and thumb position.
  • A test shows that eviction in one runtime doesn't touch another runtime's bars.
  • Closing a window drops its entries, and the store's gauge reads 0 after its runtime drops.
  • The map stays within its entry limit.
  • current_runtime_id is deprecated, and rune-kit no longer calls it.
How to check

T1 runs the kit scroll bar tests in crates/rune-kit/src/scroll_bar/tests.rs. The API snapshot shows the deprecation. The arch ratchet's counts of kit thread_locals and doc(hidden) uses keep the change in place.

Depends on
Part of
  • Theme: T06
  • Tracked in R0173
  • Phase 2, milestone 2a · priority P2 · size S
R0182Kit: rune-kit calls doc(hidden) rune items, so a third-party component crate could not do what the kit doesP1Phase 2aST06
arch-kit-public-api-only · refactor
What happens

rune-kit uses six doc(hidden) Rune items at this commit:

  • memo::digest and memo::cached, for Markdown's render cache;
  • current_runtime_id, to key ScrollBar's thread-local map;
  • scroll_watch_state, El::wrap_scroll_area and El::chain_scroll_offset, for ScrollBar's scroll tracking.

doc(hidden) items have no documentation and no stated stability. They can change in any rev without a changelog entry. So the kit depends on internals that an outside crate should not use, and a third-party component crate can't build a Markdown view or a custom scroll bar the way the kit does. The kit can't serve as proof that the public component API is enough.

Where
Why it matters

Authors of component crates hit a wall when they copy a kit pattern, and kit changes can break silently. The targets: "0 doc(hidden) rune items used by rune-kit", and code in the documented style is fast "without hand-written elision", which needs cached and digest as public API. It also supports the identity target that kit components scope their parts by their own id.

What would help

1. Inventory every doc(hidden) Rune item referenced from crates/rune-kit/src, test code included, and record the list in the PR. 2. For each item, promote it to documented API in the snapshot, or remove the use:

  • cached, digest and snapshot become documented through the component module (R0174).
    • current_runtime_id goes away when ScrollBar moves to a per-runtime store (R0181).
    • scroll_watch_state, wrap_scroll_area and chain_scroll_offset either become a documented scroll-watch API that any custom scroll bar can use, or move behind one documented builder. Recommended: a documented API, since third-party scroll bars need the same hooks.

3. Add an arch-ratchet check that fails when rune-kit references a doc(hidden) Rune item, with ceiling 0.

Done when
  • rune-kit references 0 doc(hidden) Rune items.
  • Every promoted item has docs and appears in the API snapshot.
  • The arch-ratchet check runs in T1 with ceiling 0, and has a failing fixture.
How to check

The arch-ratchet doc(hidden)-use counter in T1. The API snapshot diff shows each promoted item.

Depends on
Part of
  • Theme: T06
  • Tracked in R0173
  • Phase 2, milestone 2a · priority P1 · size S
R0183Kit: the syntax highlight cache is per thread with thread-wide evictionP3Phase 2aST06
arch-syntax-cache-per-runtime · refactor
What happens

Highlighter::highlight caches highlighted runs in a thread_local Budget with a 4 MiB budget. Every window and overlay on the thread shares it.

The budget is soft. Budget::evict never drops an entry used in the last two commits, where a commit is counted by rune::commit_generation(). That counter is thread-wide, across all windows. So:

  • Two windows that commit in turn advance the counter for each other. Window A's code blocks can count as old after window B commits twice, and A reshapes them on its next frame.
  • When the visible code is over 4 MiB, the cache holds it all, with no hard limit.
  • When a window closes, its entries stay until other commits push them out. Nothing reports the cache's bytes.
Where
Why it matters

The target: mutable component and runtime memory belongs to the runtime that drew it and has hard limits. There are 0 per-surface mutable thread_locals in rune-kit and rune. Each store lives until its Runtime drops (a hidden window keeps its runtime), evicts on that runtime's commit generation, has hard entry and byte limits, and reports bytes. After a Runtime drops, its store gauge reads 0. A code viewer in one window and a diff in another should not evict each other's highlights.

What would help

Move the cache onto a per-runtime service from R0174:

  • Keyed as today by highlighter id, language and source.
  • Evicts on its own runtime's commit generation.
  • Has a hard byte limit and an entry limit. Entries used in the current commit are kept up to the hard limit, and past it the least recently used go first.
  • Reports its bytes to the memory gauges.

The built-in language list and scanner rules are immutable and can stay process-wide. Only the highlighted runs move.

The same Budget backs the Markdown caches. Those move in their own issues under R0173, and they can share this service shape.

Done when
  • syntax.rs has no thread_local outside tests.
  • Two runtimes on one thread highlight the same code, and commits in one do not evict the other's entries (test).
  • After a runtime drops, its highlight bytes read 0 (test).
  • The cache reports bytes and never exceeds its hard limit (test).
How to check

Kit tests in the merge gate. The thread_local ratchet's rune-kit count drops by one.

Depends on
Part of
  • Theme: T06
  • Tracked in R0173
  • Phase 2, milestone 2a · priority P3 · size S
R0184Text: no test proves that a paragraph-split layout matches the whole-text layout glyph for glyphP1Phase 2aMT08
text-composite-differential · infra
What happens

The composite layout splits a field's text at newlines and lays out each paragraph alone. It is only safe if every reader sees the same geometry as one whole-text layout: lines, runs, glyphs, caret rects, selection boxes and hit tests.

Today the only bit-identity test is the re-break test, which checks that a new width re-breaks without shaping and matches a fresh layout. Nothing compares a paragraph-split layout with a whole-text one.

The research/32 spike found that the naive split is wrong often. Across 384 runs (every re-break case plus Arabic then digits, joined four ways, at 1x and 2x, at four widths), paragraphs laid out alone with their tops summed matched in only 264. Three rules brought it to 384 of 384: every paragraph takes the whole text's base direction, line tops are rounded from the running unrounded total, and under unbounded width each paragraph shifts by the alignment share of the widest paragraph. The spike checked lines, runs, glyphs and pill boxes, not caret rects, selection or hit tests.

Where
Why it matters

The typing target, keystroke p95 at or below 2 ms at 50 KB and at or below 4 ms at 1 MB, needs the composite layout. Caret, selection and deletion must stay correct for bidi, complex scripts, CJK and emoji at 100% of cases. The verification target asks for an obviously correct reference, differential-tested on generated inputs on every merge, with at least 256 cases for editor suites. Here the whole-text layout is the reference.

What would help

A seeded differential harness:

  • It generates documents with right-to-left text, CJK, emoji, pills, blocks, tabs, mixed spans, trailing newlines and empty lines, and widths including unbounded, at 1x and 2x.
  • It also applies edits that split or merge paragraphs, and an IME preedit that crosses a paragraph boundary.
  • It compares line boxes, runs, glyph (id, x, y), caret rects, selection boxes and hit tests between the composite and whole-text layouts, within 1e-3 px.
  • A failure prints the seed and a shrunk repro.

Land it before R0185, against a small test-only composite that stacks per-paragraph layouts with the spike's three rules. The production composite then plugs into the same harness. A mutation check turns off each stacking rule in turn and expects the harness to fail.

Done when
  • 10,000 seeded cases pass in under 60 s in a debug build.
  • Turning off any one of the three stacking rules makes the harness fail.
  • A failure prints a seed and a repro under 200 bytes of text.
  • The harness runs against the production composite once it lands.
How to check

The harness runs in cargo test -p rune on every change. The mutation check runs in the same suite, so a harness that stops catching a broken rule fails.

Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 2, milestone 2a · priority P1 · size M
R0185Text fields: every keystroke reshapes the whole field, 12 ms at 50 KB and 46 ms at 200 KBP1Phase 2aLT08
text-composite-layout · perf
What happens

TextSystem::layout_keyed caches one Parley layout per field under a key from shape_key, which hashes the whole text with its spans, style, scale and pills. Any edit changes the key, so the lookup misses and Parley lays out the whole field again: font selection, text analysis, HarfRust shaping and line breaking. An IME preedit update misses too, because TextEdit::display splices the preedit into a new copy of the whole text. Rich fields take the same path through layout_blocks.

The cost grows with field size. research/27 measured 2.2, 12.0 and 45.7 ms median per typed character at 5, 50 and 200 KB (--profile perf, M4 Pro). research/31 put 83% of a 15.2 ms 50 KB keystroke in HarfRust. The research/32 spike cached one layout per paragraph and reshaped only the edited one: 0.10 ms median and 0.14 ms p95 per keystroke against 15.2 ms and 16.7 ms, and 384 of 384 runs exact under three stacking rules.

Where
Why it matters

At 50 KB a keystroke takes longer than an 8.3 ms frame, so typing in a long note drops frames. The targets: typing, deleting, pasting and preedit updates stay inside one 120 Hz frame up to 1 MB, plain and rich, with AccessKit on; keystroke p95 at or below 2 ms at 50 KB and at or below 4 ms at 1 MB; a 100 KB paste and a select-all delete at 1 MB each at or below 8 ms; bytes shaped per keystroke at most the reshaped paragraph plus 1 KB. The performance target is stricter at small sizes: p95 at or below 1 ms at 50 KB and 2 ms at 200 KB.

What would help

Add text/composite/:

  • Split the text at newlines and cache each paragraph's Parley layout under its own shape key, marks and pills included.
  • Keep a (byte_start, y_top, line_start) prefix index in a balanced tree, so an edit updates O(log n) nodes plus the paragraphs it touches.
  • Serve caret, hit testing, selection boxes, decorations, elision, IME rects, the glyph walk and accessibility runs through one TextLayout facade. About 20 non-test files read Layout<Ink> today.
  • Build in the spike's three stacking rules: whole-text base direction, line tops rounded from the running unrounded total, and the alignment shift under unbounded width.
  • Drop or charge an edited paragraph's superseded layout by its heap, so stale copies don't pile up.

Turn it on above 4 KB first, and make it the default after R0184 has run clean for a release. Parley stays, and TextEdit.text stays a String. A single long paragraph still reshapes whole, and the whole-text copies per keystroke remain; both are tracked under R0706.

Done when
  • long_note type_mid and preedit, plain and rich, with AccessKit on: p95 at or below 2 ms at 50 KB and 4 ms at 1 MB (--profile perf, reserved Mac).
  • p95 at or below 1 ms at 50 KB and 2 ms at 200 KB.
  • A 100 KB paste and a select-all delete at 1 MB each at or below 8 ms p95.
  • A keystroke or preedit update shapes at most the edited paragraph plus 1 KB and touches O(log n) index nodes (count test).
  • R0184 passes on every change.
How to check

long_note cases from R0109, recorded in research/27. The differential harness and a bytes-shaped count test in cargo test -p rune.

Depends on
Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 2, milestone 2a · priority P1 · size L
R0186Text fields: undo keeps 2 steps at 200 KB and none above about 512 KB, because every step stores two full copies of the textP1Phase 2aMT08
text-delta-undo · perf
What happens

Each undo step (Change) holds a before and an after Snapshot. Each snapshot holds the whole text plus full copies of the mark, block and soft-break vectors. Change::bytes counts both copies against a 1 MiB history budget, with at most 128 steps. So depth is about 1 MiB / (2 x text size).

The long-note bench kept 53, 9 and 2 of 100 small pastes at 5, 50 and 200 KB. Above about 512 KB, one step is larger than the whole budget. The trim loop drops it as soon as it is recorded. Typing in a large document then records no undo at all, and nothing warns.

Recording also costs time in proportion to the history. text_input clones the TextEdit into the node tree, so the Arc<History> has a second owner. Arc::make_mut then copies the whole container, with every step's mark, block and soft-break vectors, on each recorded edit. Undo and redo check that a step still applies by comparing the full text.

Where
Why it matters

A notes app user pastes twice into a 200 KB note and Cmd+Z can no longer reach the text from before. At 1 MB, Cmd+Z does nothing. The target is that undo keeps its full depth on large documents: 100 of 100 steps kept at 1 MB, with history bytes per step at most 2x (changed text bytes + 32 B per changed formatting record) + 256 B. Undo and redo should also work up to 5 MB.

What would help
  • Store each change as (range, removed text, inserted text), plus deltas of the marks, blocks and soft breaks it touched, and the selection before and after. Coalesced typing extends the last delta.
  • On undo and redo, check the document by length plus a 64-bit content hash, not a full compare. Take the hash from the per-commit content check in R0187, so undo adds no whole-text scan. Drop a stale history, as today.
  • The byte budget counts delta bytes only.
  • Removed and inserted text stay Zeroizing. Secure fields keep no history, as today.
  • Stop recording from copying existing steps. Recommended: the node's copy of the edit carries an empty history, since drawing never reads it. The other option is one Arc per step, but that still copies a pointer per step.
Done when
  • undo_depth keeps 100 of 100 steps at 200 KB and at 1 MB.
  • Undo and redo work on a 5 MB field.
  • History bytes per step are at most 2x (changed text bytes + 32 B per changed formatting record) + 256 B (test).
  • Recording an edit with 100 steps in history allocates nothing per existing step (alloc test).
  • Undoing a paste in a 1 MB field takes at most 1 ms.
  • A seeded random edit, undo and redo round trip, with marks, blocks and soft breaks, returns identical documents.
  • A direct write to TextEdit.text still drops the stale history, and a secure field records nothing (tests).
  • The existing undo-group tests pass.
How to check

Edit unit tests and an alloc test in cargo test -p rune. The long-note bench's undo_depth case at 200 KB, 1 MB and 5 MB under --profile perf, with the larger sizes from R0109.

Depends on
Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 2, milestone 2a · priority P1 · size M
R0187TextEdit: a same-length write through the public text field keeps its pointer, length and capacity, so caches keyed on them miss the changeP1Phase 2aMT08
text-edit-change-detection · refactor
What happens

TextEdit.text is a public String. An app can assign it, push to it or call replace_range on it without going through a TextEdit method. Rune copes today by treating the text as unknown on every pass:

  • text_input clones the edit and runs sync_invariants on every build, because an app may have assigned the text directly.
  • The runtime clones the text before each key when the field has a change handler, and compares it afterwards.
  • The Hash impl, which memo versions use, hashes the whole text.
  • Undo compares full snapshots and full texts.

The planned copy removal in R0188 and the kit field migration both need a cheap way to know the text changed. A key made of the string's pointer, length and capacity is cheap, but it misses an equal-length replace_range. Replacing "cat" with "dog" in place keeps all three values. A layout, display, accessibility or undo cache keyed on them would then serve stale text. If each issue builds its own revision and its own check, the two can disagree.

Where
Why it matters

Apps that write edit.text directly must keep working, and caches must stay correct. The targets: text fields meet their behavioural contracts, with a passing test in rune and in kit TextInput, TextArea and TextField where each applies. Code in the documented style is fast without hand-written elision, and "the sampled cache differential check finds 0 stale hits across kit-gallery and the feed scene".

What would help

One owner for change detection, which the other issues read:

  • A private revision: u64 that every mutating method bumps.
  • A cached 64-bit content hash, recomputed once per revision. Never key anything on pointer, length or capacity.
  • Once per commit, a field whose revision did not move is hashed and compared with the last value. This is the one whole-text scan allowed per commit. A mismatch counts as a direct write: bump the revision and run sync_invariants then, not on every build.
  • Layout, display(), accessibility, memo Hash and undo validation read the revision and hash.
  • One Rc display snapshot shared by text_input, the focused-layout path, accessibility and the kit fields. A secure field keeps one copy, zeroed on replace.
Done when
  • An equal-length replace_range on text invalidates layout, display, accessibility and undo (test).
  • A direct write between two builds is seen at the next commit (test).
  • Selection-only and preedit-only changes redraw without a text rehash (test).
  • Two editors with equal revision, length and caret but different text get different Hash values (test).
  • An unchanged 200 KB field copies no text and scans it at most once per commit (count test).
  • A secure field holds one copy of its text, zeroed on replace (test).
How to check

Unit tests in crates/rune/src/edit and a count test in the T1 count budgets that tracks text copies and scans per commit.

Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 2, milestone 2a · priority P1 · size M
R0188Text fields: one keystroke copies, compares or scans the whole text about eight times outside shapingP1Phase 2aMT08
text-keystroke-copies · perf
What happens

Apart from shaping, one keystroke in a multi-line field makes these whole-text passes:

1. text_input clones the TextEdit, runs sync_invariants (a newline count over the text) and copies the text through display(). 2. Before each key, focused_layout clones the node's TextSpec and builds display() again. 3. With a change handler, the runtime clones the text before the key and compares it afterwards. 4. replace takes a full snapshot before the edit and record_change takes another after it. It then compares the two, and compares the text with the last step's. 5. The Hash impl hashes the full text for memo versions. 6. Backspace calls line_of_byte and line_range, which scan from byte 0. 7. Accessibility copies the display text once per line, inside its per-line loop, so it grows with lines x size. 8. Kit's TextInput::new clones the edit once more.

research/27 measured this per-commit work, outside shaping, at about 0.3 ms at 200 KB. It grows with the text, and it stays after composite layout removes the reshape.

Where
Why it matters

With R0185 done, these copies become the cost that grows with the field. The target: typing stays inside one 120 Hz frame up to 1 MB, "keystroke p95 at or below 4 ms at 1 MB, plain and rich, with AccessKit on", and "at most one whole-text copy and one whole-text scan per keystroke". With a screen reader on, a keystroke at 200 KB should cost at most 0.3 ms extra.

What would help

The revision, the per-commit content check and the shared snapshot belong to R0187. This issue removes the copies by reading them:

  • text_input and the kit builders hold the shared snapshot instead of a clone. sync_invariants runs only when the content check finds a direct write.
  • focused_layout reuses the node's layout when its revision matches, with no spec clone or display().
  • Change-handler detection compares revisions, not a cloned string.
  • Until R0186 lands, skip the before snapshot when typing coalesces into the last step.
  • Cache the line index by revision for Backspace and block lookups.
  • Accessibility slices the shared snapshot per line.
  • Memo Hash reads the cached content hash.

Do not key any of this on the string's pointer, length and capacity. An equal-length replace_range keeps all three.

Done when
  • At 1 MB, a keystroke makes at most one whole-text copy and one whole-text scan (count budget).
  • Non-shaping CPU per keystroke at 1 MB is at most 0.5 ms (long_note, reserved Mac, --profile perf).
  • Assigning edit.text directly, or an equal-length replace_range, is still seen (tests).
  • Accessibility copies no text per line (count test).
  • Kit TextInput holds no second copy of a secure field's text.
How to check

The copy and scan counters from R0159, run in T1. long_note type_mid at 1 MB with AccessKit on, from R0109.

Depends on
Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 2, milestone 2a · priority P1 · size M
R0189macOS: no lane types into a Rune field with a real input method, so RuneTextView would become the default on replay tests aloneP1Phase 2aMT09
text-ime-lane-macos · infra
What happens

The plan moves macOS text input from winit's view to a Rune-owned RuneTextView, and makes it the default after a phase-2 soak. Today no lane types into a Rune field with a real input method on any platform. The repo's workflows build only the site, and the macOS GUI tests run only when someone sets RUNE_GUI_TESTS=1 by hand. The first real-IME lane in the plan arrives in phase 3.

Replay fixtures check what Rune does with a recorded call sequence. They cannot show that the candidate window, the responder chain, the menu bar and key equivalents work together when a real Kotoeri or Pinyin session drives them, in a normal window and in a non-activating panel. Flipping the default on replay results alone would ship those gaps to every macOS app.

Where
Why it matters

Japanese, Chinese, Korean and Vietnamese users on macOS are the first to notice a broken candidate window or a swallowed shortcut. The target asks for "100% of real-IME lane scenarios" passing "on the lane at each release cut", "the candidate window within 2 pt where the OS places it at the anchor", and text input that works "in windows, overlays, panels and mobile views".

What would help

The macOS part of the real-IME lanes, brought forward to phase 2. The Windows and Linux lanes reuse its harness later.

1. On the self-hosted Mac from R0061, select input sources with TISSelectInputSource: Kotoeri, Pinyin, Zhuyin, 2-Set Korean and Telex. 2. Post key events with CGEventPost into a Rune field in a normal window and in a non-activating panel, at 100, 125, 150 and 200% scale. 3. Run every macOS scenario from R0114 that applies, through both the winit view and RuneTextView, plus the existing menu and shortcut tests. 4. Measure the candidate window's frame against the caret rect Rune reports. 5. Record each run with RUNE_IME_RECORD, so a failure becomes a committed fixture. 6. Run on every push to dev, never on pull_request, since the runner is self-hosted.

Making RuneTextView the default is a separate change, gated on 14 consecutive days of green runs of this lane.

Done when
  • The lane runs on every push to dev, and never on pull_request.
  • Every macOS text-input scenario passes in a window and in a non-activating panel, at all four scales, for both paths.
  • The menu and shortcut tests pass unchanged with each path.
  • The candidate window sits within 2 pt of the caret in every scenario that opens one.
  • A failing scenario uploads its recording, and the fix PR commits it as a fixture.
  • Pinned macOS and input method versions are listed in the lane's README.
How to check

The lane is the check. Its daily pass record is what the default switch reads. A deliberately broken caret rect in a test branch must turn the lane red.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2a · priority P1 · size M
R0190Web: the textarea bridge has its own composition rules, separate from the desktop IME pathP1Phase 2aMT09
text-ime-web-adapter · refactor
What happens

Two code paths decide how a composition edits a field.

On the desktops, Runtime::ime queues an Ime event and TextEdit::ime applies it. A preedit replaces the field's composition. A commit inserts at the caret. Every event breaks the undo group. There is no replacement range and no check that the event belongs to the text it was computed from.

On the web, Runtime::web_edit takes the bridge's message. It checks the field key, a byte base and an expected snapshot, maps UTF-16 offsets into that window, sets the selection to the replacement range, and inserts the text or sets it as a preedit. The web preedit always puts its cursor at the end of the composition, so an input method's caret inside the preedit is lost. Mirror keeps the 512-unit context window the bridge sees.

So a fix to composition or replacement rules lands in one path and not the other. The web has stale-request checks that the desktops lack, and the desktops keep the composition caret that the web drops.

Where
Why it matters

Web users get composition rules that drift from the desktops, and a fix on one side does not reach the other. The targets: "100% of the scenarios that apply to each adapter pass headless", with the web textarea named, and "no sequence of input-method events, app edits, focus changes and window events loses, duplicates or misplaces text". Text input should also cost "at most 4,096 units per query" and "under 1 ms per query", and the web build should be "a first-class target in every browser engine".

What would help
  • Rebuild Mirror and web_edit on R0113. The field key and snapshot become the protocol's field id and revision. Edit and preedit messages become insert and set_marked with a replacement range, and the preedit keeps the input method's selection.
  • Keep bridge.js as DOM behaviour only: it turns DOM events into protocol calls, and keeps its focus handling and the password sink.
  • Leave runtime/web/runtime.rs with DOM translation and no editing rules.
  • Run the same replay scenarios from R0114 through the web adapter.
  • Keep #165's fix in mind. Moving focus code must not undo it.
Done when
How to check

The replay tests in T1 run each scenario on the web adapter. The web smoke runs in the browser lane from R0380. The #165 check runs on the iOS Safari lane.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2a · priority P1 · size M
R0191Text input: an app-drawn editor (El::ime_cursor) gets only Preedit and Commit, with no way to answer for its own documentP1Phase 2aMT09
text-input-app-editor-client · feature
What happens

An app that draws its own editor, such as a code editor or a terminal, marks its caret with El::ime_cursor and hears the input method through App::on_ime. The window then turns the input method on, places the candidate window at that element's rect, and hands the editor Ime::Preedit, Ime::Commit, Ime::Enabled and Ime::Disabled.

That is all it gets. The editor cannot answer for its own document. The input method cannot ask it for the selected range, the text around the caret or a rect for a range, and it cannot replace a range. So in a Rune code editor, reconversion, press-and-hold over existing text, emoji replacement of a selection and dictation that edits a selection do not work. Once R0113 lands, TextEdit fields will answer those queries, and app-drawn editors would still be left on the four-event stream.

Where
Why it matters

Editors and terminals are the apps where input methods get the hardest use. The target names them: every input method talks to a Rune-owned document protocol "in windows, overlays, palettes and app-drawn editors (El::ime_cursor)". It requires that "100% of the scenarios that apply to each adapter pass headless", with app-drawn editors named. Text input should use "each platform's own protocol" in "100% of cases on every adapter and host type".

What would help
  • Make the protocol's client side public. Use a #[non_exhaustive] trait or a struct of hooks, so new queries can be added later without breaking apps. It covers selected and marked ranges, text_in for a range, set_marked, insert with a replacement range, first_rect, index_at, and purpose.
  • Register it with one builder call, in the on_ime style, for example App::text_client(fn(&mut S) -> Option<&mut dyn TextInputClient>). The runtime calls it while an El::ime_cursor element is drawn and no field has focus.
  • Every adapter (macOS, TSF, Wayland, X11, web) serves an app client the same way it serves TextEdit. Clamp reads to 4,096 units on the runtime side, so an app's client cannot exceed the limit.
  • Keep on_ime working for editors that do not register a client. Write a changelog fragment for the new API.
  • Ship a small sample editor in examples/ that implements the client over its own buffer.
Done when
  • An app registers a client with one builder call, and no existing App literal or on_ime user breaks.
  • The replay scenarios run against the sample editor and pass on every adapter they apply to.
  • Reconversion and replacement-range insertion reach the sample editor in a replay test.
  • A client that returns more than 4,096 units has its answer clamped at the runtime, checked by a test.
  • Docs for El::ime_cursor and App::on_ime point to the new client.
How to check

The replay suite from R0114 gets a sample-editor target in T1. The real-IME lanes (R0189, R0572) add one sample-editor scenario per platform.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2a · priority P1 · size M
R0192Text fields: a composition draws one underline under the whole preedit, with no clause or selected-clause stylingP2Phase 2aMT09
text-ime-clause-styling · feature
What happens

While a field is composing, paint draws one rect under each box of the preedit. The rect is scale device pixels tall, about 1 pt, and has the field's text colour. Ime::Preedit carries only the preedit string and one cursor range, so there is nothing else to draw.

Japanese and Chinese input methods split a composition into clauses. They mark the clause being converted with a thick underline and the other clauses with a thin one. macOS passes these as underline attributes on the marked text. IMM32 and TSF pass them as display attributes. That is how a user sees which clause the candidate list and the arrow keys will change. Rune drops all of it. A long Japanese composition reads as one underlined run, with no clue which part is being converted.

Where
Why it matters

Anyone who converts Japanese or Chinese text clause by clause notices. They cannot tell which clause they are changing, so they convert the wrong one and have to back up. The target says the protocol has "clause attributes", and that "composition ends as the platform's native field ends it".

What would help
  • set_marked in R0113 carries a list of clauses. Each clause has a UTF-16 range, a style (thin, thick or dotted) and a selected flag.
  • Paint draws one underline per clause in the field's text colour, with a small gap between clauses, as NSTextView does. Thin is 1 pt and thick is 2 pt. Snap both to device pixels.
  • Each adapter maps its platform's attributes: underline style and the marked selection on macOS, display attributes on TSF and IMM32, textformatupdate on EditContext.
  • The winit path, while it exists, sends one clause for the whole preedit, as today, because winit gives no clause data.
Done when
  • A three-clause composition draws three underlines with gaps, and the selected clause is thick (snapshot test).
  • At 2x, thin and thick underlines are 1 pt and 2 pt, within 0.5 pt of NSTextView's widths.
  • The ja and zh replay scenarios assert the clause list each adapter delivers.
  • The winit path still draws one underline under the whole preedit.
How to check

The snapshot test and the replay tests run in T1. A native comparison fixture records NSTextView's underline widths at 2x for the same composition. R0189 adds one real Kotoeri multi-clause scenario.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2a · priority P2 · size M
R0193macOS: winit's view answers NSTextInputClient, so press-and-hold, reconversion and emoji replacement have no document contextP1Phase 2aLT09
text-ime-macos-view · feature
What happens

On macOS every key and input-method event reaches Rune through winit's WinitView. Its NSTextInputClient methods know nothing of the field. In winit 0.30.13, the version in Cargo.lock, selectedRange always answers {NSNotFound, 0}, attributedSubstringForProposedRange:actualRange: answers nil, and validAttributesForMarkedText answers an empty array (winit's src/platform_impl/macos/view.rs). Rune then sees four events, Preedit, Commit, Enabled and Disabled, and hands winit one caret rect per frame.

So the input system can never read the text around the caret or replace a range. Press-and-hold accents, Kotoeri reconversion of committed text, emoji-picker replacement of a selection, dictation that edits a selection, and Look Up (Ctrl-Cmd-D) all need that. Rune also depends on winit's private view class already: the menu code finds WinitView by name to send key equivalents and to commit marked text.

Where
Why it matters

The Mac is the lead platform. Anyone typing Japanese or Chinese, accented Latin by press-and-hold, or by dictation notices. The targets: every input method "talks to a Rune-owned document protocol", the anchor rect is "within 1 pt of the caret rect at 100%, 125%, 150% and 200%", and the candidate window is within 2 pt. Text input uses "each platform's own protocol in windows, overlays, panels", with "at most 4,096 units per query" and "under 1 ms per query". The services matrix needs dictation, the emoji picker with replacement and Look Up.

What would help
  • Add RuneTextView, an NSView inside winit's content view, in windows and in non-activating overlay panels. It is first responder while a Rune field or an El::ime_cursor surface has the keyboard.
  • Implement against R0113: insertText:replacementRange:, setMarkedText:selectedRange:replacementRange:, unmarkText, selectedRange, markedRange, attributedSubstringForProposedRange:actualRange:, validAttributesForMarkedText, firstRectForCharacterRange:actualRange: and characterIndexForPoint:. Pass marked-text attributes on as clauses for R0192.
  • Map doCommandBySelector: to Rune edit commands after the app's keymap, so DefaultKeyBinding.dict bindings work. Forward other keys into the existing key path, and keep menu key equivalents working.
  • Reuse the focus and secure-input handling of R0115 in panels.
  • Fail closed: if winit's view class is missing or changes, stay on the winit path and log once.
  • Opt in. The records name RUNE_TEXT_VIEW=1 and RUNE_TEXT_INPUT=winit|native. Use RUNE_TEXT_INPUT, so later adapters share one switch, plus an App builder method and a changelog fragment. The default flip is R0381. AutoFill is R0574.
Done when
  • Press-and-hold e, then é, replaces the e.
  • Kotoeri reconverts committed text.
  • The emoji picker opens within 2 pt of first_rect and replaces a selection.
  • Dictation inserts at the caret and can replace a selection.
  • Look Up shows the word under the caret at its rect.
  • A field in a non-activating panel composes Japanese through the view.
  • No query returns more than 4,096 UTF-16 units.
  • Menu key-equivalent and shortcut tests pass unchanged with the view on.
  • The macOS replay scenarios pass through the view's methods, and the winit path still passes with the switch off.
How to check

Replay tests in T1 call the view's methods as AppKit does. The macOS GUI tests run automatically once R0061 lands. R0189 types into the view with real input methods.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2a · priority P1 · size L
R0194Hosts: window, overlay, web, LayerHost and headless each drive their own frame, so a fix lands in one host and not the othersP1Phase 2aXLT11
arch-surface-host · tracking
What happens

FrameClock is shared, but each host drives its own frame. The window, overlay, web and LayerHost hosts each call FrameClock::advance and repeat the work around it: acquire, retry, configure, the quiet-frame check, marks, report frames, wake and present. The desktop tool and the headless runner step through Runtime::frame directly.

So each fix reaches some hosts and not others. The quiet skip exists only in the window and overlay hosts, so the web and LayerHost hosts present every requested frame (#166). Effect marks are missing in overlays and on the web (#167). A visible window runs poll and due timers only from a redraw it requests, so a surface that gets no frame callbacks stops the app's work (#139). LayerHost reconfigures directly on Outdated or Lost. Moving all hosts onto one core takes one issue per host, because each host's drop order and event source differ.

Where
Why it matters

The target is one shared frame core. 0 frame call sites outside it, and every host is a thin adapter. Every side effect is a typed request on one queue, and hosts read no runtime request fields. The default macOS shell has 1 shared SurfaceHost. Zero cost at rest on every host. iOS and the web get every frame-core fix without a port of their own.

What would help

Build SurfaceHost on FrameClock. It owns admission, the quiet skip, acquire with backoff, checked configure, device-loss hooks, marks, report frames, wake, HostRequest dispatch, telemetry stamps and the present strategy. Each host implements a small Backing trait that declares its capabilities. The sources disagree on port order. Recommended: LayerHost first (in the core issue), then web, overlay, window, desktop and headless. That order goes from the smallest loop to the largest. Port one host per PR, with drop order encoded in Backing tests.

Done when
  • All child issues are closed.
  • 0 non-test calls to FrameClock::advance, Runtime::frame or frame_split outside the core.
  • Hosts read 0 runtime request or platform fields.
  • The parity suite passes for every Backing in the idle, live-change, starved-callback, refused, Lost and hidden scenarios, and in #204's scroll scenario.
How to check

Architecture ratchet counters for frame call sites and host reads. Parity tests in the required check. Web and Wayland scenarios on the GUI lanes.

Issues
Part of
  • Theme: T11
  • Phase 2, milestone 2a · priority P1 · size XL
R0195Hosts: there is no shared frame core or Backing trait for a host to implementP1Phase 2aLT11
arch-frame-driver-core · refactor
What happens

FrameClock is shared, but quiet skip, report frames, wake computation, miss handling and marks setup are written inside each host. The window's draw path alone is about 250 lines. The overlay and LayerHost each repeat parts of it.

Wake depends on frame delivery. When a timer is due and a visible window does not rest, the host calls request_redraw(), and poll and due timers run only from that frame. On Wayland, winit holds RedrawRequested until the compositor sends a frame callback, and Mutter sends none to a covered surface. So poll and timers stop, and the deadline loop spins a core at 100% (#139). A new host, such as the iOS shell, would copy this logic a fifth time.

Where
Why it matters

The target is one shared frame core that every host drives frames, wakes, misses and request dispatch through. Quiet skip, track_marks, report frames, wake computation and Lost or Outdated handling live in the core. With no frame callbacks for 10 s, poll and every due timer run within 1 timer period plus 16 ms. LayerHost exposes next_wake, and an embedder test checks that it is honoured. Zero cost at rest on every host. iOS shell work waits on this issue's LayerHost port.

What would help
  • Add frame::SurfaceHost<B: Backing> on top of FrameClock. Backing provides acquire, present, checked configure, size and scale, capabilities (frame-callback source, occlusion, present worker), and apply(HostRequest). Rename the overlay's private enum Backing (to OverlaySurface, say) so the names don't clash.
  • The core runs admission, the quiet skip, marks, report frames, miss and backoff handling, and wake.
  • Wake runs poll and due timers from the timer itself, and asks for a frame only when visible state changed. This fixes the wake half of #139.
  • Stamp R0121 from the core, so stamps come from one place.
  • Add a headless fake Backing and the parity-suite harness.
  • Port LayerHost first. Keep its CADisplayLink driving and its drop order. Add LayerHost::next_wake() without adding a pub field to EmbedFrame.
Done when
  • SurfaceHost and Backing exist with a headless fake.
  • LayerHost uses them and gains the quiet skip.
  • With a fake Backing that delivers no frame callbacks for 10 s, poll and due timers run within one timer period plus 16 ms.
  • Tests on both LayerHost and the fake show that marks align with instances, report frames fire, and a missed acquire backs off.
  • An embedder test shows next_wake is honoured.
  • The count of FrameClock::advance calls outside the core drops by 1.
How to check

Parity and starvation tests run in the required check (R0030). The frame-call-site ceiling in the architecture ratchet goes down with each port.

Depends on
Part of
  • Theme: T11
  • Tracked in R0194
  • Phase 2, milestone 2a · priority P1 · size L
R0196Hosts: clipboard, URL, shell and drag-out requests reach hosts as runtime fields that each host takes for itselfP1Phase 2aMT11
arch-host-request-queue · refactor
What happens

Side effects the runtime asks of the OS are pub or pub(crate) fields on Runtime: copy_request, paste_request, read_requests, shell_request, url_requests and the drag-out start. Each host polls them and takes them with mem::take or take(), at its own points. You can inspect each field alone, but there is no single ordered stream to assert, and a host can forget one. In a live run, open_url calls the OS from runtime code, and it queues requests only in headless runs.

Windowless and hidden-window wakes already flush the clipboard and handle shell requests without drawing. So a drain that runs only on frames would break them.

Where
Why it matters

The target: every side effect the runtime asks of the OS is a typed request on one queue, dispatched at defined safe points, with 0 sites where hosts read runtime request fields. Requests are drained after every event and timer callback, whether or not a frame is presented. Side effects are FIFO, and only idempotent state coalesces. A host that cannot serve a kind returns Unsupported. Headless tests assert request streams. The goal is also for Rune to own its shell seam. A new platform should implement one apply(HostRequest), not find six fields.

What would help
  • Add a HostRequest enum. SurfaceHost (R0195) drains it after every event and timer callback, whether or not a frame is presented.
  • Side-effect requests are FIFO. Only idempotent state (title, cursor) may coalesce to the latest.
  • A host that cannot serve a kind returns a typed Unsupported result to the requester.
  • Add a headless recorder that logs requests for tests and --trace.
  • Migrate four kinds, one PR each: Clipboard, OpenUrl, Shell and DragOut. Build on R0178, which moves drag-out and clipboard out of flat fields.
  • Keep timing where the platform needs it. Synchronous macOS clipboard reads keep their call time, and web URL opens keep user activation.
  • Window frame, title, popup, file-dialog and IME state follow in R0200.
Done when
  • HostRequest exists, and the four kinds reach every host through it.
  • Headless tests assert the request streams for copy, paste, open_url and drag-out, in order.
  • A test shows a hidden window serves a copy request with no frame presented.
  • A test on the fake Backing shows an unsupported kind returns Unsupported.
  • --trace logs HostRequest values.
  • The host-read count in the architecture ratchet falls by the migrated sites.
How to check

T1 headless tests in the required check, and the ratchet's host-read ceiling, which only goes down.

Depends on
Part of
  • Theme: T11
  • Tracked in R0194
  • Phase 2, milestone 2a · priority P1 · size M
R0197Headless: the script runner steps frames in its own loop, outside the shared frame coreP1Phase 2aMT11
arch-surfacehost-headless · refactor
What happens

The headless runner steps every scripted frame itself. Each frame it takes the runtime's requests, starts or steps a window-frame animation, calls rt.frame(step) with a fixed virtual dt, and opens popups headlessly. The headless desktop runner has its own copy of the shell-request loop and calls rt.frame(dt) from advance. The hot runner calls advance_by. None of them goes through FrameClock::advance or any shared code that decides when a frame runs, what it skips and when the next one is due.

R0195 adds that shared core and a Backing trait, and its siblings port the window, overlay, web and LayerHost hosts. R0165 merges the headless runners into one driver, but leaves the frame core out of scope. So after both land, headless would be the one host with its own frame step. The parity suite could not run against it, and a fix to quiet skip, wake computation or request dispatch would land in the GPU hosts and not in the runner that tests, goldens and motion traces use.

Where
Why it matters

Headless runs are how Rune's own tests, goldens and motion audits see a frame. If headless steps frames differently from a window, a headless pass says little about the window. The target is that every host, headless included, "drives frames, wakes, misses and request dispatch through one shared frame core", with 0 such call sites outside it, and that "the parity suite passes for every Backing" in idle, live change, starved callback, refused, Lost and hidden scenarios. The headless harness should also be one driver, where 100% of the about 35 script event kinds give equal per-window results in single-window, --desktop and session runs.

What would help
  • Add a virtual-clock Backing for the headless host. Acquire hands out the offscreen target, or nothing when no PNG or video is wanted. Present records the frame target as the present time. The refresh period comes from the script's frame rate.
  • Drive each scripted frame through SurfaceHost, so FrameClock::advance replaces the runner's rt.frame(step). With targets exactly one period apart, check that split gives the same dt and no catch-up, so traces stay byte-identical. If it does not, give the virtual Backing an explicit fixed-step mode rather than changing split.
  • Serve popups, file-dialog refusals and window-frame requests from the core's request drain, not from the runner.
  • Let the virtual Backing inject a refused configure, a Lost surface and a hidden window, so the parity scenarios run headless.
  • Remove the runner's own frame step.
Done when
  • The headless runner drives frames through SurfaceHost with a virtual-clock Backing, and tooling/headless.rs calls neither Runtime::frame nor frame_split itself.
  • The frame-driver call-site ratchet counts headless, and its ceiling is 0.
  • The Backing parity suite passes for headless in the idle, timer, frame-request, refused-configure, Lost and hidden scenarios.
  • Motion traces, PNG goldens and video frames from every in-repo script are byte-identical before and after.
How to check
  • The Backing parity suite and the arch-ratchet frame-driver counter run in T1.
  • Before merging, run every in-repo headless script and every scripts/motion-audit scenario at the parent rev and at the change, and diff traces and images byte for byte.
Depends on
Part of
  • Theme: T11
  • Tracked in R0194
  • Phase 2, milestone 2a · priority P1 · size M
R0198Web: the browser host keeps its own frame loop beside the shared coreP1Phase 2aMT11
arch-surfacehost-web · refactor
What happens

The web host runs its whole frame inside its RedrawRequested arm. It advances the clock itself, applies title and frame requests, flushes the clipboard, cancels popups, refuses file dialogs, acquires a canvas texture, renders, submits and presents. Every requested frame acquires and submits, even when it draws what is already on the canvas. The native window has a quiet skip for that case (Presented::unchanged); the web host has nothing like it. It also never sets track_marks, so a web compositor reads empty marks (#167).

A live value change costs two frames. frame_step samples a value the poll published but keeps its wake ("a picture may still need next frame's layout"). The web host then sees live_pending() and asks for another frame, which draws the same thing. #166 measured 60 draws a second in Chrome where about 47 were expected, and 50 to 60 where 25 were expected with both sprites on one 40 ms clock. On an iPhone, an app at rest drew 29.9 frames a second, with 59.8 rAF calls and 64 ms of frame CPU a second. Nothing recorded why those frames were asked for.

R0123 and R0126 give web the marks and the quiet skip as phase-1 fixes. This issue moves the web host onto the shared core, so those features come from one place and do not drift.

Where
Why it matters

A phone tab that draws 30 frames a second at rest drains the battery while the app looks still. The targets: every host drives frames "through one shared frame core", with 0 frame-driver call sites outside it; "0 presents, 0 submissions, 0 unrequested Rune thread wakes, CPU <= 0.1% of one core, on every host and platform"; and the web build passes every engine "with 0 submits at rest".

What would help
  • A WebBacking: rAF drives frames, acquire is get_current_texture, present is queue.present. The core owns the clock, quiet skip, track_marks, wake computation and request dispatch. Remove the host's own clock.advance.
  • Spend the retained live wake once its value is sampled, unless a picture sizes itself from its image (has_pixel_aspect), as #166 suggests.
  • Log the reason for each frame request (input, live value, timer, animation, compositor, resize) behind a debug flag. Do this first, so the iPhone rest case in #166 can be traced before the port changes behaviour.
Done when
  • The web host has no clock.advance or Runtime::frame call of its own.
  • An idle web app presents 0 frames a second in the web smoke test in every engine the lane runs.
  • A visible live value change draws at most one frame per change in the #166 two-sprite scene.
  • A web compositor reads marks aligned index-for-index with instances.
  • Frame-request reasons can be logged, and the iPhone rest case is either explained or filed with a log.
  • The Backing parity suite passes for WebBacking.
How to check
  • scripts/web-smoke.mjs counts submits and rAF calls at rest, and a new case counts frames per live value change.
  • The parity suite runs WebBacking against the fake Backing in T1.
  • A web compositor test asserts marks per instance.
Depends on
Part of
  • Theme: T11
  • Tracked in R0194
  • Phase 2, milestone 2a · priority P1 · size M
R0199Platform: hosts and the runtime talk in winit types, and the public PhysicalKeyCode is winit's KeyCodeP1Phase 2aLT11
platform-shell-event-seam · refactor
What happens

The boundary between hosts and the runtime is written in winit types. AnyHost takes winit's ActiveEventLoop, WindowEvent and WindowId. The input-time scope classifies a winit::event::WindowEvent. The runtime's wheel path takes winit::event::MouseScrollDelta. The layer-shell host, which has no winit window, still builds keys through winit's scancode extension. Across crates/rune/src, about 390 lines in 86 files name winit.

Two winit types are public API. PhysicalKeyCode is winit::keyboard::KeyCode re-exported, so a winit change becomes an app-facing break. raw_window_handle is re-exported through winit's path, and WindowHandle::with_raw_handle names it. Winit is a caret dependency (0.30.13).

This matters for every shell Rune wants to own: macOS panels, UIKit through LayerHost, a winit-free web adapter. Each would need to depend on winit to produce keys and events, or rewrite every host.

Where
Why it matters

Apps pin dev revs. A winit upgrade that renames a key today breaks app builds through a Rune type. The target is that "Rune owns its shell seam: no out-of-band hook into winit goes unchecked", with one shared SurfaceHost. The frame core work also needs a host boundary that is not winit's, so that "every host drives frames, wakes, misses and request dispatch through one shared frame core".

What would help
  • Define rune::shell::Event: pointer and wheel with phase and OS timestamp, keys with a Rune KeyCode, text-input calls, focus, scale, occlusion, theme and lifecycle.
  • Translate winit events in one module per backend. Move scroll/x.rs's winit use and the input-time classification into those translators.
  • Replace the PhysicalKeyCode alias with a Rune enum that keeps the same variant names, with the winit conversion pub(crate).
  • Re-export raw-window-handle 0.6 from that crate directly. Its types are the same, so nothing breaks.
  • Move one host per PR.
  • Add an arch-ratchet counter for winit references in runtime code and public types, with a ceiling of 0.
  • Ship a **Breaking:** changelog fragment for callers that named winit's KeyCode by its winit path.
Done when
  • No public signature names a winit type (public-API listing check).
  • 0 winit references under crates/rune/src/runtime (arch-ratchet ceiling 0).
  • Runtime-facing input code takes shell::Event only.
  • PhysicalKeyCode::KeyA and the other variant paths still compile in apps.
  • A Breaking fragment covers the KeyCode change.
  • The existing key, shortcut and scroll tests pass unchanged.
How to check
  • The public-API listing and semver checks run in T1 (R0027).
  • The arch-ratchet winit counter runs in T1.
  • Desktop tests on every OS (R0054).
Depends on
Part of
  • Theme: T11
  • Phase 2, milestone 2a · priority P1 · size L
R0200Hosts: window frame, title, minimize, popup, file-dialog and IME state reach hosts as runtime fieldsP2Phase 2aMT11
arch-host-request-window-ops · refactor
What happens

Side effects the runtime asks of the OS reach hosts as fields that each host reads for itself. After a frame, the window host takes minimize_request with mem::take, takes shell_request, checks window_frame, opens popups and file dialogs, and loops up to 8 times in case a callback asked again. The title comes through window_title.take_change(). The headless desktop and the web host have their own versions of the same reads, each with its own rules for what is unsupported.

Persistent platform state is read the same way. sync_platform reads has_secure_focus, ime_area, the cursor and help regions field by field. The IME reset is a one-shot flag that hosts consume with mem::take(&mut rt.ime_reset), from two places in the window host. Nothing says whether a host served a request, could not serve it, or never saw it.

R0196 moves clipboard, URL, shell and drag-out requests onto a typed HostRequest queue. This issue moves the rest.

Where
Why it matters

When each host reads fields its own way, a request served on macOS can be dropped on web or headless with no error. The target: "every side effect the runtime asks of the OS is a typed request on one queue", with 0 host reads of runtime request fields, requests "drained after every event and timer callback, whether or not a frame is presented", FIFO except idempotent state (title, cursor, window frame), Unsupported for a kind a host cannot serve, persistent state in one PlatformState value, and one-shot events as acknowledged requests.

What would help
  • Add WindowFrame, Title, Minimize, Popup, FileDialog, Cursor and ImeReset variants to HostRequest. Title, cursor and window frame coalesce to the latest; the rest are FIFO. ImeReset is acknowledged by the host.
  • Add a PlatformState value (IME area, secure input, help regions) that the core publishes when it changes. sync_platform reads only that.
  • A host that cannot serve a kind returns Unsupported, which replaces the web and LayerHost refuse_file_dialog and cancel_popups calls.
  • Migrate in at most four PRs: window ops; popups and dialogs; cursor and IME; PlatformState. Coordinate with #93.
  • On macOS, window-frame requests run inside live resize. Keep their timing.
Done when
  • 0 host-side reads of runtime request or platform fields (arch-ratchet ceiling 0).
  • Headless tests assert request streams for title, window frame and file dialogs, including coalescing of repeated titles.
  • ImeReset reaches the host once and is acknowledged (test).
  • A hidden window serves a file-dialog request with no frame presented (test).
  • platform_sync.rs reads PlatformState only.
How to check
  • The arch-ratchet host-read counter at ceiling 0 and the request-stream tests run in T1.
  • Window-frame timing during live resize is checked on the macOS lane.
Depends on
Part of
  • Theme: T11
  • Tracked in R0194
  • Phase 2, milestone 2a · priority P2 · size M
R0201Overlays: the overlay host keeps its own frame step, quiet skip and present path beside the window'sP2Phase 2aMT11
arch-surfacehost-overlay · refactor
What happens

The overlay host runs its own copy of the frame loop. overlay/frame.rs has its own step, quiet_step, rests, rest, claim and submit_and_present. Overlay::draw_frame joins them in about 235 lines, and commit_at steps the runtime with frame_split or frame directly. These do what the window's Host::draw does, but they are separate code. A fix to one host does not reach the other.

The two hosts already handle a refused surface differently. When acquire_checked returns Missed::Unconfigured, the overlay hides, drops its surface and reports the failure. The window treats the same miss like an outdated surface: it keeps the surface and asks it for a drawable again after 250 ms. The enum's own doc says wgpu panics on that surface's next drawable, so its owner must drop it. The overlay also repeats the acquire-and-refuse block three times in one function: for the first drawable, after a native material change and after a blend switch.

On macOS a plain overlay frame is finished, submitted and presented on a present worker thread. Only the overlay host has this path.

Where
Why it matters

Overlays carry HUDs, menus, layer-shell bars and popovers. When a fix lands only in the window loop, overlays keep the old behaviour. Users see it as an overlay that draws when nothing changed, or one that fails differently from a window when its surface goes bad. The target is that every host drives frames, wakes, misses and request dispatch through one shared frame core, with 0 such call sites outside the core. The parity suite must pass for every backing in the idle, live change, starved callbacks, refused, Lost and hidden scenarios.

What would help

Port the overlay to the SurfaceHost core from R0195, with an OverlayBacking that owns the winit window or layer-shell surface, the material views and the input regions.

  • The macOS present worker becomes a present strategy that the core picks for each frame. A plain frame goes to the worker. Materials, a transaction or a native video surface keep the frame on the main thread. Windows can opt in later.
  • The refused-surface path moves into the core's checked configure: hide, release, report. Windows use it too, so a window stops retrying a surface that wgpu says it will panic on.
  • The three acquire blocks become one core call that acquires again after a format or material change.
  • Marks for compositors come from the core, as R0123 sets them up, not from the backing.

Wayland layer-shell and XWayland have their own show and hide paths. Keep those in the backing.

Done when
  • The overlay host has no clock.advance, frame_split, step or submit_and_present of its own.
  • crates/rune/src/overlay/tests.rs passes unchanged.
  • Parity scenarios pass for a refused surface, timers on a hidden overlay, a native material and present-worker shutdown.
  • The refused-surface path lives in the core, and a window whose surface refuses its configuration releases the surface instead of retrying it.
How to check

The overlay tests and the Backing parity suite run in the required check. Wayland layer-shell and XWayland run on the Linux lane. The architecture ratchet counts frame-driving calls outside the core, and its ceiling for the overlay host drops to 0.

Depends on
Part of
  • Theme: T11
  • Tracked in R0194
  • Phase 2, milestone 2a · priority P2 · size M
R0202Window host: Host::draw and the desktop tool each drive their own frame outside a shared coreP2Phase 2aLT11
arch-surfacehost-window · refactor
What happens

Host::draw is the largest frame loop in Rune, about 305 lines at HEAD. It mixes the display-link claim, the macOS first-frame prime, the quiet skip, the clock advance, native materials, the launch-drawables reconfigure, compositor dispatch, upload, encode, submit, present, frame reports and the next wake. It calls FrameClock::advance in two places, once for the quiet path and once for a drawn frame. The desktop tool steps the runtime with Runtime::frame(dt) in a loop of its own.

Drop order also matters, and nothing tests it. On macOS a window's Native part (display link, present hook, panel, material views) must drop before the surface and the window, so AppKit observers and views go while both still exist.

Each fix to pacing, quiet skip, missed frames or telemetry has to go into this function and again into the overlay, web and LayerHost loops. #166 is an example: the window skips a timer frame that would draw what is already on screen, and the web host draws it.

Where
Why it matters

Every Rune app has a main window, so this loop carries most frames that users see. While it stays separate, a fix made in the core reaches overlays and web but not the window, or the other way round. The targets: every host drives frames, wakes, misses and request dispatch through one shared frame core, with 0 such call sites outside it. Every host is also zero cost at rest: 0 presents, 0 submissions, 0 unrequested Rune thread wakes and CPU <= 0.1% of one core. A hidden, covered or minimised window presents 0 frames even with running motion.

What would help

Port the window to the SurfaceHost core after R0201 has proved it on a smaller host, and after R0196 so side effects leave as requests.

1. Write a Backing test for today's drop order first, so the port cannot change it unnoticed. 2. Add a WindowBacking that holds the winit window plus the CAMetalLayer on macOS or the wgpu surface elsewhere. Material views, the transparent-window shadow and the Windows cloak stay in the backing. 3. Move Host::draw's clock, quiet skip, acquire, compositor dispatch, present and wake into the core's calls. 4. Move the desktop tool onto the same core with a headless backing. 5. Coordinate the configure path with #56. Land #56 first and move its lock into the core's checked configure, or port it in the same change.

Live resize, presentsWithTransaction and glass sync must keep their main-thread timing. Gate the port on the macOS soak.

Done when
  • 0 non-test calls to FrameClock::advance, Runtime::frame or frame_split outside the frame core, with the ratchet ceiling at 0.
  • A drop-order test for windows passes on the macOS and Windows lanes.
  • Window and desktop pass the same parity scenarios: idle, live change, starved callbacks, refused, Lost and hidden.
  • An idle window makes 0 presents and 0 submissions, and a hidden window with running motion presents 0 frames.
  • On the ProMotion reference Mac, the one-period share of each motion scenario does not drop against the pre-port build in paired, alternating runs.
How to check

The architecture ratchet ceilings and the Backing parity suite run in the required check. The platform lanes run the drop-order test. The macOS soak and scripts/motion-audit run before and after the port, compared by median.

Depends on
Part of
  • Theme: T11
  • Tracked in R0194
  • Phase 2, milestone 2a · priority P2 · size L
R0203Render: no host recreates the GPU, renderers and surfaces after a device lossP1Phase 2aLT05
render-gpu-recreate · feature
What happens

Even when a loss is detected, nothing rebuilds. No host drops and recreates its Gpu, Renderer and surface after a device loss. After a driver reset, a Windows TDR, a GPU switch or an eGPU unplug, a window either panics or stops drawing for good.

Parts of a rebuild already exist:

  • The overlay host rebuilds its renderer when it moves to a new device, from the #72 fix. It drops the old renderer and invalidates the glyph and image atlases.
  • ImageAtlas::invalidate marks every page for upload, and atlas pages keep CPU copies. But upload_images marks pages dirty again only when staging reports a lost encoder, not a lost device.
  • Frame::device_key gives compositors a key that changes with the device.

Several owners still hold the old device: El::cache layer textures, native video surfaces, compositor resources, and the embed path's SHARED_GPU, a OnceLock that can never be replaced. Windows and overlays can share one device, so one loss hits every surface.

Where
Why it matters

Windows driver updates and TDRs remove the device under a running app, and a Mac with two GPUs can switch. Users who keep an app open all day see it freeze or quit. The device-loss target asks for "0 panics and 0 unresponsive windows", "a correct frame (<= 2/255 per channel against the pre-loss golden) within 500 ms on native" and "Teardown <= 100 ms on the UI thread". It also asks that "S, scroll offsets and focus" stay unchanged, that "on_gpu_reset fires once" and that "3 losses in a row recover". After 5 failed recoveries in 10 s, the host reports a typed diagnostic and keeps handling input. GPU bytes after recovery stay "within 5% of before". The Windows target asks for "recovery in under 1 s with no restart, on real hardware".

What would help

Add one recover step to the shared frame core (R0195). The window, overlay and web hosts use it once they are ported (R0202, R0201, R0198). Build it from the overlay's rebuild. When Gpu::health() reports Lost (R0171), it:

1. Stops submitting and buffers up to 256 input events, replayed in order afterwards. 2. Drops the surface, renderer and Gpu in a documented order. 3. Calls Gpu::for_surface again, which may pick another adapter, and builds a new Renderer. 4. Marks every glyph and image page dirty. An image whose CPU copy is gone decodes again from its source, so #163 can still drop the copies. 5. Drops El::cache and native-surface textures, and asks each video for a new frame. 6. Moves every shared owner to the new device. That covers overlays sharing a window's device, and the embed slot, which must become replaceable. 7. Bumps DeviceKey so compositors rebuild their resources (R0172). Calls a new App::on_gpu_reset builder method. It can't be a field, because AppSpec is built as a literal.

App state, scroll offsets and focus are untouched. After 5 failures in 10 s, the host sends one typed GPU-unavailable diagnostic through R0081 and stops retrying. It keeps handling input and tries again on the next display, visibility or size change. R0072 lists what holds the device and measures bytes after recovery. Native Metal detection is in R0170. The web reuses this step in R0300. Add a changelog fragment for the new hook.

Done when
  • After an injected loss, a window with text, images, an El::cache layer, a backdrop blur, a playing video and a rune-fx compositor matches its pre-loss golden within 2/255 per channel within 500 ms, on lavapipe and native Metal.
  • S, scroll offsets and focus are unchanged, and on_gpu_reset fires once per loss.
  • 3 losses in a row recover. Logical GPU bytes afterwards are within 5% of before.
  • Teardown of the lost device takes 100 ms or less on the UI thread.
  • No input is dropped up to 256 buffered events.
  • When recovery keeps failing, input still works, and retries stop after 5 failures in 10 s with one diagnostic.
  • Two windows and an overlay sharing one device all redraw. LayerHost passes the same tests. A weak-reference test shows nothing holds the old device.
  • DX12 recovers in under 1 s on real hardware.
How to check

Fault-injection tests in T1 on lavapipe through R0087. The DX12, Vulkan and macOS lanes run the same cases on real hardware. R0298 keeps the timing targets.

Depends on
Part of
  • Theme: T05
  • Tracked in R0530
  • Phase 2, milestone 2a · priority P1 · size L
R0204API: an app author finds names in a flat 268-item crate root and a 2,830-line guide whose examples nothing compilesP1Phase 2bXLT01
api-discoverability · tracking
What happens

Rune has no prelude. crates/rune/src/lib.rs re-exports 268 items in one flat list. El has more than 300 public methods spread over more than 20 files. Some short names mean two things. rune::Theme and rune::tok::Theme are different types, and rune and rune-kit each export a MenuItem, a Keybind and a Table.

The guide is one 2,830-line README. About 38 of rune's fenced doc examples and 15 of rune-kit's are marked ignore, so nothing compiles them, and some have gone stale. No lint requires a doc comment. No generated page lists methods by what they do.

PLAN tenet 4 asks for "one way to do things" and "errors that say how to fix". Today an author or agent finds a name by searching source files.

The fix needs several issues because each part has its own check: preludes, renames with deprecated aliases, compiled doc and guide blocks, a docs ratchet, a split guide, and a generated map.

Where
Why it matters

Agents load the guide and the root re-exports into context, and they guess imports. A wrong import or a same-named type is a first-try compile failure. The import target is "100% of example and kit-gallery view files compile with rune::prelude::* and rune_kit::prelude::* plus at most one further rune or rune_kit use line", with "each prelude [holding] 40 names or fewer". The docs target asks for "0 ignore fences", "0 uncompiled Rust blocks in guide pages, crate READMEs and README.md", "docs/api-map.md regenerates with no diff" and "no guide page over 500 lines".

What would help

Land the children in this order: compiled doc and guide blocks first, since the split and the preludes move code those checks protect. Then the preludes and renames, then the split guide and the API map. The missing-docs ratchet can run alongside.

Done when
  • All child issues are closed.
  • The import and naming thresholds above hold in T1.
  • The docs thresholds above (ignore fences, compiled blocks, the API map, page length, missing docs) hold in T1 and the platform lanes.
How to check

Each child adds its own check to T1: the prelude import check, the doctest and snippet runs, the missing-docs ratchet, the page-length and link check, and the API map regeneration diff.

Issues
Part of
  • Theme: T01
  • Phase 2, milestone 2b · priority P1 · size XL
R0205Examples: no example shows the fast patterns, most have no test, and CI compiles none of themP1Phase 2bXLT01
api-examples · tracking
What happens

The README tells agents to start from examples/hello, and research note 16 says models copy examples rather than prose. But the 30 apps in examples/ don't show what the performance docs ask for. No example's Rust source uses virtual_rows, memo, live_only, on_ready, Latest or prewarm_gpu. overlay-lab describes on_ready only in prose, in window-panel.md.

19 of the 30 have no test. Nothing lists them or says what each teaches. No CI job builds them: the two workflows deploy the site and build the www page. Some have rotted. hello builds its switch by hand in an always-dark theme, and two examples parse Rune's flags themselves.

This takes several issues because each gap has its own fix and its own check. They are an index, CI compilation and an examples-check, headless tests, platform-lane builds, a rewritten hello, the rot fixes, the supported headless check, app-audit in CI, and teaching examples for the fast patterns.

Where
Why it matters

An agent's first app looks like the example it starts from. If that example skips the fast patterns, has no test and may not build, the agent's app has the same faults. The target is that "100% of discovered examples compile in T1 and in each platform lane their index row declares, have a sibling headless test that asserts an interaction or state change, and are listed in examples/README.md". It also says "every Fast-apps rule maps to example code that a test exercises" and "app-audit --strict has 0 unsuppressed findings, each suppression with a reason". The tooling target asks that "100% of documented headless commands in the crate README and examples/README have a fixture that runs in T1".

What would help

Start with the index and CI compilation. They make the other gaps visible and keep fixed examples fixed. Then add the headless tests and the platform lanes. The hello rewrite, rot fixes, headless detection, app-audit and fast-pattern examples can land in any order after that.

Done when
  • All child issues are closed.
  • The example thresholds above hold in T1 and in the platform lanes.
  • T1 runs every headless command the index lists.
How to check

The examples-check script, the examples build and tests, and scripts/app-audit --strict run in T1. Each platform lane builds the examples its index rows declare.

Issues
Part of
  • Theme: T01
  • Phase 2, milestone 2b · priority P1 · size XL
R0206API: type and identity mistakes fail silently or at the first press, while performance mistakes get namedP1Phase 2bXLT01
api-misuse-diagnostics · tracking
What happens

Rune already names many performance mistakes. About 15 debug warnings point at the call site and say what to change. key_diagnostics reports duplicate keys with both call sites. Other mistakes get nothing like that:

  • A handler typed for the wrong state panics at its first press, and the message points at Rune's states.rs, not at the app.
  • An unknown role string such as "swich" silently becomes a group or a button.
  • A list built from data with no keys gets no warning.
  • live_text on a non-text element, and .virtualize without .growth, panic in release builds too.
  • text() with no colour draws white, so labels on a light background are blank.
  • Rust's own message is all an author sees for common type mistakes in view code.

PLAN asks for "errors with fixes". Each kind of mistake needs its own detection, so this takes several issues. A panic inventory comes first, so each fix has a case that pins its debug message and its release behaviour.

Where
Why it matters

The target is "every app-misuse entry has a case that passes in debug (a message naming the app's file:line and the fix, at the commit where the mistake first appears) and in release (warn once and degrade, 0 panics)". Identity has its own target: "unknown strings warn in debug". The authors who hit these mistakes most are agents that copy code between apps. They see a crash at the first press, or a silent fault, and have to guess the cause.

What would help

Land R0035 first. Every other child adds cases to it. Each warning must have no false positives over the examples and kit-gallery before it ships.

Done when
  • All child issues are closed.
  • Every inventory entry has a debug case that checks the app's file:line and the fix text, and a release case that degrades without a panic.
How to check

The misuse suite runs in debug and in release in T1. A run over the examples and kit-gallery must give 0 new warnings.

Issues
Part of
  • Theme: T01
  • Phase 2, milestone 2b · priority P1 · size XL
R0207Docs: PLAN, the READMEs, the site and WEB.md describe an architecture, renderer and platform reach the code doesn't haveP1Phase 2bXLT01
arch-docs-match-code · tracking
What happens

Agents read PLAN.md, the README and the site before they read the code. Several current-tense passages there describe things the code does not do:

  • a render thread that owns the presented tree and animates it;
  • a command channel between the app side and that thread;
  • a rope and sum tree borrowed from GPUI;
  • a crate called a "first slice".

The crate README's own "Differences from PLAN.md" section has gone stale the other way. It says macOS runs on wgpu with no AccessKit and that scrolling is vertical only. Its "Measured" section gives numbers with no rev, backend or date.

Some passages already mark the render thread as a target. The site's motion page says springs "today" live on the main thread and the architecture "moves it to a render thread". Those passages stay. Nothing checks any of these claims, so each fix decays again.

This takes several issues because the drift is in many docs and areas. Threading, the renderer, text, layout, platform reach, accessibility, the kit, PLAN's status columns and the memory target each need their own rewrite. New fact pages and a claims check keep them true. Each rewrite corrects current-state claims and labels future passages Target, without deleting the plan.

Where
Why it matters

An agent that believes a render thread animates will write code for that model. It may move work off a thread that does not exist, or expect motion to survive a busy main thread. The architecture-docs target is "Every statement in the listed sections is a claim in docs/claims.toml or is labelled Target. 0 failing claims, every canary fails, and none stays pending". The tooling target says "0 PLAN or README lines state an unbuilt capability as current". It also says "Measured README sections carry the rev, date and machine".

What would help

Land the rewrites as small, separate PRs, one area each. Each one adds its claims to R0004 in the same PR, so the fix stays checked. R0014 gives the rewrites one page to point at for threads and owners.

Done when
  • All child issues are closed.
  • scripts/doc-claims passes in T1. Every claim has a probe and a negative canary that fails as expected.
  • rg -n 'render thread|command channel|sum_tree|rope|Slug' over PLAN.md, README.md, the crate READMEs, crate descriptions, crates/rune-motion/src, site/src and WEB.md returns only lines labelled Target or stated as future.
  • Every README Measured number names its rev, date, backend and machine.
How to check

scripts/doc-claims runs from scripts/file-size.sh and in the required T1 job. The scheduled Measured refresh re-runs the numbers.

Issues
Part of
  • Theme: T01
  • Phase 2, milestone 2b · priority P1 · size XL
R0208Handlers: a handler typed for another state type panics at its first press, with no call siteP1Phase 2bMT01
api-handler-state-check · feature
What happens

Handlers, on_edit accessors and lazy row builders are generic over the state type S where the app writes them. Rune stores them type-erased. Each closure calls downcast::<S>() when it runs. If S is neither the app's state nor the playground stage's state, downcast panics with "handler registered for a different state type than the app's".

This happens at the first press, not when the view is built. It happens in debug and release. The panic location is states.rs, so the message names no line in the app. An author who copied a row from another app sees the crash only when someone clicks, and has to search every handler to find it.

Where
Why it matters

The target is "every app-misuse entry has a case that passes in debug (a message naming the app's file:line and the fix, at the commit where the mistake first appears) and in release (warn once and degrade, 0 panics)". A wrong-state handler fails all three parts. It reports late, it names no app line, and it panics in release. Agents make this mistake often, because they copy code between apps with different state types.

What would help
  • In debug builds, store TypeId::of::<S>() and Location::caller() with each erased handler, on_edit accessor and lazy row builder. Put them beside the existing sites in El's cold part, so release El size does not change. Add #[cfg_attr(debug_assertions, track_caller)] to the builders.
  • At commit, compare each stored TypeId with the app's state and the current stage state. On a mismatch, warn once per site. The message names the file:line, the expected and the found type names, and the fix ("this handler takes &mut Other; the app's state is App").
  • In release, make downcast return None on a mismatch. The caller logs once per handler and skips the call instead of panicking.
  • Add the cases to R0035.
Done when
  • A handler, an on_edit accessor and a virtual_rows row typed for another state each warn at commit with the app's file:line, before any input.
  • A release-build case presses the mismatched control and does not panic.
  • The release El size test is unchanged.
  • Playground stories with their own state raise no warning.
  • The examples and kit-gallery raise no warning.
How to check

The misuse suite runs in debug and release in T1. elements_and_nodes_stay_small in crates/rune/src/runtime/size_tests.rs keeps the release size fixed.

Depends on
Part of
  • Theme: T01
  • Tracked in R0206
  • Phase 2, milestone 2b · priority P1 · size M
R0209Agents: no benchmark measures whether an agent's first try at a Rune app compiles and matches its specP1Phase 2bLT01
api-rune-bench · research
What happens

Rune is built for apps that agents write. But no benchmark measures how often an agent's first try at a Rune app compiles, or how often it does what was asked. Research note 16 found no public benchmark that measures first-try correctness for a new Rust UI framework. It recommends a Rune-Bench of 30 to 50 tasks, and PLAN repeats this.

Without it, API choices are guesses: a prelude, a handler trait, a scroll builder, the size of the guide. Nothing shows whether a change made agents more or less likely to get an app right.

Where
Why it matters

The target is "First-try compile median at least 85% and tree match at least 75%, each at least the same model's SwiftUI rate, for three folds in a row". It adds that "a fold is blocked when either rate drops more than 5 points and the 95% interval excludes 0". Several other targets also need these numbers. The import target asks that "import errors cause at most 2% of Rune-Bench first-try compile failures". The compile-fail suite (R0211) picks its cases from the most frequent failures.

What would help
  • Add bench/rune-bench/ with at least 40 tasks. Each has a spec, a fixture and a reference, and the kinds are weighted equally:
    • generate an app from a spec;
    • edit an app ("make the row tappable");
    • repair an app, given a lint failure.
  • Define first try as the model's first full answer, with the docs and the API map in context and no compiler feedback.
  • Define tree match: the headless --tree output equals the reference after keys are normalised and layout numbers within 1 pt are ignored.
  • Write a harness that pins the model, the prompt and the tool versions. It runs each task 3 times and records compile, lint-clean, tree match, turns to green and tokens. It reports medians and 95% intervals.
  • Write the specs without Rune names, so a SwiftUI port of the same tasks can give the baseline the target compares against.
  • Run it weekly and on any PR that changes the public API snapshot from R0039. Commit the results. scripts/changelog-fold reads the latest result and blocks a fold on a drop of more than 5 points whose interval excludes 0.
  • Model runs need an API key. Keep the key in repository secrets, and run the lane only on schedule or on push to dev, never in a pull_request workflow.
Done when
  • At least 40 tasks with references are committed.
  • Results for one pinned model, 3 runs per task, are committed with 95% intervals.
  • The weekly lane runs and commits results.
  • The fold gate blocks on a fixture that lowers the compile rate by more than 5 points.
How to check

The scheduled lane commits results. A fixture regression test shows that the fold gate blocks.

Depends on
Part of
  • Theme: T01
  • Tracked in R0704
  • Phase 2, milestone 2b · priority P1 · size L
R0210Docs: no generated map lists El, Tx and Cx methods by familyP2Phase 2bST01
api-api-map · docs
What happens

An author or agent who looks for a method has two places to look. One is more than 20 source files that hold El's methods. The other is a 2,830-line guide. The crate root re-exports 268 items in one flat list. Nothing groups the methods by what they do, such as layout, handlers or scrolling, or says which are behind a feature or a target. Nothing lists the names that mean two things.

PLAN asks for "one component catalog generated from the Rust definitions". The site's llms.txt lists the site routes, the repo and PLAN.md. It has no API reference.

Where
Why it matters

The docs target says "docs/api-map.md regenerates with no diff". The import target says "every same-named public type pair is renamed (with a deprecated alias during its window) or listed with a one-line distinction in the API map". Agents get most from this page. One file of a few hundred lines can sit in context, where the guide and the source cannot. Rune-Bench (R0209) gives the map to the model as context.

What would help
  • Generate docs/api-map.md from the public API snapshot (R0039) and each item's first doc line.
  • Group every El, Tx, Cx and App method by a family tag kept in a small mapping file. The families are layout, visuals, handlers, a11y, scroll, text, motion and testing. An untagged method fails the check, so new methods get placed.
  • Mark feature- and target-gated items with their gate.
  • List deprecated aliases from R0047 under their replacement.
  • Add the kit component catalog and the same-name list, with a one-line distinction for each pair that keeps its name.
  • Link the map from llms.txt and from the README index.
  • Add a check that regenerates the map and fails on a diff.
Done when
  • The map lists every El, Tx, Cx and App method, each in exactly one family.
  • Gated items show their gate, and aliases sit under their replacement.
  • The same-name list covers every same-named public type pair that remains.
  • Regenerating the map gives no diff in CI.
  • llms.txt links the map.
How to check

The regeneration diff runs in T1. It fails when a public item is added without a family tag or the map is not refreshed.

Depends on
Part of
  • Theme: T01
  • Tracked in R0204
  • Phase 2, milestone 2b · priority P2 · size S
R0211Errors: no compile-fail test pins the compiler message for common type mistakes in view codeP2Phase 2bST01
api-compile-fail-suite · infra
What happens

Some mistakes in view code are type errors: a handler with the wrong arguments, a view that returns (), or a child that is an Option<El>. For these, rustc's own message is all an author sees. Where a Rune trait is involved, that message names the trait bound and not the fix.

Rune has no #[diagnostic::on_unimplemented] attribute on any trait. No test checks what the compiler says for these mistakes, so a change to a builder signature can make the message worse and no test fails. Research note 16 recommends both: custom diagnostics with the fix, and tests that pin them.

Where
  • research/16-research-agent-generative-ui.md:182-183: "Make compiler errors actionable via custom #[diagnostic::on_unimplemented] and compile_error! messages with the fix".
  • rg 'diagnostic::on_unimplemented' crates/rune/src: no hits.
  • No crate depends on trybuild.
  • PLAN.md:77: tenet 4, "errors that say how to fix".
Why it matters

An agent's first try fails at compile time more often than at run time. A message that names the fix turns a failed first try into a one-turn repair. The misuse target asks for "compile-fail tests with fix text for the 10 most frequent Rune-Bench compile failures". The first-try target is "First-try compile median at least 85%".

What would help
  • Take the 10 most frequent compile-failure classes from the committed Rune-Bench results (R0209). Write a minimal trybuild compile-fail case for each, and check in its expected output.
  • Add #[diagnostic::on_unimplemented] with a message and a note to every Rune trait that the preludes (R0048) export. The message names the Rune type, and the note says what to write instead. An example: "children takes El items; wrap an optional child with .into_iter()".
  • Each case asserts that its output names the Rune type and contains its fix text. That way a re-bless after a toolchain change cannot quietly drop the fix.
  • Pin the toolchain for this suite. Re-bless the output only on purpose, when the toolchain changes.
Done when
  • 10 compile-fail cases, chosen from committed Rune-Bench results, are committed with their expected output.
  • Each case's message names the Rune type and contains its fix text.
  • Every Rune trait in the preludes has an on_unimplemented message.
How to check

trybuild runs in T1 on the pinned toolchain. When Rune-Bench's top 10 changes, the suite gets the new class.

Depends on
Part of
  • Theme: T01
  • Tracked in R0206
  • Phase 2, milestone 2b · priority P2 · size S
R0212Text: text() with no colour draws white in every appearance, so labels on a light background are blankP2Phase 2bST01
api-default-text-color · bug
What happens

text() starts with Color::WHITE. An uncoloured label, icon or field draws in the colour from Cx::foreground, and only if the view sets it on every run. Otherwise it draws white. An app that fills its window with a light colour and forgets foreground, or sets it in one view and not another, shows blank labels.

The window background has the same fixed default. With no fill on the root, the clear colour is opaque black. So the defaults suit a dark appearance only. This may be why 18 sites in the examples call tok::theme(true) and stay dark always, hello among them. Rune already knows the system appearance through Cx::system_dark, but neither default uses it.

Where
Why it matters

An agent that builds a light app sees nothing where its labels should be. A headless snapshot shows the same blank, so the agent may think the layout is broken. The misuse target asks that a builder mistake is "reported at the call site with the fix" or degrades safely. The theme's exit target is concrete: "Uncoloured text meets 4.5:1 contrast in both appearances".

What would help

At the start of each view run, when the app has set no foreground, the runtime sets the default from the window's appearance. Use tok::theme(dark).text, where dark is Cx::system_dark(). An explicit .color() and Cx::foreground still win.

The text default and the background default must change together, or a light appearance gets dark text on the black clear colour. There are two options:

1. Make an unfilled root also clear to the appearance's window background (tok::theme(dark).bg). 2. Base the default text colour on the root fill's luminance, and leave the clear colour black.

Recommended: option 1. It gives one rule, the appearance, that agents can predict, and it matches what a native window does.

Add a debug warning, once per view, when uncoloured text sits on a fill with less than 4.5:1 contrast. Add a changelog fragment, since output changes for light-appearance apps that relied on white text or a black window.

Done when
  • An uncoloured label on the default window background has a contrast ratio of at least 4.5:1 in both appearances.
  • An explicit .color() and Cx::foreground give the same output as before.
  • A dark-appearance app that sets no colours renders as before.
  • changelog/unreleased/ has a fragment for the change.
How to check

A headless test renders an uncoloured label in light and in dark appearance and measures the contrast. A second test pins explicit colours. Both run in T1.

Part of
  • Theme: T01
  • Tracked in R0206
  • Phase 2, milestone 2b · priority P2 · size S
R0213Docs: the framework guide is one 2,830-line READMEP2Phase 2bMT01
api-readme-split · docs
What happens

crates/rune/README.md is the framework guide, in one file of 2,830 lines, about 4.6 times PLAN.md's 617. An agent that needs the scrolling rules either reads the whole file or searches it and loses the context around a hit. The page has no topic structure beyond its headings. Topics sit next to each other in the order they were added. For example, "Launching fast" and "Smooth scrolling" come between app lifetime and tray windows.

llms.txt lists the site routes, the repo and PLAN.md, and not this guide. The file is also an edit hotspot. 257 of the 1,642 commits on dev so far touched it, so changes in parallel collide there.

Where
Why it matters

The docs target says "no guide page over 500 lines". A 500-line page fits in an agent's context with room for the app. A 2,830-line page does not, and an agent that reads only part of it misses rules. Authors find a topic faster on a page named for it. The split should land early in phase 2. Every other docs change in that phase edits this file, and a split made late collides with all of them.

What would help
  • Split the guide into topic pages of 500 lines or fewer under docs/guide/. The topics are app structure, layout, text fields, scrolling, motion, launching fast, testing headless, platform, and stability.
  • Move text as is, with no rewrite in the same PR, so review is a move.
  • Keep crates/rune/README.md as a short index. Keep an anchor for each old heading that links to its new page, so outside links still resolve.
  • List every page in llms.txt, and have the site render them.
  • Compile each page's Rust blocks with the check from R0034, which must land first.
  • Add a check that fails when a guide page goes over 500 lines.
Done when
  • No page under docs/guide/ is over 500 lines.
  • crates/rune/README.md is an index, and every old heading anchor resolves.
  • llms.txt lists every guide page.
  • The site renders the guide pages.
  • Every Rust block in the guide pages compiles.
  • A link check passes.
How to check

A page-length and link check runs in T1, next to the snippet compile check.

Depends on
Part of
  • Theme: T01
  • Tracked in R0204
  • Phase 2, milestone 2b · priority P2 · size M
R0214Keys: a list built from data with no keys gets no warning, though PLAN asks for an error that says to add .key(id)P2Phase 2bMT01
api-unkeyed-children · feature
What happens

A child with no key gets a path segment from its position among its siblings: #0, #1 and so on. Rune keeps focus, hover, a text field's edit state and presence motion per path, so for unkeyed children that state belongs to a position, not to an item. When an app builds a list from data with .children(items.iter().map(row)) and inserts an item at the front, the item that was in row 2 moves to row 3. Its focus, caret, typed text and any exit motion stay in row 2 and now show on a different item.

Rune checks sibling keys for one mistake only: two siblings with the same key. key_diagnostics renames the later one and prints a warning that names both call sites. A missing key gets no message. .child() and .children() both push onto the same list and record nothing about where the children came from, so the runtime can't tell a data-driven list from a fixed layout.

PLAN asks for the opposite: an error with the fix, "Text has no key inside a dynamic list; add .key(id)".

Where
Why it matters

A user types into a row of a list. A new item arrives at the top, and the caret and the typed text jump to the item below. A removal animation plays on the wrong row. Agents write .children(iter) without keys, because nothing tells them to add one.

The target is that misuse is reported at the call site with the fix: every app-misuse case gives a debug message that names the app's file:line and the fix, at the commit where the mistake first appears. Identity should be typed or checked, not a silent string convention.

What would help
  • In debug builds, put track_caller on El::children and mark each child it appends as dynamic, with the call site. Release builds get no new fields and no new work.
  • At commit, for each parent, count the unkeyed dynamic children and compare with the count from the last commit at that path. When there are two or more and the count changes, warn once per call site. For example: ".children at src/list.rs:42 builds unkeyed rows and their count changed from 4 to 5; Rune matches unkeyed rows by position, so focus and motion move to the wrong row; add .key(id) to each row".
  • Never flag children added with .child(), including conditional ones. Never flag an iterator whose count does not change, such as a fixed set of tabs. Keyed children are never flagged.
  • Add the case to the misuse suite from R0035.
Done when
  • A misuse case inserts at the front of an unkeyed .children list and gets one warning that names the .children call site and says to add .key(id).
  • .child() siblings, conditional children and fixed-count iterator lists give 0 warnings (tests).
  • A test focuses a text field in row 2, inserts an item at the front, and shows that the focus stays with its item once the rows have keys.
  • All 30 examples' tests and kit-gallery's every_story_builds give 0 warnings.
  • A commit with no count changes adds no allocations, like repairing_a_tree_without_duplicates_allocates_nothing for the duplicate check.
How to check

The misuse suite runs in T1. A warning count over every_story_builds and over the examples' headless tests runs in T1 and must stay at 0.

Depends on
Part of
  • Theme: T01
  • Tracked in R0206
  • Phase 2, milestone 2b · priority P2 · size M
R0215README: no scheduled job re-measures the Measured numbers, so they age without noticeP2Phase 2bST01
authoring-measured-refresh · infra
What happens

The rune README's Measured section gives a binary size, frame CPU times and a motion-lint count. The heading names "Apple silicon, headless at 2×", but no line names the rev, date or backend it was measured at. The live-edit section gives a median save-to-GPU time of about 8 s for Settings with no date or rev. The rune-light README and the site's Launch page give numbers from a machine "under other load" or "under heavy load".

R0005 adds the rev, date, backend and machine to each number, and scripts/measure-readme to reproduce them. That makes each number true once. Nothing re-runs the script, so the numbers age as code changes. A change to the renderer, text or layout can move frame CPU or binary size, and the README goes on saying the old number.

Where
Why it matters

A reader compares Rune with another framework from these numbers. An agent decides whether a pattern is fast enough from them. A stale number misleads both, and nobody sees it go stale.

The targets: each published number records rev, backend, device and date; Measured README sections carry the rev, date and machine and are refreshed by a monthly job; and 0 PLAN or README lines state an unbuilt capability as current.

What would help
  • A monthly scheduled job runs scripts/measure-readme on the macOS lane's runner from R0161, with --profile perf and paired, alternating runs compared by median, as the repo's performance rules ask.
  • When a number moves by more than its stated tolerance, the job opens a PR that updates the number, its rev and its date. Recommended tolerance: 10%, or the run-to-run spread over at least 5 runs, whichever is larger. The PR states the spread.
  • A committed map links each measured line to the source paths it depends on (for example, frame CPU to the runtime and renderer). The doc check flags a PR that changes a mapped path without a refresh note. Options for the note: a commit trailer such as Measured: unchanged, <reason>, or a field in the changelog fragment. The trailer is recommended because it needs no new file.
Done when
  • A monthly job runs scripts/measure-readme and posts its numbers per rev.
  • A number that moves past its tolerance opens a PR that updates it with rev, date, backend and machine.
  • The doc check fails a fixture PR that changes a mapped code path without a refresh note, and passes one with a note.
  • Every Measured line in the READMEs and on the site is in the map.
How to check

The scheduled job's runs and PRs are the record. The doc check runs in T1 on every PR, with a canary fixture that must fail.

Depends on
Part of
  • Theme: T01
  • Tracked in R0207
  • Phase 2, milestone 2b · priority P2 · size S
R0216App: poll, setup and on_key take fn pointers, so examples keep startup config in statics and launcher passes a placeholder initP3Phase 2bMT01
api-app-closures · feature
What happens

AppSpec's init, setup, poll, on_key and scenes are fn pointers. App adds a capturing init, and on_window, on_ready, on_frame_encoded and on_frame_drawn take closures. But there is no capturing poll, setup or on_key, and on_focus, on_ime, on_close and on_reopen also take fn pointers.

So an app that knows something at startup, such as a flag or a handle, must copy it into its state or into a static. Five examples use statics: WINDOWED in live-values and overlay, DESKTOP in launcher, CONFIG in motion-bento, and HANDLES, HANDED and DRIVER in glass-panel. Agents copy that pattern. launcher passes || unreachable!() as the AppSpec init and then replaces it with .init(..), because AppSpec::new requires a fn pointer.

Statics are also a hot-reload hazard. In the hot-patch spike, an unchanged static in the patched crate was reset to its initializer on each patch.

Where
Why it matters

An author starting from an example learns to keep config in a static. That breaks when two apps or two test Runtimes in one process need different values. The targets: docs and examples are complete, compiled, tested and current; and a component is one expression that returns one El, with handlers that follow one naming rule.

What would help
  • Add App builder methods that take closures: poll_with, setup_with and on_key_with. Add a constructor that takes a view and an init closure, so no placeholder is needed. AppSpec is built as a literal by apps, so add no pub fields to it.
  • Store the closures in App, not AppSpec. Keep the fn-pointer fields working.
  • Move the five examples off config statics, to captured closures or to fields in the state. Detecting headless runs is separate; this issue only moves the value.
  • Under --features hot, route the closures through the patch table. Test a closure with one capture, since the spike found that shape skips patches. If it can't be made to work, document the limit in the guide.
Done when
  • No example keeps app config in a static.
  • launcher has no unreachable!() init.
  • A test runs two Runtimes with different captured config through each new method.
  • crates/rune/tests/app_spec_compat.rs passes unchanged.
  • A hot test patches a closure-based poll with one capture and sees new code, or the guide documents the limit.
How to check

The example tests, app_spec_compat and the new two-Runtime test run in T1. The hot test runs in the hot-feature build.

Part of
  • Theme: T01
  • Phase 2, milestone 2b · priority P3 · size M
R0217Testing: Runtime::find matches key paths, but Runtime::presented matches only exact keys and returns an unnamed tupleP3Phase 2bST01
api-test-helpers · refactor
What happens

Runtime::find and Runtime::presented are the two helpers a headless test uses most. They match keys in different ways.

find("slider/knob") matches a path: a key that contains / matches any node whose path ends with it, skipping unkeyed elements in between. presented("slider/knob") compares the string with each node's own key, so it returns None. A test that finds a node with a path can't read its drawn rect with the same string.

presented returns ([f32; 4], f32). hello's test reads the knob's x as rt.presented("knob").unwrap().0[0], which doesn't say what .0[0] is. The docs don't say what each helper returns when two nodes share a key, and they differ on exiting nodes: find skips them and presented still reads them.

Where
Why it matters

Agents and authors write headless tests from these two helpers, and hello's test is the one they copy. A path that works in find and returns None in presented looks like a missing node, so the test author goes looking for a bug that isn't there.

The targets: identity is typed or checked, not a silent string convention, and an API that resolves a key resolves to the documented tree-order first match; docs and examples are complete, compiled, tested and current.

What would help
  • Make presented use the same matching as find. This is additive: every exact key that matched before still matches.
  • Add Runtime::drawn(key_or_path) -> Option<Drawn>, with Drawn { rect, opacity } as named fields and the same matching. Mark presented deprecated in its favour, with the changelog fragment and window that R0046 requires.
  • Document in the testing guide what each helper returns for an exact key, a scoped path, an ambiguous key (tree-order first match) and an exiting node. Keep drawn returning exiting nodes, as presented does, so tests can read an exit animation.
  • Switch hello's test to rt.drawn("knob").unwrap().rect.
Done when
  • presented and drawn accept paths, with tests for exact, scoped and ambiguous keys.
  • A test pins the result for an exiting node, and the guide documents it.
  • presented is deprecated with a changelog fragment.
  • hello's test uses named fields.
How to check

Unit tests for the matching run in T1, beside the existing find tests. hello's headless test runs in T1.

Depends on
Part of
  • Theme: T01
  • Phase 2, milestone 2b · priority P3 · size S
R0218API gate: once semver-checks compares against a lagging verified rev, a break merged after it fails every later PRP1Phase 2bST02
api-break-attribution · infra
What happens

Today no semver check runs, and changelog fragments carry no break marker. None of the 216 fragments in changelog/unreleased/ say Breaking. CHANGELOG.md uses the form - **Breaking: ...**.

The planned API gate works in two steps. First, cargo semver-checks compares each candidate against a baseline. That baseline starts as the merge base, and later becomes the latest rev on the verified branch. Second, R0046 fails a PR whose report shows a major change without a **Breaking:** fragment.

Those two steps conflict once the baseline is the verified rev. verified moves only after every platform lane passes on a SHA, so it trails dev by up to about 3 h at p95. Say PR A removes a public item and lands with a fragment. Every PR queued after A, until verified catches up, sees A's removal in its own semver report. The fragment check then asks each of those PRs for a fragment it has no reason to write.

Each of those authors has three bad choices. They can write a duplicate fragment, which puts the same break in the changelog twice. They can apply the override label, which teaches everyone to override. Or they can wait for verified. The cost is a false red on every PR in that window. A busy hour can have several.

Where
  • AGENTS.md:21-22: dev is fast-forward-only, and a fragment is needed for any change that can break an app's build.
  • scripts/changelog-fold: folds fragments into ## dev. Nothing ties a fragment to the semver finding it answers.
  • CHANGELOG.md:192: an existing **Breaking:** entry in the form the check will match.
  • R0169: the verified branch and the lag it adds.
Why it matters

App authors pin dev revs, and they need each break announced once, by the PR that made it. The targets:

  • "100% of changes semver-checks marks major ship a **Breaking:** fragment naming the replacement".
  • "0 breaking changes merged without a Breaking: fragment".

Both are against "the latest verified rev (the merge base until verified exists)". A gate that blames the wrong PR gets overridden, and then it enforces nothing.

What would help

Run two comparisons on each merge-group candidate:

1. Attribution. Compare the candidate against the merge-queue parent, the commit the queue builds on. The fragment check asks for a new fragment only for these findings, which are the PR's own breaks. 2. Range. Compare the candidate against the latest verified rev. Every major finding must match a fragment that is already merged, either in changelog/unreleased/ or folded into CHANGELOG.md. To make that matching reliable, a fragment names the item path it breaks, such as rune::TextStyle.

Cache the baseline's rustdoc JSON by SHA, so the second comparison costs one extra diff and no extra build. Until this lands, the semver baseline stays the merge base.

Done when
  • With verified two commits behind and a break with a fragment among those commits, a second queued PR with no API change passes without a new fragment.
  • A PR that adds a break without a fragment still fails.
  • A range break whose fragment was deleted fails the range check.
  • The T1 log names both baseline SHAs.
How to check

A fixture test in T1 builds the two-queued-PRs history in a scratch repo and runs the attribution and range checks on it. The semver step's log names both baselines on every run.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P1 · size S
R0219Release: no crate declares rust-version, so an app can't tell which toolchain builds a revP2Phase 2bST02
api-msrv · infra
What happens

rust-toolchain.toml pins channel 1.99.1 for work inside this repo. No package declares rust-version, and [workspace.package] sets only edition and license. When an app builds a pinned rev on a different toolchain, nothing tells it in advance whether that works. If the rev uses a newer feature, the first sign is a compile error deep in rune. Cargo's MSRV-aware resolver has nothing to go on either, so cargo update in an app can pick dependency versions its toolchain can't build.

It also means nobody knows the real minimum. Edition 2024 needs Rust 1.85, and no lane has ever checked an older toolchain than the pinned one.

Where
  • rust-toolchain.toml:2: channel = "1.99.1".
  • Cargo.toml:54-56: [workspace.package] has edition = "2024" and license, and no rust-version.
  • All 15 crates under crates/ and themes/opencode already inherit edition.workspace = true, so inheriting one more key is one line per manifest.
  • rune depends on procwatch, rune-motion, rune-staging and rune-taffy. Three of those have publish = false (for example crates/rune-motion/Cargo.toml:7). The declaration has to cover those crates too, not only the published ones.
Why it matters

App authors pick a toolchain for their CI and their team. An unstated minimum turns a Rune bump into a surprise. The target: "rust-version is declared, inherited and green in an MSRV lane on four targets", as part of "Rune installs from a registry with versions, docs, a declared toolchain and a measured footprint".

What would help
  • Add rust-version to [workspace.package], and add rust-version.workspace = true to every member, examples included.
  • Choose the value. There are two options:
    • (a) Set it to the pinned 1.99.1. This is honest from day one and costs nothing to check, but it forces apps onto the newest toolchain.
    • (b) Find the lowest toolchain that passes, by running the lane on older releases, and declare that.

Recommend (a) now, and lower the value later only when the lane proves it.

  • State the policy on the Stability page from R0020: what rust-version means, and that raising it needs a changelog fragment.
  • Add an MSRV lane that installs the declared toolchain and runs cargo check on Linux, macOS, Windows and wasm32. Take the default and all-features sets for each target from scripts/ci-matrix.toml (R0036), so features that only build on one target are left out where they don't apply.
  • Once packaging works, the same lane also builds a small consumer crate against the packaged crates.
Done when
  • rust-version is declared in [workspace.package], and every member inherits it.
  • The MSRV lane is green on Linux, macOS, Windows and wasm32, with default and all features.
  • The Stability page states the MSRV policy and names the lane that enforces it.
  • A PR that uses a feature newer than the declared version fails the lane.
How to check

The MSRV lane runs on every merge. Check it once with a scratch PR that uses an API newer than the declared version (with the value set below 1.99.1 in a test branch) and confirm the lane goes red.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P2 · size S
R0220Lints: no check runs clippy, three shared lints were relaxed to warn, and clippy.toml's reasons name modules Rune doesn't haveP2Phase 2bMT02
arch-clippy-gate · infra
What happens

No workflow, script or documented command runs clippy. The toolchain ships with it (rust-toolchain.toml lists the clippy component), but nothing calls it. The one place clippy is mentioned is the overlay docs, which say Windows builds are checked with cargo xwin clippy only, by hand.

The workspace copies a shared lint set and then relaxes three of its lints from deny to warn, with the comment "errors left": undocumented_unsafe_blocks, let_underscore_must_use and disallowed_methods. Because nothing runs clippy, those warnings are never counted, so they can only grow.

clippy.toml gives the reasons for the disallowed methods. It sends std::env::var to "config.rs at startup" and SystemTime::now to config::now(). Neither exists in Rune. There is no config.rs and no config::now, and rg finds 45 matches for those two calls outside test files. An agent that hits the lint can't tell what rule it protects.

The workspace also sets unsafe_code = "allow". Six crates contain no unsafe at all: rune-fx, rune-knobs, rune-light, rune-mermaid, rune-register and rune-staging. None of them forbids it.

Where
Why it matters

The gate is meant to enforce the lints: "Clippy runs for every matrix row with -D warnings, and undocumented_unsafe_blocks, let_underscore_must_use and disallowed_methods are back at deny."

Clippy is also the cheapest way to hold the failure-model rules: "0 allocation expect in native Metal" and "0 production eprintln! outside diag! and the tooling writer". Both can be counted through expect_used and disallowed-macros.

And no check should be weakened silently: a lint ceiling that rises needs a Raised: trailer.

What would help
  • Run cargo clippy --message-format=json in T1 for every row of scripts/ci-matrix.toml (R0036). Count warnings per lint and per row from the JSON, not by matching text.
  • Store the counts in scripts/arch-ratchet.txt (R0044) as ceilings that only go down. Include unwrap_used, expect_used and undocumented_unsafe_blocks. A rise fails unless the commit carries a Raised: trailer.
  • Rewrite the clippy.toml reasons to describe the real rule. For example: read env vars through the documented RUNE_* entry points, and take time from the virtual clock or an injected Instant. Add disallowed-macros for eprintln! outside diag!.
  • Add #![forbid(unsafe_code)] to the six crates with no unsafe.
  • Restore each relaxed lint to deny in the PR that brings its count to 0. When every count is 0, switch T1 to -D warnings and delete the ceilings.
Done when
  • Clippy runs in T1 for every matrix row, with per-lint ceilings that fail on a rise.
  • The clippy.toml reasons name code that exists.
  • Every crate without unsafe has #![forbid(unsafe_code)].
  • undocumented_unsafe_blocks, let_underscore_must_use and disallowed_methods are back at deny, and T1 runs clippy with -D warnings.
How to check

The T1 clippy step and the arch-ratchet ceilings enforce this. Check it with a scratch PR that adds one let _ = must_use_fn(); and confirm the row fails.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P2 · size M
R0221Crates: nothing checks which workspace crate may depend on which, so a leaf crate can grow an edge back to the runtimeP2Phase 2bST02
arch-crate-deps-check · infra
What happens

The workspace is cut into crates with a clear direction. Today the [dependencies] tables have these edges between workspace crates:

CrateDepends on
runeprocwatch, rune-motion, rune-staging, rune-taffy
rune-kitrune, rune-mermaid, rune-motion
rune-fxrune-motion, rune-staging
rune-lightrune-staging
rune-mermaid, rune-knobs, rune-refrune
rune-perfprocwatch
themes/opencoderune, rune-kit
procwatch, rune-motion, rune-staging, rune-taffy, rune-mac, rune-registernone

The planned rune-abi and rune-render crates add two more layers under rune.

No file writes this direction down, and no check tests it. AGENTS.md says procwatch has "no Rune dependency", but only prose holds that rule. If a single Cargo.toml edit gives rune-motion or rune-taffy a dependency on rune, the build passes. Cargo rejects cycles, but rune doesn't depend on every leaf, so not every back-edge makes a cycle. Once such an edge exists, the leaf can no longer be built, tested or published alone. Layering only gets harder to restore after that.

Where
Why it matters

When crate boundaries are a checked rule, agents and contributors can't erode them by accident, and the planned rune-abi and rune-render split keeps its shape. The target: "scripts/crate-deps passes against scripts/crate-deps.toml (rune-abi <- rune-render <- rune <- kit; leaf crates have no rune edge)."

What would help
  • Add scripts/crate-deps. It reads cargo metadata --format-version 1 --no-deps, collects every edge between workspace packages and checks each against scripts/crate-deps.toml. Normal and build edges are checked against one list, and dev edges against a separate list. Dev edges such as test helpers may point up, but they should still be listed.
  • Make crate-deps.toml an allowlist of edges grouped into layers:
    • rune-abi has no workspace dependencies;
    • rune-render may use rune-abi and rune-staging;
    • rune may use both, plus procwatch, rune-motion and rune-taffy;
    • rune-kit, the themes and other component crates may use rune;
    • procwatch, rune-motion and rune-taffy have no rune edge.
  • Print each failing edge with the rule it breaks.
  • Run it from scripts/file-size.sh, so T1 runs it through R0030. It needs no build, so it adds seconds.
  • Examples and www/app are leaves and can depend on anything. List them by glob.
Done when
  • scripts/crate-deps.toml lists every current edge, and the check passes at HEAD.
  • A canary edge from rune-motion to rune fails, with a message that names the edge.
  • A canary normal edge from procwatch to any workspace crate fails.
  • T1 runs it through scripts/file-size.sh.
How to check

The check runs in T1 on every PR. A fixture in the scripts test suite runs it against a copy of the metadata with the canary edge added, so the checker itself stays tested.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P2 · size S
R0222Ratchets: file-size.sh only warns on soft-cap growth and test files over 1,000 lines, and stray files like pack.new land uncheckedP2Phase 2bMT02
arch-test-file-rules · infra
What happens

AGENTS.md asks for three things: Rust files under 800 non-test lines, any test file or test module under 1,000 lines, and tests in a sibling tests.rs or *_tests.rs. scripts/file-size.sh measures all three, but it only fails on files over the 1,500-line hard cap. Everything else is a warning, and the script exits 0. At this commit it reports 23 warnings.

Nothing stops the warnings from growing. 122 inline #[cfg(test)] mod name { ... } blocks sit inside production files, against the sibling-file rule, and nothing counts them.

The repo root also holds pack.new, a stray 368-line file. It is identical to crates/rune-fx/src/pack.rs as of commit 2d92d377, and the real file has changed since then. Nothing flags editor or patch leftovers like this one.

Where
Why it matters

Rules that only warn get ignored. The targets:

  • "scripts/file-size.sh fails on errors, on a soft-cap warning count above its ceiling (ending at 8 or fewer, down from 23), on any test file over 1,000 lines and on any folder over 40".
  • "the ratchets" run in the required gate.
  • "No check can be weakened or bypassed silently": raising a ceiling needs a Raised: trailer.
What would help
  • Add a committed soft-cap warning ceiling, starting at 23. file-size.sh fails when the count is above it. --update-exceptions lowers it and never raises it without --allow-raise. R0223 lowers it after each split.
  • Make a test file or inline test module over 1,000 lines an error. List the three current files in scripts/file-size-exceptions.txt with ceilings that only go down, until their splits land.
  • Split those three files by scenario, one PR each. The test count from cargo test must not change.
  • Count inline #[cfg(test)] mod name { blocks under crates/, with a ceiling of 122 that only goes down. Move them out to sibling files as their files are touched.
  • Delete pack.new. Fail a PR that adds a tracked *.new, *.orig, *.bak or *.rej file.

The clippy and forbid(unsafe_code) parts of this debt are handled in R0220.

Done when
  • file-size.sh fails when soft-cap warnings rise above the committed ceiling.
  • 0 test files are over 1,000 lines, and a new one fails file-size.sh.
  • Each split keeps the cargo test count unchanged.
  • The inline test module count is ratcheted from 122.
  • pack.new is gone, and a scratch PR that adds a *.orig file fails T1.
How to check

scripts/file-size.sh runs in the T1 ratchets job from R0030. Check it with scratch PRs that add a 1,001-line test file, one more inline test module and a foo.orig file, and confirm each fails.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P2 · size M
R0223Core: 19 non-test files are over the 800-line target, and the count can growP3Phase 2bXLT02
arch-soft-cap-splits · tracking
What happens

At this commit, scripts/file-size.sh --warn-only reports 19 files over 800 non-test lines and 23 warnings. The 23 warnings are those 19 files, 3 test files over 1,000 lines and 1 folder over 40 files. No file is over the 1,500-line hard cap, so the exceptions list is empty. The script exits 0 whenever there are no errors, so a 20th or 30th file over 800 lines passes too.

AGENTS.md gives the reason for the cap: to stop god files and edit collisions. The largest files are where planned work in several areas has to land:

The other files over 800 are outside core: rune-motion store.rs and scene.rs, rune-fx fill.rs, video/macos.rs, rune-kit diff/state.rs and diff/view.rs, and an example. Finishing this takes many issues. Each split is its own no-behaviour-change PR, as AGENTS.md asks. The splits touch files owned by the renderer, authoring, overlays, macOS and runtime work, so they have to land one at a time, between in-flight changes.

This tracker owns the splits that span several owners: render.rs, el.rs, overlay.rs with platform/macos.rs, and the 41-file crates/rune/src root. The single-owner splits are filed by their owners: edit.rs, edit/html.rs, text.rs, commit/apply.rs and recorder. The runtime splits handle runtime.rs, frame.rs and paint/build.rs.

Where
Why it matters

The target: "scripts/file-size.sh fails on errors, on a soft-cap warning count above its ceiling (ending at 8 or fewer, down from 23), on any test file over 1,000 lines and on any folder over 40." Contributors and agents working in parallel collide less when each area lives in its own module.

What would help

R0222 adds the warning-count ceiling, set at 23. After each split lands, lower the ceiling in the same PR. Each child keeps public paths through pub use, changes no behaviour and changes tests only in their module paths.

Done when
  • Every child is closed.
  • scripts/file-size.sh reports 8 or fewer soft-cap warnings, and the committed ceiling matches.
  • No file under crates/rune/src has more than 1,000 non-test lines.
How to check

scripts/file-size.sh in T1, with the ceiling from R0222. The ceiling only goes down, so a split cannot be undone without a failing check.

Issues
Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P3 · size XL
R0224Size: neither hello's stripped binary nor the web build's Brotli wasm is recorded or gated, so both only growP2Phase 2bMT02
perf-binary-size · infra
What happens

PLAN sets a budget of 5 MiB or less for a stripped arm64 Mac hello. The crate README's "Measured" section gives 10.9 MB, or 9.3 MB stripped, of which 1.2 MB is the three Inter faces. That line carries no rev, and nothing has measured the binary since. A macOS build now also embeds builtin_native.metallib (540 KB) plus two smaller uber metallibs.

On the web, scripts/web-build.sh prints the raw and gzip size of app_bg.wasm after each build. Nothing stores or compares those numbers. Brotli, the measure the research note's under-1.5 MB target uses, is never computed. web-hello uses default features, which include embedded-fonts. So its wasm carries Inter Regular, Medium and SemiBold plus IBM Plex Mono, 1.40 MB of TTF in all.

With no recorded baseline, a dependency or asset that adds 300 KB lands unnoticed.

Where
Why it matters

Users pay for size in download time and first-frame time, most of all on the web over a phone connection. The targets:

  • "Mac stripped arm64 hello <= 5 MiB" and "gzip wasm <= 3 MiB".
  • "Each .wasm at most 1.5 MB brotli, the cold load at most 2.2 MB brotli, and a regression above 3% fails".
  • "Count budgets required in T1 on every merge".
  • "Each published number records rev, backend, device and date."
What would help
  • Add scripts/size-budget, which measures:
    • stripped examples/hello on aarch64 darwin, x86_64 windows-msvc and x86_64 linux-gnu, built with a pinned profile and features;
    • web-hello and rune-www after wasm-opt. For each, measure the .wasm alone and the cold-load total (wasm, JS and fonts), each as raw, gzip -9 and brotli -q 11.
  • Commit the numbers, with their rev, to a baseline file that changes only by an explicit PR.
  • T1 fails a rise over the baseline without a Raised: trailer. The tolerance is 3% for Brotli. Use the same 3% for native until run-to-run noise is measured.
  • Upload cargo bloat --crates and twiggy top -n 30 as artifacts on every run, so growth can be traced to a crate or function.
  • The native size job runs only on merge_group, to keep T1 within its time budget. The wasm job runs on PRs, where www.yml already builds the wasm.
  • Cutting toward 5 MiB and 1.5 MB Brotli is separate work, for the perf and web size-reduction issues. This issue gives that work its baseline.
Done when
  • The baseline file holds stripped hello for 3 desktop targets, plus raw, gzip and Brotli .wasm and cold-load sizes for web-hello and rune-www, at a named rev.
  • A scratch PR that grows the Brotli wasm by more than 3% fails without a trailer.
  • The twiggy and cargo-bloat artifacts are attached to every run.
  • The README "Measured" line is replaced by the baseline numbers, with their rev and date.
How to check

The size job in T1 (wasm on PRs, native on the merge group) checks against the committed baseline. #124 gets a link to the baseline file.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P2 · size M
R0225Build: dependency count, duplicate versions and clean build time are never recorded, so they only growP2Phase 2bMT02
platform-build-cost-budget · infra
What happens

Cargo.lock holds 549 packages at this commit, and 30 package names appear in more than one version. Some of these are whole stacks built twice:

  • objc2 0.5.3 and 0.6.5, with objc2-foundation and objc2-app-kit at 0.2 and 0.3;
  • zbus 5.19.0 and 6.1.0 on Linux;
  • windows-sys 0.52, 0.59 and 0.61;
  • bitflags 1 and 2.

Nothing records how many packages a default examples/hello build pulls in, how many of them are duplicates, or how long a clean build takes. #124 says Rune has too many dependencies and builds too slowly, and nothing can show whether a change made that better or worse. A new dependency or a second version of an existing one lands without anyone seeing it.

Where
Why it matters

Every new app and every CI cache miss pays for the clean build, and #124 shows users notice. The targets:

  • "A package-count rise without a changelog fragment fails, and a clean-build regression above 10% fails".
  • "Normal-dependency duplicate versions are at or below a ceiling that only goes down, and every remaining one is listed with a reason".
  • "each release publishes hello's crate count and clean build time with default and minimal features on a pinned runner, neither rises more than 10% between releases without a note, and no crate appears at two versions without a recorded reason".
What would help
  • Counts in T1. These are deterministic and need no build. For examples/hello with default features on aarch64 darwin, x86_64 windows-msvc and x86_64 linux-gnu, run cargo tree --target <triple> -e normal|build|dev --prefix none and cargo tree -d. Record unique packages and duplicate names, with normal, build and dev counted separately. Store them in a committed budget file. T1 fails a rise unless the PR adds a changelog fragment.
  • Duplicate reasons. List every remaining duplicate in the budget file with a reason, such as "wgpu 27 needs objc2 0.6; AppKit code still on 0.5". A new duplicate with no reason fails.
  • Unify. Move the AppKit code from objc2 0.5 to 0.6 one module at a time, since it touches every macOS FFI file. Unify the zbus generations once the crates that pull in 5.x allow it.
  • Clean build time. Run this off T1, because hosted wall-clock time is too noisy to gate. A lane on a fixed runner type builds clean debug and release hello three times each with cargo build --timings, records the medians per rev, fails a rise above 10% over the budget, and keeps the 20 slowest compile units as an artifact.
  • Post the first numbers, and each change in them, on #124.
Done when
  • The budget file holds the package and duplicate counts per target and kind, plus the clean debug and release medians, at a named rev.
  • A scratch PR that adds a dependency without a fragment fails T1.
  • Every remaining duplicate is unified or listed with a reason.
  • The normal-dependency duplicate count is lower than today, and the numbers are on #124.
  • The build-time lane fails a 10% rise in the median clean build.
How to check

The T1 counts step checks against the budget file on every PR. The build-time lane runs on each push to dev on its fixed runner.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P2 · size M
R0226Overlays and macOS: overlay.rs and platform/macos.rs are over the 800-line cap that the owned-panel work must changeP2Phase 2bST02
platform-split-overlay-macos · refactor
What happens

crates/rune/src/overlay.rs has 1,097 non-test lines and crates/rune/src/platform/macos.rs has 828, by scripts/file-size.sh. Both are over the 800-line soft cap. Several planned changes edit both files: the owned macOS panel, the Wayland layer-surface reuse and the overlay input work. AGENTS.md says to move the area being touched into its own module, in its own PR, before adding to such a file. A behaviour change mixed into a 1,000-line file is hard to review, and it collides with other work in flight.

Both files already have folders for submodules. overlay/ has placement.rs (71 lines), draw.rs, input.rs and others. platform/macos/ has panel_bridge.rs, cursor.rs and others. Most of the remaining bulk is one large impl Overlay<T> in overlay.rs, and the Panel, pointer and geometry code in macos.rs.

Where
Why it matters

The owned macOS shell is meant to own its seam: "no out-of-band hook into winit goes unchecked, and the default macOS shell mutates no winit object". The panel adoption and pointer code that work rewrites should sit in named modules first, so the rewrite's diff shows only behaviour. The gate target also asks for a soft-cap warning count "ending at 8 or fewer, down from 23". This split removes 2 of those warnings.

What would help

Move code only, with no behaviour change, in one PR per file.

  • overlay.rs:
    • overlay/visibility.rs gets show, fade, hide, park, unpark and release;
    • overlay/backing.rs gets Backing, Live, layer() and window();
    • the existing overlay/placement.rs gets place_window, origin sync, resized, resolve_size and pointer following.

OverlayHandle, OverlaySpec and the Overlay struct stay in overlay.rs.

  • platform/macos.rs:
    • macos/geometry.rs gets display bounds, window frames and overlay rects;
    • macos/pointer.rs gets PointerState and the mouse monitors;
    • macos/panel.rs gets Panel and PanelFlags.

Each inline test moves with its code into a sibling *_tests.rs.

Keep every pub and pub(crate) path through pub use. Change tests only in their module paths.

Done when
How to check

Run scripts/file-size.sh in T1. The macOS tests from R0058 and the Linux and Windows suites must pass on the split PRs. The API snapshot diff must be empty.

Depends on
Part of
  • Theme: T02
  • Tracked in R0223
  • Phase 2, milestone 2b · priority P2 · size S
R0227Gates: blessing goldens, raising ceilings, allowlisting findings, weakening checks or deleting tests leaves no traceP2Phase 2bMT02
tooling-evidence-trailers · infra
What happens

Some checks can be made green by changing the check itself, in the same commit as the code change, and nothing records it:

  • RUNE_BLESS=1 rewrites the markdown fixture goldens and the Kit accessibility goldens.
  • scripts/file-size.sh --update-exceptions --allow-raise raises the ceilings in scripts/file-size-exceptions.txt and the folder-shape list.
  • The exhaustive-literal tests, such as app_spec_compat.rs, are ordinary test files. A commit that adds a field to AppSpec can add the field to the "legacy" literal too, and the test still passes.
  • A commit can delete a test or add one of the 22 #[ignore] attributes now in the tree, and no count goes down anywhere.
  • When a CI gate exists, a PR could also edit the checker script or the workflow condition that judges it.

Agents write both code and checks in this repo, so the cheapest way to get a green check is often to change the check. A reviewer cannot tell an intended golden update from a hidden regression unless the commit says so and shows the change.

Where
Why it matters

The target: "100% of protected-path changes carry a Blessed:, Allowed:, Raised: or Checks-changed: trailer, with artifacts for goldens. Test counts fall and ignore or skip counts rise only with a Tests-removed: trailer." Without this, every other gate in T1 can be weakened by the PR that it judges, and a pass tells you less.

What would help

Add an evidence-diff job to T1 (R0030):

1. Commit a list of protected paths, for example scripts/protected-paths.txt. It covers goldens, allowlists, budgets, ceilings, exception files, literal-compat fixtures, the legacy canary app, the flake quarantine, scripts/verify and its checkers, and .github/workflows/. 2. A change under a protected path needs a trailer with a reason: Blessed: (goldens), Allowed: (allowlists), Raised: (ceilings and budgets) or Checks-changed: (checkers, workflows, compat fixtures). 3. The job uploads before and after artifacts: rasters and a diff image for scene goldens, JSON diffs for trees and budgets. 4. It compares per-crate test counts and #[ignore] and skip counts with the merge base. A fall in tests or a rise in ignores or skips needs Tests-removed:. The job summary lists assert lines that were removed or changed in test files. 5. The job runs the checker from the base branch, not from the PR. Then a PR cannot weaken the check that judges it, and a change to the checker takes effect only after it merges.

Run it warn-only for one week, then make it required.

Done when
  • A fixture PR that changes a golden, a workflow or a checker without a trailer fails T1.
  • A fixture PR that removes a test or adds #[ignore] without Tests-removed: fails T1.
  • Every blessed golden has before, after and diff artifacts on the run.
  • A PR that edits the checker is judged by the base branch's copy, and a fixture shows this.
  • The protected-path list is itself a protected path.
How to check

The evidence-diff job runs on every PR and merge group in T1. The fixture PRs above run as the job's own tests in the scripts test suite, so any change to the checker has to keep them failing as expected.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P2 · size M
R0228Tests: flaky tests are not tracked, and there is no quarantine with a ceilingP2Phase 2bMT02
tooling-flake-ledger · infra
What happens

The workspace has about 3,050 #[test] functions. No workflow runs them today: the only workflows are site.yml and www.yml. When T1 and the platform lanes start to run them on new machines (Linux lavapipe, hosted Macs, Windows), some tests will fail sometimes. The repo has no record of which tests are flaky, no retry policy and no JUnit output. It also has no quarantine list.

Without a record there are two bad outcomes. A flaky test blocks merges until someone reruns the job. Or people get used to rerunning until it is green, and a real intermittent bug, such as a race in the render thread, is never seen. If a test is marked to skip, nothing shows whether it has recovered or whether it is still running.

Where
  • .github/workflows/: only site.yml and www.yml, and neither runs cargo test.
  • No nextest config and no quarantine or flake file in the tree.
  • crates/rune-motion/src/math.rs:7: one cause of flakes across CI hosts is already known (golden motion traces that differ in the last bits).
Why it matters

The targets: "Flaky runs at most 0.1% of executions over 30 days, rates reported after 100 executions. Quarantine at most 10 entries, each linked to an issue, still running, and expiring after 14 days." The T1 target also asks that "any red dev is fixed or reverted within 2 h". That works only if a red result means a real failure, not noise.

What would help

This builds on nextest (R0053), which gives retries, a flaky status for tests that pass on retry, and JUnit output.

1. Add tests/quarantine.txt, with one line per entry: test id, reason, issue number, date added. It has at most 10 entries, and a ceiling that only goes down, checked the same way as file-size-exceptions.txt. 2. T1 builds a nextest filter from the file. Quarantined tests leave the required set but still run in every lane, in a step that does not block. Their results go into the ledger. 3. An entry expires after 14 days. If the test passed 50 runs in a row, it goes back to the required set. If not, the job escalates its issue. 4. A scheduled workflow collects nextest JUnit from T1 and the post-merge lanes. It computes per-test flake rates over 30 days. The denominator counts every execution, including retries and quarantined runs. It reports a rate only after 100 executions and files an issue for any test above 0.5%. It reports days with missing results instead of skipping them. 5. Post a weekly report: the total flaky-run rate, the worst 10 tests and the quarantine age.

The quarantine file is a protected path under R0227, so adding an entry needs a trailer.

Done when
  • tests/quarantine.txt exists with at most 10 entries, and each entry has an issue and a date.
  • Adding an 11th entry, or raising the ceiling, fails T1.
  • Quarantined tests run in every lane and appear in the ledger.
  • An entry older than 14 days fails the check until it is removed or renewed with a reason.
  • A weekly flake report is posted.
  • Flaky runs are at most 0.1% of executions over 30 days.
How to check

The scheduled ledger workflow and the quarantine ratchet in T1. A fixture test that fails one run in three must show up in the ledger with a rate near 33% after 100 runs.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P2 · size M
R0229CI: advisories, licences and sources are never checked, actions are pinned by tag, and binaryen is fetched without a checksumP2Phase 2bST02
tooling-supply-chain · infra
What happens

No job checks the dependency tree for security advisories, licences or sources. The repo has no deny.toml. The CHANGELOG shows that a manual cargo deny run once found three unmaintained-crate advisories (RUSTSEC-2026-0370, 0371 and 0372) through rfd's zbus 5 path. Rune fixed it by hand, but nothing stops the same kind of advisory from coming back with the next cargo update.

Every GitHub Action is pinned by a major tag (actions/checkout@v5, Swatinem/rust-cache@v2, taiki-e/install-action@v2, actions/cache@v4, actions/setup-node@v5, oven-sh/setup-bun@v2). That is 8 references in 2 workflows, and a moved tag changes what runs. www.yml installs binaryen by piping a release tarball from curl into tar, with no checksum. That job also runs on pull requests.

The workspace pins its own toolchain (1.99.1), and Cargo.lock pins every crate. That is correct for the gate, but nothing tells Rune when the newest compatible dependencies break it. Apps that run cargo update find out first.

Where
Why it matters

The target says CI must be "safe to run in a public repo", with "100% of actions pinned by SHA". The tarball and the tag-pinned actions run with the job's token on every PR. An advisory in a crate that every Rune app ships is a problem for every app, and only Rune can see it early.

What would help

1. Add deny.toml and a cargo deny check advisories licenses sources step to T1 (R0030). For licences, allow the set the tree uses today and fail on anything new. For sources, allow crates.io only: the lockfile has no git sources today. Leave duplicate-version counting to the build-cost budget issue and rust-version to R0219, so that the two counts are kept in one place each. 2. Pin every uses: by full commit SHA, with the tag in a comment. Let Dependabot or Renovate propose the bumps. This follows the workflow linting in R0050. 3. Commit the SHA-256 of the binaryen tarball beside BINARYEN_VERSION and check it before tar runs. 4. Add a nightly "latest" lane: cargo update, then scripts/verify t1. When it is red, it files one issue (or updates the open one) with the lockfile diff. It never blocks a merge.

Done when
  • cargo deny runs in T1, and a fixture that adds a crate with a known advisory fails it.
  • Every uses: in .github/workflows/ is a 40-character SHA, and a lint fails a tag pin.
  • A wrong binaryen checksum fails the www job before extraction.
  • The nightly latest lane runs, and a red run opens or updates an issue.
How to check

The cargo deny step and the SHA-pin lint in T1, and the scheduled latest lane. An injected bad checksum in a scratch branch proves the binaryen check.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P2 · size S
R0230Format: no workspace rustfmt config or check exists, so a stray cargo fmt rewrites hundreds of filesP3Phase 2bMT02
arch-rustfmt-per-crate · infra
What happens

rust-toolchain.toml installs rustfmt. But the repo has no workspace rustfmt.toml, and no job runs cargo fmt --check. Three crates have their own config (crates/rune-kit, examples/kit-gallery, themes/opencode), each max_width = 120 and use_small_heuristics = "Max". crates/rune has none, so rustfmt uses its default 100-column width, and the house style goes to 130 columns.

With the pinned 1.99.1 rustfmt, rustfmt --check from each crate's lib.rs reports these files as changed:

CrateFiles changed (current config)With the kit's configFiles
rune601560623
rune-kit63 (its own config)6383
rune-motion261828
rune-mermaid6060
rune-fx1212

Even the crates that have a config do not pass. So one cargo fmt from an agent or an editor rewrites hundreds of files. The diff collides with every open branch, and git blame loses its history.

Where
Why it matters

The target: "Every crate passes cargo fmt --check", enforced by the required gate. Until then, format churn is a source of edit collisions, the problem the file-size and folder-shape rules exist to prevent. Reviewers also cannot tell a reformat from a real change in a large diff.

What would help

1. Add one workspace rustfmt.toml that matches how the code is written now. Measure two or three candidates (for example 120 and 140 columns with use_small_heuristics = "Max") by changed lines, not changed files, and pick the one that changes fewest. Remove the per-crate files if they match it. 2. In the first PR, record the baseline: files and lines that cargo fmt --check would change per crate under the pinned toolchain. 3. Reformat one crate per PR, or one crates/rune folder per PR, when that folder has no open work. Add each reformat commit to .git-blame-ignore-revs; GitHub's blame view reads it. 4. Add a T1 step (R0030) that runs cargo fmt --check -p <crate> for finished crates and rustfmt --check on the root module of finished crates/rune folders. The list grows until it covers the workspace, then becomes cargo fmt --all --check.

Never reformat everything in one commit. dev is fast-forward-only, so the reformats are ordinary commits and nothing is rewritten.

Done when
  • A workspace rustfmt.toml exists, and the per-crate baseline is in the first PR.
  • Every reformat commit is listed in .git-blame-ignore-revs.
  • T1 fails when a crate or folder on the list has a formatting diff.
  • cargo fmt --all --check passes in T1 for every crate.
How to check

The T1 format step over the growing list, and at the end cargo fmt --all --check. A fixture PR with a mis-indented line in a finished crate must fail.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P3 · size M
R0231Core: crates/rune/src has 41 files at its root, over the 40-file folder warningP3Phase 2bST02
arch-src-root-shape · refactor
What happens

crates/rune/src has 44 .rs files at its root. Three are test files, so scripts/folder-shape.sh counts 41 and warns (41 warn crates/rune/src/). The root mixes the runtime, rendering, media, OS services, development tooling and design tokens. A new module has no obvious home, so it usually goes at the root, and the count can only grow.

Several capabilities are already folders. shortcuts/, native_menu/, video/ and recorder/ use mod.rs, so moving those folders does not lower the root count. The count comes from root files such as tray.rs, open_url.rs, clipboard.rs, file_dialog.rs, dirs.rs, prefs.rs, image.rs and pixels.rs.

Where
Why it matters

The architecture target asks the gate to fail "on any folder over 40". This folder is the one that is over today. A flat root also slows agents, which pick a place for new code by listing the folder.

What would help

Group root modules into capability folders. Keep every public path the same through pub use, and change no behaviour. One option that reaches 35:

The root then has 35 non-test files. In lib.rs, write pub use services::tray; and the others, one per line and sorted, and keep the existing item re-exports (pub use tray::Tray;) as they are.

The other option is to move single files into their existing same-name folders as mod.rs. That changes less but adds nothing to the capability shape. Use the grouping above.

Do it in one PR when those files have little open work. Run it after the API snapshot exists, so the snapshot shows that no path moved.

Done when
  • scripts/folder-shape.sh reports 35 or fewer non-test files in crates/rune/src.
  • The public API snapshot has no diff on any target.
  • No new prefix-family warning in the new folders.
  • cargo check --workspace --all-targets passes, and the examples build with no change.
How to check

scripts/folder-shape.sh, run inside scripts/file-size.sh in T1, and the per-target API snapshot diff (R0039).

Depends on
Part of
  • Theme: T02
  • Tracked in R0223
  • Phase 2, milestone 2b · priority P3 · size S
R0232Core: el.rs is 1,313 lines of El types and builders, and one commit in seven touches itP3Phase 2bST02
merge-gate-split-el-rs · refactor
What happens

crates/rune/src/el.rs is 1,313 lines. It has no inline tests, so all 1,313 count against the 800-line target. It is the second-largest soft-cap warning in the repo. Since the repo began, 246 of 1,642 commits (15%) have touched it. Most view and component changes add or change an El builder, so parallel work collides here.

Much of the builder API has already moved into el/: 27 modules such as focus.rs, a11y.rs, handlers.rs and text.rs, several with their own impl El block. What is still in el.rs:

  • pointer event types: Phase, Drag, PointerPress, PointerEvent;
  • spec and style types: ScrollSpec, GrowthSpec, InputSpec, Shadow, RadialRadius, Outline, Align, the link and pill types;
  • the El struct (about 280 lines of fields) and auto_grow;
  • one impl El with input and paste handlers, live_* bindings, secondary presses, native surface and video, focus, modal and sequence, accessibility and help, children, and text style.
Where
Why it matters

The architecture target asks the gate to fail when soft-cap warnings go above a ceiling that "ends at 8 or fewer, down from 23". el.rs is one of the 23, and it is the one most likely to collide, because nearly every feature passes through it.

What would help

Move each builder group next to the code it already shares a module with, through more impl El blocks. Change no behaviour and keep every public path:

  • focus builders (focusable through no_focus_ring) into el/focus.rs;
  • role, label, level, expanded and help* into el/a11y.rs;
  • color, align, text_case, justify and the other text style methods into el/text.rs;
  • input and paste handlers and secure and revealed into a new el/input.rs;
  • the live_* methods and bind_live into a new el/live.rs;
  • native_surface, surface_* and video into a new el/surface.rs;
  • the pointer event types into a new el/pointer.rs, re-exported from el.rs.

El's fields stay in el.rs. Fields that the new modules use become pub(super) if they are not already visible. ScrollSpec and the other literal-built types keep their fields and paths unchanged. el/ grows from 27 to about 31 files, under the 40-file warning.

Done when
  • scripts/file-size.sh reports el.rs under 800 non-test lines.
  • The public API snapshot has no diff on any target.
  • The headless and Kit golden suites pass with no golden changed.
  • No new folder-shape warning in el/.
How to check

scripts/file-size.sh and the API snapshot diff in T1 (R0039). The literal-compat tests for ScrollSpec keep compiling unchanged.

Depends on
Part of
  • Theme: T02
  • Tracked in R0223
  • Phase 2, milestone 2b · priority P3 · size S
R0233Repo: history holds about 155 MiB of packs, and nothing stops a large binary or a re-encoded video from landingP3Phase 2bST02
tooling-repo-media-ratchet · infra
What happens

A full clone of the repo downloads about 155.6 MiB of packs (git count-objects -vH), while the tree at this commit is about 86 MiB. An app that pins a dev rev pays the same cost on its first cargo git fetch. Cargo fetches the repository's history, not one tree.

Most of the extra weight is media. demo/rune.mp4 has been committed three times, on 2026-11-05 and twice on 2026-11-06, at 14.4 MB, 23.0 MB and 21.8 MB. Video does not compress in a pack, so these three versions alone are about 59 MB of history. Each re-encode of the hero video adds another 15 to 25 MB that every clone downloads for ever, because dev is never rewritten. Four PNGs in demo/light/ are 2.4 to 2.6 MB each, so any update to them also adds more than 2 MB.

.gitignore ignores demo/**/*.mp4, but an ignore rule does not apply to a file that is already tracked. No check limits the size of a new or changed blob.

Where
  • .gitignore:9: demo/**/*.mp4, and .gitignore:12, one exception.
  • README.md:8: the README links demo/rune.mp4, so it is kept in the tree.
  • git ls-tree -r -l HEAD: 5 blobs over 2 MB at this commit, demo/rune.mp4 and demo/light/{chat,emissive,godrays,raised}.png.
  • AGENTS.md, "This repo is public": commit the stills a doc shows.
  • #124: build cost and fetch weight.
Why it matters

The target: "0 new blobs over 2 MB without a Media: trailer." Every new app's first build waits on this fetch, and so does every fresh CI runner without a cache. The cost only grows, because history cannot be cleaned on a fast-forward-only branch.

What would help

1. Add a check to the T1 ratchets job (R0030). It fails on any new or changed blob over 2 MB in the PR's commits, unless the commit has a Media: <reason> trailer. It uses the same trailer parser as R0227. 2. Report the bytes added to history per month in the weekly report, against a budget (for example 20 MB a month), so slow growth is visible. 3. Host the hero video outside git, on the docs site or as a release asset. Link to it from the README and keep a still in demo/. The next re-encode then adds no blob. 4. Never rewrite history to remove the old versions. Apps pin those revs.

Done when
  • The blob-size check runs in T1, and a fixture commit with a 3 MB PNG and no trailer fails it.
  • The same commit with Media: <reason> passes.
  • The weekly report shows bytes added to history in the last 30 days.
  • README.md links the hero video at a URL outside the repo, and the next update to it adds no blob to git.
How to check

The T1 ratchets job on every PR and merge group, and the weekly report. The 3 MB PNG fixture runs in the scripts test suite.

Depends on
Part of
  • Theme: T02
  • Phase 2, milestone 2b · priority P3 · size S
R0234CI: no lane runs Rune on macOS, Windows, Linux GPUs, browsers or iOS after mergeP0Phase 2bXLT03
tooling-t2-lanes · tracking
What happens

The repo has two workflows, site.yml and www.yml, and both run on Ubuntu. After merge, nothing runs Rune on macOS, Windows, a Linux GPU or compositor, a browser or iOS. The only Rust job builds rune with default features off. So CI never compiles AccessKit, D-Bus or the Metal backend, and it runs only rune-www's tests. Apps pin dev revs that no machine has run on their platform. #182 (Windows never uses the precompiled shader, because its hash came from a CRLF checkout) was found after merge. When something breaks, nothing names the commit that broke it.

This tracks one outcome. Every platform has a post-merge lane. Apps pin a verified branch that moves only to a SHA every lane passed. A red lane names its culprit. It takes many issues, because each platform needs its own runner, session and adapter, and promotion and bisect depend on all of them.

Where
Why it matters

The targets:

  • All 5 platforms and 8 variants run on 100% of dev pushes, with 0 skips for the resources each lane declares.
  • Each desktop lane runs its accessibility test: roles, names, an action, focus and a state change. The web lane asserts the DOM mirror.
  • verified advances only when every required variant passed on that SHA, and only by fast-forward. Dev-to-verified lag p95 is at most 3 h.
  • 100% of red test failures get an issue naming the first bad commit within 3 h. A revert PR opens when no fix lands within 2 h.
  • 11 of 11 renderer lanes are green on every verified rev, with 0 skipped GPU tests. Canonical scenes agree within 2/255 across backends.
What would help

These rules hold for every child:

  • Self-hosted runners run only on push to dev and on dispatch restricted to dev, never on pull_request.
  • Hosted lanes gate on counts, never on wall-clock times. Wall-clock gates live on reserved hardware under R0510, which also tracks the real-GPU vendor lanes.
  • No job is allowed to fail. Under a new strict mode (RUNE_TEST_STRICT=1), a skipped test for a declared resource fails.
  • Each lane uploads a manifest with the OS, backend, adapter, driver, rev and the tests that ran and skipped.
  • A red lane opens one issue through R0249. R0155 sizes the machines to fit the 3 h lag.
  • Screen-reader speech lanes are tracked apart from the platform accessibility-API lanes here.
Done when
  • Every child issue is closed.
  • Every variant runs on each dev push with 0 skips under strict mode, and promotion reads those results.
  • No job is marked allowed-to-fail, and 0 tests are quarantined.
  • Dev-to-verified lag p95 is at most 3 h over 30 days.
  • Post-merge lanes report within 2 h of every push for 30 consecutive days of merges. Oldest-version lanes run weekly and before each changelog fold.
How to check

A weekly report job computes the lag, pass rates per variant, skip counts and the quarantine count from the lane history.

Issues
Depends on
Part of
  • Theme: T03
  • Phase 2, milestone 2b · priority P0 · size XL
R0235Examples: no platform lane builds the examples on the platforms their index row declaresP2Phase 2bST01
authoring-examples-platform-lanes · infra
What happens

Rune has 30 examples. Some use services that differ by platform: edge overlays (overlay, overlay-lab, glass-panel), drag-out (drag-out), file drops (drop-files), the clipboard (rich-clipboard), background apps and several windows (background, launcher), video (video-player, video-tiles) and the web (web-hello, web-showcase). Today no CI job builds any example on any platform. The repo's only workflows deploy the site.

R0031 adds an index with a platform column and compiles every example in T1. R0033 gives each example a headless test. T1 runs on one host, so neither shows that an example declared for Windows or the web builds there, or that its OS service works there. A cfg(target_os) branch, a missing feature or a platform-only API can break an example on a platform that nobody builds.

Where
Why it matters

An author on Windows or Linux copies an example as a starting point and finds it doesn't build, or its overlay or clipboard does nothing. An agent picks an example from the index and trusts the platform it lists.

The target is that docs and examples are complete, compiled, tested and current: 100% of discovered examples compile in T1 and in each platform lane their index row declares, and each has a sibling headless test that asserts an interaction or state change.

What would help
  • In each lane from R0234, read the platform column of examples/README.md and build every example declared for that lane's platform. Fail the lane on any build error. The web lane builds wasm32 examples.
  • Run each example's headless test in each lane where it is declared.
  • For examples that use OS services (overlays, drag-out, drop, clipboard, background and multi-window, video), add a short smoke test in each declared lane. It launches the example, drives one interaction through the existing script or tree flags, and checks the result. An example that can't run a service in a lane says so in its index row, with a reason.
  • An example with no platform column fails the check.
Done when
  • Every lane builds 100% of the examples its platform column lists, and a build error fails the lane.
  • Each example's headless test runs in every lane it declares.
  • Each OS-service example has a smoke test that passes in every lane it declares, or a reason in its index row for each lane it can't run in.
  • A test fixture with a wrong platform column or a broken cfg branch makes the lane fail.
How to check

The platform lanes from R0234 run the build, the headless tests and the smoke tests after each merge. The examples check from R0031 keeps every example in the index with a platform column.

Depends on
Part of
  • Theme: T01
  • Tracked in R0205
  • Phase 2, milestone 2b · priority P2 · size S
R0236Hot reload: only the last stage of save-to-pixels is timed, and no lane measures it per platformP2Phase 2bMT01
tooling-hot-stage-stamps · infra
What happens

The README says the median save-to-GPU time is about 8 s for Settings, over ten edits. PLAN still says about 1 s measured (989 ms median), from a spike on a plain binary, and a 300 ms goal. Nobody can say where the 8 s goes, because only the last stage is timed.

The rune-hot-pixels line and the tree's hot object report the patch generation and pixels_ns, the wall-clock time when the pixels were read back. No earlier stage has a stamp: not when the save was seen, the guard accepted it, dx started and finished the build, the patch arrived or was applied. The number also comes from an offscreen readback, not a presented frame, from one machine, with no p95, and it is never re-measured.

The watcher in scripts/rune-dev wakes every 100 ms and stats every tracked file under crates/, examples/ and themes/, about 1,460 files. That cost is one of the stages nobody has measured.

Where
Why it matters

An author or agent who edits a view waits about 8 s to see it, and can't tell which change would help. The targets: a view edit shows on screen in about a second with state kept, with the numbers re-measured weekly and published; save-to-first-new-frame p95 at most 1 s.

What would help
  • Stamp each stage on one clock, nanoseconds since the Unix epoch, which pixels_ns already uses: save seen, guard accepted, dx build start, dx build end, patch received, patch applied, first new presented frame, PNG written. rune-dev writes its stamps to the control channel; the app adds its own. All go in the rune-hot-pixels line and the tree's hot object.
  • Commit a corpus of 30 edits: view body changes, added children, layout and colour changes.
  • A weekly lane on pinned macOS, Linux and Windows runners from R0234 applies the corpus to hello, settings and an outside fixture app through rune-dev --local from R0023, with a warm cache. It checks that state and scroll are kept after each edit, using the state, scrolls and motion fields the hot object already reports.
  • Publish per-stage and total p50 and p95 per platform, and write the first results to a research note.
Done when
  • The rune-hot-pixels line carries all eight stamps on one clock.
  • A 30-edit corpus is committed.
  • The weekly lane publishes per-stage and total p50 and p95 for macOS, Linux and Windows per rev.
  • The lane reports the share of edits that kept state and scroll.
  • A research note gives the first per-stage results and names the largest stage on each platform.
How to check

A unit test parses a rune-hot-pixels line and checks the stamps are present and in order. The weekly lane keeps the numbers current. Hosted runners are noisy, so the lane reports medians and does not gate merges on wall time.

Depends on
Part of
  • Theme: T01
  • Tracked in R0502
  • Phase 2, milestone 2b · priority P2 · size M
R0237Linux: no test reads Rune's accessibility tree through AT-SPIP1Phase 2bMT03
a11y-lane-linux-atspi · infra
What happens

On Linux, AccessKit's Unix adapter puts Rune's tree on the AT-SPI bus for Orca. It does this once the desktop turns accessibility on, with each surface as one of the app's windows. It needs no window handle, so layer-shell overlays get a tree too. accessibility and dbus are default features.

No test reads the tree back. crates/rune/tests has accessibility_macos and accessibility_windows, and nothing for Linux. A zbus, AccessKit or adapter change could leave Orca users with an empty or wrong tree, and nothing would fail. AT-SPI activation is lazy: the adapter starts only when a client registers. A test that just opens a window proves nothing.

Where
Why it matters

Orca users on GNOME and KDE would get a silent or wrong screen, and the bug would ship in a pinned rev. The targets: platform accessibility-API lanes are green on every merge. Every desktop lane checks roles, names, an action, focus and a state change. 100% of scenes match on all 5 targets, and every host kind (windows, overlay panels, layer surfaces) exposes its expected content and working actions. Focus and caret rects are within 1 pt of the drawn rects.

What would help
  • Run the test in the Linux lanes from R0071, under dbus-run-session with at-spi2-core. Open Rune under Xvfb (X11) and headless sway (Wayland) on lavapipe.
  • Register as an AT-SPI client the way Orca does, so the adapter activates. Then read the tree with the atspi crate: role, name, states, actions, extents, and the Text and Value interfaces.
  • For every Kit scene, compare the result with its AccessKit golden from R0078. Use a published AccessKit-to-AT-SPI mapping table. A difference is either in the table with a reason or a failure.
  • Include a layer-shell overlay through the windowless adapter.
  • Act on the tree: DoAction on a button runs its on_press. A focus move sets the focused state and emits the event. A toggle reaches the tree as a state change. Extents are within 1 pt of the drawn rect.
  • The lint that checks roles and names over every example's --tree is a pre-merge check, tracked apart from this lane.
Done when
  • Every Kit scene matches its golden through the mapping table on X11 and on Wayland.
  • A layer-shell overlay exposes its expected content and actions.
  • DoAction on a button runs on_press. A focus move and a state change reach the AT-SPI tree.
  • Extents are within 1 pt of the drawn rects.
  • The test runs on every dev push with 0 skips, and is green.
How to check

The Linux lane, with results per push. On a branch, map a button to the wrong role. The scene must fail with a diff that names the node.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P1 · size M
R0238macOS: the AppKit accessibility test runs only by hand and checks one button in a 4-element viewP1Phase 2bMT03
a11y-lane-macos-ax · infra
What happens

accessibility_macos.rs asks a window's content view for its accessibilityChildren, as VoiceOver and the Accessibility Inspector do. It walks the elements AccessKit returns, then presses one button with accessibilityPerformPress. The view has four elements: a heading, a button, a text field and a label. The test runs only when someone sets RUNE_GUI_TESTS=1 in a logged-in session.

Nothing compares what AppKit reports for Kit components with what the AccessKit tree says. The Kit goldens stop at the AccessKit level. An AccessKit update or a host change could alter roles, subroles, values, frames or actions, and no test would see it. The adapter also refuses a view that key-value observing has already subclassed. Then the window has no tree, and the only sign is a line on stderr.

Where
Why it matters

VoiceOver users meet a missing label or a dead control before any test catches it. The targets: platform accessibility-API lanes are green on every merge. Each desktop lane checks roles, names, an action, focus and a state change. Focus and caret rects are within 1 pt of the drawn rects. 100% of scenes match on all 5 targets. A refusal shows a visible diagnostic, and the tree never disappears silently.

What would help
  • Turn the test into an AX dump harness. For each Kit scene, open a real window and read these attributes recursively: AXRole, AXSubrole, AXTitle or AXDescription, AXValue, AXIdentifier, AXEnabled, AXFrame and the action names.
  • Compare them with the scene's AccessKit golden from R0078, through a published AccessKit-to-AX mapping table. Do not compare against a separately blessed AX dump. Every difference is either in the table with a reason or a failure.
  • Perform each listed action once and check that its handler ran. Move focus and check AXFocused. Toggle a control and check that its AXValue changes.
  • Keep the reads in-process, through the content view, as the test does today. Then the runner needs no Accessibility permission. A cross-process AXUIElement reader would need a TCC grant on the runner.
  • Run it in the macOS GUI lane from R0061. Pin the OS image, and record the OS version with each result, since AX attribute order and timing change between releases.
  • Fail when the adapter refuses a view.
Done when
  • Every Kit scene is compared through the mapping table, with 0 unexplained differences.
  • Each node's AXFrame is within 1 pt of its drawn rect.
  • Every listed action runs its handler. A focus move and a state change reach the AX tree.
  • The test runs on every dev push with 0 skips, and fails on any difference.
How to check

The macOS lane, with results per push. On a branch, change a Kit toggle's role. The lane must fail with a diff that names the scene and the node.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P1 · size M
R0239Web: no browser test reads the page's accessibility treeP1Phase 2bMT03
a11y-lane-web · infra
What happens

On the web, Rune keeps a hidden semantic DOM mirror over the canvas, so that assistive tech, the keyboard and Find-in-page can see the scene. The mirror holds landmarks, headings, text runs, links, images and buttons. syncA11y in the bridge writes it into the page. The mirror is a second model, separate from the AccessKit tree. It treats input nodes apart from text, and #118 asks for it to carry the AccessKit tree's roles, states, live regions and focus.

The web smoke tests check typing, focus and links, but they never read what a browser exposes to screen readers. A mirror change could drop roles, names or states, and nothing would fail. axe-core never runs, so no machine checks the WCAG rules it can test.

Where
Why it matters

Screen-reader and keyboard users in browsers are the first to meet a regression. The targets: platform accessibility-API lanes are green on every merge, and the web lane asserts the DOM mirror. 100% of scenes match on all 5 targets. axe-core reports 0 violations in Chromium, WebKit and Firefox, with an empty allowlist. Every machine-testable Rune or Kit cell names a test that passed in the latest run, so that an app can pass an independent WCAG 2.2 A and AA audit.

What would help
  • Add Playwright jobs in Chromium, WebKit and Firefox to the browser lane from R0062. Run WebKit on the macOS runner as well as on Linux, because headless WebKit on Linux differs from Safari.
  • Load every kit-gallery story and a form scene. Take the browser's accessibility snapshot. Compare roles, names, states and focus with the AccessKit goldens from R0078, through a published AccessKit-to-ARIA mapping table.
  • Repeat the keyboard walk in the browser: Tab order, a button pressed with Space and Return, and focus that follows the drawn focus ring.
  • Run axe-core with the wcag2a, wcag2aa, wcag21aa and wcag22aa tags.
  • Start with an allowlist of today's failures, each linked to its issue (#118 for most). A gate check lets the list only shrink.
Done when
  • Every gallery story and the form scene are compared in 3 engines.
  • The keyboard walk passes in every engine.
  • axe-core runs in every engine. Each violation is either allowlisted with an issue link or fails the lane.
  • The allowlist ratchet runs in the merge gate, and the list never grows.
  • The lane runs on every dev push and is green.
How to check

The web lane, with results per push. On a branch, drop a button's name from the mirror. The snapshot comparison and axe-core must both fail.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P1 · size M
R0240Windows: the UI Automation test runs only by hand and checks two control patternsP1Phase 2bMT03
a11y-lane-windows-uia · infra
What happens

accessibility_windows.rs runs only when someone sets RUNE_GUI_TESTS=1 in a desktop session. It finds four elements through IUIAutomation, presses Save through the Invoke pattern and sets a field through the Value pattern. Nothing more.

NVDA and Narrator use other patterns, and nothing checks them: Toggle, RangeValue, ExpandCollapse, SelectionItem, Text and Scroll. Nothing checks the UIA events that AccessKit raises (StructureChanged, PropertyChanged, focus). Nothing checks the WinEvents Rune raises itself: EVENT_OBJECT_REORDER when children change, and EVENT_OBJECT_LOCATIONCHANGE when a scroll moves boxes. Rune raises those two because AccessKit's UIA events don't cover them. A regression in either path would reach screen-reader users with no failing test.

Where
Why it matters

NVDA and Narrator users would hear a stale list after an insert, or lose their place after a scroll, and nothing would catch it. The targets: platform accessibility-API lanes are green on every merge. Each desktop lane checks roles, names, an action, focus and a state change. 100% of scenes match on all 5 targets. Focus and caret rects are within 1 pt of the drawn rects.

What would help
  • Build a UIA dump harness on IUIAutomation. For each Kit scene, read ControlType, Name, AutomationId, BoundingRectangle and the supported patterns with their state.
  • Compare them with the scene's AccessKit golden from R0078, through a published AccessKit-to-UIA mapping table, patterns included.
  • Record UIA events and WinEvents separately through a client hook. Assert that:
    • a row insert raises StructureChanged and EVENT_OBJECT_REORDER;
    • a scroll raises EVENT_OBJECT_LOCATIONCHANGE;
    • a focus move raises a focus event;
    • a toggle raises a PropertyChanged for its state.
  • Exercise one action per pattern: Invoke, Toggle, set a RangeValue, ExpandCollapse, SelectionItem.Select, and a Scroll.
  • Run it in the Windows lane from R0063. That lane checks for an interactive session first, because UIA clients don't see the window without one.
Done when
  • Every Kit scene matches its golden through the mapping table, patterns included.
  • A row insert raises StructureChanged and EVENT_OBJECT_REORDER. A scroll raises EVENT_OBJECT_LOCATIONCHANGE.
  • Each listed pattern's action reaches the app, and a focus move and a state change reach UIA.
  • BoundingRectangle is within 1 pt of the drawn rect at 100% and 150% scale.
  • The test runs on every dev push with 0 skips and is green.
How to check

The Windows lane, with results per push. On a branch, stop raising EVENT_OBJECT_REORDER. The row insert case must fail.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P1 · size M
R0241Perf: no native reference app runs beside Rune, so 'matches native' has no numberP1Phase 2bLT03
perf-native-peer-baselines · infra
What happens

Several of Rune's targets compare it with a native peer: AppKit, UIKit, Win32, GTK4, Chromium or GPUI Fast. Every comparison so far is a hand run in an issue report, each with its own probe. #204 compared a scroll with GPUI Fast: 53 to 90 fps against 119 to 120 fps, and 2.1 ms of GPU time a frame against 0.85 ms. #205 compared hover repaints with GPUI Fast. PLAN §8 compares key-to-photon with AppKit on the same rig.

The repo has no reference app. So no peer ratio can be published, repeated or held, and a claim that something "matches native" has no number behind it.

Where
  • PLAN.md:511: key-to-photon p95 at most 35 ms, compared against native AppKit on the same rig.
  • PLAN.md:508: the launch target that the AppKit hello ratio checks.
  • #204, #205.
  • There is no bench/ directory at HEAD.
Why it matters

App teams pick Rune expecting it to feel native. When it doesn't, they find out by hand, as #204 did. The targets need a peer in the same session:

  • Each platform's input-to-present is within one refresh of a native control (AppKit, UIKit, Win32, GTK4) measured by the same probe.
  • Mac hello launch is within 1.2x of an AppKit hello.
  • #204's table GPU time is within 1.25x of GPUI Fast, and hover-sweep power is within 1.2x of GPUI Fast.
  • Windows and Linux hello footprint is within 1.2x of a native hello.
  • Scroll offsets are within max(2 pt, 5%) of the native trace per frame.
  • A violation of a peer ratio fails the lane, as an absolute violation does.
What would help
  • Add bench/peers/ with minimal apps matched to Rune scenes:
    • an AppKit hello, an NSScrollView table and an NSTextView field;
    • a UIKit scroll view;
    • a Win32 list;
    • a GTK4 list;
    • a Chromium page with the same table and textarea;
    • a pinned GPUI Fast checkout for #204's table and #205's hover.
  • Give each peer the same content, window size and scale as its Rune scene. Each writes the same frame record log as R0121, from its platform's own present-time API, so one probe reads both.
  • Run each peer in paired alternating runs beside Rune on the reserved lanes, starting with R0125.
  • R0066 gives each comparison its statistic and ratio limit.
  • Keep the peers minimal, and pin their toolchains, so a peer change never moves a ratio unseen.
Done when
  • Every peer above builds and writes a frame record log on its lane.
  • Each lane checks the Rune-to-peer ratios in the perf matrix for launch, cadence, input-to-present, footprint and hover power.
  • A peer-ratio violation fires the same alarm as an absolute one.
  • Every 'matches native' row in the perf matrix names its peer and its last measured ratio.
How to check

A deliberately slowed Rune rev must move the ratio past its limit and turn the lane red. A peer rebuilt with an unchanged pin must reproduce its last numbers within the noise floor.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 2, milestone 2b · priority P1 · size L
R0242Launch: nothing measures fresh process to first present for hello against PLAN's 150 ms targetP1Phase 2bMT03
perf-launch-lane · infra
What happens

PLAN §8 sets a launch target: a Mac hello app goes from a fresh process to its first presented frame with p50 at most 150 ms and p95 at most 200 ms. PLAN also says launch timestamps run in CI. Nothing measures this.

scripts/bench-startup.py times only settings, and only when someone runs it by hand. It runs with --first-pixels --frames 1, which is a headless mode, so no window opens. It stops at GPU-complete readable pixels, not at a frame on screen, and it leaves OS and driver caches warm. The README's figure, about 300 ms after open on Apple silicon, comes from the hand method it describes.

Two launch bugs were found by apps. #164: the first frame blocks the main thread until the GPU finishes it. #99: a DX12 check before the first device costs ~215 ms. A count check would have caught both.

Where
Why it matters

Users judge an app by how fast its window appears. The targets: Mac hello p50 at most 150 ms and p95 at most 200 ms, within 1.2x of an AppKit hello on the same machine. Settings p95 at most 250 ms. Windows and Linux hello p95 at most 250 ms. The main thread never waits for GPU completion before the first frame shows. Wall-clock suites run nightly on every platform lane, pooled over at least 5 paired runs, and every number records rev, backend, device and date.

What would help
  • Extend bench-startup.py to hello and settings in a real window. Time from process exec to the real present time of the first frame with content, read from R0121. Keep GPU-complete pixels as a second number.
  • Run cold and warm. A cold run deletes the app's Metal shader caches, as the README describes.
  • Run nightly on each native lane, starting with R0125. Use paired alternating runs beside the AppKit hello from R0241, and check p50, p95 and the peer ratio.
  • Add a count check before merge: no adapter enumeration and no font registration on the main thread before the first frame (#99, #164).
Done when
  • Each native lane checks hello and settings launch p50 and p95 against the perf matrix every night, cold and warm.
  • The macOS lane reports the ratio to the AppKit hello and fails above 1.2x.
  • The count check fails if adapter enumeration or font registration runs on main before the first frame.
  • Each result records rev, backend, device, cache state and date.
How to check

On a branch, add a 30 ms sleep before the first frame. The nightly launch lane must fail on p50 and on the peer ratio. A branch that registers fonts on main before the first frame must fail the count check.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 2, milestone 2b · priority P1 · size M
R0243Platform: no test checks that a hidden window or overlay gives its memory back, and it does not on macOS or WaylandP1Phase 2bMT03
platform-hidden-memory-gate · infra
What happens

Menu-bar and tray apps keep their windows and display-size overlays hidden most of the time. Apps found three ways hidden surfaces keep memory:

  • #161: on macOS, a hidden window keeps its full-size drawables, textures, atlas pages and shared buffers. One report saw 32 MB after an overlay showed a screen-size image.
  • #162: on macOS, release_gpu_when_closed leaks one window-size surface on every hide and show.
  • #142: on Wayland, a hidden overlay keeps its renderer and last images, at 23.8 MB per full-screen frame at 3024x1964, and release_gpu_when_hidden does nothing.

No lane measures memory across show and hide. overlay_soak reads process memory only on Windows and Linux, and returns 0 on macOS. procwatch reads footprint only on macOS. So no platform can gate on both footprint and threads today.

Where
Why it matters

Users of always-running utilities see their memory grow, or stay high, while nothing is on screen. The targets: owned resource counters return exactly to the warmed baseline when release is asked for. Footprint is within 5% of the warmed baseline 1 s after a hide. Growth over 100 cycles is under 1 MB, and the thread count returns to baseline. A hidden window holds no full-size drawables.

What would help
  • Add a cycle test to each GUI lane: R0061 on both backends, R0063, and R0071 on Wayland and X11. After one warm-up cycle, it shows and hides each of these 100 times:
    • a window with keep_running;
    • a window with release_gpu_when_closed;
    • an overlay with release_gpu_when_hidden.
  • Read Rune's owned-resource counters exactly, as procwatch gauges: live surfaces, textures and buffers, and atlas and image bytes. Read footprint and threads through the macOS, Windows and Linux backends from R0070. Take each reading before the cycles, 1 s after each hide, and at the end.
  • On the web lane, read the gauges, plus measureUserAgentSpecificMemory in Chromium.
  • Gate exactly on the owned counters. Gate footprint with the 5% and 1 MB margins, because allocators and drivers keep memory.
  • Cases for #161, #162 and #142 stay quarantined only while their issues are open. R0247 fixes overlay_soak on macOS.
Done when
  • The test runs in the macOS (both backends), Windows, Wayland, X11 and web lanes on every dev push.
  • Owned counters return exactly to the warmed baseline after a hide when release is asked for.
  • Footprint is within 5% of baseline 1 s after a hide, growth over 100 cycles is under 1 MB, and the thread count returns to baseline.
  • No case is quarantined when this issue closes.
How to check

The GUI lanes, with results per push. Revert the fix for #162 on a branch: the macOS release_gpu_when_closed case must fail on the surface counter within 100 cycles.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P1 · size M
R0244CI: iOS is never built or run, not even on the simulatorP1Phase 2bLT03
platform-ios-ci · infra
What happens

iOS is one of Rune's five targets, and target_os = "ios" appears 113 times under crates/. Nothing compiles for an iOS target or runs anything on a simulator. The LayerHost embed path, the precompiled iOS metallibs and both Metal backends on iOS are checked by hand only.

The one embed unit test compiles only on macOS. It also returns early, and passes, when it cannot create a host. So even on a Mac a broken host creation looks green. A shader-table miss in the iOS metallibs, a broken embed path or a dropped colour tag reaches apps first.

Where
Why it matters

App authors who embed Rune in an iOS app find iOS breakage after they update a pin. The target is that every supported target builds and tests after merge and reports "at most 2 h for every push, and a red result opens an issue", and that "every simulator case passes on each push to dev". The renderer target asks that canonical scenes "agree within 2/255 across backends" with "the expected adapter in each manifest".

What would help

Add an iOS step to the self-hosted Mac lane from R0061, after R0036 makes the iOS targets compile:

1. Build aarch64-apple-ios-sim. 2. Run the rune lib tests and the embed tests on a simulator through a small test host app (xcodebuild test, or a runner such as cargo-dinghy). Widen the embed tests' cfg to iOS, and make a failed host creation fail the test. 3. Run embed_cost on the simulator. 4. Draw a canonical LayerHost scene with RUNE_GPU_BACKEND=wgpu and =metal, read back the frame, and compare it with the macOS output from R0161. Fail on a builtin-table miss. 5. Drive a scripted tap with R0167 and compare the resulting tree with the headless tree. 6. Read the layer's colour space after each configure path and assert it is sRGB. 7. Rebuild the iOS metallibs with xcrun metal and fail when the hash differs from the committed files.

Do not wait for the UIKit shell. When #110 lands, add an XCUITest that reads roles and names.

Done when
  • The simulator build, lib tests, embed tests and embed_cost run on every push to dev and report within 2 h.
  • A failed host creation fails the lane.
  • The canonical LayerHost scene is within 2/255 of macOS on both backends, with 0 builtin misses.
  • A scripted tap gives the same tree as headless.
  • A stale iOS metallib fails the lane.
  • The layer is tagged sRGB after every configure path.
  • Once #110 lands, an accessibility test runs in the lane.
How to check

The iOS step's result per push, fed into promotion by R0169. Seed a stale metallib and a failing host creation on a dispatched branch, and confirm each turns the lane red. The simulator GPU differs from devices, so the device checklist stays.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P1 · size L
R0245Layout: no job on fixed hardware fails a merge when layout timing goes past PLAN's limitsP2Phase 2bMT03
layout-reserved-hardware-timing · infra
What happens

PLAN and the layout targets set timing limits. The layout phase is at most 0.5 ms p95 on the stack scene. md-resize layout is at most 2 ms p95 per step. A 1M-row list scrolls at CPU p95 of 1 ms (fixed rows) and 2 ms (variable rows), with a first viewport in 100 ms.

Count budgets catch most regressions, but they cannot see a constant-factor slowdown, such as a solver that does the same work 20% slower. research/31, 37 and 38 measured layout time by hand with paired runs. Hosted runners are too noisy to gate on wall-clock time, and no job runs on fixed hardware. layout_text_cost measures the right things but has no 1M-row case.

Where
Why it matters

A slower layout shows up as dropped frames during resize and scroll on a 120 Hz display. The targets: "layout phase (flatten, solve, place, text) <= 0.5 ms p95 on the reference Mac"; "md-resize (50 KB note) layout CPU <= 2 ms p95 per step on the reference Mac"; and "CPU p95 <= 1 ms fixed and <= 2 ms variable; first viewport <= 100 ms".

What would help

1. Add list-1m-fixed and list-1m-variable cases to layout_text_cost, with a first-viewport metric. 2. On the reserved ProMotion Mac from R0125, build with --profile perf and run layout_text_cost on every push to dev. 3. Use paired, alternating runs against the previous dev rev, compared by median, with outliers kept. 4. Fail when a scene passes its limit: stack layout phase 0.5 ms p95, md-resize 2 ms p95 per step, 1M-row lists 1 ms and 2 ms p95 per scroll frame, first viewport 100 ms. Also fail on a regression over 5% against the previous rev. 5. Write a JSON report per rev with the view-run and solve counts from R0069 beside the times. Say what a headless number leaves out: GPU upload and presentation. 6. If the machine is offline, report "not run", not "pass".

Done when
  • The job runs on every push to dev on the named machine.
  • Each limit above is a pass or fail check in a JSON report per rev.
  • A seeded 10% slowdown in place() fails it.
  • An offline machine gives "not run".
How to check

The reserved-hardware job and its per-rev reports. Rerun the seeded slowdown after any change to the job or the machine.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 2, milestone 2b · priority P2 · size M
R0246Frame timing: no test checks that a covered or minimised window stops presenting on macOS, Windows, X11, Wayland and webP2Phase 2bMT03
motion-covered-surface-idle · infra
What happens

The runtime gates loops on surface visibility, so a hidden surface should not ask for motion frames. But the headless motion gate steps frames at a fixed rate on purpose, so it cannot show whether a real host stops redrawing when a window is covered, minimised or on another workspace. Host-level redraw requests, presents and CPU are not measured anywhere.

Two hosts are known to fail. On GNOME Wayland a covered window spins a core at 100% (#139). On the web, frames that change nothing are drawn, 30 a second at rest on an iPhone (#166). Nobody has checked macOS, Windows or X11.

Where
Why it matters

A covered window that keeps drawing drains laptop batteries and heats phones, and users blame the app. The targets: "A covered or minimised window issues 0 presents and its frame path uses < 0.5% of a core on macOS, Windows, GNOME and KDE Wayland, X11 and web"; "a hidden, covered or minimised window presents 0 frames even with running motion"; and "Hidden: at most 1% of a core".

What would help

Add one test to each GUI lane: macOS (R0061), Windows (R0063), GNOME and KDE Wayland and X11 (R0071), and Chrome and Safari with a hidden tab (R0062).

1. Open a window that runs a loop and a spring. 2. Cover it, minimise it, and move it to another workspace, one case at a time. 3. In each case, count redraw requests and presents, and sample the CPU in Rune's frame path, leaving out app poll work. Use procwatch for CPU (R0070). 4. Uncover the window and check that motion resumes on its trajectory with 0 jump findings. 5. Link a failure to #139 or #166, or file a new platform issue.

Done when
  • The test runs in each listed lane.
  • A covered, minimised or off-workspace window issues 0 presents on every listed host.
  • Rune's frame path uses under 0.5% of a core in each case.
  • Uncovering resumes motion with 0 jump findings.
  • Each failing host has an open issue.
How to check

The GUI lanes run the test nightly. Known failures (#139, #166) stay quarantined and linked to their issue, and rejoin the gate when it closes.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P2 · size M
R0247Tests: the overlay soak test checks memory only on Windows and LinuxP2Phase 2bST03
perf-macos-soak · infra
What happens

The overlay soak test shows and hides two overlays a few thousand times and checks that memory stays flat. Its memory_mb() reads memory on Windows and Linux only. On every other OS it returns 0.0, so the 48 MB growth check passes trivially on macOS, the main platform. The test also exercises none of the content caches: no Markdown, emoji, images or blur. A leak in the glyph atlas or image cache would not show up.

procwatch already reads the macOS physical footprint, which is the number the OS uses for memory pressure.

Where
Why it matters

A leak on macOS reaches users of long-running apps, such as a dictation overlay shown on every use. The targets: "Drift <= 2 MiB"; "Every registered cache stays within its bound, and retained overhead grows less than 1% over the second half of a 100k-frame soak; 1,000 hide and show cycles leak 0 surfaces"; and wall-clock suites on a nightly schedule on macOS.

What would help

1. On macOS, have memory_mb() read the physical footprint through procwatch, added as a dev-dependency. 2. Add a content soak. It scrolls Markdown with emoji, images and blur for 30 minutes of virtual time. Take the baseline after the cache budgets fill, not at the first frame. Fail on more than 2 MiB of drift. 3. Run both in the macOS GUI lane from R0061: the overlay soak on every push, the content soak nightly.

Done when
  • The overlay soak asserts memory on macOS with a real footprint.
  • The content soak runs nightly on macOS and fails on more than 2 MiB of drift.
  • A seeded leak in an image cache fails the content soak.
How to check

The macOS GUI lane runs the overlay soak on each push and the content soak nightly. Run the seeded cache leak on a dispatched branch when the soak first lands.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P2 · size S
R0248Web: nothing runs Rune in Safari on an iPhone or Chrome on Android, where the keyboard and idle-frame bugs were foundP2Phase 2bMT03
platform-web-mobile-lane · infra
What happens

The web smoke test runs only desktop headless engines with touch emulation, and no workflow runs it. Two bugs that matter most on phones were found by hand on an iPhone:

  • #165: on iOS the soft keyboard closes right after a tap focuses a text field.
  • #166: an app at rest drew 29.9 frames a second for 10 s on an iPhone (59.8 requestAnimationFrame calls and 64 ms of frame CPU a second), while the same app drew 0 in desktop Chrome and in Playwright WebKit on macOS.

Desktop headless engines do not show the real soft keyboard, ProMotion pacing, mobile memory limits or the IME candidate window. No lane measures first-frame time on a phone.

Where
Why it matters

Phone users see the keyboard close and lose battery to frames that change nothing. The targets: the web build is a first-class target in every browser engine, desktop and mobile, with "0 submits at rest", "first-frame time recorded per rev, and a regression above 10% fails on the device lane". At rest every host presents "0 presents per second beyond the caret or media rate". Web hello's first canvas frame has p95 at most 1 s on a pinned mid-range Android phone in Chrome and on an iPhone in Safari.

What would help

Add a self-hosted mobile web lane that runs on push to dev and on dispatch, never on pull_request:

  • An iPhone Pro running Safari through safaridriver, and a 120 Hz Android phone running Chrome through adb and CDP.
  • Run the web smoke on both with real touch input: tap-to-focus keeps the keyboard open (#165), 0 submits and 0 rAF requests at rest over 2 s (#166), and touch-scroll cadence counted from rAF timestamps.
  • Record time from navigation to first frame with a cold cache per rev in a committed CSV, and fail on a 10% regression on the same device.
  • Carry the Safari check from R0119: with a text field focused, the hidden input sits at the caret, so the IME candidate window and emoji picker open there.
  • Use the runner isolation from R0050; the phones are credentialed hardware.
Done when
  • The lane runs on every push to dev on both phones and reports a result.
  • #165's and #166's cases are in the smoke and pass once those issues are fixed.
  • Cold first-frame time is recorded per rev in a committed CSV, and a 10% regression fails the lane.
  • The Safari check from R0119 passes on the iPhone.
  • No job in the lane is reachable from a pull_request event.
How to check

The lane's own results per push. Replay a rev from before the #166 fix to confirm the idle check fails, and a rev with a 10% slower first frame to confirm the CSV gate fails.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P2 · size M
R0249CI: one regression can open an issue from every lane, bisector, fuzzer and speech job, and nothing strips what they attachP2Phase 2bMT03
tooling-report-broker · infra
What happens

Today no CI job files issues. The planned lanes will. R0250 opens one issue per lane and culprit, and the perf bisector, the fuzzer, the speech lane and the GUI lanes each plan to open their own. One bad commit that fails four lanes would file four or more public issues about the same cause.

Each reporter would also attach what it has: logs, traces, screenshots and environment manifests. In a public repo a filed issue stays in history. Raw logs from self-hosted machines can hold home paths, machine names and tokens.

Where
Why it matters

Maintainers triage one cause at a time; four issues for one commit split the discussion and hide the culprit. A leaked token or path in a public issue cannot be taken back. The targets: "100% of red test failures get an issue naming the first bad commit, or the inconclusive range, within 3 h; infrastructure failures are retried and reported without a culprit", and CI is "safe to run in a public repo", with "0 self-hosted or credentialed jobs reachable from untrusted triggers or refs".

What would help

One broker job on a hosted runner that every reporter calls instead of the issues API:

  • Key each result by failure signature (test or scenario, failure kind) plus culprit commit or range.
  • Add a lane to an open incident with the same key instead of opening a new issue.
  • Keep infrastructure failures (runner offline, device missing, timeout before the test) apart, with no culprit.
  • Rate-limit repeats per key.
  • Publish only allowlisted fields: lane, test, commit, range, the numbers, and links to restricted artifacts. Raw logs and captures stay in artifacts with limited retention.
  • Run a hygiene scan on every published field for home paths, temp paths, tailnet hostnames and token shapes.
  • Give reporters no issue-write permission; only the broker has it, after R0050's lint and permission rules.
Done when
  • A regression that fails four lanes opens one issue that lists all four.
  • A seeded home path and a seeded token in a lane's log do not appear in the issue.
  • An infrastructure failure opens no culprit issue.
  • A repeat failure with the same key comments on the open incident instead of filing again.
  • No job other than the broker can create issues.
How to check

A scratch-branch drill: a seeded commit that fails four lanes, a log line with a fake home path and a fake token, and a forced runner timeout. Check the issue count, the published text and the permissions of each job. Rerun the drill when a new reporter is added.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P2 · size M
R0250CI: a red lane names no culprit and gets no revert, so a broken dev stays broken until someone looksP1Phase 2bMT03
tooling-auto-bisect · infra
What happens

When a post-merge lane goes red, someone has to find the bad commit by hand. Until they do, the verified branch from R0169 cannot move, and apps cannot take newer fixes. Nothing tells a test failure apart from a lost runner or a flaky test. dev takes about 55 commits a day (1,642 in the 30 days to this commit), so a red lane can cover many commits within hours.

Where
  • .github/workflows/ holds only site.yml and www.yml. Neither bisects, files issues or opens reverts.
  • AGENTS.md:21: dev is fast-forward-only, so a fix must be a new commit, such as a revert.
Why it matters

App authors wait for a verified rev while a lane stays red. The target: "100% of red test failures get an issue naming the first bad commit, or the inconclusive range, within 3 h; infrastructure failures are retried and reported without a culprit. A revert PR is opened when no fix lands within 2 h of a named culprit." The renderer target adds: "A red lane bisects and opens an issue." T1 asks that "any red dev is fixed or reverted within 2 h".

What would help

On a red T2 lane:

1. Classify the failure. A runner or network error is retried once and reported as infrastructure, with no culprit. A test that passes on rerun goes to R0228. 2. Otherwise run git bisect run scripts/verify lane <name> --only <failing tests> over verified..SHA, with the script from R0029. Run each failing test 3 times per step. Skip commits that do not build. Use the lane script from the red SHA; if an older commit lacks the harness, report "harness unavailable", not a culprit. 3. If one commit is named, open or update one issue per lane and culprit, with the lane, failing test and log. If skips leave a range, open an issue naming the range. Send all issues through R0249, so one regression gives one issue. 4. If no fix merges within 2 h of a named culprit, open a revert PR through the merge queue. If the revert fails T1, the issue says so and asks for a forward fix.

Bisect steps use the reserved machines, so the slots come from R0155.

Done when
  • A seeded failure on a scratch branch gives an issue naming the right commit.
  • A seeded infrastructure failure gives no culprit issue.
  • A seeded range with an unbuildable commit gives an issue naming the range.
  • Bisect of a 20-commit range finishes within 3 h.
  • A revert PR opens 2 h after a named culprit with no fix.
  • Over 30 days, 100% of red test failures get an issue within 3 h.
How to check

A monthly drill on a scratch branch through workflow_dispatch covers each seeded case. The 30-day figure comes from the issues the broker files.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P1 · size M
R0251Perf: a reserved-lane regression names no commitP2Phase 2bST03
perf-regression-bisect · infra
What happens

Rune has no perf workflow today. The repo has two workflows, site.yml and www.yml, and the only Rust test job runs cargo test -p rune-www. Frame, launch and memory numbers come from scripts run by hand.

Once the reserved lanes run nightly, starting with R0125, a red alarm covers every commit since the last good run. dev took 1,642 commits in the 30 days before this commit, about 55 a day, so one nightly alarm spans tens of commits. Nothing narrows that range. R0250 handles pass/fail tests, but a timing alarm needs a statistical step: a 2 ms p95 change can sit inside the noise of a single run.

Where
Why it matters

A regression that nobody pins to a commit stays in dev, and every app that pins a rev in the range ships it. The target is that "a violation, absolute or of a peer ratio, fails the lane, bisects and opens an issue", and that on the reserved 120 Hz machines "a paired regression over 10% and above the noise floor turns the lane red".

What would help

On an alarm, bisect the range on the machine that raised it, with R0250's driver and a statistical step:

  • Each step runs 5 paired, alternating runs of the candidate against the last good rev, with the same --profile perf build.
  • Classify by the alarm's own statistic (for example p95 input-to-present), with a noise margin taken from the last 10 nightly runs of that scenario.
  • A step inside the margin reruns up to 3 times, then is marked unclear.
  • Skip revs that do not build. Report a non-monotonic result as non-monotonic, not as a culprit.
  • Take machine time from the reserved slots in R0155, so a bisect does not starve the push lanes.
  • File through R0249: the commit or the explicit unclear range, both sides' numbers, run counts and frame counts, and links to the runs.
Done when
  • A seeded 2 ms p95 regression in a 30-commit range is named to the right commit within 2 h.
  • A range with an unbuildable rev and a noisy step ends with a commit or an explicit unclear range, never with no result.
  • Every report states rev, backend, device, date, run count and frame count for both sides.
  • One regression seen on two lanes produces one issue, not two.
How to check

A seeded drill on the reserved Mac: a scratch branch of 30 commits where one adds a fixed 2 ms of work to the frame path, and a second branch with one unbuildable commit and one noisy step. The drill runs after any change to the bisect driver or the noise margin, and its time to a named commit is recorded.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 2, milestone 2b · priority P2 · size S
R0252Motion: the motion audit is described as a required check, but it runs by hand and never fails a mergeP1Phase 2bXLT04
motion-gate-required · tracking
What happens

AGENTS.md says a motion change passes scripts/motion-audit with its scenario added (AGENTS.md:41). Nothing enforces it. .github/workflows holds only site.yml and www.yml. run.sh builds 13 apps in release, records 36 scenarios and ends with ls (scripts/motion-audit/run.sh:9-11, scripts/motion-audit/run.sh:27-63). It never calls analyze.py --fail, so passing the audit is a person reading its output.

There are also two checkers. The Rust RULES table has 27 kinds, including wakes-after-end (crates/rune/src/motion_gate/check.rs:37-65). analyze.py has kinds Rust lacks: stall, dog-leg, invisible-work, idle-frames, latency, hitch and the script expectation kinds (scripts/motion-audit/analyze.py:1-30). snap means a different thing in each (scripts/motion-audit/analyze.py:925). A few crate tests already run gate_rows, which fails on a finding (crates/rune/src/motion_gate/gate.rs:207-217), but the 36 audit scenarios are not among them.

This takes several issues. The checker has to become one rule set first, the scenarios have to run as debug tests on the virtual clock, and the gate has to cover cadence, reduced motion, idle and first-use cases that no scenario checks today.

Where
Why it matters

Motion is what users feel first, and a regression in it lands silently today. The targets: "100% of scenarios in the required merge check; findings come only from the Rust rules, with every kind analyze.py had; 0 unallowed findings; every allow row has a reason, a max and an issue link", "0 debug/release differences in the nightly run" and "test execution <= 3 min on a 4-core hosted runner". The gate also carries the frame-rate target ("<= 1/64 device px for scene tracks" across rates and jitter), the reduced-motion target ("0 animated spatial travel over 2 pt under reduced motion") and the idle target ("0 frames more than 1 frame after settle in every scenario").

What would help

In order: make run.sh fail on findings now (R0076), split check() (R0068), port every analyze.py kind (R0156), run every scenario as a debug test (R0166), and make that a required check (R0064). Then add the cadence, reduced-motion, idle and first-use passes, debug/release parity and the coverage inventory, and retire analyze.py as a checker (R0279). Keep cells parallel and debug-only. Pixel cells that are slow go to post-merge lanes.

Done when
  • Every child issue is closed.
  • Every scenario runs in the required merge check under the Rust rules, with 0 unallowed findings.
  • The nightly debug/release comparison shows 0 differences.
  • Gate tests take at most 3 min on a 4-core hosted runner, excluding compilation.
How to check

The required merge check runs the gate tests. A planted finding in one scenario fails it.

Issues
Depends on
Part of
  • Theme: T04
  • Phase 2, milestone 2b · priority P1 · size XL
R0253Headless: output is byte-identical on one machine only, so goldens cannot be shared across operating systemsP1Phase 2bXLT04
tooling-canonical-lane · tracking
What happens

PLAN wants "same pixels on every platform for the canonical lane, from a CPU reference renderer that the GPU path is diffed against" (PLAN.md:396). Headless output today holds only on the machine that made it:

So a golden blessed on a Mac may not hold on Linux CI, and a payload difference can't be told apart from an environment difference. Fixing this takes fonts, math, the clock, a CPU path, an artifact format and a cross-OS job, each its own change.

Where
Why it matters

Agents and contributors on different machines need one golden set to diff against. The target: "Every scene in the committed manifest ... has a byte-identical payload on the 3 desktop OSes. Tree and instance hashes also match on wasm32. 1 golden set and 0 per-OS goldens. The canonical lane runs with no GPU adapter present. 100% of trace headers, trees and goldens carry the envelope, and no envelope field is part of a payload hash." Motion adds "normalized physics traces bit-identical in the canonical mode". Layout adds "CI never writes goldens" and "0 golden changes without a matching fragment".

What would help

An opt-in canonical mode, so app output doesn't change: bundled fonts only (R0157), portable spring and scroll math (R0258, R0283), no wall clock, and CPU output through rune-ref (R0273). Each artifact splits into a byte-compared payload (tree, trace, instance stream with resource ids, CPU PNG) and a provenance envelope (rev, OS, backend, adapter, font set) that is recorded but not hashed (R0266). A committed scene manifest lists every kit-gallery story and example scene, and each exclusion names its reason. Rect, interaction and scene goldens build on it, and R0275 compares the bytes.

Done when
  • Every child issue is closed.
  • The determinism job reports 0 payload differences across macOS, Linux and Windows for every manifest scene, and tree and instance hashes match on wasm32.
  • The canonical lane runs on a host with no GPU adapter.
How to check

The cross-OS determinism job, run after each merge, diffs payload hashes across the three desktop OSes and wasm32.

Issues
Depends on
Part of
  • Theme: T04
  • Phase 2, milestone 2b · priority P1 · size XL
R0254Layout: nothing checks that a scene lays out the same on every platformP2Phase 2bMT03
layout-cross-platform-rect-lane · infra
What happens

Layout is shared code, but its output can still differ by platform. Text widths round up to whole device pixels, so a rect depends on the scale: 1.25 and 1.5 on Windows, 3 on iOS, and any device pixel ratio on the web. Native builds also fall back to system fonts for missing families and glyphs, so line breaks can depend on the machine. No platform lane exists, so nobody would notice when a scene lays out differently on Windows than on macOS.

Where
Why it matters

An app's layout should not shift by platform. A label that fits on macOS and wraps on Windows is a bug users see. The target: "identical digests across the 5 targets at each scale, and <= 1 device px per text edge between scales, with at most 5 exceptions that each name an issue".

What would help

1. Run the scenes in the canonical mode from R0253, with bundled fonts only and fallback limited to bundled fonts (R0157), a fixed locale, a fixed viewport and a fixed scene time. 2. In each platform lane, dump --tree rect digests of every gallery scene at scales 1, 1.25, 1.5, 2 and 3. The targets are macOS (R0161), Windows (R0162), Linux (R0168), wasm with the headless runtime (R0062) and the iOS simulator (R0244). 3. Keep one golden set per scale, shared by all platforms. Fail on any difference at equal scale. 4. Between scales, check that each rect is within 1 device pixel per text edge of the scale-1 rect. 5. Keep an exception list of at most 5 entries, each naming an issue.

Done when
  • At each scale, digests are identical across the 5 targets.
  • Between scales, every rect is within 1 device pixel per text edge of the scale-1 rect.
  • Every exception names an issue, and the list holds at most 5 entries.
  • The check runs post-merge on every push to dev.
How to check

A T2 job compares the digests that each platform lane uploads. A seeded change that rounds text widths differently on one platform proves the job fails.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P2 · size M
R0255Headless: five frame loops and two script dispatchers drift apartP1Phase 2bXLT04
tooling-headless-host · tracking
What happens

Five places drive frames headless, each in its own way:

Script dispatch is copied between the single-window loop (crates/rune/src/tooling/headless.rs:249-278) and the desktop window (crates/rune/src/desktop/window.rs:317-336). The copies have drifted. The single-window loop handles Kind::Resize (crates/rune/src/tooling/headless.rs:273). The desktop copy has no arm for it, so a scripted resize falls into canvas_input (crates/rune/src/desktop/window.rs:334). A fix lands in one loop and not the others, and an event or a flag is dropped with no warning.

One driver needs several changes: pacing, the resize and --snap-on-patch fixes, a flag table, strict scripts, a shared host, --native --script, structured summaries and a generated flag reference.

Where
Why it matters

Scripted headless runs are how agents and tests see a UI. If --desktop ignores an event that the single-window run honours, a test passes for the wrong reason. The target: "100% of script event kinds (about 35) give equal per-window results in single-window, --desktop and session runs. 0 accepted flag pairs with no effect ... A mid-run error leaves a flushed trace, complete PNGs and a finalised video." The shared-host target asks that every host, headless included, drive frames "through one shared frame core".

What would help

Move headless onto SurfaceHost with a virtual-clock backing first (R0197). Then build one HeadlessHost on it that owns the frame loop and script dispatch for every runner (R0165). The smaller fixes (R0079, R0075, R0164, R0288, R0163) can land before it, each with a test that the unified host keeps.

The tracker closes on a parity matrix: for every script event kind, the targeted window's tree in window coordinates, its side effects and its output files are equal across single-window, --desktop and session hosts.

Done when
  • Every child issue is closed.
  • The parity matrix passes for every event kind across single-window, --desktop and session hosts.
  • A test generated from the flag table finds 0 accepted flag pairs with no effect.
How to check

The parity matrix and the flag-pair test run in the merge checks.

Issues
Depends on
Part of
  • Theme: T04
  • Phase 2, milestone 2b · priority P1 · size XL
R0256Accessibility: the tree's build and update cost is never recorded or gatedP1Phase 2bMT04
a11y-cost-gate · infra
What happens

The README says the accessibility tree is free until asked, and that "a turn that changed none of it costs one comparison" (crates/rune/README.md:2276-2279). In fact building the stamp for that comparison walks every scroll state first (crates/rune/src/a11y/tree.rs:281-297). So the cost of an idle turn grows with the number of scroll views.

The only cost measurement is a11y_cost, an #[ignore] test at 2,000 elements that prints full, incremental, scroll and idle times under --profile perf (crates/rune/src/a11y/tests.rs:360-388). Its numbers have never been recorded in the repo. Nothing counts what an update walks, fingerprints, builds or sends. A change that makes every keystroke rebuild the whole tree would pass every test.

Where
Why it matters

A screen reader user notices when the app slows only for them. The target: "Count budgets pass in the merge gate. At 6,000 elements: full build at most 4 ms, incremental at most 0.5 ms, idle turn at most 5 us. Accessibility time at most 1 ms at p95, and frame p95 with a client within 10% of without." The docs target asks that "every enumerated claim matches the code".

What would help

1. Count per update: nodes walked, nodes fingerprinted, nodes built, nodes sent, and stamp entries per idle turn. Expose them as counters the shared budget mechanism reads (R0158). 2. Add budgets for three canonical scenes: a settings form, a 6,000-element list, and a 200 KB text field with an editing keystroke. The budget caps are node visits at most 2n per walk and nodes built at most the changed nodes plus their parents. 3. Record a11y_cost (full, incremental, scroll-only, idle) at 2,000 and 6,000 elements under --profile perf on a reference Mac and a Windows machine, with the date and rev. Check each run against the limits above. 4. Fix the README sentence to say what an idle turn costs.

Don't gate on wall-clock time on hosted runners. Timing is recorded on named hardware, and counts are gated.

Done when
  • Budgets for the three scenes run in the merge gate, and raising one without an explicit raise and a changelog fragment fails.
  • A seeded regression that rebuilds the whole tree on a keystroke fails the gate.
  • Recorded numbers at 6,000 elements meet full build <= 4 ms, incremental <= 0.5 ms and idle <= 5 us, or the README names the missed limit and links its issue.
  • README "Free until asked" describes the stamp cost.
How to check

The count budgets run with the other scene budgets in the merge gate. The timing numbers are re-recorded on the reference machines in the nightly perf lane.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2b · priority P1 · size M
R0257Layout: canonical scenes have no count budgets, so a pass or O(n) regression lands silentlyP1Phase 2bMT04
layout-count-budgets · infra
What happens

The layout cost cuts in research/28, 31, 37 and 38 were found by hand, with paired timing runs: resize reshaping, text hashing, path scans, view re-runs to fill a virtual window. layout_text_cost has the cases that found them, from stack and list to md-resize, vlist-resize, tree and memo-chat (crates/rune-kit/examples/layout_text_cost/main.rs:5-27, crates/rune-kit/examples/layout_text_cost/main.rs:54-55). It prints medians and is read by a person. FrameStats counts only commits, layout nodes, glyphs and shaped runs (crates/rune/src/runtime/types.rs:442-448).

Once R0069 counts view runs, measure passes, layout solves and rows built, nothing yet fails when those counts rise. Wall-clock timing on hosted runners can't serve as a gate. So a change that turns off the resize fast path (crates/rune/src/runtime/commit/relayout.rs:94) or adds a second solve to every commit would land unnoticed.

Where
Why it matters

Layout cliffs are what make a long list or a live resize stutter. The targets: "At most 3 view runs in any commit of any test or trace ... At most 1 view run in >= 99% of commits in each scene ... Commits with >= 2 compute_layout calls are <= 5% in each scene"; "0 root view runs after the first frame" in live resize and virtual scroll scenes; "one append costs <= 1 + mounted key calls" on a 1M-row list; and "each count <= dependency closure + moved-span roots".

What would help

Add perf/budgets/layout/<scene>.json through the shared mechanism (R0158) for:

  • the layout_text_cost cases: stack, stack-same, list, md-resize, md-resize-live, md-same, vlist-resize, md-virtual, tree, memo-chat;
  • 1M-row fixed and variable lists: scroll, append, filter;
  • resize scenes with aspect_fit images and anchored_fit menus;
  • two scripted real-app traces.

Each file holds the per-commit maximum and the per-scene distribution: the share of commits with more than one view run, and the share with two or more compute_layout calls. It also holds per-frame totals of passes, Taffy computes, measure calls, texts laid out, rows built, key calls and allocations. A shared schema caps every file at the limits above. A merge-gate test runs each scene headless for a fixed number of frames and fails above budget. Lowering is free. Raising needs the explicit flag and a changelog fragment, and can never pass the cap. A scene that misses a cap today starts with a recorded exception naming the issue that fixes it, and that list only shrinks.

Done when
  • At least 14 scenes are gated, including two real-app traces.
  • A budget file above a cap fails schema validation.
  • Two runs give equal counts.
  • The test runs in under 2 minutes in the merge gate.
  • A seeded regression that disables resize_only fails, and so does one that adds a second solve to every commit.
How to check

The budget test and the schema check run in the merge gate on every merge.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2b · priority P1 · size M
R0258Motion: spring math fuses multiply-add on some CPUs and uses the platform's exp, so traces differ across CI hostsP1Phase 2bMT04
motion-canonical-math · bug
What happens

rune_motion::math promises bit-identical results only "on every machine of the same kind" (crates/rune-motion/src/math.rs:1-9). FUSED is true on aarch64 and on x86-64 with FMA, and false elsewhere (crates/rune-motion/src/math.rs:11-20). Baseline x86-64 hosted runners and wasm32 take the unfused path, so a spring sampled on a Mac and on Linux CI differs in the last bits.

Settle bounds use the platform's f64 ln and exp (crates/rune-motion/src/layer.rs:126-127, crates/rune-motion/src/layer.rs:202-211), and platform libms differ in the last bits too. So a layer's end time, and the settle event it writes, can move between hosts.

Motion traces also carry CPU time per frame (crates/rune/src/tooling/trace.rs:224-229), so whole traces can't be compared across machines even when the physics agrees. No lane compares motion output across platforms.

Where
Why it matters

One motion golden set across operating systems lets a Linux CI runner check what a Mac developer blessed. The targets: "normalized physics traces bit-identical in the canonical mode; full gate traces within 1/64 device px", and for the canonical lane "1 golden set and 0 per-OS goldens".

What would help

Measure first. Run the spring step bench in paired, alternating --profile perf runs with one path everywhere (always unfused, or always mul_add with a software fallback where the CPU lacks FMA).

  • Recommended: if one path costs at most 1% on Apple silicon, use it in production too. Then production and canonical math are the same.
  • Otherwise keep the fast path in production and select the portable path in canonical mode, which tests turn on by default. A test pins both paths, since they then differ.

Either way, route settle-bound ln and exp through deterministic f64 functions (a small polynomial like math::exp, or libm). Build the canonical lane with -C llvm-args=-fp-contract=off, so the compiler doesn't fuse on its own. Scroll steppers have the same problem and are handled in R0283.

Define a normalized physics trace: per-frame presented values, velocities and settle events, with no timings, host data or font-dependent geometry. Produce it from fixed-layout fixtures with scripted input, and hash it per scenario. Re-bless the motion goldens once, in a commit that does only that and says why.

Done when
  • The same spring inputs give bit-identical outputs on aarch64, x86-64-v3, baseline x86-64 and wasm32 in the chosen mode, checked by a test with recorded expected bits.
  • Normalized physics-trace hashes are identical on macOS arm64, Linux x86-64, Windows x86-64 and wasm32.
  • Full gate-scenario traces agree within 1/64 device px across those platforms.
  • The PR records the paired perf result that chose the path.
  • One re-bless commit, with its reason.
How to check

The expected-bits test runs in the merge gate on Linux x86-64 and macOS, and under wasm32 in the determinism job. The cross-OS job compares physics-trace hashes after each merge, and a mismatch opens an issue.

Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 2, milestone 2b · priority P1 · size M
R0259Motion gate: nothing lists which public motion builders have a scenario, so a new one can ship untestedP1Phase 2bST04
motion-coverage-inventory · infra
What happens

Motion gate scenarios were written by hand around features as they landed. Nothing lists the public motion surface and checks each item against a scenario. That surface is:

So a new builder or animation source can ship with no gate coverage. Porting the existing scenarios to tests (R0166) does not change that, since it moves only what exists.

Where
Why it matters

An untested motion API is where a pop, a jump or a never-settling loop ships first. The targets: "it covers the whole public motion surface" with "100% inventory coverage", and "100% of inventory pairs traced and audited".

What would help

1. Generate an inventory from source: public El and Tx motion methods, Transition constructors and AnimSource bits. Commit it, with a mapping from each item to the scenarios that exercise it. 2. Have gate recordings note which builders and sources each scenario touched. The mapping is then checked against what the recording used, not against test names. 3. A test fails when an inventory item has no scenario, when a mapped scenario's recording never touched its item, or when the committed inventory differs from the source.

This tells an agent that adds a motion API to add a scenario with it.

Done when
  • The inventory test fails when a new public motion method, Transition constructor or AnimSource bit is added without a scenario.
  • Each mapping is confirmed by the recording, not only by the scenario's name.
  • matched_crop and unclipped_flights each have a scenario whose recording touches them.
  • The inventory test fails when the committed inventory is stale.
How to check

The inventory test runs with the gate tests in the required merge check.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 2, milestone 2b · priority P1 · size S
R0260Motion gate: scenarios run at one fixed frame rate, so frame-rate-dependent motion goes unseenP1Phase 2bMT04
motion-gate-rate-jitter · infra
What happens

motion_gate::Run steps a fixed dt of 1/hz straight through Runtime::frame (crates/rune/src/motion_gate/mod.rs:141-145, crates/rune/src/motion_gate/mod.rs:156-170). Runtime::frame(dt) is frame_split(0.0, dt), so a gate run never takes a catch-up step (crates/rune/src/runtime/frame.rs:296). A window instead goes through FrameClock, which splits a late frame's gap into catch-up and a capped step (crates/rune/src/frame/clock.rs:43-48, crates/rune/src/frame/clock.rs:91-95). So the gate never runs the code path a window takes when a frame is late, and every scenario runs at 120 Hz.

Only one test jitters its sampling, and only for one rune-motion scene (crates/rune-motion/tests/quality.rs:3-4). Growth, scroll, content slides, flights and touch edges each step in their own way. Touch momentum, for example, steps exp(-k·dt) per frame (crates/rune/src/runtime/scroll/touch.rs:106-118). A stepper whose result depends on frame size passes the gate at 120 Hz and drifts at 60 Hz or under jitter. research/15 and PLAN ask for a jitter fuzzer in CI (research/15-research-motion-perception.md:76, PLAN.md:409-410).

Where
Why it matters

The same app runs at 60 Hz on one display, 120 Hz on ProMotion and with dropped frames under load. Users see a fling travel farther or a sheet land later depending on the display. The target: "the same motion at any refresh rate, cadence jitter, rate switch or late frame follows the same trajectory", within "<= 1/64 device px for scene tracks, <= 0.5 pt for scroll, growth and flights, <= 1/255 opacity, in 100% of scenarios and variants with no remaining allow rows".

What would help

1. Let Run take a cadence: fixed Hz, seeded jitter, a rate schedule, or gaps. Drive each frame through FrameClock and frame_split, as a window does. 2. Schedule script inputs at absolute times, so every variant sees them at the same instants. 3. Add a rate-drift rule. It compares each variant with a reference at the same instants: the closed form where one exists, else the same stepper at 960 Hz. Across a gap, compare only with the reference trajectory, so travel that should happen during the gap is not a finding.

Expect first findings in growth and touch. Allow them with bounded rows that link their issues until they are fixed.

Done when
  • Run supports fixed 30, 60, 90, 120 and 144 Hz, a seeded ±4 ms jitter at 120 Hz, a 120-to-60 Hz switch halfway through each animation, and one 100 ms gap, all through FrameClock.
  • rate-drift flags deviation over 1/64 device px for scene tracks, 0.5 pt for scroll, growth and flights, and 1/255 opacity.
  • A planted stepper that scales with frame count is flagged.
  • Every scenario runs every variant in the required check, and each finding is fixed or covered by a bounded allow row with an issue link.
How to check

The cadence variants run as gate tests in the required merge check. The frame-rate target counts as met only when no rate-drift allow rows remain.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 2, milestone 2b · priority P1 · size M
R0261Motion gate: no scenario checks what moves under Reduce MotionP1Phase 2bST04
motion-gate-reduced-pass · infra
What happens

Reduced motion is applied in many separate places. rune-motion reduces per property class at animate time, with travel snapping and opacity, colour and presence taking REDUCED_FADE (crates/rune-motion/src/props.rs:42-63). Flights return early (crates/rune/src/runtime/motion/flights.rs:166, crates/rune/src/runtime/motion/flights.rs:241). Text flights use a fixed 0.15 s ramp (crates/rune/src/flight.rs:66-69). Loops hold still unless they are sequences (crates/rune/src/runtime/motion/motion_elements.rs:134). Scroll glides check it in their own code (crates/rune/src/runtime/scroll/offset.rs:26, crates/rune/src/runtime/scroll/offset.rs:155).

Only scattered unit tests check these paths (crates/rune/src/runtime/tests/no_motion.rs). No gate scenario runs with reduced motion on, or switches it on while motion is running. A new motion source that forgets the flag fails nothing.

Where
Why it matters

People turn on Reduce Motion because travel makes them ill. One forgotten slide is a real harm to them, not a style issue. The target: "0 animated spatial travel over 2 pt under reduced motion; instant layout changes are allowed. Running spatial motion lands within one frame of a toggle, with at most one declared cut. Every animated effect draws its calm pose and requests no frames."

What would help

Run every gate scenario two more times: once with system reduced motion on from the start, and once with it switched on halfway through. Add a reduced-travel rule. It flags an edge that moves more than 2 pt over two or more frames when a spring, decay or glide drives it and no input, scroll or direct manipulation does. A change that lands in one frame is not travel. Fades up to REDUCED_FADE are allowed. After a mid-run toggle, running spatial motion must land within one frame, with at most one declared cut.

These passes reuse the scenarios from R0166, so they need no new scripts.

Done when
  • Every scenario has a reduced pass and a mid-run toggle pass in the required check.
  • reduced-travel flags a planted spatial spring that ignores reduced motion, and does not flag an instant layout change.
  • After a mid-run toggle, running spatial motion lands within one frame, with at most one declared cut and 0 other jump findings.
  • 0 unallowed findings across both passes.
How to check

The reduced and toggle passes run as gate tests in the required merge check, beside the default pass. The planted-spring fixture keeps the rule honest.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 2, milestone 2b · priority P1 · size S
R0262Idle: no test asserts zero frames, submissions and self-wakes over 10 s at rest on every host kindP1Phase 2bMT04
perf-idle-tests · infra
What happens

PLAN.md promises zero cost at rest: no ticks, no GPU submissions and no wake-ups once settled, checked by counters over a 10 s idle sample. Only parts of that are tested. A window test checks that a still compositor's window rests and polls its timers. An overlay test checks that an idle pointer requests no unchanged frames. The web smoke script checks that 600 ms of idle submits no frame and requests no animation frame, but no CI workflow runs it.

Nothing tests LayerHost, a covered or minimised window with running motion, or a focused text field. SurfaceCounts counts redraws, presents, event-loop turns and deadline wakes. It does not count GPU submissions or wakes of the threads Rune starts. The hosts that break the promise today were found by apps:

  • the web host draws 29.9 frames a second at rest on an iPhone (#166);
  • a hover sweep redraws about 70 times a second where 20 would show every change (#205);
  • a covered GNOME Wayland window spins one core at 100% (#139).

Open PR #54 blinks the text caret, so every focused field will start to wake.

Where
Why it matters

Apps stay open all day. A host that draws at rest drains a laptop or phone battery, and users see it as heat and fan noise. The targets are "0 presents, 0 submissions, 0 unrequested Rune thread wakes, CPU <= 0.1% of one core, on every host and platform", "a hidden, covered or minimised window presents 0 frames even with running motion" and "a blinking caret presents <= 2 frames a second". The count-budget target is 0 frames, 0 GPU submissions and 0 self-wakes over 10 s of settled virtual idle for window, overlay, web, LayerHost and covered Wayland window hosts, with known failures in quarantine linked to their issue. Count budgets are required in T1 on every merge.

What would help

1. Count GPU submissions per surface in SurfaceCounts (it is #[non_exhaustive], so apps don't break). Count wakes of each thread Rune starts, split into app-requested wakes and self-wakes. 2. Add a host matrix test on the virtual clock. Each row settles a scene with no declared animation and no focused field, steps 10 s with no input, then 10 s of pointer moves inside one hovered element. Rows: window (reuse the still-compositor test), overlay, LayerHost and the web runtime. Extra cases: a covered and a minimised window with running motion, and a focused field with and without a caret blink. 3. Add a covered Wayland window case to the Linux lane. It asserts no frames, near-zero CPU, and that poll and timers still run. 4. Put known failures in the quarantine from R0228: the web compositor case against #166, the hover case against #205 and the Wayland case against #139. Each still runs on every push and rejoins the required set when its issue closes.

Done when
  • Submissions and per-thread self-wakes are counted on every host kind.
  • T1 runs the matrix for window, overlay, LayerHost and web runtime and asserts 0 frames, 0 submissions and 0 self-wakes over 10 s of virtual idle.
  • A covered or minimised window with running motion presents 0 frames.
  • A focused field presents at most 2 frames a second with a caret blink and 0 without one.
  • The covered Wayland case runs in the Linux lane.
  • Each quarantined case names its issue and runs on every push.
  • A seeded host that requests a frame on every turn fails the matrix.
How to check

The matrix runs in T1 through R0030. The web and Linux lanes repeat the same assertions on real hosts. The quarantine ledger shows each excluded case and its issue.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2b · priority P1 · size M
R0263Render: no count budget gates passes, draws, upload bytes or GPU allocations on canonical scenesP1Phase 2bMT04
render-count-budgets · infra
What happens

The renderer has some counters. LayerStats counts layer targets, their bytes, extra passes and allocations. FrameStats counts commits, layout nodes, glyphs and shaped runs. A counting allocator checks that some steady frames allocate nothing on the CPU. None of these has a budget per scene. A change that adds a pass to every frame, doubles the bytes uploaded each frame or creates a texture per frame passes every test. It is seen only when someone profiles by hand.

Nothing counts draw calls, bind-group switches, upload bytes, buffer and texture creations, or synchronous GPU waits on the UI thread. Pipeline creations and total GPU bytes come from R0073 and R0072.

Where
Why it matters

A pass, an upload or a pipeline compile added to every frame turns into a dropped frame on a slower GPU, and users see a scroll or animation stutter. The targets: "0 GPU allocations in a steady frame on every path, video included", "0 UI-thread pipeline creations after the first frame", "0 synchronous GPU waits on the UI thread after the first frame, except pacing waits that end within 1 refresh period", "<= 4 MB of non-video uploads in any frame", "a static isolated layer redraws its content 0 times while unchanged", and "a frame that changes nothing is not presented". GPU memory must be bounded and counted for every pool.

What would help

Add render budgets to the framework from R0158, one file per scene, for 10 scenes:

1. hello window; 2. kit gallery; 3. board scroll; 4. glass blur; 5. video tile; 6. effects showreel; 7. 1,000 spring quads; 8. long Markdown; 9. a settings form with 20 disabled controls while it scrolls; 10. a 100-step live resize under a blur.

Each scene tracks passes, draw calls, bind-group switches, upload bytes, buffer and texture creations, pipeline creations, layer content redraws, UI-thread GPU waits, presents against the content rate, and total GPU bytes. It runs headless on lavapipe. Each counter has a ratchet value and, where a target sets one, an absolute ceiling. Lowering a value is free. Raising one needs --allow-raise, a changelog fragment and a Raised: trailer, and can never pass a ceiling.

Done when
  • The 10 scenes run in T1 in under 2 min.
  • Adding one pass per frame to any scene fails, naming the scene and the counter.
  • Ceilings are asserted: 0 GPU allocations and 0 pipeline creations in steady frames, <= 4 MB uploaded in any frame, 0 UI-thread GPU waits after the first frame, 0 content redraws of an unchanged isolated layer, presents per second <= content rate + 1.
  • Scenes that miss a ceiling today are listed with linked issues.
  • A raise without --allow-raise, a fragment and a trailer fails.
How to check

The budgets run in T1 on lavapipe. A seeded regression test adds a pass, a per-frame texture and a 5 MB upload to one scene and checks that each fails.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2b · priority P1 · size M
R0264rune-ref: the oracle checks only linear-light blending, not the sRGB-encoded blending windows use by defaultP1Phase 2bMT04
render-ref-srgb-blend · feature
What happens

rune-ref decodes the previous sRGB RGBA8 pixel, applies premultiplied source-over and quantizes back. That is linear-light blending into an sRGB target. The GPU lane of the differential builds its renderer on Rgba8UnormSrgb and never calls set_srgb_blend(true), so it tests the same mode.

Apps draw in the other mode. App::new turns srgb_blend on by default, and a window then renders into the non-sRGB form of its surface format and blends sRGB-encoded values. Renderer::create starts with srgb_blend off, and only set_format or set_srgb_blend turns it on. So the path that every app window takes by default is never compared with the oracle. A shader change that is wrong only for encoded blending, such as an image texel encoded twice, passes every reference test.

Where
Why it matters

Users see colours, translucent fills and image edges through the encoded path. A wrong blend there shows as fringes or shifted colours that no test catches. The target: the CPU oracle covers "14 of 14 kinds and 2 of 2 blend modes" and the differential holds at "<= 2/255 per channel with 0 outlier pixels". Colour management also needs goldens that "pass in both modes with no double encode".

What would help

1. Add a blend-mode field to Scene (linear-light or sRGB-encoded), with linear-light as the default so existing replay files still load. 2. In the CPU lane, blend the encoded values directly when the mode is sRGB-encoded, under the same strict-f32 rules. 3. In the GPU lane, render into Rgba8Unorm and call set_srgb_blend(true) for that mode. 4. Pin a second set of seeded-corpus hashes in goldens.json for the encoded mode. Keep the current 16 hashes unchanged. 5. Run every kind the oracle covers in both modes.

Done when
  • Scene carries a blend mode, and old replay files load as linear-light.
  • Both modes pass the differential at <= 2/255 with 0 outliers for every covered kind.
  • goldens.json holds hashes for both modes, and the existing hashes do not change.
  • A seeded double encode of image texels fails the encoded-mode differential.
How to check

scripts/check-reference.sh runs the CPU hashes in T1 and the GPU differential with --gpu in T2, both modes each time.

Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 2, milestone 2b · priority P1 · size M
R0265Kit: no count budget or bench catches a streaming reply that reparses, rehighlights or rebuilds everythingP1Phase 2bMT04
text-kit-content-budgets · infra
What happens

Kit content makes speed claims that no test holds. The syntax module says its scanners cost 0.01 to 0.5 ms per thousand lines. The README says two 50,000-line texts diff in about 40 ms and a first frame takes about 20 ms. Those numbers come from diff_50k_time, an ignored test that only prints, and no research note records them. The Mermaid timing test asserts only that the biggest charts draw in under 5 s in debug.

Nothing counts the work each commit does while a reply streams. A change that reparses the whole reply, rehighlights every code block or rebuilds completed blocks on each new chunk passes every test. A 200 KB reply then costs more on each commit than the last.

Where
Why it matters

Chat and agent apps stream long replies with code, diffs and diagrams. When per-commit work grows with the reply, the window starts to stutter half-way through a long answer, and users see it while they read. The target: "per commit, at most the new bytes plus the open block's last line plus 1 KB of parse and highlight work", and "0 rebuilds of completed blocks unless a new reference definition, theme, find state or handler change invalidates them, and then only those blocks". Every cache must be bounded in entries and bytes.

What would help

1. Add counters behind a test feature: bytes parsed, bytes highlighted, blocks rebuilt, Mermaid layouts and allocations, per commit. 2. Add a streaming scene to R0158: a 200 KB reply with TypeScript code (with index signatures), a diff fence and a Mermaid diagram, and a second reply that streams at the same time. 3. Budgets: parse and highlight work per commit at most the open block plus 1 KB; 0 rebuilds of completed blocks; one Mermaid layout per changed diagram. 4. Record the syntax and diff throughput with --profile perf in a research note, and make each claim cite it. Remove any claim that has no number behind it.

Done when
  • The scene fails when a commit reparses or rehighlights the whole reply.
  • The scene fails when a completed block rebuilds without an invalidating change.
  • The budgets run in T1 in under 20 s in a debug build.
  • Every throughput claim in the kit docs cites a recorded number.
How to check

The scene runs in T1 with the other count budgets. A seeded regression that clears the parse cache on each commit must fail it. Throughput numbers are re-run with --profile perf when the scanners or the diff change.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2b · priority P1 · size M
R0266Headless: traces, trees and first-pixels lines record no rev, backend, adapter, OS or font set, and traces carry wall-clock frame timeP1Phase 2bST04
tooling-env-manifest · feature
What happens

The trace header records size, refresh rate, scale, units and clock. It does not record which Rune rev, backend, adapter, OS or font set produced it. That matters because the backend can change under the same flags: instance_for switches to wgpu when a compositor wants features the native Metal backend lacks. --tree and the rune-first-pixels line record nothing about the environment either.

Every trace frame also carries the measured cpu_ms in its quality object. So the same script writes different bytes on each run, and a trace cannot be a byte-compared golden.

Where
Why it matters

When a golden or trace differs, the first question is whether the code changed or the machine did. Today the artifact cannot say. The target is that "100% of trace headers, trees and goldens carry the envelope, and no envelope field is part of a payload hash". Machine output must be structured, so tools read fields rather than prose.

What would help

1. Write a provenance envelope as a separate env object in the trace header, --tree output, the rune-first-pixels line and every golden file. Fields: Rune git rev, backend, adapter, OS and version, font-set hash, scale, locale, canonical flag and clock. 2. Payload hashes and byte comparisons leave the envelope out. 3. Comparisons print envelope differences as context. They fail only on the fields that define the canonical environment: font-set hash, scale and canonical flag. 4. Write cpu_ms only with a new --trace-timing flag, and never in canonical mode. 5. Update trace-quality.py and the motion-audit analyzer in the same PR so they treat cpu_ms as optional.

Done when
  • Two canonical trace runs of the same script have byte-identical payloads.
  • Every golden, --tree output and trace header has the env object.
  • A golden compared on another OS passes when the payload matches, and prints the envelope difference.
  • A golden compared with a different font-set hash fails and names that field first.
  • trace-quality.py and the motion audit pass on traces without cpu_ms.
How to check

A T1 test runs a script twice and compares payload bytes. A second test changes the font-set hash and checks that the comparison fails on that field. R0275 relies on the envelope being left out of the payload.

Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 2, milestone 2b · priority P1 · size S
R0267Render: no test compares the same canonical scene across GPU backendsP1Phase 2bMT03
render-cross-backend-diff · infra
What happens

Rune checks pixels in two narrow ways. The native Metal and wgpu Metal backends are compared on one Mac. The rune-ref differential compares the GPU with the CPU oracle, but only on whichever adapter the run picks. No scene set is drawn on every backend and compared. A difference that shows up only on DX12, Vulkan or WebGL2 is found by app authors. #117, where the WebGL2 build draws washed-out colours because fills are sRGB-encoded twice, is that kind of bug.

The tolerances in research/24 were set on Metal. The note says to measure Vulkan and D3D12 before claiming their budget, and that has not been done.

Where
Why it matters

An app should look the same on every platform. The targets: "Canonical scenes agree within 2/255 across backends and vendors (blur within 3/255)", and the oracle differential holds "at <= 2/255 per channel with 0 outlier pixels".

What would help

1. Define a canonical corpus: the rune-ref seeded scenes, the kit gallery stills and colour fixtures. Use bundled fonts only, so text does not depend on the machine. 2. Add a runner that each lane calls. It writes one PNG per scene and an environment manifest from R0266 (rev, backend, adapter, driver). 3. Add a T2 comparison job. It compares each lane's PNGs with the CPU oracle where an oracle arm exists, and with the lavapipe output from R0168 otherwise. Keep tolerances per instance kind, never above 2/255 (3/255 for blur). 4. On a failure, name the backend, scene and kind, and attach the diff image.

Start with lavapipe as the reference, since it is deterministic and runs on hosted runners. Other lanes join as they land: macOS, Windows, web and iOS.

Done when
  • The corpus runs on every lane that exists, and each lane uploads PNGs with a manifest.
  • The comparison job fails on a difference over 2/255 (blur over 3/255) and names the backend, scene and kind.
  • Per-kind maxima for each backend are committed in research/24.
  • A seeded colour regression on one backend turns the job red.
How to check

The T2 comparison job runs after the lanes on each dev push, and its result feeds promotion in R0169. A seeded double sRGB encode on one backend proves it fails.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P1 · size M
R0268CI: no browser lane renders a frame with WebGPU or WebGL2 and compares it with the other backendsP1Phase 2bMT03
render-lane-web · infra
What happens

The www workflow builds Rune to wasm and deploys the site, but no test reads back a rendered frame. The web smoke scripts exist, but no workflow runs them. They also cover only web-hello and do not compare pixels.

The WebGL2 path is broken three ways today. The webgl feature does not compile on wasm32 (#115). The fallback never runs when navigator.gpu exists but has no adapter (#116). The WebGL2 build draws washed-out colours (#117). No lane would have caught any of them.

Where
Why it matters

Web users see the bugs first, in whichever engine they use. The targets: "Canonical scenes agree within 2/255 across backends and vendors (blur within 3/255)"; SDR colour "<= 2/255 across backends" and "native equals web within 1/255"; and the web build "within 2/255 per channel".

What would help

Add render checks to the browser lane from R0062:

1. Build web-hello and a canonical-scene page twice: with default features and with --features webgl. 2. Run both in headless Chromium, once with WebGPU (SwiftShader or Dawn's software path) and once with WebGL2 forced. 3. Have the page report which backend it used, and assert it. 4. Read back the canvases. Compare the scenes with the lavapipe output through R0267, within 2/255 (3/255 for blur). Compare the WebGL2 gallery with the WebGPU gallery.

Software WebGPU is slow, so keep the scenes small. Safari and mobile browsers come later in their own lanes.

Done when
  • Both builds compile on every push to dev.
  • Both draw the canonical scenes within 2/255 of lavapipe (blur within 3/255).
  • The WebGL2 gallery matches the WebGPU gallery within the same tolerance.
  • The test asserts the backend the page reports, and a wrong or missing backend fails it.
  • Reverting the fix for #117 turns the lane red.
How to check

The browser lane result per push, fed into R0169. A dispatched branch that sRGB-encodes fills twice proves the comparison fails.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P1 · size M
R0269CI: no lane renders with Safari's WebGPUP2Phase 2bST03
render-lane-safari · infra
What happens

scripts/web-smoke.mjs can already drive WebKit with WEB_ENGINE=webkit, but no workflow runs it. When headless WebKit has no WebGPU adapter, the script prints available: false and passes instead of failing. Safari ships its own WebGPU implementation and is the only engine on iOS, so its differences in limits, texture formats and device-loss behaviour go untested.

Where
Why it matters

A Safari-only rendering bug reaches every iPhone user of a Rune web app before anyone sees it. The targets: "11 of 11 lanes green on every verified rev, with 0 skipped GPU tests and the expected adapter in each manifest", canonical scenes "within 2/255 across backends and vendors (blur within 3/255)", and on the web a lost device gives "a correct frame within 1,000 ms" with "0 panics". The web build is a first-class target in every browser engine, and "a missing engine fails".

What would help

Add a macOS job, built on R0268's pages and diff:

  • Run the smoke page and the canonical-scene pages in Playwright WebKit with WebGPU enabled, on a runner image whose WebKit has an adapter.
  • The page reports its backend; the test asserts WebGPU.
  • Read back the canvas and compare each scene with the lavapipe output: 2/255 per channel, 3/255 for blur.
  • Run the web device-loss test.
  • In this lane a missing adapter fails. Keep the skip only for local runs.
  • Before each release, run the same pages in shipping Safari on macOS and on an iPhone through WebDriver (safaridriver), and record the result in the release notes.
Done when
  • Canonical scenes are within 2/255 of lavapipe, blur within 3/255.
  • The test asserts the page's backend is WebGPU.
  • A missing WebGPU adapter fails the lane.
  • The web device-loss test passes in WebKit.
  • Each release records a shipping Safari result on macOS and on an iPhone.
How to check

The lane runs on every push to dev. To prove the adapter gate, run it once on an image without WebGPU and confirm it fails. To prove the diff, seed a 3/255 colour change in one scene and confirm it fails.

Depends on
Part of
  • Theme: T03
  • Tracked in R0234
  • Phase 2, milestone 2b · priority P2 · size S
R0270Verification: no committed matrix says which reference and generator cover each hard subsystem, or checks that its test ranP1Phase 2bST04
tooling-oracles · infra
What happens

PLAN.md's tenet is that each hard subsystem has a slow, obviously correct reference, and every change differential-tests the fast path against it on generated inputs. Today the references are partial and nothing lists them:

  • the renderer has rune-ref, which rejects kinds 5-7 and 13 and tests whichever backend is the default;
  • layout has hand-written differential tests against Taffy;
  • springs have an RK4 check on a fixed grid;
  • the editor has randomized tests against a span model;
  • Markdown streaming, Mermaid, DiffView, SVG icons, rich-text paste and script JSON have no generated reference.

No CI workflow runs any of it. So nobody can say which subsystem is covered, by what, with how many cases, and whether that test ran on the last merge.

Where
Why it matters

A reference that silently stops running, or runs 10 cases instead of 256, gives false confidence. The target: "every hard subsystem listed in a committed oracle matrix, content parsers included, has an obviously correct reference that is differential-tested on generated inputs on every merge", and "every matrix row runs on every merge with at least its stated case count (at least 256 for layout, editor, spring and streamed-Markdown suites)".

What would help

1. Add verification/oracles.toml with one row per subsystem: renderer kinds, layout, text editing, springs, Markdown streaming, Markdown, Mermaid, DiffView, SVG icons, rich-text HTML and RTF paste, and script JSON. 2. Each row names its reference, its generator, its test target, the lane it runs in and its minimum case count. A row with no reference yet says so and links its issue. 3. Add a T1 check that reads the test results and fails when a row's test target is missing, did not run, or ran fewer cases than stated. 4. Test targets report their case count in a form the check can read.

The gaps are separate issues. They add or upgrade their row as they land, including the streamed-Markdown differential.

Done when
  • oracles.toml lists every subsystem above with a reference, generator, lane and case count, or an open issue.
  • The T1 check fails when a row's test did not run.
  • The T1 check fails when a row's test ran fewer cases than stated.
  • Removing a test target named by a row fails the check.
How to check

The coverage check runs in T1 behind R0028. Rows for T2 and nightly lanes are checked against those lanes' results.

Depends on
Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 2, milestone 2b · priority P1 · size S
R0271Kit: streamed Markdown is checked against a one-shot parse on hand-picked documents and split points onlyP1Phase 2bMT04
failure-and-trust-markdown-stream-differential · feature
What happens

Kit Markdown parses a stream incrementally (crates/rune-kit/src/markdown/stream.rs:23, crates/rune-kit/src/markdown/cache.rs:52). The tests that compare it with a one-shot parse use hand-picked documents. an_open_span_never_shows_its_markers streams nine fixed documents a character at a time (crates/rune-kit/src/markdown/stream_tests.rs:43-64). a_stream_grows_its_parse_like_a_whole_one checks one document's cached stream against a fresh streaming parse (crates/rune-kit/src/markdown/stream_tests.rs:153-163). No test generates documents, splits them at random points, or compares find matches and selection after a stream.

#190 shows what slips through. At this commit five Markdown tests fail on dev: a streamed open span shows its marker text (crates/rune-kit/src/markdown/stream_tests.rs:61), find matches nothing in alt text (crates/rune-kit/tests/markdown_find.rs:87-88), and a streamed selection loses a character (crates/rune-kit/tests/markdown_select.rs:124). Those cases were found because someone wrote them. A generator would have found the class.

Where
Why it matters

An app that streams a model's reply shows it as it arrives. A wrong intermediate frame, a find that misses, or a selection that shifts by one character is seen at once. The streaming target asks that "the rendered content is correct", with "100% of kit tests ... pass". The verification target asks for a reference "differential-tested on generated inputs on every merge", with "at least 256 for layout, editor, spring and streamed-Markdown suites".

What would help

A proptest in rune-kit, listed in the oracle matrix (R0270):

1. Generate Markdown from a grammar: spans, nested emphasis, tables, lists, task items, fenced code, links, images and reference definitions. 2. Split it at random valid UTF-8 boundaries and feed it through the streaming path. 3. At every checkpoint, compare the incremental stream state with a from-scratch streaming parse of the same prefix. 4. After finalizing, compare the final tree, the find matches for generated queries and the selection mapping with a one-shot render. 5. Always include fixed fixtures that stress growth: a growing single paragraph, a long fence, a table that grows rows, and a reference definition that arrives after its use.

The fuzzing half (crash targets for Markdown, Mermaid, DiffView and others) is separate. This test is a correctness oracle.

Done when
  • The differential runs at least 256 generated documents per merge-gate run, with random UTF-8 split points.
  • Every checkpoint matches a from-scratch streaming parse, and the final tree, find matches and selection match a one-shot render.
  • The four growth fixtures are included.
  • The test fails at a9da7e3e, the parent of the commit that fixes #190's streaming regressions, and passes after it.
  • A failing case shrinks to a minimal document and split, and is kept as a regression test.
How to check

The test runs in the documented rune-kit test command, in the merge gate. Its row in the oracle matrix records the case count.

Depends on
Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 2, milestone 2b · priority P1 · size M
R0272rune-ref: stroke segments, triangles and images (kinds 5-7) have no oracle, and the generator emits only kinds 0-4P1Phase 2bLT04
tooling-ref-vector-kinds · feature
What happens

The uber shader draws 13 instance kinds that reach rune-ref (0-12), and a 14th, backdrop blur (13). Scene::validate accepts kinds 0-4 and 8-12 only, and the scalar shader panics on any other kind. So three kinds the renderer draws every day are never checked against a reference:

  • kind 5, stroke segments: the capsule and box segments that shapes lower to;
  • kind 6, filled triangles: ear-clipped polygons whose interior edges are "owned" so tessellated fills have no seams;
  • kind 7, RGBA images: manual bilinear filtering clamped to the image's own texels, straight-alpha atlas pixels premultiplied, and sRGB re-encoding when srgb_blend is on.

The main generator emits kinds 0-4. Dashed borders and gradients have their own generators. Layer composites, scope ends and effect slots are not generated in valid nested compositions. The per-kind tolerance budget has 5 entries.

Where
Why it matters

Icons, charts, vector shapes and every image go through these kinds. A seam in a tessellated fill or a dark fringe on a scaled image is visible to users, and today only eyes catch it. Compound paths with holes (#133) will be triangles, so they need this oracle too. The targets: "14 of 14 kinds" in the oracle at "<= 2/255 per channel with 0 outlier pixels", and "13 of 13 instance kinds (0-12) accepted by rune-ref and each present in at least 10% of generated scenes, with nested layers in at least 20%".

What would help

1. Transcribe kinds 5 and 6 from shader.wgsl into rune-ref under the same strict-f32 rules. Evaluate the owned-edge rule at the exact pixel centre. 2. Add an RGBA image atlas to the scene format, frozen bytes like the glyph atlas, with a stated sampling model. Transcribe kind 7. 3. Extend the generator to emit kinds 0-12, including tessellated polygons with shared edges, scaled, offset and clipped images with guard texels, valid nested layer scopes (8 and 9) and effect slots (12). 4. Extend per-kind budgets to all 13 kinds. Save any minimised failure as a regression. 5. Remove kinds 5-7 from the allowlist that R0074 adds. Kind 13 is covered by the blur work under the same tracker.

A transcription error makes the oracle and the shader agree on a bug, so review it against the WGSL line by line.

Done when
  • validate accepts kinds 0-12.
  • A seam test shows coverage summed over a tessellated opaque polygon's interior is exactly 1 at every pixel.
  • Each of the 13 kinds appears in at least 10% of generated scenes, and nested layers in at least 20%.
  • The differential passes per-kind budgets for all 13 kinds with 0 outliers, including down- and up-scaled images and their edges.
  • Kinds 5-7 are off the allowlist.
How to check

check-reference.sh runs the CPU tests in T1 and the GPU differential per backend in T2.

Depends on
Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 2, milestone 2b · priority P1 · size L
R0273Headless: --snap, --tree, --trace and instance hashes need a GPU device, so a machine without one cannot make goldensP1Phase 2bLT04
tooling-headless-cpu · feature
What happens

The runtime and the --html export run without a GPU. The headless runner does not: it creates a wgpu device before the first frame of a --snap, --tree or --trace run, and exits if there is none. Trees, traces and the instance stream are CPU work, and rune-ref can rasterize instances on the CPU. But the instance stream refers to glyph atlas slots and image textures that live on the GPU, so it is not a complete artifact by itself.

So the canonical lane depends on each runner's adapter. It cannot run on wasm32 under Node, and every tree query pays for GPU start-up.

Where
Why it matters

A hosted CI runner, a container or an agent's sandbox often has no GPU or only a software one that differs per OS. Goldens made there either fail or differ. The targets: "the canonical lane runs with no GPU adapter present", "tree and instance hashes also match on wasm32", and one golden set on every OS. For agents, a warm snap of Settings should return "p95 at most 50 ms over 100 requests", which device start-up makes harder.

What would help

1. Add --cpu, and a test-support constructor, that runs runtime, layout, paint and instance generation with no device. 2. Produce glyph atlas and image contents on the CPU and name them by content hash. The instance stream plus its resources is then a complete, ordered artifact. 3. Write --tree, --trace and instance hashes from that path, and write PNGs through rune-ref. This needs kinds 5-7 from R0272 and the font set from R0157. 4. A compositor or effect that needs the GPU fails with its name, and the scene manifest lists it as excluded with that reason. 5. Build the same path for wasm32 and run it under Node.

Some text and image paths read GPU state today. Move those to CPU-side content ids, or list what the mode leaves out.

Done when
  • --cpu --tree runs on a Linux runner with no Vulkan driver.
  • For every manifest scene, --tree and the instance hash are byte-identical between --cpu and the GPU path.
  • The --cpu PNG matches rune-ref's golden for every manifest scene.
  • Every manifest scene runs on wasm32 under Node.
  • A GPU-only effect in --cpu mode fails with the effect named.
How to check

A T1 test runs on a runner without lavapipe. R0275 runs the same path on macOS, Linux, Windows and wasm32 and compares hashes.

Depends on
Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 2, milestone 2b · priority P1 · size L
R0274Goldens: kit-gallery stories and example scenes have no stored golden, so their rendering changes are seen only when someone runs --snap by handP1Phase 2bLT04
tooling-scene-goldens · feature
What happens

Committed goldens exist for a few things: the Markdown fixture's scene tree, the kit accessibility trees, rune-ref's 16 corpus hashes, and 12 CoreText PNGs that run on macOS only. Kit-gallery stories and example scenes have none. A change to a button's padding, a shadow or a layout in them fails no test. Someone sees it only by running --snap and comparing by eye.

Blessing is an environment variable, RUNE_BLESS=1, which writes goldens wherever the test runs. Nothing stops a CI job from writing them.

Where
Why it matters

Users see kit components in every app. A regression in one lands in every app that pins the next rev, and nobody notices until an app's own review. The targets: every scene in the committed manifest (every kit-gallery story and example scene, with any exclusion listed with a reason) has a byte-identical payload on the 3 desktop OSes, with "1 golden set and 0 per-OS goldens". Layout needs "100% of stories, eligible examples and checkpoints gated in T1; 0 golden changes without a matching fragment; CI never writes goldens".

What would help

1. Add goldens/<scene>/ for every scene in the canonical manifest, holding:

  • the canonical tree JSON;
    • the instance stream with resource ids at checkpoints t = 0, 0.1 s and the end;
    • a CPU PNG at the end checkpoint, from R0273;
    • the env envelope from R0266.

2. Reuse rect goldens from R0067 rather than storing rects twice. 3. On a mismatch, CI uploads expected and actual PNGs, a pixel diff, and the tree diff with blame per node. 4. Blessing is local only, through one command, and the commit needs a Blessed: trailer. CI never writes goldens. 5. Store PNGs compressed and keep the total under a committed size ceiling. 6. A manifest test fails when a new story or example has neither a golden nor a listed reason.

Goldens change on every intended visual change. Diffs and blame keep review cheap. Never bless automatically.

Done when
  • Every manifest scene has a golden.
  • A new story or example with no golden and no listed reason fails T1.
  • A one-pixel shadow change fails T1 and uploads before and after rasters with blame.
  • A golden change without a Blessed: trailer fails.
  • CI never writes goldens (tested).
  • The golden set's size stays under its ceiling.
How to check

T1 runs the goldens on Linux. R0275 repeats them on macOS, Windows and wasm32 and checks the payloads match.

Depends on
Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 2, milestone 2b · priority P1 · size L
R0275CI: nothing checks that the same canonical scene gives the same bytes on macOS, Linux, Windows and wasm32P1Phase 2bST04
tooling-cross-os-determinism · infra
What happens

PNG equality is tested only by running the same scene twice on one machine. No job compares output across operating systems or architectures. research/24 says cross-architecture byte equality of rune-ref's corpus "is a design goal, not measured evidence". Without a comparison, a canonical mode can drift back into machine dependence and nobody sees it until a golden fails on a contributor's machine.

Where
Why it matters

One golden set only works if every runner makes the same bytes. Otherwise each OS needs its own goldens, and a layout change that lands on one OS only is missed. The targets: every manifest scene "has a byte-identical payload on the 3 desktop OSes", "tree and instance hashes also match on wasm32", "1 golden set and 0 per-OS goldens". Motion needs "normalized physics traces bit-identical in the canonical mode". Layout needs "identical digests across the 5 targets at each scale". Every platform's post-merge lane feeds the verified branch.

What would help

Add a T2 job that runs on every dev push:

1. Run the canonical --cpu lane on hosted ubuntu, macos and windows runners, and on wasm32 under Node. 2. Each run uploads payload hashes for every manifest scene: tree, trace, instance stream and CPU PNG. wasm32 uploads tree and instance hashes only. 3. Each run also uploads the normalized spring traces from R0258. 4. A final step compares payloads with the provenance envelope left out, and fails with the first differing scene and field. 5. The job's result feeds verified promotion.

Done when
  • The job runs on every dev push and covers every manifest scene.
  • A seeded platform-dependent value fails it, with the scene and field named.
  • wasm32 tree and instance hashes are compared with the desktop ones.
  • Normalized spring traces are compared bit for bit across aarch64, x86-64 and wasm32.
  • Envelope differences are printed as context and never fail the job.
How to check

The T2 job itself. Its status feeds verified promotion. A test fixture that reads the OS name into a scene's payload must fail the job, which keeps the comparison honest.

Depends on
Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 2, milestone 2b · priority P1 · size S
R0276Perf: the one soak test is opt-in and reads 0 MB on macOS, so slow leaks and unbounded caches are found by appsP1Phase 2bMT04
tooling-soak-budget · feature
What happens

Rune has one soak test. overlay_soak shows and hides two overlays 2,000 times and fails if memory grows past a set amount. It runs only with RUNE_GUI_TESTS=1 in a desktop session. The only workflows in the repo build the site, so no merge runs it. It reads private bytes on Windows and resident pages on Linux. On every other OS memory_mb returns 0.0, so on macOS the growth check passes whatever happens. procwatch already reads the macOS footprint, but the test does not use it.

A per-frame budget cannot see growth spread over thousands of frames. Apps found three such leaks before any test did: #162 (macOS leaks one window-size surface on every hide and show), #161 (a hidden macOS window keeps its full-size drawables) and #142 (a hidden Wayland overlay keeps its last images). The docs ask for every cache to be bounded in entries and bytes, but no test checks that a bound holds, and caches do not report their sizes in one place.

Where
Why it matters

Rune apps stay open all day. A slow leak shows as a footprint that climbs over hours, and the user notices a slow machine or a memory warning from the OS. The target: long sessions keep every cache within its bound and retained overhead flat. Every registered cache stays within its bound, retained overhead grows less than 1% over the second half of a 100k-frame soak, and 1,000 hide and show cycles leak 0 surfaces. The memory target also asks for drift of at most 2 MiB, and for a hidden window to hold no full-size drawables.

What would help

1. A cache registry. Every bounded cache reports its entries and bytes through one debug accessor. A test in the required merge check fails when a cache type is not registered. 2. Soaks on the virtual clock, built on the budget harness from R0158 and the counting allocator from R0080:

  • stream 100k Markdown tokens into a transcript;
    • scroll a 10k-row virtual_rows list end to end 100 times;
    • type 200 KB into a text field;
    • show and hide an overlay and a window.

After warm-up, assert that every registered cache stays within its bound, and that retained heap minus content bytes grows less than 1% over the second half of the run. 3. Give overlay_soak a macOS footprint reading through procwatch and a window case. Run 1,000 hide and show cycles in the macOS and Linux GPU lanes, and assert 0 growth in live surfaces. 4. Run 10k-frame versions on every merge and 100k-frame versions nightly.

GPU allocation counts need per-backend hooks. Start with surfaces and heap, and add GPU bytes once R0284 lands. The hide-and-show soak fails until #162 is fixed, so put it in quarantine linked to #162; it rejoins when that issue closes.

Done when
  • Every bounded cache is registered and reports entries and bytes, and an unregistered cache fails the merge check.
  • At least 4 soak scenarios run, each with a 10k-frame merge length and a 100k-frame nightly length.
  • In each soak, every registered cache stays within its bound, and retained overhead grows less than 1% over the second half.
  • overlay_soak reports a nonzero memory reading on macOS.
  • The 1,000-cycle hide-and-show soak sits in quarantine linked to #162, and fails until #162 is fixed.
  • A seeded unbounded cache fails the short soak.
How to check

The short soaks run headless in the required merge check, with no GPU. The long soaks and the hide-and-show soak run nightly in the macOS and Linux GPU lanes. A seeded-regression test, a cache with its bound removed, proves that the short soak fails.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2b · priority P1 · size M
R0277Layout: rect goldens cover only first frames, so a layout change after a menu opens, typing or a resize goes unnoticedP2Phase 2bMT04
layout-interaction-goldens · infra
What happens

R0067 gates the first frame of each story: the rects that --tree reports are compared with committed goldens. Many layout paths run only after an interaction, so a first-frame golden never reaches them:

  • an anchored menu, popover or combobox opening;
  • a text field growing as the user types;
  • a selection change in a list or table;
  • a live resize, which takes the resize-only path and skips the view;
  • a virtual_rows window shifting as the list scrolls, which takes the virtual-only path.

The pixel diff against Storybook in scripts/kit-diff.py also checks one state per story. Its per-story actions only reach the state that the Rune scene starts in. So a change that breaks resize_only or virtual_only, or moves a menu after it opens, lands unnoticed until someone sees it in an app.

Where
Why it matters

These paths are where users see layout break: a menu that opens in the wrong place, a field that clips its third line, a sidebar that jumps during a resize. The layout target is that every rect change in a story, an eligible example or a scripted interaction is caught at merge and declared: 100% of stories, eligible examples and checkpoints gated, 0 golden changes without a matching fragment, and CI never writes goldens. The resize target needs the same checkpoints. Live resize and virtual scrolling relayout without running the app view, with 0 root view runs after the first frame, and row builders run only for newly mounted rows.

What would help

Add scripted checkpoints to the rect-golden test, driven by the headless runtime's input injection. Cover at least:

  • open each menu, popover and combobox in the gallery;
  • type 3 lines into each text input;
  • change the selection in lists and tables;
  • resize the window from 1024 to 480 pt in 10 steps;
  • scroll each virtual list by 3 viewports.

Each checkpoint stores the --tree rects in the same golden format as the first-frame goldens, under the same bless and changelog/unreleased/ fragment rules. Run every checkpoint on the virtual clock so that two runs give equal rects. Keep the added time in the merge check under 60 s, for example by running each story's checkpoints in one process.

Done when
  • At least 40 scripted checkpoints across the gallery, covering all five interaction kinds.
  • Making resize_only skip one node's relayout fails a resize checkpoint.
  • Two runs give equal rects at every checkpoint.
  • A checkpoint golden change without a matching fragment fails, and CI never writes goldens.
  • The checkpoints add under 60 s to the required merge check.
How to check

The rect-golden test runs in the required merge check. A seeded fault in resize_only, and one in virtual_only, each prove that a checkpoint fails.

Depends on
Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 2, milestone 2b · priority P2 · size M
R0278Perf: PLAN's target of 1,000 spring-animated quads at 120 Hz has no scenario or budgetP2Phase 2bMT04
motion-1000-quads-budget · perf
What happens

PLAN.md §8 sets a target of 1,000 spring-animated quads at 120 Hz on Mac and iPhone: CPU p95 ≤ 4 ms, GPU p95 ≤ 4 ms and under 0.1% missed presents. No scenario measures it. The motion crate's benchmarks time single tracks, for example 16.8 ns for a critically damped scalar spring. The settings bench draws 174 instances. gpu_springs steps 1 to 10,000 springs as a spike, outside the runtime. None of these runs a whole animating frame through the scene, scroll, paint build and upload at 1,000 to 100,000 elements. Nothing fails when such a frame does more work.

The paint pass clears and resizes per-node scratch arrays for every node on every frame. So a frame where 10 nodes move in a 100,000-node tree may cost almost as much as a frame where every node moves. Nobody can say, because no count is recorded.

Where
Why it matters

Users notice this as dropped frames when a board full of cards rearranges, or when a long list sorts with animation. The motion target is that motion costs only what moves: CPU p95 ≤ 4 ms, GPU p95 ≤ 4 ms and < 0.1% missed presents on the reference Mac, with visits ≤ 2 × changed + feature-list nodes + 64, differing by ≤ 5% between the 10,000-node and 100,000-node trees. The worst-case frame target is p95 ≤ 4 ms and 0 frames over 8.3 ms per run on the reference Mac.

What would help

Add a motion bench example to the scene suite from R0065, with three shapes:

  • 1,000 keyed quads retargeting on springs;
  • a 10,000-node tree with 10 nodes moving;
  • a 100,000-node tree with 10 nodes moving.

Count per frame: scene nodes visited, runtime nodes scanned, paint nodes walked, instances and bytes written, and uploads. Commit a count budget for each shape through R0158. The counts are exact on the virtual clock, so the merge check needs no wall clock.

The wall-clock numbers are a separate row in the perf matrix, run by the reference-device lane: --profile perf, 30 s per run, paired alternating runs, median, with outliers kept. Say what a headless number leaves out (GPU upload, presentation).

Done when
  • The three scenarios exist and run headless on the virtual clock.
  • The required check fails when any count exceeds its committed budget.
  • Visit counts differ by ≤ 5% between the 10,000-node and 100,000-node trees with 10 nodes moving.
  • The perf matrix has a 1,000-quad row that fails on the reference Mac when CPU p95 > 4 ms, GPU p95 > 4 ms or missed presents ≥ 0.1%.
How to check

Count budgets run in the required merge check. A seeded change that walks every node on a frame where 10 move fails the 100,000-node budget. The reference-device lane runs the wall-clock row on its nightly schedule.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2b · priority P2 · size M
R0279Motion audit: two checkers drift apart, and the docs tell contributors to run the Python oneP2Phase 2bST04
motion-audit-retire-analyzer · refactor
What happens

The motion audit has two checkers. scripts/motion-audit/analyze.py (1,038 lines) reads the traces that run.sh records. The Rust gate in crates/rune/src/motion_gate runs check() against its RULES table inside cargo test. R0156 ports the analyzer kinds that are left to Rust, and R0166 moves the 36 scenarios into gate tests. After that, analyze.py stays as a second rule set that can disagree with the first.

The docs still point at the Python checker. The audit README's first commands run run.sh and then analyze.py, and the --allow and --fail flags that make it a gate exist only in Python. run.sh says analyze.py reads its output. test_retargets.py holds retarget checks that exist only in Python. Traces that installed builds write (motion-trace.py) also need a checker, and today only Python reads them.

Where
Why it matters

A contributor or agent who follows the README runs a checker that the merge gate does not use. They can see a pass that the gate fails, or chase a finding that the gate never reports. The target is a required gate with one rule set: findings come only from the Rust rules, with every kind analyze.py had, and there is 1 checker (the Rust RULES), with equal findings to the old analyzer on shared fixtures or listed differences.

What would help
  • Add a Rust entry point that reads a motion-trace JSONL into a Recording and runs check(), so traces from installed builds use the same rules. When a trace lacks a channel a rule needs (painted properties, pixels), report that rule as not run, never as passed.
  • Move test_retargets.py's checks into Rust gate tests.
  • Compare analyze.py and the Rust rules on shared fixtures, and list any difference.
  • Then reduce analyze.py to a trace viewer or delete it. Recommended: keep track.py as the frame viewer and delete analyze.py, since a viewer that still prints findings invites people to trust it.
  • Update the audit README and the contributor docs: a motion change adds or changes a gate test, and the gate tests are the check.
Done when
  • Motion findings come only from crates/rune/src/motion_gate.
  • For every gate scenario, the findings from the imported trace equal the findings from the native Recording, including expectation and retarget-audit kinds.
  • A trace that lacks a channel a rule needs reports that rule as not run.
  • The audit README describes the gate tests as the check, and no doc tells contributors to run analyze.py to pass.
How to check

The gate tests run in the required merge check, with a test that imports each scenario's trace and compares findings with the native run. A doc review confirms that the README and contributor docs name the gate tests.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 2, milestone 2b · priority P2 · size S
R0280Motion gate: recordings don't show which frame built a pipeline, grew an atlas or loaded a face, so first-use hitches go unseenP2Phase 2bST04
motion-first-use-hitch-count · infra
What happens

A hitch on first use is one long frame. A pipeline is built lazily, a glyph atlas grows a page, or a font face loads on the main thread. Such costs are large: building the renderer's one uber pipeline costs 89 ms with macOS's shader cache cleared, against 0.94 ms warm. rune-fx builds an effect pipeline the first time a frame draws it, inside the render pass. FxRenderer::built_pipelines counts pipelines in total, for tests only. Frame stats and motion-gate recordings carry no per-frame count or time for pipelines, atlas pages or font faces. So no scenario can fail because an animation's first frame compiled a shader, and nothing would catch a new lazy path.

R0073 adds the per-frame pipeline count. This issue adds the atlas-page and font-face counts beside it, records all three in gate recordings, and adds the gate rule.

Where
Why it matters

The first time a user opens a sheet or plays an effect, it stutters, and every later time it is smooth. Developers rarely see it, since their shader caches are warm. The motion target asks that motion hold up on first use: first entrances present with no interval over 1.5 refreshes on the reference Mac, their first frame matches a warm-cache render, and 0 pipeline creations happen inside an animating frame's encode. The render target asks for 0 UI-thread pipeline creations after the first frame, and no scenario adding more than 2 ms of render or media work to the UI thread.

What would help
  • Add per-frame counters and CPU time to the frame stats for atlas pages allocated and font faces loaded, beside the pipeline counter. Keep them allocation-free per frame.
  • Record all three in gate recordings, with the element whose draw triggered each one.
  • Add a gate rule first-use to RULES. It reports a pipeline creation during an animating frame after the scenario's first frame, and an atlas page or face load there that costs over 2 ms. Glyph uploads into existing atlas pages are not findings.
  • Give existing scenarios that trip it bounded allow rows that each link an issue.
Done when
  • Atlas-page and font-face counters and times exist in frame stats and allocate nothing per frame.
  • Gate recordings carry all three counters per frame, with the triggering element.
  • first-use is in RULES and flags a planted lazy pipeline in a test scenario, naming the element.
  • Streaming text into existing atlas pages gives no findings.
  • Current scenarios pass, or carry bounded allow rows that link an issue.
How to check

Gate tests in the required merge check, including a planted lazy pipeline that must fail and a streaming-text scenario that must pass.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 2, milestone 2b · priority P2 · size S
R0281Motion gate: debug runs record different commits than release, so a debug gate can miss release behaviourP2Phase 2bST04
motion-gate-debug-release-parity · infra
What happens

The motion audit records its scenarios from --release builds. R0166 moves them into gate tests, which run in debug. Debug builds commit differently:

  • A Tx::live_only event 0.25 s or more after the last commit commits anyway in debug, so the runtime can compare what the view builds with what is on screen. Release builds skip that commit.
  • That check commit keeps virtual lists' mounted rows rather than picking them again, so it takes a different path through virtual_only.
  • The idle meter records what woke each frame only in debug builds.

motion_gate::Run::new leaves the live-only check on. So a gate scenario in debug records extra commits that a release app never makes. It can pass in debug and behave differently in release, or the reverse, and nothing compares the two.

Where
Why it matters

Apps ship release builds. A gate that passes on behaviour users never get gives false confidence, and a finding that only debug shows wastes a contributor's time. The target is a required gate with one rule set whose debug runs agree with release: 0 debug/release differences in the nightly run, and test execution ≤ 3 min on a 4-core hosted runner.

What would help
  • Have motion_gate::Run turn off debug-only paths that change commits by default, starting with check_live_only(false). Give scenarios that test those paths an opt-in.
  • Audit other cfg(debug_assertions) paths in the runtime that change what commits or what frames are requested, and either turn them off in Run or list them.
  • Add a nightly job that runs every gate scenario in --release, compares its findings with the debug run, and opens an issue on a difference.
Done when
  • Run disables the live-only check commit unless a scenario opts in.
  • A nightly release run of all gate scenarios reports 0 finding differences from debug.
  • A planted debug-only behaviour difference is reported by the nightly comparison.
How to check

Gate tests run in debug in the required merge check. The nightly release job reruns them with --release and diffs the findings, with the planted difference as its self-test.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 2, milestone 2b · priority P2 · size S
R0282Motion gate: a scenario can keep asking for frames for up to a second after its motion settles and still passP2Phase 2bST04
motion-idle-gate-pass · infra
What happens

Rune aims to draw nothing when nothing moves. Loops run only when their surface is visible, opaque enough and not clipped away, and a debug idle meter warns about frames that change nothing. The Rust gate checks the end of a scenario with wakes-after-end, but that rule allows 1.0 s after the motion ends. At 120 Hz a scenario can ask for up to 120 more frames and pass. idle-frames, which flags frames asked for with no visible change, exists only in analyze.py. The gate's Recording stores only whether each frame returned awake, not which redraw or wake the runtime asked the host for. Run::quiet, which marks where the motion ended, is not called at the end of every scenario, so most scenarios never get the check at all.

Where
Why it matters

A window that keeps drawing after its motion ends spins a core and drains a laptop battery while the user reads. The "Fast apps" docs page says an idle window draws nothing. The motion target is that motion costs nothing once it settles or cannot be seen: 0 frames more than 1 frame after settle in every scenario (declared exceptions such as a caret blink), and 0 frame requests from unseen loops.

What would help
  • End every gate scenario with Run::quiet and a quiet phase.
  • Lower the wakes-after-end grace to one frame after the last motion settles. Exceptions such as a caret blink are declared, not covered by the threshold.
  • Record the runtime's redraw and wake requests in the Recording, so a rule sees what a host would be asked for.
  • Add idle-frames to RULES: a frame requested with no visible change.
  • Add headless tests for each loop kind (periodic, sequence, delayed start) under a clipped, a zero-opacity and a hidden surface, each asserting 0 requested frames.

This builds on R0156 and R0166.

Done when
  • Every gate scenario ends with a quiet phase checked by wakes-after-end (one-frame grace) and idle-frames.
  • A planted 0.3 s trailing wake fails the gate.
  • A planted loop under an opacity-0 parent fails the gate.
  • Each loop kind has a hidden-surface test that asserts 0 requested frames.
How to check

Gate tests in the required merge check, including the two planted failures as self-tests of the rules.

Depends on
Part of
  • Theme: T04
  • Tracked in R0252
  • Phase 2, milestone 2b · priority P2 · size S
R0283Scrolling: momentum, rebound and growth use the platform's exp, so trajectories can differ between operating systemsP2Phase 2bST04
motion-scroll-steppers-deterministic · refactor
What happens

rune-motion's springs use their own polynomial exp and sin_cos, so their traces do not depend on the platform's libm. The scroll and growth steppers do not use them. Scroll momentum on both axes, touch momentum, the critically damped touch rebound and the growth module's ramp and rate decay all call std exp. Its last bits can differ between macOS, Linux, Windows and wasm32 libm builds, so a scroll trajectory and its settle frame can differ between hosts.

The iOS decay rate is also defined twice, with two values: SCROLL_DECAY is 2.002 in the runtime, and Decay::IOS_NORMAL is 2.002_002 in rune-motion.

Where
Why it matters

Scroll goldens and motion-gate traces must match across CI hosts, or every platform needs its own set and a real regression hides among last-bit noise. The target is that motion physics are deterministic across platforms: normalized physics traces bit-identical in the canonical mode, and full gate traces within 1/64 device px.

What would help
  • Add an f64 exp to rune_motion::math, beside the f32 one, built on the same canonical math as R0258. The touch rebound works in f64.
  • Use it in every stepper listed above.
  • Take the momentum decay rate from Decay::IOS_NORMAL, and delete SCROLL_DECAY.
  • Add physics fixtures for momentum, rebound, glide and growth that record trajectories and settle frames.
  • Add a grep guard to the required check that rejects std exp, ln and powf in runtime/scroll, runtime/motion and growth.rs.

Expect last-bit changes to existing scroll traces. Bless them once, in the same change, with a fragment.

Done when
  • The physics fixtures give bit-identical trajectories and settle frames in the canonical mode on macOS arm64, Linux x86-64, Windows x86-64 and wasm32.
  • The grep guard finds no std exp, ln or powf in runtime/scroll, runtime/motion or growth.rs.
  • The iOS decay rate has one definition.
How to check

The fixtures run in the platform lanes of the canonical lane and compare against one golden set. The grep guard and unit tests run in the required merge check.

Depends on
Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 2, milestone 2b · priority P2 · size S
R0284Memory: no subsystem reports its bytes, so footprint cannot be attributedP2Phase 2bMT04
perf-memory-gauges · feature
What happens

procwatch can name memory the Rust allocator never sees. A Gauge holds bytes for pixel buffers, GPU textures or IOSurfaces, and a snapshot subtracts the counted heap and every gauge from the footprint, leaving the unaccounted remainder. Rune registers no gauges. procwatch is an optional dependency, enabled only by the frame-profile feature. The heap counter tags bytes per thread, not per subsystem. It counts each 2048 × 2048 glyph atlas page as allocated when the page is created, whether or not its pages are resident. LayerStats counts layer targets and their blur scratch, but not the glyph atlas, image pages, backdrops or drawables. dev_stats shows only what an app writes into it by hand.

So when a footprint grows, nobody can tell which pool grew.

Where
Why it matters

A chat or notes app that grows past its budget gets killed on iPhone and slows a Mac. Without attribution, each regression starts with an Instruments session. The memory target is a footprint that is bounded, attributed, stable, and given back at rest and under pressure: Mac hello ≤ 30 MiB footprint, iPhone ≤ 40 MiB, a text-free overlay adds ≤ 2 MiB, drift ≤ 2 MiB, and reclaimable bytes at baseline within 1 s of a pressure warning. Every criterion should be checked continuously, so each row needs a number a test can read.

What would help
  • Register procwatch gauges for glyph and image atlas CPU bytes, layers, backdrops, the blur pyramid, staging buffers, drawables and text caches. Take GPU bytes from the single count that R0072 adds, rather than a second count.
  • Add memory_report() on Renderer and Runtime. List allocated CPU bytes, GPU bytes and the process footprint as separate lines, and the unattributed remainder as its own line.
  • Show the report in the built-in dev_stats summary.
  • Make it available in --profile perf builds through a feature, so numbers come from the build that is measured.

The soaks in R0276 can then assert on named pools instead of process totals.

Done when
  • Each gauge has a test that follows its pool through allocate, grow and free.
  • memory_report() exists on Renderer and Runtime.
  • For hello, dev_stats shows each pool, the footprint and the unattributed remainder.
  • The report is available in a --profile perf build.
How to check

Unit tests for each gauge's lifecycle in the required merge check. The macOS lane prints the report for hello and checks that the gauges plus the heap stay below the footprint.

Depends on
Part of
  • Theme: T04
  • Tracked in R0520
  • Phase 2, milestone 2b · priority P2 · size M
R0285Bench: bench-ui.py and bench-live.py parse the headless summary line's prose, so a wording change breaks benchmarks across revisionsP2Phase 2bST04
tooling-bench-summary · refactor
What happens

A headless run ends with a human summary on stderr: rune: N frames at F fps, gpu init … ms, first frame … ms, frame cpu mean … ms p50 … p95 … max …, N instances. bench-ui.py and bench-live.py read their numbers from that sentence with regular expressions. bench-ui.py --compare also runs saved binaries from an older revision, so a change in wording breaks the comparison with past revisions, not just the current one. The desktop runner prints a different sentence, with no p50 or p95. Structured lines already exist for first pixels (rune-first-pixels) and the frame profile (rune-frame-profile), but not for the main summary.

Where
Why it matters

Benchmarks are only useful if a number from last month still compares with today's. An agent that reads results needs fields, not prose. The harness target asks for structured machine output: 0 in-repo scripts parse prose from a binary that prints rune-summary, with one isolated legacy parser allowed for comparing older revisions. Latency results must also be comparable across candidates on reserved hardware, with a paired regression over 10% turning the lane red, which needs a parser that does not break between revisions.

What would help
  • In every headless run mode (snap, script, video, desktop), print rune-summary {json} beside the human line. Include a v schema version and the fields: frames, fps, gpu init, first frame, frame CPU mean, p50, p95 and max, instances, animating and at-rest counts, and the environment block from R0266.
  • Switch both bench scripts to read it.
  • Keep one isolated legacy parser, used only when the binary under comparison has no rune-summary line.
  • Pin the fields and version with a schema test. A change to a field bumps v.
Done when
  • Every headless run mode prints rune-summary, including --desktop.
  • The bench scripts read JSON, and the legacy parser runs only for binaries without the line.
  • A schema test pins the fields and version.
  • No in-repo script outside the legacy parser matches the prose summary.
How to check

A schema test in the required merge check runs each mode on a small app and validates the line. A grep guard keeps prose-summary regexes out of scripts/ except the legacy parser.

Depends on
Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 2, milestone 2b · priority P2 · size S
R0286Text: no independent model checks the editor's text, selection, undo and IME composition after random edit sequencesP2Phase 2bMT04
tooling-editor-model-test · feature
What happens

TextEdit changes often, and planned work changes it again: composite layout, delta undo and a text-input protocol. Its randomized tests check internal consistency, not correctness against a model. flatten_spans is compared with a naive merge over 300 random span sets. random_edits_keep_ranges_blocks_and_soft_breaks_consistent runs 40 seeds of 300 random steps: typing, deletes, moves, marks, blocks, undo and redo, cut, copy and paste, preedit and commit. After each step it calls assert_invariants, which checks that ranges, blocks and soft breaks agree with each other. Nothing checks that the text, the selection, the undo depth or the preedit state are what the operations should have produced. A bug that leaves the editor consistent but wrong, such as undo restoring the wrong text, passes. The tests use a hand-rolled generator, so a failing sequence is not shrunk or saved.

Where
Why it matters

Users notice an editor bug as lost text: undo that skips a step, a selection that jumps after an emoji, a composed Japanese word that commits twice. These bugs ship when the test only checks that the editor agrees with itself. The target is that every hard subsystem in the oracle matrix has an obviously correct reference, differential-tested on generated inputs on every merge, with at least 256 cases for the editor suite.

What would help

Add a proptest state machine. Each case applies random inserts, deletes, selections, word and grapheme moves, undo and redo, paste, and preedit and commit sequences to TextEdit and to a model. The model is a String plus anchor and focus, with its own undo stack of whole snapshots and a preedit slot. Compare after every step:

  • text;
  • selection (anchor and focus, on char boundaries);
  • undo depth and the text undo would restore;
  • preedit text and range.

Use the existing Unicode pieces (combining marks, ZWJ emoji, CJK, tabs, newlines) and the IME cases as seeds. Persist regressions in proptest's regression file, so a shrunk failure replays on every run. Keep rich marks and blocks out of the first model. They stay covered by assert_invariants, and can be added once the plain model holds.

Done when
  • At least 256 sequences of up to 64 steps run per merge-check run.
  • Text, selection, undo depth and preedit are compared after every step.
  • Persisted regressions replay.
  • A seeded undo bug (one step dropped) fails within the default case count.
  • The test runs under the composite-layout path once that exists.
How to check

The state machine runs in the required merge check. Its case count and seeded-bug check are rows in the oracle matrix that R0519 tracks.

Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 2, milestone 2b · priority P2 · size M
R0287Headless: work an app starts in setup lands at wall-clock-dependent frames, and examples hand-roll their own headless checkP2Phase 2bMT04
tooling-headless-setup-threads · bug
What happens

A headless run passes a no-op waker to the runtime and to the shortcut guard. Threads an app starts in setup still run, but nothing waits for them. Their results land at whatever frame is current when they finish, which depends on how fast the machine is. So a scripted run of an app with a background producer is not reproducible.

Examples work around it by hand. live-values and overlay decide whether they are headless from a short list of flags (--snap, --trace, --tree, --frames, --strip, --first-pixels, --list-scenes). The list misses --script, --video, --out, --html, --desktop and --duration. A scripted video run of live-values starts its wall-clock producer threads. rune::is_headless reads the process's arguments, so an app with its own flags cannot use it. motion-bento says so in a comment and calls rune::tooling::headless_run() instead.

Where
Why it matters

Goldens and replays for apps that fetch or stream in setup flake from run to run, and the failure looks like a rendering bug. Examples teach the wrong pattern to apps. The canonical-lane target is a deterministic lane across machines, with every scene in the committed manifest giving a byte-identical payload on the 3 desktop OSes and 1 golden set with 0 per-OS goldens.

What would help
  • Give setup a headless-aware spawn helper. In a headless run, work spawned through it delivers its result at a virtual time the app declares, or at the next virtual frame. The runner waits for that delivery before it draws that frame. In a window it behaves like a thread plus the real waker.
  • In canonical mode, a wake from a thread not started through the helper fails the run and names the setup function.
  • Let is_headless take the app's own arguments. Args::parse_from(..).headless() already works as the escape hatch.
  • Move live-values, overlay and motion-bento onto the helper and the supported check.
  • Document the rule in "Agent tooling" in the crate README.

Apps that spawn raw threads in setup stay out of the canonical lane, and the failure names them.

Done when
  • No example parses argv to decide whether it is headless.
  • A canonical scripted run of live-values gives byte-identical payloads across 20 runs.
  • It still does with an artificial 50 ms delay in its producer.
  • A test shows a canonical run failing when setup wakes the runtime from an unmanaged thread, with the setup function named.
How to check

Tests in the required merge check, including the 20-run and delayed-producer runs. The cross-OS determinism job in R0253 keeps the payloads equal across machines.

Part of
  • Theme: T04
  • Tracked in R0253
  • Phase 2, milestone 2b · priority P2 · size M
R0288Headless: a script error mid-run exits without flushing outputs, and unknown fields in a script are ignoredP2Phase 2bMT04
tooling-script-strict · bug
What happens

The headless runner stops on any error through die, which calls process::exit(2). That skips destructors, so the trace's BufWriter is not flushed, the PNG writer threads are not joined, and the video encoder is not finalised. A script that names a missing key at t = 3 s leaves a cut-off trace and partial PNGs, and loses the queued video frames. Keys resolve only when their event fires, so this error can come late in a long run.

The script parser is also loose. An unknown event type fails, but unknown fields in an event are ignored, and a t that is missing or not a number becomes 0. No schema exists for agents to validate against. The ScriptEvent values the parser produces are an expansion of the authored JSON, not its grammar, so they cannot serve as one.

Where
Why it matters

When a scripted run fails, the partial trace and frames are what an agent needs to see why. Today they are cut off. A typo in a field name runs a different script than the author meant, with no error. The harness target: a mid-run error leaves a flushed trace, complete PNGs and a finalised video (tested), and scripts validate against a published JSON Schema of the authored grammar before frame 0. The docs target asks for every flag and event in a generated reference.

What would help
  • Replace die inside the frame loop with an error that unwinds to the runner. The runner flushes the trace, joins the PNG writers, finalises the video, prints the error with the event index, and exits 2.
  • Write a JSON Schema for the authored script grammar and publish it in the repo. It rejects unknown fields and non-finite or malformed numbers. R0289 generates the event reference from it.
  • Add --check-script. It validates a script against the schema, and its static keys against the first frame, without running it. Keys that depend on later state are checked when their event fires.
  • Rejecting unknown fields can break private scripts. Warn for one release cycle first, then fail, with a changelog fragment.
Done when
  • A test with a missing key at a late event leaves a flushed trace up to that frame, every PNG written so far complete, and a playable video.
  • An unknown field, a NaN time and a string where a number belongs each fail with the field and its path.
  • --check-script validates a script and its static keys without running it.
  • Every committed script under examples/ and scripts/ validates against the schema in the required merge check.
How to check

Tests in the required merge check for the late-error outputs and for each rejection, plus a schema check over every committed script.

Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 2, milestone 2b · priority P2 · size M
R0289Docs: the headless flags are documented by hand in the README, and nothing checks the list against the codeP2Phase 2bST04
tooling-flag-reference · docs
What happens

Args has about 40 flags. The script format has about 35 event forms. Both are documented by hand: in the HELP text in args.rs, and in the "Agent tooling" section of the crate README. Nothing compares either with the parser, so a renamed flag or a new event drifts from the docs. Agents read the docs first. Many documented commands use placeholders and alternatives, so they cannot be run as written, and nothing runs them.

Where
Why it matters

An agent that trusts a stale doc loses a loop to a flag that was renamed, or never learns of one that would have helped. The tooling target is that the agent's inner loop is fast and its docs are true: 100% of flags and events in a generated reference that the merge check keeps fresh, and 100% of documented headless commands in the crate README and examples/README with a fixture that runs in the merge check.

What would help
  • Generate a flag and script-event reference from the flag table that R0163 adds and from the script schema that R0288 publishes. Check it in, for example as crates/rune/HEADLESS.md, and fail the merge check when it is stale. Generate HELP from the same table.
  • For each documented headless command, commit an executable fixture: a concrete app, paths and expected outputs. A folder such as crates/rune/tests/commands/ keeps them runnable under cargo test. Link each fixture from the doc line it illustrates.
  • Replace placeholders in the README with the fixture's concrete command where that reads well.
Done when
  • The generated reference covers 100% of flags and event types.
  • HELP is generated from the same table.
  • The merge check fails when the reference is stale.
  • Every documented headless command in the crate README and examples/README has a linked fixture, and the merge check runs them all.
How to check

A doc-check job in the required merge check regenerates the reference and diffs it, and runs every fixture. Renaming a flag without regenerating fails it.

Depends on
Part of
  • Theme: T04
  • Tracked in R0255
  • Phase 2, milestone 2b · priority P2 · size S
R0290Motion: springs are compared with the RK4 reference on a fixed grid only, with no shrinking or saved failuresP2Phase 2bST04
tooling-spring-generated · feature
What happens

The closed-form spring in rune-motion drives every animated property in Rune. One test compares it with an RK4 integration of the spring equation. That test checks a fixed grid: 6 springs, 3 start states and 5 sample times, so 90 points. It never checks a spring built from stiffness, damping and mass, a target other than 1.0, or a trajectory with a retarget.

A second test, randomized_retargets_are_c1_continuous, drives 8 seeds of 1,500 random retargets through AnimationStore. It checks that position and velocity do not jump at a retarget and that the track settles. It never compares positions with the reference, so a spring that is smooth but wrong passes. It uses its own LCG, so a failure is not shrunk to a small case and not saved for the next run.

Where
Why it matters

A spring bug shows as a wrong overshoot, a late settle or a kink at a retarget. On a 120 Hz display those are visible in every list, sheet and drag. The goal is that every hard subsystem "has an obviously correct reference that is differential-tested on generated inputs on every merge", with "at least 256" cases per run for the spring suite.

What would help

Add proptest as a dev-dependency of rune-motion and a generated test next to the grid:

  • Generate springs both ways: Spring::new(duration, bounce) across under-, critically and over-damped ranges, and from_stiffness_damping with mass. Also generate start position, start velocity and target.
  • Generate a sequence of retarget times and targets, and a frame-step sequence with dt from 1 ms to 60 ms.
  • Run the sequence through AnimationStore. Integrate the same piecewise problem with RK4, switching target at each retarget time from the current state. Compare position and velocity at every step.
  • Check velocity continuity at each retarget against the reference, not only against the previous frame.
  • State each tolerance in the test with its reason, as the grid test does (position per unit of travel, velocity scaled by omega).
  • Commit the regressions file, so a shrunk failure replays on every run.

Keep the grid test and the continuity test. They are cheap and name regimes by hand.

Done when
  • The generated test runs at least 256 cases per T1 run.
  • It covers both constructors, retargets and variable frame steps.
  • Each tolerance is stated in the test with its reason.
  • Minimised failures are saved in a committed regressions file and replayed.
  • A seeded fault fails the test within the case budget, for example a wrong damping sign in one regime or a dropped velocity at retarget.
How to check

cargo test -p rune-motion in T1. R0270 lists the suite in the oracle matrix with its case count, so T1 fails if it runs fewer cases.

Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 2, milestone 2b · priority P2 · size S
R0291Tree: debug builds record where a node was keyed, but --tree never says, so a pixel cannot be traced to codeP2Phase 2bMT04
tooling-tree-source · feature
What happens

In debug builds, El::key is #[track_caller] and stores the caller's Location in key_source. Six handler builders store their call sites in HandlerSites: on_hover, on_hover_change, on_pointer_move, on_layout, on_drawn_layout and on_visible_rows. Rune uses these only for warnings, such as a duplicate key.

tree_json builds the JSON that --tree and --snap-on-patch write. It emits path, role, rect, key, label and state, but no source location. Press, drag and key handlers record no site at all. Unkeyed nodes have no location. A kit wrapper that calls .key() inside the kit would record the kit's line, not the app's.

So an agent that finds a wrong pixel or rect in a tree must grep for the key to find the code. That fails for unkeyed nodes and for keys built with format!.

Where
Why it matters

An agent reading a tree, a golden diff or an explain answer needs to know which line to edit. The target: "100% of keyed nodes and handlers and at least 95% of all nodes carry file:line in debug trees." Explain queries, the compact tree and --check all key their findings to this field.

What would help

1. Emit src as a repo-relative file:line for every node in debug builds. Use key_source, then the node's handler sites, then a creation site. 2. Add #[track_caller] and a debug-only site to el(), text() and the other public builders. Then unkeyed nodes get a creation location. Add sites for press, drag and key handlers too. 3. Add #[track_caller] along the kit's public wrappers, so Location::caller() resolves to the app's line. rune-kit has 5 uses today. 4. Strip the workspace prefix from Location::file(), so paths are repo-relative and carry no home folder. 5. Store sites behind the cold pointer if they push El past its budget. Release builds carry nothing. 6. Pass src to the session tree and query replies from R0524.

Done when
  • In debug builds, 100% of keyed nodes and handlers in the kit gallery tree have src.
  • At least 95% of all nodes in that tree have src, and the test lists the rest by builder.
  • A test shows a kit wrapper reports the app's line, not the kit's.
  • Every src path is repo-relative.
  • Release trees have no src, and release size_of::<El>() is unchanged.
How to check

A T1 test runs the kit gallery headless in debug, parses the tree and counts coverage. It also checks that no path is absolute. A release-mode size check keeps El within budget.

Part of
  • Theme: T04
  • Tracked in R0521
  • Phase 2, milestone 2b · priority P2 · size M
R0292Security: untrusted content reaches decoders with incomplete budgets, and each link sink checks URLs its own wayP1Phase 2bXLT05
arch-trust-boundaries · tracking
What happens

Apps built on Rune render model output, web responses, pasted HTML and dropped files, and an attacker can influence all of them. Rune has edge defences: the URL check in open_url, the HTML sanitizer, a 32 MiB SVG input cap and web image dimension checks. But each link sink checks URLs its own way, and the limits are incomplete. SVG hrefs read local files and SVG trees expand without a bound. Markdown depth has no cap. ImageCache::url reads local paths. Web fetch bodies, media downloads, clipboard and drop sizes, and decode queues have no full budget. Release builds accept the dev CLI and start an exporter from an ambient environment variable.

No single place lists what input is untrusted and what limit applies, so each fix is local, and gaps come back. The work spans the image, Markdown, media, clipboard, input, tooling and dev-channel code, so it takes several issues.

Where
Why it matters

One hostile reply can read local files, hang a thread, use gigabytes of memory, or crash the app. The trust target: "every link sink (open_url, edit/html, the clipboard sanitizer, the DOM mirror, --html export, AccessKit, Markdown and media) classifies through rune::trust", "every inventory input has a budget and an adversarial test that fails in under 100 ms of main-thread time on the reference Mac", "release builds ignore Rune's dev argv and an ambient OTEL endpoint unless the app opts in", and "local control channels bind loopback and check Host". The media target asks that "downloads stay under a 256 MB cap, no thread hangs, and no local file is read". The fuzzing targets ask for nightly fuzzing of every untrusted consumer with "0 open crashes older than 7 days".

What would help

First write an inventory of each untrusted input with its current and missing limits: encoded size, decoded allocation, expansion, queue length, time and cancellation. Then add one rune::trust module with a URL classifier and per-sink policies, fill in the missing budgets, gate dev surfaces in release, and fuzz every consumer. Budgets are configurable, so an app with trusted content can raise them.

Done when
  • The trust inventory is in docs/failure-model.md or ARCHITECTURE.md.
  • Every inventory input has a budget and an adversarial test under 100 ms of main-thread time.
  • Every link sink classifies through rune::trust.
  • Every inventory input maps to a fuzz target.
  • All child issues are closed.
How to check

Adversarial tests in T1 for each budget. Nightly fuzzing in T3, from R0294 and R0295.

Issues
Part of
  • Theme: T05
  • Phase 2, milestone 2b · priority P1 · size XL
R0293Metal: the native backend panics on failed allocations and unsupported descriptors, and its error scopes always report noneP1Phase 2bMT05
arch-metal-backend-errors · bug
What happens

Rune's own Metal backend is the default on macOS (crates/rune/src/gpu/backend.rs:30). It implements wgpu's device API, but it reports no errors through that API.

  • Allocation panics. Buffer, texture, sampler and command-buffer creation call expect on the Metal result. When Metal returns nil, for example under memory pressure or for a texture past a device limit, the app panics. It should fail one draw instead.
  • Unsupported features panic. The unsupported! macro is a panic! whose message names the way back to wgpu. It has 51 call sites in 12 files under gpu/metal. Surface configure also asserts on any colour space other than Auto or sRGB.
  • Error scopes report nothing. push_error_scope returns 0 and pop_error_scope always resolves to None. The checked configure in window.rs relies on these scopes to turn a refused configuration into an Err. On native Metal it always reports success.

A feature check at device creation already sends a compositor that wants missing features to wgpu. Nothing covers a feature that is first used after creation.

Where
Why it matters

A Mac app that loads a very large image, or runs while the system is short of memory, can quit with a panic. It should show a broken-image placeholder instead. The failure model asks that "a failed allocation skips the resource and reports it", with "0 allocation expect in native Metal". The rendering target asks for "0 panics on unsupported descriptors or failed allocations that the API can report". It also asks that in debug builds the native backend return "an error of the same class as wgpu for each listed validation class".

What would help

1. List every unsupported! that public API can reach (compositors, Frame, SurfaceDraw). For each one, either return an error through the error scope, or send the device to wgpu at creation through wgpu_for, and document which. Keep a panic only where no public API reaches, with a comment that says why. 2. Make allocation fallible. A failed buffer or texture becomes an error-state resource. The error scope reports OutOfMemory. Any pass that binds the resource skips that draw. An image shows its broken-image fallback. The failure goes once to the diagnostics channel from R0081, and a counter counts each one. 3. Build error scopes from a per-device error list. Allocation results and command-buffer status (R0170) feed the list. Then window::configure behaves the same on both backends. 4. Replace the colour-space assert with an error that configure reports.

Risk: every pass must tolerate a missing resource. Start with image upload and layer textures, where large sizes come from content.

Done when
  • The PR lists each reachable unsupported! with its outcome, and each has a test.
  • Forced buffer, texture and command-buffer allocation failures on native Metal skip the work, emit one diagnostic and raise a counter (tests).
  • 0 expect on Metal allocation calls in gpu/metal, held by a count that only goes down.
  • The error-scope test that passes on wgpu Metal also passes on native Metal, including a refused configure that returns Err from window::configure.
  • An image whose texture allocation fails draws its broken-image fallback, and the app keeps running.
How to check

Native backend unit tests with allocation failures injected through R0087, run in T1 on macOS and on the macOS lane. A scripted count of allocation expect calls in gpu/metal, run with the other ratchets in scripts/file-size.sh, keeps the number at 0.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 2, milestone 2b · priority P1 · size M
R0294Security: no parser or consumer that reads untrusted input is fuzzed continuouslyP1Phase 2bLT05
arch-parser-fuzzing · infra
What happens

Rune and rune-kit read untrusted bytes in many places: pasted HTML and RTF, CF_HTML on Windows, Markdown and diffs that a model wrote, Mermaid sources, SVG icons, incoming URLs and --script JSON. Each has hand-written hostile-input tests at most. The workspace has no fuzz/ directory and no fuzz job.

Hand-written cases tend to stop at the parser. #196 shows the gap. DiffView has a test for hostile patches, but a patch with hunks near u32::MAX, or with overlapping hunks, still panics later, in state construction and render. A fuzz target that drives the whole consumer path to its output would have found it.

Where
Why it matters

Apps that stream model replies show Markdown, diffs and diagrams they did not write. One panic in that path ends a desktop app and freezes a web page. The trust target asks that "a fuzz target drives each untrusted consumer path and runs nightly for at least 10 minutes with no open crash". The verification target asks for fuzz targets for "Markdown, Mermaid, DiffView, SVG icons, rich-text HTML and RTF paste, and script JSON" that "run nightly for 10 min each with 0 open crashes older than 7 days". The misuse target needs "every past crash replays in T1".

What would help
  • Add a fuzz/ crate with cargo-fuzz targets. Each has memory and time limits and drives the consumer to its output: Markdown, whole and streamed, to an El; a DiffView patch to a rendered El; a Mermaid source to a scene; an SVG icon to pixels; HTML and RTF paste into TextEdit; CF_HTML unpack; the clipboard sanitizer and its link checker; TIFF header checks; incoming URLs; script JSON.
  • Seed each corpus from the existing tests and from synthetic transcripts. Never use real sessions. Start the DiffView corpus with the #196 patches.
  • Write fuzz/README.md. It maps every input in the trust inventory to the target that covers it, with that target's limits.
  • Add a nightly job. It runs each target for at least 10 minutes and sorts results into crash, timeout and out-of-memory. It logs executions per second and coverage per target and keeps the corpus. It files one issue per new crash through R0249.
  • Replay the committed corpus as plain tests in T1 (R0030).
  • The job fails when a crash issue is older than 7 days. There is no deferral.

Some work is out of scope here: highlighting and TextEdit targets driven through Runtime commit and layout, and run times sized from each target's measured rate to reach 10 million cases a week. The logged rates from this job are their input. The streamed-Markdown differential is also tracked separately.

Done when
  • fuzz/README.md maps 100% of trust-inventory inputs to a target.
  • Every target listed above builds and runs.
  • The DiffView and Markdown targets reach a rendered El.
  • The nightly job runs every target for at least 10 minutes, logs executions and coverage for each one, and files an issue for each new crash.
  • A crash issue that is open for more than 7 days fails the job.
  • Every fixed crash is a corpus case that T1 replays, starting with #196.
How to check

The nightly fuzz job and its per-target logs. The corpus replay in T1 on every merge keeps fixed crashes fixed.

Depends on
Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P1 · size L
R0295Security: highlighting and TextEdit have no fuzz target, and no target drives content through Runtime commit and layoutP1Phase 2bMT05
arch-fuzz-runtime-consumers · infra
What happens

Rune has no fuzz infrastructure today: no fuzz/ folder and no fuzz job. R0294 adds parser targets (Markdown, DiffView, Mermaid, SVG, HTML and RTF paste, script JSON) that run 10 minutes a night. That leaves three gaps.

  • Syntax highlighting and TextEdit get no target, although both take untrusted text: code blocks in model replies and pasted text.
  • The targets stop at an El. A panic in Runtime commit, layout or text shaping for that content is never reached.
  • 10 minutes a night reaches 10 million cases a week only at about 2,400 executions per second per target and mode. A target that drives commit and layout runs far slower, so the weekly count is not met, and nothing measures it.

The parser plan also allows a reasoned deferral of an open crash, which no criterion bounds.

Where
Why it matters

A panic in commit or layout from content an app passes in crashes a release build, and parser-only fuzzing can't find it. The misuse target asks for "fuzz targets for Markdown, DiffView, Mermaid, highlighting and TextEdit" that "run through Runtime commit and layout with inputs up to 256 KB, at least 10 million cases per target per week in debug and release, 0 panics, coverage reported", and "every past crash replays in T1". The fuzzing target asks for "0 open crashes older than 7 days". The trust target asks that "a fuzz target drives each untrusted consumer path".

What would help
  • Add a highlighting target and a TextEdit target. The TextEdit target applies a fuzzed sequence of inserts, deletes, selections and pastes.
  • Run the Markdown, DiffView, Mermaid, highlighting and TextEdit targets through a headless Runtime commit and layout, with inputs up to 256 KB.
  • Build each target in debug and in release.
  • Log executions and coverage per target and per mode on every run.
  • Set each target's nightly time from its measured rate, so it reaches 10 million cases a week per mode.
  • Fail the job when a crash issue is older than 7 days, with no deferral.
  • Add each fixed crash as a corpus case that replays in T1.
Done when
  • Highlighting and TextEdit targets exist.
  • The five content targets drive Runtime commit and layout.
  • Each target logs at least 10 million cases a week in debug and in release.
  • Executions and coverage are logged per target and mode.
  • A crash issue older than 7 days fails the job.
  • Every fixed crash replays in T1.
How to check

The nightly fuzz job, with its weekly case counts per target and mode, and the T1 corpus replay test.

Depends on
Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P1 · size M
R0296Security: open_url, the HTML sanitizer, the DOM mirror, --html export, AccessKit, Markdown and media each classify URLs separatelyP1Phase 2bMT05
arch-url-classifier · refactor
What happens

Each link sink checks URLs its own way, with its own list of schemes:

  • open_url::check trims the URL, lowercases the scheme and allows http, https and mailto.
  • The rich-text editor's is_safe_href drops controls and whitespace from the first 64 characters, then allows http, https, mailto, tel and URLs with no scheme.
  • The clipboard sanitizer's url_is_safe decodes entities first, then allows http, https, mailto, tel and cid, plus raster data: URLs for images.
  • The web DOM mirror sets el.href = item.h on a link node with no check. webLink only decides whether the link opens in a new tab.
  • The --html export writes href with HTML escaping only.
  • AccessKit gets a URL for any link id that contains ://.

So a javascript: or data: link that open_url refuses still lands in the mirror and in the export (#195). A new sink copies whichever list is nearest.

Where
Why it matters

A Markdown reply or a pasted page can carry a javascript: link. On the web, the mirror's <a> is a real element in the page. When a screen-reader user activates it, it can run script in the app's origin. The export writes the same link into a file that someone opens in a browser. The trust target asks that "every link sink (open_url, edit/html, the clipboard sanitizer, the DOM mirror, --html export, AccessKit, Markdown and media) classifies through rune::trust and applies its own documented policy". The web target asks that the web build be "a first-class target in every browser engine".

What would help

Add rune::trust::Link::classify(&str) -> Link with the classes Web, Mail, File, App(scheme), Relative and Refused. It normalises the URL first, the way browsers do: HTML entities, percent-encoding, case, leading controls and spaces, and embedded tabs and newlines. A protocol-relative //host URL classifies as Web and is never Relative.

Each sink then applies its own documented policy to the class:

  • open_url takes Web and Mail and refuses File. Local paths go through a typed open_path (#147).
  • The DOM mirror, the --html export and AccessKit take Web and Mail. Anything else loses its href and keeps its text. The filter runs in Rust before data reaches JS or HTML, so bridge.js never sees a refused URL. A link id that is not a URL leaves the export with no href.
  • The rich-text editor and the clipboard sanitizer keep their current sets (tel, and cid for the sanitizer), written as policies over the classes.
  • Markdown links and media sources go through the same classifier.

A scripted count of scheme checks outside trust/ that only goes down stops new copies. The trust inventory goes in the failure-model doc. It lists every untrusted input with its current and missing limits.

Done when
  • Every listed sink calls Link::classify and documents its policy.
  • Tests for each sink cover javascript:, vbscript:, data:, relative, protocol-relative, percent-encoded, entity-encoded, mixed-case and control-character inputs.
  • The #195 cases pass for the mirror and the export. No mirror link node gets a refused href.
  • 0 ad hoc scheme checks outside trust/.
  • The trust inventory lists every untrusted input with its limits.
How to check

T1 tests for each sink. The web smoke test (scripts/web-smoke.mjs) renders a hostile Markdown fixture and asserts that no mirror <a> has an href outside http:, https: and mailto:. The scheme-check count runs with the other ratchets.

Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P1 · size M
R0297Web: a panic freezes the page with no visible error, and later JS callbacks re-enter the dead instanceP1Phase 2bST05
arch-web-failure-path · bug
What happens

The web build targets wasm32-unknown-unknown, where a panic always aborts. The catch_unwind guards that protect native builds, such as the image decoder's and Mermaid's, do nothing there. On the web, a panic logs through console_error_panic_hook and then traps.

After the trap:

  • The page stays frozen and shows no error. error() can draw an on-page message, but only errors that Rust returns reach it. Panics never do.
  • Event listeners and the animation-frame loop stay registered. The next input or frame calls back into an instance whose RefCell borrows were never released, so it logs more errors or traps again.

Nothing tells the page that the app is dead, and nothing offers a way back except a manual reload.

Where
Why it matters

A user whose web app hits a bug sees a page that looks normal but ignores every click. They can't tell whether to wait or to reload. The failure model asks that "a web panic shows the error overlay and stops all callbacks", with the same documented outcome on macOS, Windows, Linux, web and LayerHost. The web target asks that the web build be "a first-class target in every browser engine".

What would help

Building wasm with panic=unwind needs a nightly toolchain, so the plan is to tear down from JS, not to catch.

1. Chain a Rust panic hook after console_error_panic_hook. Before the trap, it calls a JS import such as rune_fatal(message). The hook must not borrow any app state. 2. In the bridge, rune_fatal sets a page-wide fatal flag. It shows the existing error overlay with the panic message and a Reload button, cancels pending animation frames and timers, and removes every listener that bridge.js and platform.js installed. Every JS entry into wasm checks the flag first. 3. winit installs its own listeners on the canvas and the window. Swap the canvas for an inert copy, and guard the window listeners. The smoke test confirms that nothing reaches wasm afterwards. 4. Keep the existing rules in error(). An embedded canvas shows the message beside the canvas. A document page with data-rune-static keeps its static HTML. 5. Write the web column of the failure-model doc, with the outcome of each failure class from R0082.

Canvas acquire failures are handled in R0299, and device loss in R0300.

Done when
  • A panic in a view on the web shows the error overlay with the message.
  • After the panic, the smoke test counts 0 calls into wasm over 5 s of pointer, key and resize input.
  • The Reload button reloads the page.
  • An embedded canvas shows its error beside the canvas, and the rest of the page keeps working.
  • The failure-model doc's web column lists the outcome of each failure class.
How to check

The web smoke test (scripts/web-smoke.mjs) gets a test-only panic trigger. It runs in Chromium and WebKit on the browser lane, counts calls into the instance after the panic, and checks the overlay text.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 2, milestone 2b · priority P1 · size S
R0298Frames: nothing measures how long a window stays frozen after sleep, a display change or GPU loss, or runs each failure class on every platformP1Phase 2bLT05
perf-fault-recovery-suite · infra
What happens

Desktop apps stay open for days, through sleep, display plug and unplug, refresh-rate switches, GPU switches and driver resets. Nothing measures what a Rune window does during these events. Nobody records the longest main-thread wait, the time from the device or display coming back to the next correct frame, or whether input is lost.

Several known waits have no bound:

  • On native Metal, pace() waits up to 1,000 ms each frame, and teardown up to 10,000 ms, when the shared event never signals (R0170).
  • The first frame waits for the GPU with no timeout (#164). On Windows, the cloak lift waits the same way.
  • A Wayland compositor that stops sending frame callbacks can block the event loop inside vkQueuePresentKHR (#169).
  • The device-lost hooks are empty, so a loss has no measured outcome at all.

Each fix in this area proves itself with a one-off test. No suite runs every failure class on every platform and keeps the fixes in place.

Where
Why it matters

A user who opens the lid, unplugs a monitor or switches GPUs sees a frozen or blank window, or loses keystrokes. The performance target says: "no main-thread wait over one refresh; every window draws a correct frame within 500 ms of the device or display being available again; no input dropped up to 256 buffered events." The failure model asks for "a passing injection test" for each class on "macOS, Windows, Linux, web and LayerHost". The device-loss target asks for a correct frame "within 500 ms on native and 1,000 ms on the web". The surface target asks for a redraw "within 2 frames of a restoration event". The verification target asks that wall-clock suites run nightly, and that a violation fail the lane, bisect and open an issue.

What would help

Build one fault matrix with these cases:

  • device loss on wgpu (Vulkan, DX12, wgpu Metal) and on native Metal;
  • a Metal shared event that never signals;
  • a refused configure, and a Lost surface;
  • sleep and wake, display unplug and replug, and a refresh-rate switch;
  • a Wayland compositor that stops frame callbacks (#169);
  • a panic in each callback class from R0082, each in a child process.

Faults come from R0087. Each case records three numbers from the frame records in R0121: the longest main-thread wait; the time from restored availability to the first frame within 2/255 per channel of its pre-fault golden; and the number of dropped input events.

Headless cases run in T1: injected loss on lavapipe, the unsignalled event, the refused configure, the Lost surface and the panics. Windowed cases run nightly on the macOS, Windows, Linux, web and LayerHost lanes (R0125, R0234, R0268). Where a lane can't put a machine to sleep, it sends the OS notifications instead and says so in its report.

The recovery itself lands in R0203, R0170 and R0091. This suite holds them to their numbers.

Done when
  • Every case above exists. Each failure class in the failure-model doc has at least one case on each platform where it can happen.
  • A case fails on any main-thread wait over one refresh period.
  • A case fails when the first correct frame comes later than 500 ms (native) or 1,000 ms (web) after the device or display returns.
  • A case fails on any dropped input up to 256 buffered events.
  • Headless cases run in T1 on every merge. Windowed cases run nightly on the five lanes.
  • Each report records rev, backend, device and date, and a failure opens an issue.
How to check

The suite itself, in T1 and on the nightly lanes. Its first run at this commit should fail the device-loss and unsignalled-event cases. That run is the baseline that the recovery issues close.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 2, milestone 2b · priority P1 · size L
R0299Web: any canvas acquire other than Success ends the app, including Timeout and OutdatedP1Phase 2bST05
render-web-acquire-failure · bug
What happens

The web frame loop treats every get_current_texture result except Success and Suboptimal as fatal. It calls error("WebGPU canvas acquisition failed", ..), which shows the on-page error, and then ends the event loop. Timeout, Occluded, Outdated, Lost and Validation all take this path.

On the web, several of these are routine: a tab in the background, a resize, or a GPU process restart. Each one ends the app until the page reloads.

Native hosts handle the same results in acquire_checked. An outdated or lost surface is reconfigured through the checked configure and tried again. Other misses skip the frame and retry later. The web path also calls the raw Surface::configure on resize and on a blend switch.

Where
Why it matters

People switch tabs, resize windows and put laptops to sleep. They expect a web app to be as they left it when they come back. Today it shows "WebGPU canvas acquisition failed" and stays dead. The surface target asks for "0 panics, and no acquire result ends the app", and that a recreated surface "draws within 2 frames of a restoration event", with "at most 1 retry per second" after the first 3 tries. The failure model asks that "a refused or Lost surface recovers within 500 ms or ends in one terminal report after 5 attempts".

What would help

Classify the web result the same way native does, through Missed::of or a wasm-safe copy of it. Then:

  • Timeout and Occluded: skip the frame and request another. After 3 misses, retry at most once per second. Retry at once on the next visibilitychange or resize.
  • Outdated: reconfigure at the canvas's current size through the checked path from R0088, then retry once.
  • Lost: reconfigure. If the device itself is lost, hand over to device-loss recovery.
  • Validation: report it and skip the frame.

An acquire result never calls end(). While drawing is suspended, the app keeps handling input and state. The first miss of each kind is reported once through R0081, and every miss is counted in the surface stats. The on-page error shows only when the device can't be recovered. Move the two raw configure calls onto the checked path too.

Done when
  • With Timeout, Occluded, Outdated and Lost injected through R0087, the app keeps running. It redraws within 2 frames once the fault clears.
  • 10 minutes of repeated Timeout never reach end(). Retries drop to at most 1 per second after 3 tries. Input keeps reaching the app. A test counts all three.
  • Each kind of miss is reported once and counted every time.
  • platform/web.rs has no raw Surface::configure calls left.
How to check

Tests on the browser lane (R0268) in headless Chromium, on WebGPU and WebGL2, with injected acquire results.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 2, milestone 2b · priority P1 · size S
R0300Web: a lost WebGPU device or WebGL context leaves the canvas blank with no recoveryP1Phase 2bMT05
render-web-device-lost · feature
What happens

Browsers drop GPU devices when the GPU process crashes or the driver resets. On mobile they also drop them when a tab goes to the background. The web shell doesn't listen for GPUDevice.lost. On the WebGL2 path it doesn't handle webglcontextlost or webglcontextrestored. After a loss the canvas stays blank until the page reloads.

The shell touches the device only at teardown, when close destroys it. gpu() already builds a device and surface from the canvas, trying WebGPU first and then WebGL2, so recovery can reuse it.

Where
Why it matters

A phone user who switches apps and comes back finds a blank canvas, and anything they had not saved is gone after the reload. The device-loss target asks for "a correct frame (<= 2/255 per channel against the pre-loss golden) within ... 1,000 ms on the web", for "S, scroll offsets and focus unchanged" and for "3 losses in a row recover". After 5 failed recoveries in 10 s, the host "reports a typed GPU-unavailable diagnostic, stops retrying, keeps handling input, and tries again on the next display, visibility or size change". The surface target asks that no surface failure end the app. The web target asks that the web build be "a first-class target in every browser engine".

What would help

1. On WebGPU, register wgpu's device-lost callback on the device that try_backend makes. On WebGL2, add webglcontextlost and webglcontextrestored listeners to the canvas. The lost listener calls preventDefault() so the browser may restore the context. 2. On a loss, stop drawing and keep handling input, state and timers. Ignore the loss that close causes when it destroys the device. 3. When a device is available again, run the shared recover step from R0203. On WebGPU that is at once, through a new adapter request. On WebGL2 it is on webglcontextrestored. The step runs gpu() again, builds a new Renderer, marks the atlases dirty and redraws. App state, scroll and focus stay as they were. 4. After 5 failures in 10 s, show the existing on-page error and try again on the next visibilitychange. 5. Add a test-only hook that destroys the WebGPU device or calls WEBGL_lose_context.loseContext(), so tests can inject a loss (R0087).

Safari's WebGPU configuration is verified once a Safari lane exists.

Done when
  • A Playwright test destroys the WebGPU device through the hook and sees a redraw within 2/255 of the pre-loss golden within 1 s in Chromium.
  • A WebGL2 test with WEBGL_lose_context loses and restores the context, then redraws within 1 s, in Chromium and WebKit.
  • App state, scroll offsets and focus are unchanged, and 3 losses in a row recover.
  • No case panics or traps.
  • After 5 failures in 10 s the on-page error shows, and a visibility change starts another try.
  • Safari WebGPU passes the same test once the Safari lane exists.
How to check

Playwright tests on the browser lane (R0268) with the loss hook, plus the Safari lane when it lands.

Depends on
Part of
  • Theme: T05
  • Tracked in R0530
  • Phase 2, milestone 2b · priority P1 · size M
R0301Web: a Mermaid layout bug aborts the whole page, because catch_unwind does nothing on wasmP1Phase 2bMT05
text-mermaid-wasm-panic · bug
What happens

Mermaid's build wraps scene() in catch_unwind, so a layout bug costs one diagram, which then draws its source as code. The parser also has limits: 400 items, a nesting depth of 8, and a limit on dummy nodes. Each returns None, so known oversized input is already safe.

The web build targets wasm32-unknown-unknown, where a panic aborts. There the guard does nothing. Any panic left in layout aborts the whole wasm instance and freezes the page, along with everything else the app shows. Nobody has searched for such panics: no fuzz target or generated test feeds Mermaid sources through layout.

Where
Why it matters

An app that streams model replies into kit Markdown shows diagrams it did not write. On the web, one bad diagram ends the page, and the user loses the whole conversation view. The content target asks for "0 panics on hostile diffs and 10,000 fuzzed diagrams". The misuse target asks that content an app passes in never crash a release build, and that "no content path depends on catch_unwind on wasm32". The web target asks that the web build be "a first-class target in every browser engine".

What would help

1. Make Mermaid layout fallible. Every case that panics today returns an error from scene(), so the source draws as code on every platform. Document catch_unwind as a native-only backstop. 2. Add a seeded fuzz to T1. It runs scene() on 10,000 sources generated from a grammar that covers flowchart, sequence and state diagrams. It runs in a child process built with panic = "abort", so the test behaves like wasm. After an abort it restarts from the next seed, so one crash can't hide the rest. The whole run takes under 60 s. 3. Turn each panic found into a returned error and a regression test. 4. Add a wasm smoke test. It loads the real wasm artifact and feeds each past-crash source to a Markdown view. It checks that each one draws as code and that the page still answers input.

The nightly cargo-fuzz target for Mermaid is part of R0294. This issue fixes the panics and adds the T1 guard.

Done when
  • A seeded fuzz of 10,000 Mermaid sources finds 0 panics in T1, in under 60 s.
  • Every panic found has a regression test.
  • The wasm smoke test draws each past-crash source as code, and the page stays alive.
  • No Mermaid content path depends on catch_unwind on wasm32.
How to check

The seeded fuzz runs in T1 on every merge. The wasm smoke test (scripts/web-smoke.mjs) runs on the browser lane.

Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P1 · size M
R0302Input: pasted text, clipboard files, dropped data and incoming URLs have no size bound, and drop temp folders are never cleanedP2Phase 2bMT05
arch-clipboard-drop-bounds · bug
What happens

Several inputs that another app controls reach Rune with no size bound:

  • Plain text from the clipboard is read whole, on every platform.
  • HTML is copied into a String before the 4 MiB filter drops it.
  • Images on Windows and Linux come from arboard already decoded to RGBA, so Rune checks its 64 MP limit only after the decode.
  • File lists from the clipboard have no count limit.
  • Dropped image data is written to disk on the main thread with no byte cap. The rune-drops temp folders it writes to are never removed.
  • Incoming URLs of any length go to the hook. Before a window listens, they wait in a queue with no cap.

The macOS TIFF checks already bound image reads there, and the HTML, RTF and PNG paths have byte caps.

Where
Why it matters

Pasting a large log can stall the editor while it copies text it will never show. Another app on the system can put a gigabyte on the pasteboard. Dropping many images fills the temp folder, and nothing removes it. The trust target asks that "every inventory input has a budget and an adversarial test that fails in under 100 ms of main-thread time on the reference Mac, excluding documented after-read OS paths".

What would help
  • Cap plain text at 16 MiB by default. Check the length before copying where the platform exposes it: the NSPasteboard data length on macOS, GlobalSize on Windows. Where it doesn't, as with arboard on Linux, document the path as after-read.
  • Check HTML length on macOS from the pasteboard data before building a Rust String.
  • Cap the clipboard file list at 10,000 entries.
  • Check image dimensions from the header before decoding where the format allows it. On Windows and Linux, read the PNG form and use the existing PNG header check where it exists. Otherwise document the path as after-read.
  • Write drop data off the main thread with a byte cap. At launch, remove rune-drops folders from earlier launches, and remove this launch's folders at exit.
  • Cap incoming URLs at 32 KiB and the pending queue at 64 entries.
  • Keep the TIFF checks.

Make each cap configurable through a builder method, so an editor app can raise it. Report a refused input once through R0081. List each cap in the trust inventory.

Done when
  • Adversarial tests for oversized text, HTML, images, file lists, drops and URLs fail with an error in under 100 ms of main-thread time on the reference Mac, apart from documented after-read paths.
  • rune-drops folders from earlier launches are removed at launch.
  • Drop data is written off the main thread and stops at its byte cap.
  • The caps are documented in the trust inventory and configurable through a builder method.
How to check

T1 tests for the caps and the cleanup. The macOS, Windows and Linux lanes run the platform paths with oversized clipboard and drop content.

Depends on
Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P2 · size M
R0303Images and HTML: encoded image loads, browser fetch bodies, the decode queue and HTML parsing have no complete byte or allocation budgetP2Phase 2bMT05
arch-decoder-budgets · bug
What happens

The SVG and clipboard paths have their own issues. Other decoders that see untrusted bytes have only partial limits:

  • Encoded files. Input::File reads the whole file with std::fs::read before any check. A native Input::Url becomes a file path and does the same.
  • Raster decode. The decoder caps images at 8,192 px a side and allocation at 256 MiB, but nothing caps the encoded byte count. SVG input has its own 32 MiB cap.
  • Decode queue. Requests go into an unbounded mpsc::channel served by up to 4 threads. A view that asks for 10,000 images queues all of them, mounted or not, and no request is ever cancelled.
  • Browser fetch. readImage reads the whole response with response.blob() and decodes it with createImageBitmap. Only then does it check the size against maxSide. The fetch body has no byte cap.
  • HTML. parse_html caps nesting at 512 frames, but it accepts input of any length. The clipboard caps HTML at 4 MiB before parsing. TextEdit::paste_html callers that pass app-supplied strings get no cap.
Where
Why it matters

An app that shows images from links in chat, or from model output, can be made to read a huge file, fill memory with a decompression bomb, or queue thousands of decodes that delay the images on screen. The image target says each hostile case "ends in a safe result within 30 s": a readable failure or a bounded result. It also says "Downloads stay under a 256 MB cap, no thread hangs, and no local file is read". The trust target asks that "every inventory input has a budget and an adversarial test that fails in under 100 ms of main-thread time on the reference Mac".

What would help

Set a documented budget for each input. Make each one configurable through a builder method, so image-heavy apps can raise it:

  • Encoded bytes before read. Check file metadata length before fs::read.
  • Decoded pixels before allocation. Keep the 256 MiB decoder cap. Count the full decoded RGBA with its mip chain, as the cache rules ask.
  • Decode-queue length. Use a bounded queue. When it is full, cancel the oldest request for an unmounted image first. A cancelled image asks again when it mounts.
  • Fetch body bytes. Check Content-Length, stream the body, and stop past the cap. The cap is at most 256 MB. Read dimensions from the header before createImageBitmap where the format allows.
  • HTML input. Add a byte cap to parse_html that matches the clipboard's 4 MiB, and keep the depth cap.

Each budget that is hit reports once through R0081. List each budget in the trust inventory with its default.

Done when
  • Each budget is in the trust inventory with its default and builder method.
  • These adversarial tests fail with an error in under 100 ms of main-thread time on the reference Mac: an oversize PNG header, a decompression bomb, 10,000 queued images, an oversize fetch body, and deeply nested and oversize HTML.
  • The decode queue never exceeds its length limit, and unmounted requests are cancelled first (test).
  • A web fetch past its cap stops reading the body.
How to check

T1 tests for each budget. The web smoke test (scripts/web-smoke.mjs) checks the fetch cap on the browser lane.

Depends on
Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P2 · size M
R0304Diagnostics: platform, media, tooling and service modules still print to stderr directlyP2Phase 2bMT05
arch-eprintln-migration · refactor
What happens

Rune reports most problems by printing to stderr. rg 'eprintln!' crates/rune/src finds 107 lines outside test files, and about 94 of them sit outside inline #[cfg(test)] modules. An app launched from Finder, a Windows GUI-subsystem build and a wasm page never show that stream. The user sees a missing feature with no reason, and the app author has nothing to read.

R0081 adds diag! and moves the GPU, surface and image sites. The rest are spread over about 50 files: display links and window creation, menus, pop-up menus, shortcuts, open-url, drag-out, the microphone permission check, accessibility logging, runtime layout warnings, and tooling output such as headless run summaries and hot-reload notices. Each stays invisible to apps until it moves.

Where
Why it matters

The failure model's target is one report path for every failure class, the same on macOS, Windows, Linux, web and LayerHost, with 0 production eprintln! outside diag! and the tooling writer. Until these sites move, a display link that never starts or a menu callback that panics is silent in a shipped app, and an agent driving the app has no structured record of it.

What would help

Migrate by area, one PR each, and lower the ceiling in each PR:

1. Platform and window: display links, platform/macos.rs, reopen, drop, ready signal, window creation and lifecycle, pacing. 2. Services and media: native and pop-up menus, shortcuts (macOS, X11, service), open-url and incoming URLs, clipboard, drag-out, file dialogs, cursor images, and the recorder. 3. Runtime and accessibility: layout diagnostics, motion checks, frame and measure warnings, a11y logging. 4. Tooling: headless, trace, args, record, html export, playground, desktop, hot reload and perf warnings.

Each event gets a level and an area. Output that is meant for a terminal on purpose (--trace, headless summaries, RUNE_GPU_LOG) goes through one explicit tooling writer, not bare eprintln!, so the count can reach 0. Debug-only warnings keep their opt-outs, such as RUNE_PERF_WARN=0.

Add a ceiling check to scripts/, in the style of scripts/file-size.sh and its exceptions file. It counts eprintln! outside the diagnostics module and the tooling writer, and the ceiling only goes down.

Done when
  • 0 production eprintln! calls outside diag! and the tooling writer, inline test modules excluded.
  • Every migrated event has a level and an area.
  • The ceiling check runs with scripts/file-size.sh and fails when the count rises.
  • A test per area asserts that one migrated event reaches the diagnostics channel.
How to check

The ceiling script, set to 0 at the end, keeps it proven. Per-area tests in cargo test -p rune trigger one event in each area and read it back from the diagnostics channel.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 2, milestone 2b · priority P2 · size M
R0305Images: ImageCache::url reads local paths, web image fetch has no policy hook, and --html export publishes local file pathsP2Phase 2bMT05
arch-image-source-policy · bug
What happens

On native, ImageCache::url has no HTTP client. A URL with no scheme is a path, and a file: URL names one. Both are read like ImageCache::file, with std::fs::read, no size check and no file-type check. A FIFO or device path blocks the decode worker, and a huge file is read whole. Content that hands Rune an image URL, such as a Markdown document, can name any local file.

On the web, fetchImage reads the whole response body before it checks the side limit. No app hook can refuse, proxy or block a fetch. Markdown images and favicons go through closures the app supplies, which cannot see a shared policy.

The --html export writes Pixels::source_url into <img src>. For an image from ImageCache::file that is the local path as given, home folders included, so a published export leaks the author's file layout.

Where
Why it matters

The trust-boundary target: untrusted content crosses one named boundary with byte, count, depth and time budgets, and every inventory input has an adversarial test that fails in under 100 ms of main-thread time. The media and image target: each hostile case ends in a safe result within 30 s, downloads stay under a 256 MB cap, no thread hangs, and no local file is read. A reader of an untrusted Markdown file should never cause a local read, and a published export should never carry a home path.

What would help
  • ImageCache::file reads local files explicitly: regular files only, with a byte cap checked from metadata before reading.
  • ImageCache::url accepts only http(s) and data:, classified through R0296. On native it reports Unsupported unless the app supplies a fetcher. File paths in url warn first and are refused after a deprecation window, with a changelog fragment at each step.
  • Add an ImagePolicy builder hook with three modes (allow, proxy or offline) that Markdown images, srcset candidates and favicons pass through.
  • Cap browser fetch bodies: check Content-Length, and stop reading a streamed body past the cap.
  • The export writes only http(s) and data: sources and drops local paths.
Done when
  • file refuses FIFOs, devices and files over the cap before reading (tests).
  • url with a file path warns during the deprecation window and is refused after it (test).
  • Markdown images and srcset honour an offline policy (test).
  • A web fetch over the cap is refused (web smoke test).
  • Export output contains no absolute local paths (test).
  • Each refusal returns in under 100 ms of main-thread time.
How to check

Unit tests in cargo test -p rune and -p rune-kit --features rune-kit/markdown, and a case in scripts/web-smoke.mjs against a local server that serves an oversized body.

Depends on
Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P2 · size M
R0306Dev channels: the hot devserver address isn't checked for loopback, procwatch accepts any Host header, and rune-dev syncs untracked filesP2Phase 2bST05
arch-local-control-channels · bug
What happens

Three local channels trust more than they need to.

  • The hot-reload connector reads DIOXUS_DEVSERVER_IP and DIOXUS_DEVSERVER_PORT from the environment, connects to the address they name and loads the patches it sends with subsecond::apply_patch. Nothing checks that the address is loopback. scripts/rune-dev always sets 127.0.0.1, so a check costs the normal flow nothing.
  • procwatch::serve binds whatever address it is given. It drops non-loopback peers and sets a 1 s read timeout, but it ignores the Host header. A web page that rebinds its DNS name to 127.0.0.1 can read the process's memory and CPU snapshot. It has no write deadline and serves one connection at a time, so one slow client stalls every later request.
  • scripts/rune-dev lists files with git ls-files --cached --others --exclude-standard and rsyncs them to the remote build host. Untracked files that aren't ignored, such as a local .env or a credentials file, go with them.
Where
Why it matters

The trust-boundary target says local control channels bind loopback and check Host. A hot-reload build that connects to an address from the environment would run code from it. A procwatch endpoint that answers any Host leaks process data to any web page. A remote sync that copies untracked files can put secrets on a shared build machine.

What would help
  • Hot reload: refuse a non-loopback devserver address with one diagnostic, unless the app opts in. Use a builder flag, or, since the hot feature is driven by the environment today, an env var that names the intent, such as RUNE_HOT_REMOTE=1.
  • procwatch: return an error for a non-loopback bind address. Parse the request line and headers within the read timeout, and answer 403 unless Host is localhost, 127.0.0.1 or [::1] with the bound port. Set a 1 s write timeout.
  • rune-dev: sync tracked files plus untracked files whose extensions are on a source and asset allowlist. .rune-dev-include adds more. Print the untracked files it skipped.
Done when
  • A test shows the hot connector refuses a non-loopback address without the opt-in, and connects with it.
  • Tests show procwatch refuses a non-loopback bind and answers 403 to a foreign Host.
  • A test shows procwatch answers a second client within 2 s while a first client holds its connection open and sends nothing.
  • scripts/test-rune-dev.py shows an untracked file outside the allowlist is not synced, and one listed in .rune-dev-include is.
How to check

cargo test -p procwatch, cargo test -p rune --features hot, and scripts/test-rune-dev.py.

Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P2 · size S
R0307Failure model: locks in callbacks and Drop are unwrapped, and recovering a poisoned one would resume state a panic half-wroteP2Phase 2bST05
arch-poisoned-lock-policy · refactor
What happens

rg 'lock\(\)\.unwrap\(\)' crates/rune/src finds 331 sites outside test files. Another 35 sites already recover a poisoned lock with into_inner. Neither choice is written down per site. When a panic poisons a Mutex, the next lock().unwrap() panics again. Inside an extern "C" callback, or in a Drop that runs during unwinding, that second panic aborts the process.

R0308 adds lock_or_recover. Used everywhere, it would swap the abort for something worse: the next caller would resume data that a panic left half-written, for example a clip's control state halfway through a seek, and the app would keep running on it.

The sites that matter most run app code under a lock. main_queue::on_main runs video and audio drives inside an extern "C" dispatch callback. The drive locks the clip's native and ctl state and ends in Shared::settle, which locks the waker slot and calls the app's waker.

Where
Why it matters

The failure model's target: app panics tear down the surface and are never resumed mid-commit, and each failure class has a documented outcome and an injection test on every platform. The lock policy decides whether a panic in a waker aborts the app, tears down one clip, or quietly corrupts it.

What would help

Classify every lock that a callback, a completion block, a main-queue job or a Drop takes:

  • Recoverable: the data stays valid after any partial update, such as a counter, a cache that can be cleared, or a slot that is only replaced whole. The site uses lock_or_recover, with a one-line reason next to it and a test that poisons the lock and checks the state.
  • Owner-invalidating: everything else. Poisoning marks the owner (the clip, the service, the surface) failed and reports through diag!. The next frame tears it down under R0082.

Record the class with a short marker comment that a check can find. Add a check in scripts/ that counts unclassified sites in these contexts, with a ceiling that only goes down. Other lock().unwrap() sites in ordinary Rust code stay as they are.

Done when
  • 0 unclassified lock sites in callbacks, completion blocks, main-queue jobs and Drop.
  • Every recoverable site has a reason and a test that poisons it.
  • A seeded panic under an owner-invalidating lock marks its owner failed and reports once, with no abort (test).
  • A child-process injection test per callback family shows its documented outcome.
How to check

The count check in scripts/ keeps the ceiling at 0. The poison tests run in cargo test -p rune. The per-family injection tests run in a child process on each desktop lane, next to R0308's tests.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 2, milestone 2b · priority P2 · size S
R0308Failure model: extern "C" callbacks, completion blocks and main-queue jobs run app code with no shared guardP2Phase 2bMT05
arch-ffi-guard · refactor
What happens

Native callbacks that reach app code each handle panics their own way, or not at all. Menu, pop-up menu, Carbon hot-key and Windows tray callbacks wrap the app's handler in catch_unwind, then print or ignore the result. The main-queue job runner, the microphone completion block and the Linux tray's zbus methods have no catch. A panic cannot unwind through an extern "C" frame, so the process aborts with no report, and the app's own panic handler never runs.

main_queue::on_main runs boxed jobs inside an extern "C" dispatch callback. Video and audio use it to drive clips, and the drive ends in Shared::settle, which calls the app's waker. A panicking waker there aborts the app. The recorder's permission callback runs the app's closure inside an RcBlock that AVFoundation calls, after a lock().unwrap().

Where
Why it matters

The failure model's target: every class has a documented outcome and one report path, the same on every platform; app panics tear down the surface and are never resumed mid-commit; 0 unguarded inventory entries. A user sees a dictation or media app vanish with no crash dialog the app controls. The app author gets a SIGABRT with the first panic hidden, as in #150.

What would help

Add ffi::guard(what, on_panic, f). It catches a panic, reports it through diag! with what, and then does what the caller chose: return a default when the callback touched no shared state, or mark the owning service or surface invalid so the next frame tears it down under R0082. It never resumes the interrupted work.

Keep a reviewed boundary inventory, in the failure-model docs page or a new ARCHITECTURE.md. It lists every extern "C" function, block2 completion block, main-queue job, declare_class method and Linux tray zbus method that can reach app code, with its guard mode. A check in scripts/ fails on an unlisted one.

Locks taken inside these callbacks follow R0307: a site recovers a poisoned lock only with a stated reason and a test, and otherwise the guard invalidates the owner. Don't make "no lock().unwrap()" a blanket rule. Recovering everywhere would resume state that a panic half-wrote.

Document the limits: a catch inside an AppKit callback cannot cover nested winit dispatch, and panic = "abort" builds cannot catch at all.

Done when
  • Every inventory entry calls ffi::guard, and the check finds no unlisted extern "C" fn or completion block.
  • Every lock in an inventory callback is classified as R0307 requires.
  • A child-process injection test per callback family (menu, pop-up, shortcut, tray, main-queue job, recorder, open-url, drop) on macOS, Windows and Linux shows the documented outcome: one diagnostic, then the default or the teardown, and no abort.
How to check

The inventory check in scripts/ runs with the other repo checks. The injection tests run in a child process, since a missing guard aborts, on each desktop CI lane.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 2, milestone 2b · priority P2 · size M
R0309Clipboard: the HTML sanitizer keeps remote-loading attributes although its doc says it drops anything that can loadP2Phase 2bST05
arch-sanitizer-remote-loads · bug
What happens

sanitize_html cleans HTML pasted from other apps. Its module doc says it drops anything that can run code or load something. It does drop scripts, frames, <object>, <link>, <base>, forms and CSS url(). But for every attribute in its URL list it keeps any http:, https: or cid: value. <img src>, srcset, poster, ping, background, lowsrc, dynsrc, longdesc, manifest and icon with a remote URL all survive, and a test asserts that an https srcset candidate is kept.

Pasted HTML can therefore carry tracking pixels and pings to whatever renders it next: the app's own HTML view, an export, or another app the user copies into.

Where
Why it matters

The trust-boundary target: no sanitizer output loads remote content unless the app's policy allows it, and every link sink, the clipboard sanitizer included, classifies through rune::trust with its own documented policy. Someone who pastes an email into a Rune app expects the paste to stay offline. A tracking pixel that fires on render breaks that.

What would help
  • List every attribute that can make a request on the elements the sanitizer keeps: src, srcset, poster, ping, background, lowsrc, dynsrc, longdesc, manifest, icon and profile. href on <a> and cite stay, since they only navigate or describe.
  • Drop ping always.
  • Drop remote values in the others unless the app's ImagePolicy from R0305 allows remote loads. Keep relative, cid: and raster data: sources.
  • Route every kept URL through Link::classify from R0296.
  • Rewrite the module doc so it lists exactly what is kept. Note that rich text copied with remote images loses them under the default policy.
Done when
  • A test per listed attribute shows no remote value survives under the default policy.
  • Tests show the allow policy keeps remote image sources and still drops ping.
  • The existing remote srcset test asserts the new default.
  • The module doc lists exactly what is kept.
How to check

cargo test -p rune runs the per-attribute tests. The HTML paste fuzz target also asserts that no output attribute holds a remote URL under the default policy.

Depends on
Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P2 · size S
R0310Media: Ogg and WebM audio URLs are fetched whole with a synchronous request and no cap or timeout, so a live stream hangs the clip and grows memoryP2Phase 2bMT05
platform-media-audio-open-limits · bug
What happens

For .ogg, .oga, .opus, .webm, .mka and .mkv audio, and for any audio clip AVFoundation fails to open, Rune on macOS decodes the clip itself. fetch reads the source whole: a local file with fs::read, and a URL with NSURLConnection::sendSynchronousRequest, a deprecated API, with no timeout and no size cap. The bytes then decode to a temporary WAV of up to MAX_SAMPLES, about 4 GiB of 16-bit PCM (about 6 hours of 48 kHz stereo).

On a live stream such as internet radio, the request never finishes. The worker thread blocks for good, the response buffer grows without limit, and the clip never opens. The 30 s load timeout (LOAD_PATIENCE) covers only AVPlayer items, not this fetch. Dropping the Player does not stop the worker. ogg-audio is a default feature, so every macOS app that plays audio URLs has this path.

Where
Why it matters

The media target: each hostile case ends in a safe result within 30 s, a readable failure or a bounded result; downloads stay under a 256 MB cap, no thread hangs, and no local file is read. The trust-boundary target asks for byte, count, depth and time budgets on every untrusted input, and for media URLs to classify through rune::trust. A user who opens a radio link sees a spinner forever while memory climbs.

What would help
  • Stream the download to a temporary file with URLSession on the media worker. Use a byte cap and a timeout set by MediaRequest builder methods, 256 MB and 30 s by default. Decode from the file, so the compressed clip is never held whole.
  • Fail the clip with a readable message on the cap, on the timeout, or on a response with no length that passes the cap.
  • Cap the decoded duration with the same builder. The default should sit well under the WAV limit; 1 hour is about 690 MB at 48 kHz stereo.
  • Check local file size from metadata before reading.
  • Make the worker cancellable: dropping the last Player cancels the download task and ends the thread.
  • Remove a partial download on any failure, and sweep stale ones at launch, as foreign.rs already sweeps WAVs.
  • Classify URLs through Link::classify from R0296 before fetching.
Done when
  • An endless HTTP stream fails within the timeout with a readable error, and resident memory stays under the cap.
  • A stalled server and an oversized body each fail with a readable error.
  • An over-long decode fails at the duration cap.
  • Dropping a Player during a download ends its worker thread within 1 s.
  • No temporary file is left after any failure.
  • A normal remote Ogg file still plays.
How to check

A headless test against a local HTTP server that streams forever, stalls, or sends an oversized body. It counts bytes, threads and temporary files, and runs on the macOS lane.

Depends on
Part of
  • Theme: T05
  • Tracked in R0292
  • Phase 2, milestone 2b · priority P2 · size M
R0311Render: backdrop blurs past four, materials past four, targets without COPY_SRC and late formats fall back with no messageP2Phase 2bST05
render-silent-fallbacks · bug
What happens

Several rendering paths degrade with no message. An app author sees a missing blur or a flat material and has no reason to go on.

  • Only the first MAX_BACKDROP_BLURS (4) backdrop blurs per frame are prepared. The rest draw their fill only.
  • Only the first MAX_NATIVE_MATERIALS (4) system materials per window get native views. The rest draw their fallback.
  • A target without COPY_SRC, or a caller-owned pass, can't be split, so backdrop blurs and backdrop slots draw fill only.
  • A format added after prepare has no blur composite, so its blur is skipped.
  • A precompiled-shader miss on DX12 or Metal returns None, and the runtime-compiled shader is used.

The one fallback that says anything is the switch from Rune's Metal backend to wgpu for a compositor's features, which prints once to stderr.

Where
Why it matters

The rendering target: no rendering path degrades silently, with "0 silent paths: a test per path asserts one diagnostic and a non-zero counter, and the counter counts each occurrence". An agent checking a screen, or a designer comparing to a mock-up, can't tell a missing blur from a bug without it.

What would help

Give each path a typed Fallback kind and report it through diag! from R0081, once per kind per surface. Count every occurrence in a per-frame counter. FrameStats has public fields, so expose the counters through an accessor rather than new pub fields that would break struct literals. In debug builds, a perf_warn names the element key that fell back, so the author can find it. Release builds stay quiet by default, but the counter is readable. The Metal-to-wgpu switch moves from eprintln! to the same path.

Done when
  • Each listed path has a test that triggers it and asserts one diagnostic and a non-zero counter.
  • Triggering one path twice in one frame gives one diagnostic and a count of 2.
  • Release builds print nothing by default, and the counter is readable.
  • The Metal-to-wgpu switch reports through diag! and a counter, not eprintln!.
How to check

Unit tests in cargo test -p rune, one per path: a target without COPY_SRC, five blur records, five materials, a format added after prepare, and a precompiled-shader hash mismatch.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 2, milestone 2b · priority P2 · size S
R0312Runtime: an animating frame makes six to eight passes over every node to find the few that changedP1Phase 2bXLT06
perf-frame-scans · tracking
What happens

On an animating frame with no commit, the main thread does work that scales with the whole tree, not with what moved:

  • Scene's present_dirty walks its full order to find dirty nodes.
  • step_scroll and tell_scroll_offsets loop over every runtime node to find scroll viewports and offset watchers.
  • build() clears and resizes about 10 scratch arrays to the node count, then walks every node.
  • After the first build, the frame may build up to three more times for keeps.

Input does the same: about 35 paths find a node by comparing path strings across the tree, and each hover move runs several full passes.

research/37 measured the cost on the board's long card. Per-frame scans and ancestor walks were 15 to 20% of busy time. A small spike that removed most of them cut long-card scroll p50 by 17% (9.81 ms to 8.17 ms), and frames over 8.3 ms fell from 221 to 178. Each kind of scan needs its own index owned by its subsystem, so the work splits across several issues.

Where
Why it matters

Large scenes drop frames while something small animates, and battery drains on idle-looking motion. The targets: worst-case frames fit the budget and "per-frame work scales with what changed", with p95 <= 4 ms and 0 frames over 8.3 ms on the reference Mac. Very large lists "cost what is visible, not what exists". Motion visits at most 2 x changed + feature-list nodes + 64, differing by at most 5% between a 10,000-node and a 100,000-node tree.

What would help

Give each subsystem dense index lists it keeps up to date at commit, and iterate those per frame. This issue covers feature lists (R0317), path lookups (R0323), hover (R0322) and the Scene and scroll-watcher lists (R0386). The scroll-viewport index, slot index, paint subtree skip and single build per frame are tracked in other themes. In debug, assert that each list equals a full scan. Output must stay identical.

Done when
  • Every child issue is closed.
  • In the gated board and table scenes, nodes visited per animating frame stay <= changed + visible (R0158).
  • The debug linear path-scan counter reads 0 for key, hit, gesture and secondary events on a 10,000-node tree.
  • Each list has a passing equals-full-scan debug assert.
How to check

Count budgets in T1 for nodes visited per frame. The macOS lane tracks p95 frame time on the board long-card scroll.

Issues
Depends on
Part of
  • Theme: T06
  • Phase 2, milestone 2b · priority P1 · size XL
R0313Tooltips: El::help never shows on keyboard focus, and moving the pointer onto a tooltip hides itP2Phase 2bMT06
a11y-tooltip-keyboard-hover · bug
What happens

Tooltips that Rune draws for El::help follow the pointer only. update_help takes its target from the pointer position and nothing else. It shows the text after help_delay, 0.5 s by default. This has three results:

  • A keyboard user who tabs to a control with help never sees the tooltip. Screen readers get the text as a description, but a sighted keyboard user gets nothing.
  • The tooltip itself is not a hit target. When the pointer moves from the element onto the tooltip, the target becomes none and the tooltip hides, so a user can't move onto a long tooltip to read it.
  • Any key press calls dismiss_help, so typing in a field hides its tooltip. Escape has no special meaning.

Kit Tooltip and HoverCard take an open(bool) from the app. The doc examples and the gallery drive it from hover, so these components have the same gaps, and each app has to write its own focus logic.

WCAG 1.4.13 (Content on Hover or Focus) requires content that shows on hover or focus to be dismissible, hoverable and persistent. WCAG 2.1.1 requires the same information from the keyboard.

Where
Why it matters

Keyboard-only users and low-vision users miss the hints that pointer users get, and an independent audit fails 1.4.13 for any Rune app that uses help. The targets: every control works from the keyboard alone, and "tooltips appear on keyboard focus and are hoverable, persistent and dismissible with Escape", with 100% of keyboard stories passing and 0 allowlisted failures by the end of phase 2. An app built on Rune and Kit must be able to pass an independent WCAG 2.2 A and AA audit, with 0 Rune or Kit cells failing or partial on desktop and web by the end of phase 3.

What would help

For El::help:

  • When focus becomes visible on an element with help (focus_visible, as keyboard focus sets it), start the same help_delay wait and show the tooltip. A pointer resting on another help element takes priority.
  • Count the tooltip's own box as part of its target, so the tooltip stays while the pointer is over the trigger or the tooltip.
  • Escape hides the tooltip and focus stays. Use Escape only when a tooltip is showing, so a modal still gets it otherwise. Other keys no longer dismiss it. It hides when focus moves away or the pointer leaves both boxes.
  • Place it so it doesn't cover the focused control. Flip it above when there is no room below.

For Kit Tooltip and HoverCard, there are two options. (1) Keep open(bool) and add a documented helper that gives the open state from hover or visible focus, plus Escape. (2) Add a runtime-driven mode that uses the same help state as El::help, and keep open(bool) for controlled use. Option 2 is recommended, so the rules live in one place.

On macOS, AppKit's native tooltips (set_native_help) show for the pointer only. Document that, and draw Rune's tooltip on keyboard focus in that mode.

Done when
  • Tabbing to an element with El::help shows its tooltip after help_delay, and moving focus away hides it.
  • The tooltip stays when the pointer moves from the trigger onto it, and hides when the pointer leaves both.
  • Escape hides it and focus stays on the control. Typing in a field with help does not hide it.
  • The tooltip for a focused text field does not cover the field.
  • Kit Tooltip and HoverCard follow the same rules, and each has its own tests.
  • In macOS native help mode, keyboard focus still shows a Rune tooltip.
How to check

The merge gate runs headless runtime tests for El::help (Tab, a pointer move onto the tooltip's box, Escape, typing) and kit tests for Tooltip and HoverCard. The keyboard stories get a tooltip case, and the WCAG matrix cell for 1.4.13 names these tests.

Part of
  • Theme: T06
  • Phase 2, milestone 2b · priority P2 · size M
R0314Commit: nothing asserts that a moved-node stub never reaches the published tree, paint or accessibilityP2Phase 2bST06
arch-commit-stub-invariants · refactor
What happens

Memo reuse, relayout and remount move nodes out of the old node list. Each moved node leaves a Node::moved_stub in its place: an empty path, role "group", default handlers, and the old id, parent and geometry. Stubs in the old list are expected during apply. Apply skips them, and apply_scratch checks the moved spans in debug. When a pass runs again, several paths move nodes back with restore_moved_nodes: the virtual-estimate retries in measure, relayout and remount.

No check covers the other side. Nothing asserts that a stub never appears in the incoming Measured nodes or in the tree that apply publishes. Paint, hit testing, focus and the accessibility walk all read that tree. Readers have grown their own guards instead. Focus restore checks is_moved_stub() || path.is_empty(), and flatten and the paint tracks check too. A stub that leaked would not panic. It would show up as a node with an empty path: lost focus, a missing accessibility node, or a hit target with no handlers.

R0318 will move nodes, path ids, the node index and the memo cache into a Tree subsystem, which touches each of these paths. The invariant should exist before that move, so the move is checked.

Where
Why it matters

This issue is part of the runtime core split: "The runtime core is non-generic and split into subsystems whose state is private to their modules." A checked tree lets that split land one family per PR without silent regressions. It also follows the failure model, in which "app panics tear down the surface and are never resumed mid-commit". So no test should keep using a tree after a panic in measure.

What would help
  • Add a #[cfg(debug_assertions)] invariant pass. Run it on the incoming Measured nodes before apply, and on the published tree at the end of apply. It checks that no node is a moved stub, that node ids are unique, that every parent index is in range, and that node_index maps each id to its position.
  • On failure, panic with the commit reason (CommitWhy) and the index and id of the bad node.
  • Add tests that drive each non-panic restore path and then check the published tree: virtual-estimate reruns in measure, layout-read settles in relayout, focus and caret re-measures, and memo reuse across remounts.
  • Don't add a test that panics in measure and then keeps using the tree.
Done when
  • The pass runs in every debug commit, on the incoming and the published nodes.
  • All runtime and kit suites pass with it on.
  • Each restore path (measure retry, relayout, remount, memo reuse across remount) has a test that checks the published tree afterwards.
  • A test that puts a stub into Measured nodes shows that the pass catches it.
How to check

T1 runs the tests in debug, so the pass runs in every test commit. The restore-path tests sit beside the commit tests in crates/rune/src/runtime/tests/. The cost is one O(N) pass per debug commit, and release builds compile it out.

Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 2, milestone 2b · priority P2 · size S
R0315Runtime: scroll, growth, reveal, flight and loop state are side tables on Runtime outside the motion storeP2Phase 2bMT06
arch-core-motion-state · refactor
What happens

Motion state lives in two places. scene holds the motion store. Beside it on Runtime are HashMap<NodeId, _> side tables and per-node Vecs: scrolls, grows, stacks, reveals, reveal_chain, flights, row_dy, row_h, row_mask, row_lifts, loops, loop_clock, loops_active, static_scales, static_scale_settling, loop_wake and sticky_frame.

step_motion, the paint walk and commit reach all of them through self. Measurement borrows scrolls mutably on its own. Any module can change a scroll offset or a loop track without going through the motion code that owns its timing. The tables are kept in step with the store by hand, for example when a node's time scale changes and its reveal words and loop must shift by the same amount.

This issue moves the state. It changes no behaviour, and the cost it removes is coupling, not time. It also gives R0317 the owner its loop, sticky and flight lists need.

Where
Why it matters

The target is that "the runtime core is non-generic and split into subsystems whose state is private to their modules", with 0 non-private fields on state-owning subsystems and a compile_fail doctest for each. This move is also what lets motion "cost only what moves, and nothing once it settles": visits <= 2 x changed + feature-list nodes + 64, and CPU p95 <= 4 ms on the reference Mac. The feature lists need one owner to keep them. Renderers should also read an owned frame packet rather than the runtime, and that needs motion state behind an interface.

What would help
  • One PR with no behaviour change: a Motion subsystem owns scene and the side tables, with private fields. It gets methods for what paint, commit, input and scroll do today: step, sample, retarget a scroll, start or stop a loop, land a flight.
  • Measurement borrows a narrow view of scroll state, not the field.
  • Keep the time-scale rebase inside Motion, so the store, reveals and loops shift together.
  • Leave the dense lists for later: the scroll-viewport list is a separate issue under R0312, and the loop, sticky and flight lists are R0317.
  • Several of these fields are read by tests and tools, and scene is pub. R0177 gives the pub ones accessors first.
Done when
  • These fields leave struct Runtime, and the field-count ceiling drops to match.
  • Measurement no longer borrows a motion field directly.
  • Motion has a compile_fail doctest showing that its fields can't be reached from outside its module.
  • The motion-audit scenarios and the runtime motion tests give byte-identical output before and after.
How to check

Run scripts/motion-audit over its existing scenarios before and after, and compare. T1 runs the runtime scroll, spring, loop, fold and reveal tests. The field-count ceiling in the arch ratchet keeps the move in place.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 2, milestone 2b · priority P2 · size M
R0316Runtime: paint scratch buffers, the has_* flags and the layout-report maps are flat fieldsP2Phase 2bMT06
arch-core-paint-reports · refactor
What happens

Paint and report bookkeeping are flat fields on Runtime:

  • About a dozen paint scratch buffers: glyph_scratch, deco_scratch, inh_scratch, motion_scratch, turn_scratch, layer_scratch, dissolve_scratch and the four cache_*_scratch, plus node_caches.
  • Seven fast-path flags: has_dissolve, has_cache, has_pixel_aspect, has_drawn_layout, has_key_up, has_sticky and has_raise.
  • The per-node drawn, drawn_scale and seen Vecs, and the report maps layout_seen, layout_fired, screen_fired, drawn_fired and visible_fired.

After every apply, a loop walks every node to recompute the seven flags and whether any loop exists. It runs even when memo reuse kept most of the tree, so a commit that changed one row still visits every node one extra time. The paint build and the report steps read and reset these fields through self, next to motion and tree state.

Where
Why it matters

The targets: "the runtime core is non-generic and split into subsystems whose state is private to their modules", with 0 non-private fields on state-owning subsystems. Retained paint should do "work in proportion to what changed", and renderers should read an owned frame packet, which needs paint state behind one owner. For frame time: on the reference Mac, p95 <= 4 ms and 0 frames over 8.3 ms per run, with nodes visited within the counted definition. A full pass per commit counts against that on large trees.

What would help
  • A Paint subsystem owns the scratch buffers, node caches, drawn, drawn_scale, seen and the flags. A Reports subsystem owns layout_seen and the *_fired maps. Both have private fields.
  • Compute the flags while flatten pushes nodes. Memo reuse copies whole spans without visiting each node, so store a small flag summary with each memo entry and merge it when a span is reused. Retained exits add their own flags when they are kept.
  • In release, remove the post-apply pass. In debug, keep it as an assert that the incremental flags equal a full scan.
  • Keep paint output byte-identical.
  • instances, marks and surfaces are pub; R0177 gives them accessors first if they move here.

R0317 builds its per-feature lists on the Reports owner this issue creates.

Done when
  • These fields leave struct Runtime, and the field-count ceiling drops to match.
  • Release builds have no post-apply full pass for the flags.
  • A debug assert shows that the incremental flags equal a full scan in every suite, including memo-reuse and retained-exit scenarios.
  • The instance stream is byte-identical in all suites.
  • Each subsystem has a compile_fail doctest showing that its fields can't be reached from outside its module.
How to check

T1 runs every suite in debug, so the equals-scan assert runs on every commit. An instance-stream comparison before and after covers paint output. The field-count ceiling in the arch ratchet keeps the move in place. A paired --profile perf run on a large tree compares commit p50.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 2, milestone 2b · priority P2 · size M
R0317Runtime: drawn-rect, visible-row, loop, sticky and flight bookkeeping scan every node each frameP1Phase 2bMT06
perf-feature-index-lists · perf
What happens

On every animating frame, step_motion builds the paint list and then runs a row of per-feature steps. Most of them find the few nodes that use a feature by walking the whole node list and checking each node's handlers:

  • write_drawn_rects (El::drawn_rect_into), report_drawn (on_drawn_layout), report_rects (on_layout, on_screen_layout) and report_visible (on_visible).
  • report_visible_rows (on_visible_rows), which also looks up each node's path in the virtual-list map.
  • record_rewind, which visits every keyed or trace-named node.
  • The sticky keeps in follow_keeps and finish_keeps, which find each kept row by comparing path strings across all nodes.
  • Flights: paint calls self.flights.iter().any(|f| f.lands(&n.path, ..)) once per text node, so the cost is nodes × flights string compares.

On commit, apply walks every node again to sync loop tracks whenever a loop exists anywhere.

Gates such as has_drawn_layout skip a walk only when no node in the window uses the feature. One on_visible row in a 10,000-node tree makes every animating frame walk all 10,000 nodes several times to find that one row. Nothing counts these visits yet, so no cost has been measured. The visit counter under R0312 gives the baseline.

Where
Why it matters

A scrolling list with a sticky header and a few on_visible rows pays for every mounted node on every frame, and the cost grows with the tree, not with what moves. The targets are: on the reference Mac, p95 <= 4 ms and 0 frames over 8.3 ms per run, with per-frame work that scales with what changed. For motion, nodes visited <= 2 x changed + feature-list nodes + 64, and that count differs by <= 5% between the 10,000-node and 100,000-node trees.

What would help

Each owning subsystem keeps a dense list of the node indices that use its feature. Flatten and apply build it as they push nodes, memo-reused spans and retained exits included, and fix it up when a commit moves indices.

  • Reports (R0316): one list each for drawn-rect, drawn-layout, layout and screen-layout readers, and on_visible.
  • Virtual lists: the on_visible_rows nodes, each tied to its list.
  • Rewind: keyed or trace-named nodes.
  • Motion (R0315): loop nodes, sticky nodes, and the nodes a flight departs from or lands on. Resolve flights to node indices once per commit, not by comparing paths at each paint.

Each step iterates only its own list. In debug, compare each list with a full scan after every commit, and panic with the feature name if they differ. The has_* flags move in R0316. The scroll-viewport list is a separate issue under R0312.

Done when
  • write_drawn_rects, report_drawn, report_rects, report_visible, report_visible_rows, record_rewind, the sticky keeps, the paint flight checks and the apply loop sync each iterate their own list.
  • Each list has a debug assert that it equals a full scan, and the assert passes in every runtime and kit suite.
  • Tests cover list upkeep across retained exits, virtual-row mounts and unmounts, memo reuse and remounts.
  • On a 10,000-node tree with one node per feature, these steps visit at most changed + list entries + 64 nodes per animating frame, and the count differs by <= 5% from the 100,000-node tree.
  • The instance stream is identical before and after in all suites.
How to check

cargo test -p rune -p rune-kit --features rune-kit/markdown runs in debug, so the equals-scan asserts run in every test. The visit-count budget scenes from R0312 gate the counts. A paired --profile perf run of a scroll scene compares CPU frame p95 before and after.

Depends on
Part of
  • Theme: T06
  • Tracked in R0312
  • Phase 2, milestone 2b · priority P1 · size M
R0318Runtime: nodes, path ids, node index, layout store and memo cache are separate flat fieldsP2Phase 2bLT06
arch-core-tree · refactor
What happens

The commit's data is spread across Runtime as separate fields: nodes, spare_nodes, apply_scratch, layout, node_index, path_ids, memo and next_id. Because each one is a separate field, the Measurement borrow struct has 40 fields: it borrows each one, plus scroll and virtual-list state, stats and many copied settings.

Measurement has a purpose. Its type limits what measure can change. Its docs say it has "no Scene, growth tracks, reveal tracks, draw instances, or mutable app state". That limit must survive any move.

runtime.rs is 1,077 lines, and it declares its modules with 110 #[path = "runtime/..."] attributes. The folders and the module tree don't match, so a file under runtime/commit/ can be a sibling module of commit rather than its child. Privacy then follows the attribute, not the folder.

Where
Why it matters

The targets: "the runtime core is non-generic and split into subsystems whose state is private to their modules". Runtime<S> ends with at most 8 fields, and each subsystem has a passing compile_fail doctest. Module and folder shape must be enforced by the gate. scripts/file-size.sh fails on errors and on folders over 40 files. A tree subsystem with a narrow measure view is the largest step toward both, and real modules make privacy mean what the folders show.

What would help

1. A mechanical first PR: replace the #[path] lines with a real module tree under runtime/, with no code changes. Keep each folder within the folder-shape limits. 2. A Tree subsystem owns nodes, spare_nodes, apply_scratch, layout, node_index, path_ids, memo and next_id. 3. Measurement borrows it through a TreeMeasure<'_> view. The view exposes only the operations measure does today (take and restore moved nodes, allocate ids, read and insert path ids, memo lookup and insert, the layout engine) plus a few read-only references. Measurement drops below 15 fields. 4. Mark the apply-only methods (publish the new tree, prune, rebuild the node index) so they can't be called through TreeMeasure, and prove it with compile_fail doctests.

Land this after R0314, so the moved-node restore paths are checked in every debug commit while they move.

Done when
  • The tree fields leave struct Runtime, and the field-count ceiling drops to match.
  • Measurement has fewer than 15 fields.
  • compile_fail doctests show that measure code can't call apply-only Tree methods.
  • runtime.rs has no #[path] attributes and is under 300 lines.
  • scripts/file-size.sh passes, with the folder-shape check inside it.
  • All suites pass, with the stub invariants on.
How to check

T1 runs the runtime and kit suites in debug with the stub invariant pass. cargo test --doc -p rune runs the doctests. scripts/file-size.sh checks file and folder shape, and the field-count ceiling in the arch ratchet keeps the move in place.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 2, milestone 2b · priority P2 · size L
R0319Runtime: frame_step is one 265-line function whose statement order carries correctnessP2Phase 2bMT06
arch-frame-step-phases · refactor
What happens

frame_step is one 265-line function. The order of its statements is part of its correctness:

  • Routed input (keys, key-ups, IME, paste, file drops) commits pending state before it runs, so text goes to the field the new tree focuses, not the old one.
  • A selection that an earlier handler asked for is applied before the key that copies it.
  • When a handler opens a popup, the hover it takes ends in the same commit, not a frame later.
  • Scroll requests run after the commit. If those scrolls moved the caret, one more instant commit follows, so a view placed from the caret sees the new position.
  • Debug live-only bookkeeping (ran_other, live_check, live_checks) runs through all of it.

A reordering compiles, and most tests still pass, because only a few tests drive these combinations. frame.rs is 814 lines, and new frame work tends to go into this function because it has no named place to go.

Where
Why it matters

An order bug shows up as a lost keystroke, a copy of the old selection, or a caret that lags a scroll by a frame, and it is hard to trace back to a moved line. The target: "frame_step is replaced by named phase methods of at most 80 lines, and order tests cover key bursts, copy after selection, post-scroll caret commits and frames with no commit." Named phases are also where frame telemetry can mark time.

What would help

1. First PR: add a debug-only phase recorder that pushes each phase name and commit reason (CommitWhy) into a Vec on the runtime. Add order tests against the current code: a key burst with several routed commits in one frame, a copy after a selection change, a post-scroll caret commit, and a frame with no commit. Record the sequences. 2. Second PR: split frame_step into named methods with typed inputs and outputs, for example begin_frame, timers_and_poll, run_queue (actions with routed commits), latch_requests, commit, post_commit_scroll, latch_live and step_motion. A small frame context struct carries tx, ran, why and the debug flags between them. The recorded sequences must stay the same.

Keep the change mechanical. Don't reorder anything in the same PR.

Done when
  • No phase method is over 80 lines.
  • Phase-order tests cover a key burst with several routed commits in one frame, a copy after a selection change, a post-scroll caret commit, and a frame with no commit.
  • The recorded sequences are identical before and after the split.
  • frame.rs is under 800 non-test lines.
How to check

The phase-order tests run in the merge workflow from R0030. A maximum-phase-length check in the arch ratchet keeps the phases short. scripts/file-size.sh checks frame.rs.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 2, milestone 2b · priority P2 · size M
R0320Runtime: debug builds commit on live-only events that release builds skip, so tests check a different commit sequenceP2Phase 2bST06
arch-live-check-parity · refactor
What happens

Debug builds check Tx::live_only by committing anyway. For a live-only event 0.25 s or more after the last commit, skip_view stores a print of what is on screen and returns true, so the frame commits. frame_step then compares the new print with the stored one and warns if they differ. Release builds never do this. As a result:

  • Tests run in debug, so they see commits and view runs that a shipped app doesn't. A test that counts commits has to call rt.check_live_only(false). live_only_tests.rs does this five times.
  • The check commit is not a normal commit. Measure sets hold_windows, so virtual lists keep the rows they have mounted, and remount takes a different path.
  • The check runs the view and applies it, so it can write memo caches, kit caches and the request queue. A test that passes in debug may be testing a state that release never reaches.
  • FrameStats has only commits, and nothing separates the check commits from the others.
Where
Why it matters

Commit-count and view-run budgets measured in tests should mean the same thing in a shipped app. The targets: "what ships is what is tested… Debug checks change neither the commit count nor the instance stream compared with release, and diagnostic view runs are counted separately." Also, FrameStats commit and view-run counts for one script are equal in debug and release, with debug's live-only checks counted separately. Misuse such as a wrong live_only must still be reported at the call site.

What would help

The two source proposals agree on the shape: run the check as a dry diagnostic build that never applies.

  • Build the view from the state at the start of the commit, measure and flatten it into a ViewPrint, and compare it with the print of the tree on screen. Then discard the build.
  • Discard memo writes, or send them to a scratch memo. Component-service writes go to a scratch store (R0174). Deferred requests and virtual ranges are discarded.
  • Count the check in its own live_only_checks counter. It is not counted in commits or in view runs (R0069).
  • The check still warns on a wrong live_only, and that case joins the misuse inventory (R0035).
  • Update the README section and the Fast apps page. A view with interior mutability can still change during a check, so say so there.
Done when
  • A debug live-only check makes no commit.
  • After a check, memo caches, component stores, virtual ranges, production counters and the request queue are unchanged (test).
  • One scripted live-only scenario gives identical FrameStats commits, view runs and instance stream in debug and release. Debug reports its checks in live_only_checks.
  • The check still warns for a handler that calls live_only but changes state the view reads.
  • The check_live_only(false) calls that exist only to fix counts are removed from tests.
How to check

T1 runs the scripted scenario in debug. A platform lane runs the same scenario and a subset of the headless suites in release, and asserts the same counts and instance stream. The misuse case for a wrong live_only runs in T1.

Depends on
Part of
  • Theme: T06
  • Phase 2, milestone 2b · priority P2 · size S
R0321Layout: a key that contains '/' or starts with '#' can give two different nodes the same pathP2Phase 2bST06
layout-unambiguous-node-paths · bug
What happens

Every node gets a path string. node_path and push_segment join the parent's path and the child's key with /, and name an unkeyed child # plus its index. El::key accepts any string, and nothing escapes it. So two different nodes can get the same path:

  • A parent p has a child keyed "a/b" and a child keyed "a", and "a" has a child keyed "b". Both the first child and the grandchild get the path p/a/b.
  • A child keyed "#0" and an unkeyed first sibling both get p/#0.

The duplicate-key check compares keys among one parent's children, so it sees neither case. in_scope finds a scope by splitting a path on /, so a scope key that holds a / never matches its own element.

Paths drive path_ids, retained layout, memo reuse, scroll state, focus and layout reads. When two nodes share a path, one can take over the other's scroll offset, focus or retained layout, and the app sees state jump between unrelated elements. Apps often build keys from data such as file paths and URLs, which hold /.

Where
Why it matters

Incremental layout must never be found stale: a retained commit lays out exactly as a fresh layout with the same app state, and node identity is unambiguous. The target is 0 mismatches in at least 2,000 sequences of at least 20 commits per merge-gate run and in 100,000 sequences nightly. Layout must also be robust for every supported input, with 0 findings from app-supplied structure or values. A key built from a file path is ordinary app input.

What would help

Two options:

1. Escape keys when building a segment: % as %25, / as %2F, and a leading # as %23. Keys without these characters keep their paths, the change is local to path building, and tools print the escaped form. 2. Keep identity as a typed (parent id, segment) pair. This removes string identity, but it touches every path_ids user and every tool that prints paths.

Recommended: option 1 now. Apply the same escaping wherever a raw key is compared with a segment (in_scope, scoped lookups by key), so a lookup by the app's own key still finds its node. Add a debug warning when two nodes in one commit resolve to the same path, naming both call sites. Add a changelog fragment, because --tree prints escaped segments for such keys.

Done when
  • A child keyed "a/b" and a grandchild "b" under a sibling "a" have different paths and keep separate scroll and focus state (test).
  • A child keyed "#0" and an unkeyed first sibling have different paths (test).
  • A scope key that holds / matches its own element in in_scope (test).
  • Keys without /, # or % produce the same paths as before (test over the gallery's paths).
  • A same-path collision in one commit warns in debug with both call sites.
  • A changelog fragment describes the escaped --tree output.
How to check

Runtime tests in the merge gate. A property test generates keys with /, # and % and asserts that no two nodes in a commit share a path. The retained-versus-fresh layout fuzz generates such keys too.

Part of
  • Theme: T06
  • Phase 2, milestone 2b · priority P2 · size S
R0322Hover: each pointer move runs several passes over every nodeP2Phase 2bMT06
perf-hover-scans · perf
What happens

Hover work scales with the size of the tree, not with what the pointer touched.

  • update_interaction walks every node to retarget hover and press tracks. Before the walk it calls hovered_alone and shared_hovered, and each of those also walks every node. That is three full passes per call. It runs from frame_step after input and again from the paint build.
  • decide_hold, which refresh_hover calls on a pointer move, falls back to hover_flip over every node when it has no precomputed flips. That fallback calls hovered_alone and shared_hovered again.

On a 10,000-row table where every row has a hover fill, a move that stays on the same row still costs several passes over all 10,000 nodes.

Tab order has the same shape. tab_order filters all nodes, then for each focusable node in a focus group scans all focusable nodes again, and group walks ancestors each time. That is O(F² × depth) for F focusable nodes, on every Tab press.

Where
Why it matters

Users move the pointer over rows as they read, for hours. The targets: worst-case frames fit the budget, with p95 at or below 4 ms and 0 frames over 8.3 ms on the reference Mac, per-frame work that scales with what changed, and nodes visited at or below the counted definition. A hover sweep must present no more often than the hovered element changes, with sweep power within 1.2x of GPUI Fast. #205 measured Rune at 42% CPU against 18% for GPUI Fast on such a sweep.

What would help
  • Compute hover changes from the old and new hit chains (the hit node and its ancestors). Only nodes on either chain, plus the members of a hover group the pointer enters or leaves, can change hover.
  • Keep a per-commit list of hover_alone nodes and an index from hover_group_shared key to members, so hovered_alone and shared_hovered read the chain and the index, not the tree.
  • Use the same delta in decide_hold, so its fallback goes away.
  • Build tab order once per commit and reuse it until the next commit or a focus change.
  • Land this with #205's redraw fix, which decides whether the frame happens at all. This issue makes the frame that does happen cheap.
Done when
  • On a 10,000-node table with every row hover-styled, a move that keeps the hovered row visits at most the hit chain (count test).
  • A move to another row visits at most both chains plus the members of the groups entered or left (count test).
  • tab_order is built once per commit (count test).
  • A debug assert checks the delta result against the full pass.
  • The hover tests pass unchanged.
How to check

The hover_tests and hover-delay tests, plus node-visit counters with budgets in the merge gate. A --profile perf hover sweep on the 100k-row table from #205, compared by median of paired runs.

Part of
  • Theme: T06
  • Tracked in R0312
  • Phase 2, milestone 2b · priority P2 · size M
R0323Runtime: about 35 node lookups compare every node's path string instead of using the path indexP2Phase 2bST06
perf-path-scans · perf
What happens

The runtime keeps an index from path to node: path_ids maps a path to a NodeId, and node_index maps the id to its slot. index_of uses it. But most lookups by path do not. They walk the node list and compare each node's path string until one matches:

  • Runtime::node(path) in key handling.
  • live_index in hit testing.
  • gesture_handler for canvas gestures.
  • The secondary-button release.

In crates/rune/src/runtime, 35 non-test lines find a node with nodes.iter() and a path comparison, 18 of them under runtime/input/. Runtime::node alone has 38 callers. Each key, pointer, gesture or secondary event can run several of these, each O(n) string compares on a large tree.

Where
Why it matters

Every event that scans the tree adds to input latency on large apps. The targets: on a 120 Hz Mac and a ProMotion iPhone, input-to-present p50 at or below 8.3 ms and p95 at or below 16.7 ms, with dispatch-to-submit p95 at or below 4 ms. Worst-case frames must fit the budget, with per-frame work that scales with what changed and nodes visited at or below the counted definition.

What would help

Route Runtime::node, live_index, gesture_handler and the other scanning helpers through path_ids and node_index, as index_of does. Keep each helper's filters: exiting subtrees, unmounted subtrees, inert nodes (allowed) and the active modal.

One case needs care. An exiting node can keep its path while a new node with the same path mounts. The index must return the live node, and a helper that wants the exiting one must ask for it by id. A debug check that the indexed result equals the scan's result catches any difference.

Add a debug counter of linear path scans, so a new one shows up in tests.

Done when
  • The debug linear path-scan counter reads 0 for key, hit, gesture and secondary events on a 10,000-node tree (test).
  • In debug, each indexed lookup is checked against a full scan and agrees.
  • The existing exiting, unmounted, inert and modal filtering tests pass.
How to check

Runtime tests in the merge gate, plus the counter test on a 10,000-node tree. The parent R0312 tracks the other per-frame scans.

Part of
  • Theme: T06
  • Tracked in R0312
  • Phase 2, milestone 2b · priority P2 · size S
R0324Memo: elision is opt-in and almost nothing opts in, so an ordinary state edit re-runs and rebuilds the whole viewP1Phase 2bXLT07
api-default-elision · tracking
What happens

A handler that changes state commits, and the commit re-runs the whole view, flatten and apply. live_only skips this for handlers that only move a live value. memo, virtual_rows and Markdown's own cache skip work where they apply. Everything else rebuilds. rune-kit has 3 non-test memo calls, all in the diff view. None of the 30 apps in examples/ calls memo, virtual_rows, live_only, on_ready, Latest or prewarm_gpu. So a keystroke in a field rebuilds every row and every Markdown block on screen, and new apps copy that pattern.

Caching pays where it is used. In research/38, the md-same commit went from 0.851 ms to 0.167 ms p50 (-80%), and allocations from 5,687 to 10. Rust evaluates view helpers eagerly, so Rune cannot skip an arbitrary helper without memo. Elision by default therefore has to come from types and components: state that bumps its own version, kit components that cache themselves, checks that keep caches correct, and an example that shows the pattern. Those are separate pieces of API, some in other themes (a public cached(), self-caching kit components, count budgets), so this takes several issues.

Where
Why it matters

The target: "Code in the documented style is fast without hand-written elision". In the feed scene, "a composer keystroke runs the view at most once and builds at most 5% of mounted El nodes", and "the sampled cache differential check finds 0 stale hits". Typing must stay inside one frame: p95 <= 1 ms at 50 KB. Per-frame work must scale with what changed.

What would help

In this theme: R0329, R0339, R0327 and R0330. Read tracking, signals, a Model<T> type and typed El<S> views are out of scope.

Done when
  • Every child is closed, and so are the tracked issues in other themes.
  • In the feed scene (virtual_rows over 1,000 rows, kit components, versioned state, no hand-computed memo versions), a composer keystroke runs the view at most once and builds at most 5% of mounted El nodes.
  • View runs and nodes flattened per keystroke and per token in the chat scene drop by at least 40% against the rev before this work.
  • Appending one row to a 100,000-row virtual_rows list makes O(1) key calls.
  • The sampled cache check finds 0 stale hits across kit-gallery and the feed scene.
  • FrameStats commit and view-run counts for one script are equal in debug and release.
How to check

Count budgets on the feed example run in the required merge check (R0028).

Issues
Part of
  • Theme: T07
  • Phase 2, milestone 2b · priority P1 · size XL
R0325Commit: one commit can run the view dozens of times, and resize or scroll re-runs it whenever a picture is on screenP1Phase 2bXLT07
commit-and-layout-bounded-commits · tracking
What happens

One commit can run the app view many times. The virtual-row loop re-runs the whole view each time a virtual window needs more rows. From the ninth pass it sets force_all, which mounts every row of every list. Layout reads may take 2 more measurements in a commit, and layout feedback alone may cause 4 commits in a row. Nothing caps the total, and nothing reports why a run happened.

The paths that skip the view have holes. Resize-only relayout and virtual-only remounts both need every node to be reusable. A node with aspect_fit, a fitted anchor or a picture's pixel aspect is not. Virtual-only also refuses when any node shows live text. So one image on screen sends every resize step and every virtual scroll through a full view run. A burst of queued keystrokes runs one full commit per key in the same frame.

The view-run budget, retries in place, the fast paths, the refit and the key batching are separate code paths, so this takes several issues.

Where
Why it matters

A list that scrolls into a short window, or a window resized with a photo in it, misses frames at 120 Hz. The targets: "At most 3 view runs in any commit of any test or trace, enforced in code. At most 1 view run in >= 99% of commits in each scene", "0 view re-runs to fill a virtual window", and rows built across all retries at most viewport + 400 per commit. Resize and virtual scroll must relayout "without running the app view whenever the retained structure is unchanged, for any built-in content", with md-resize layout CPU <= 2 ms p95 per step and resize frame CPU p95 <= 8.3 ms with 50 KB of text.

What would help

Start with R0338: count view runs per commit with a cause, and cap them. Then R0337, which replaces the force_all cliff; R0333; R0341; and R0351.

Done when
  • Every child is closed.
  • No commit in any test or trace runs the view more than 3 times, enforced in code.
  • At most 1 view run in at least 99% of commits in each scene.
  • 0 view re-runs to fill a virtual window, and nothing mounts a whole list.
  • Commits with 2 or more compute_layout calls are at most 5% in each scene, scenes with aspect_fit pictures and fitted anchored menus included.
  • Resize and virtual scroll run the root view 0 times after the first frame with images, fitted overlays and live text on screen.
  • md-resize layout CPU is at most 2 ms p95 per step on the reference Mac.
How to check

Per-commit view-run and compute_layout counts become count budgets in the required merge check (R0028). md-resize is timed with --profile perf in paired runs.

Issues
Part of
  • Theme: T07
  • Phase 2, milestone 2b · priority P1 · size XL
R0326Virtual rows: a 1M-row list misses PLAN's targets for scroll, append, filter and memoryP1Phase 2bXLT07
layout-virtual-million-rows · tracking
What happens

PLAN.md section 8 targets a 1M-row list, with fixed and variable heights: list CPU p95 at most 1 ms and 2 ms, first viewport within 100 ms, and at most 200 realized rows. PLAN.md also promises a sum-tree height index for huge lists. Today heights are a flat Vec<f32>. Any change marks the prefix sums stale, and the next read sums every row again. set_keys rebuilds the row map and clones every key on any key change. A count change reads every key (#203). The largest list measured anywhere is 100,000 rows, in the kit's table example. No target covers filtering, or the memory each row costs.

The height index, row positions, the bench, key scans, retained elements and correction drift are separate pieces of work, so this takes several issues.

Where
Why it matters

Logs, captures and chat histories grow all day. A list that slows as it grows is felt in every scroll. The targets: CPU p95 <= 1 ms fixed and <= 2 ms variable; first viewport <= 100 ms; filter <= 16 ms, reading each key at most once; <= 200 realized rows; one append costs at most 1 + mounted key calls and O(log n) index updates, with no allocation proportional to n; <= 64 B per row; row tops exact to 1/64 pt. Scroll containers must keep anchoring error and drift at most 0.5 pt on every frame.

What would help

The children: R0336, R0349, R0335, R0350, R0355 and R0348, plus #203. The bench issue owns the pass and fail numbers below. Scenes: a 1440 x 900 pt window, 24 pt fixed rows, and 20 to 200 pt seeded variable rows.

Done when
  • Every child is closed, and #203 is closed.
  • On the reference Mac, CPU p95 per scroll frame is at most 1 ms fixed and 2 ms variable, and the first viewport is within 100 ms.
  • Filtering 1M rows to 10% reads each key at most once and completes within 16 ms.
  • The virtualizer holds at most 64 B per row, not counting app data or key strings.
  • Row tops at row 999,999 are exact to 1/64 pt.
  • The count budgets for these scenes are gated in the required merge check.
How to check

R0335 times the scenes with --profile perf on the reference Mac. Its count budgets (rows realized, key calls, index updates) run in the required merge check (R0028).

Issues
Depends on
Part of
  • Theme: T07
  • Phase 2, milestone 2b · priority P1 · size XL
R0327Memo: nothing checks that a cache hit returns what a rebuild would, so a missed input gives a stale componentP1Phase 2bMT07
api-cache-differential-check · infra
What happens

memo, cached and the kit's own caches return a stored El when their key matches. The memo contract asks the app to put everything that can change into version: captured handler state, a theme, a locale, a selection. A key that misses an input returns stale output with no error. Examples: a replaced callback, a changed image, a new locale string or theme token, or a reused element after removal. Hit-count tests show that caching works, not that it is correct. Once caching becomes the default, through versioned state and self-caching kit components, a stale hit becomes a bug the app author did not write.

Where
Why it matters

A stale component shows an old label, an old image or a button that runs an old handler. The user sees wrong data, and the author has no message to start from. The targets: "the sampled cache differential check finds 0 stale hits across kit-gallery and the feed scene", and misuse "is reported at the call site with the fix".

What would help

In debug builds, rebuild a sampled 1 in 16 cache hits and compare a structural fingerprint of the rebuilt subtree (keys, styles, text, images and theme-resolved colours) with the cached one. On a mismatch, warn once with the call site. RUNE_CACHE_CHECK=all checks every hit, for tests. The sample rate bounds the debug cost.

Closures cannot be compared, so the fingerprint cannot see a replaced callback. Cover callbacks with behavior: the invalidation test presses the reused element and asserts that the new callback runs.

Add an invalidation matrix test for each kit cache: replace a callback, change an image, change a locale string, change a theme token, and remove and re-add the element. With the kit on public API only (R0182), every kit cache goes through hooks the check can see. The warning and its debug case belong in the misuse inventory (R0035).

Done when
  • A misuse case with a memo version that misses an input warns with the call site.
  • The invalidation matrix passes for every kit cache.
  • kit-gallery and the feed example raise no warning with RUNE_CACHE_CHECK=all.
  • Release builds run no check.
How to check

The misuse case and the invalidation matrix run in the required merge check (R0028). The kit-gallery and feed runs with RUNE_CACHE_CHECK=all run there too.

Depends on
Part of
  • Theme: T07
  • Tracked in R0324
  • Phase 2, milestone 2b · priority P1 · size M
R0328Layout: no declarative way to mount an element above the whole window from where it is builtP1Phase 2bMT07
api-portal-core · feature
What happens

An element that must draw above everything else, such as a popover, menu, select list, tooltip or dialog, has to be moved to the window root by hand. rune_kit::root(base, overlays) mounts each overlay as a root sibling after base. The kit builders that open one take a &mut Vec<El> layer, and the app passes that vector to root. Ten public kit builders work this way today, including Dialog, Menu, Select, Combobox and Tooltip.

An element built in place, deep in the tree, is clipped by its ancestors and paints under their later siblings. The runtime already knows about root-sibling overlays: modal membership follows an overlay's anchor chain, not its layout parent. But no element-level API lets an app or component say "paint and hit-test this above the base, from here".

The cost: overlay components cannot be one expression that returns one El. Apps thread a layer vector through their views. Focus and accessibility order follow the root's child order, not the trigger.

Where
Why it matters

Component authors and agents meet this on every overlay. The target is that "a component is one expression that returns one El": 0 non-deprecated public kit APIs take &mut Vec<El>, every kit builder finishes with build(self, &Kit) -> El, and "every overlay's content comes right after its trigger in Tab and accessibility order". A portal is also one of the 14 layout features that apps must be able to express "with shipped and documented builders".

What would help

Add El::portal(PortalLayer).

  • At flatten, move the element under the root's overlay layer, in paint and hit order above the base.
  • It escapes ancestor clips and stays anchored to its trigger key.
  • In focus and accessibility order it comes right after its trigger.
  • Memo reuse and presence treat it as a child of the element that built it, so a memoized subtree keeps its portal and exit motion still runs.
  • Nested portals stack in build order. A modal portal traps focus above earlier ones and returns it in order.

This issue lands the core primitive. Moving the kit builders off &mut Vec<El> can follow once it holds. Flatten ordering and moved-node reuse are fragile, so land it behind the differential test below.

Done when
  • For an equivalent tree, paint and hit order of a portal match kit::root (instance-stream differential test).
  • A portal inside a clipped scroll view is not clipped.
  • Tab and the accessibility tree reach open popover content right after its trigger.
  • Nested modal portals trap and return focus in order.
  • A memoized subtree that holds a portal reuses it, and presence exit motion works.
  • The builder is documented with an example.
How to check

Instance-stream, focus and accessibility tests in crates/rune/tests, run in T1 with cargo test -p rune -p rune-kit --features rune-kit/markdown.

Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 2, milestone 2b · priority P1 · size M
R0329Memo: an app computes every memo version by hand, and no type bumps a generation when state changesP1Phase 2bMT07
api-versioned-state · feature
What happens

memo(id, version, build) reuses a subtree while version hashes the same. virtual_rows_version works the same way for a list's keys. Both accept any Hash value, so apps hash fields or keep revision counters by hand. The doc example for virtual_rows passes m.revision, a counter the app must remember to bump.

A missed field leaves a stale row on screen: the subtree keeps its old text and handlers. That is memo's largest correctness risk. Rune cannot track reads for it, because a view gets &S, a plain shared reference with no field-read tracking.

No type in Rune bumps a version when its value changes.

Where
Why it matters

App authors pay twice: they write version code for every memo, and a bug in it shows stale content that no test catches by default. The target is that "code in the documented style is fast without hand-written elision": in the feed scene, with Versioned state and "no hand-computed memo versions", a composer keystroke runs the view at most once and builds at most 5% of mounted El nodes, and "the sampled cache differential check finds 0 stale hits". Typing must also stay inside one frame in large documents: p95 <= 1 ms at 50 KB.

What would help

Add rune::Versioned<T>.

  • Deref is free and does not bump.
  • DerefMut and set bump a u64 generation.
  • A new Versioned takes its generation from a global counter, so a replaced value never reuses an old generation. A clone keeps its source's generation.
  • Hash hashes only the generation, so memo and virtual_rows_version accept &Versioned<T> with no change to their signatures.
  • Document two limits: the u64 does not wrap in practice, and interior mutability through Deref (Cell, RefCell) does not bump. Add touch() for that case.

Any &mut access bumps the generation. That over-invalidates but never goes stale.

Done when
  • Unit tests: DerefMut and set bump, Deref does not, a replacement value gets a new generation, a clone keeps it.
  • A memo row over a replaced Versioned rebuilds (test).
  • The virtual_rows doc example and the memo guide use Versioned instead of a hand-kept revision.
  • The feed example from R0324 uses it and computes no memo version by hand.
How to check

Unit tests in crates/rune, and the feed example's count budget, run in T1.

Part of
  • Theme: T07
  • Tracked in R0324
  • Phase 2, milestone 2b · priority P1 · size M
R0330Examples: no example shows a feed written the fast way, with virtual_rows, memo over Versioned rows, live_only, on_ready, Latest and prewarm_gpuP1Phase 2bMT07
api-feed-example · docs
What happens

The Fast apps page and the crate README make these APIs the rules for a fast app. No example's Rust code uses any of them: across examples/**/*.rs there are 0 hits each for virtual_rows, memo(, live_only, on_ready, Latest and prewarm_gpu. The only case that puts virtual_rows and memo together in a chat layout is a cost probe in rune-kit's layout_text_cost example, written to measure, not to copy. Someone who asks for a chat or feed app gets prose but no code to start from, so new apps start from the slow pattern.

Where
Why it matters

Apps copy examples. The targets: "every Fast-apps rule maps to example code that a test exercises", and in the feed scene, with no hand-computed memo versions, "a composer keystroke runs the view at most once and builds at most 5% of mounted El nodes".

What would help

Add examples/feed:

  • virtual_rows rows keyed by id, with memo over versioned rows from R0329;
  • a Latest search box;
  • slow work started from on_ready, and prewarm_gpu;
  • scroll_anchor;
  • a live_only typing indicator;
  • a kit composer;
  • a streaming Markdown reply with links.

Add a headless test and a script. Add docs/fast-rules.toml, which maps each Fast apps rule to the line that shows it, and have the examples check from R0031 verify the map. Make the example the scene that the elision count budget runs on, and list it as the pattern reference.

Done when
  • Each Fast apps rule maps to a line in the example, and the examples check verifies the map.
  • The headless test exercises each mapped behavior: typing, streaming, scrolling and the deferred load.
  • The elision count budget runs on this example.
  • scripts/app-audit reports nothing on it.
  • examples/README.md lists it as the pattern reference.
How to check

The example's test, the rule map check and the count budget run in the required merge check (R0028).

Depends on
Part of
  • Theme: T07
  • Tracked in R0324
  • Phase 2, milestone 2b · priority P1 · size M
R0331Layout: Rune's flex and grid results are never compared with a browser'sP1Phase 2bLT07
layout-css-parity-harness · infra
What happens

Agents write CSS-shaped layouts, and Rune lays them out with its own Taffy adapter. The --html export gives the same styles to the browser for the web's static first frame. Nothing compares the two sets of rects.

Rune deviates from CSS on purpose in places: relative positioning, max-content scroll children, grow semantics and device-pixel text widths. It can also deviate by accident. Taffy's own Chrome fixtures do not cover Rune's rewrites. scripts/kit/rects.mjs prints Chromium rects for one Storybook story, and someone compares them by hand.

The exporter cannot serve as the reference yet. It writes display: grid but no grid tracks or placement. It drops content-size keywords and fr, skips input elements, and rounds every length to 0.01.

Where
Why it matters

An agent that writes flexbox expects browser results. A silent difference shows up as a misplaced control that only a screenshot catches. On the web, a difference between export and live layout shows as a jump when the wasm arrives. The target: on a generated corpus of at least 500 trees, "<= 0.01 pt on every element, or the element is covered by one of the deviations listed in the docs page, with at most 10 deviation classes; 0 unmatched nodes; export equals live on the corpus; gallery: <= 1 device px on >= 95% of elements and <= 2 device px on all". Layout is a hard subsystem, so it also needs an obviously correct reference, differential-tested on generated inputs.

What would help

Add scripts/layout-parity with two parts.

1. A generator of El trees with fixed-size leaves over every exposed flex and grid builder. For each tree it writes the expected CSS from its own model, not from the exporter. It lays that out in headless Chromium through Playwright, matches every Rune node to a DOM element by a data attribute, and compares rects with --tree. A missing or extra node fails. The same trees also go through --html, and the export's CSS must give the same rects, so the exporter is checked too. 2. Kit gallery scenes with text in bundled fonts, compared within the device-pixel tolerance.

Each allowlist entry must name one deviation from R0015. R0103 fixes the exporter gaps first. Keep the solver corpus to fixed-size leaves, so text shaping differences do not loosen the strict tolerance.

Done when
  • On at least 500 generated trees covering every builder in the layout feature matrix, every edge differs by at most 0.01 pt or is covered by a documented deviation.
  • Every Rune node has a matching DOM element, and the reverse.
  • The --html export gives the same rects as the independent CSS on the corpus.
  • On the gallery, at least 95% of elements are within 1 device px and all are within 2.
  • A JSON report is written, and a local run takes under 5 minutes.
How to check

The script runs locally, and R0340 runs it on every push to dev.

Depends on
Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 2, milestone 2b · priority P1 · size L
R0332Layout: a deeply nested tree can overflow the main thread's stack, and nothing tests the depthP1Phase 2bMT07
layout-deep-tree-stack · bug
What happens

Several commit paths recurse once per tree level:

  • flatten (flatten_owned and flatten_ref call themselves for each child);
  • window_tree, which picks virtual windows;
  • Taffy's solvers;
  • the drop of an El tree, which has no custom Drop and so recurses through children.

Content sets the depth: nested Markdown quotes and lists, diagrams, JSON trees, often from model output. Kit's Markdown does not limit nesting, and nothing in the commit limits depth.

A Windows main thread has a 1 MiB stack by default, and a macOS main thread has 8 MiB. The motion gate already runs its runtimes on 64 MiB threads. Nobody has measured the depth at which a normal app thread overflows. An overflow aborts the process, so a release build crashes with no error to catch.

Where
Why it matters

A chat app that renders a reply with deep nesting can crash on Windows first. The targets are "no panic or stack overflow in release from app-supplied structure or values", with "0 release panics in the misuse tests, depth probe and fuzz", and "depth 1,024 exact on a 1 MiB stack in release, and depth 8,192 without a crash".

What would help

1. Add a probe that runs, in subprocesses, a build, commit, scroll and drop of nested columns at depths from 64 to 8,192, on threads with 1 MiB and 8 MiB stacks. It records the deepest depth that succeeds at each stage. 2. Make the paths that overflow first iterative or stack-light, starting with El drop, flatten and window_tree. 3. Set a depth budget that is safe on a 1 MiB stack in release, at least 1,024 levels. Up to the budget, layout is exact. Past it, Rune stops descending, draws the cut subtree as one clipped box with a visible marker, and warns once in debug with the call site. 4. Kit's Markdown limits nesting below the budget as part of its content budgets.

Paint walks also recurse and need the same budget. The marker changes output only for pathological content, and it is visible on purpose so nobody takes it for real layout.

Done when
  • Depth 1,024 builds, commits, scrolls and drops on a 1 MiB stack in release on macOS, Windows and Linux, with layout identical to an 8 MiB run.
  • Depth 8,192 does not crash on a 1 MiB stack. Content past the budget shows the marker and warns once in debug.
  • The probe's per-stage results are written to its report.
How to check

The subprocess depth probe runs in T1 on each platform lane.

Part of
  • Theme: T07
  • Tracked in R0541
  • Phase 2, milestone 2b · priority P1 · size M
R0333Layout: one image, fitted overlay or live text on screen makes every resize and virtual scroll re-run the viewP1Phase 2bMT07
layout-fast-paths-with-pictures · perf
What happens

Rune has two fast paths that skip the app's view. resize_only lays the retained tree out again at the new viewport. virtual_only remounts virtual rows when only a list's window moved. Both require every node in the window to be reusable.

reusable rejects any node with pixel_aspect, aspect_fit or a fitted anchored overlay. Flatten sets pixel_aspect on any picture with one auto side. Every Markdown image is one: it sets w_full and max_w and leaves the height auto. So one image in a note makes every live-resize frame run the view and flatten. One mounted image row in a virtual_rows transcript does the same on every window move. virtual_only also rejects any secure or live-text node anywhere in the window.

The skip is not needed for correctness. A picture's ratio change is already detected on its own each frame.

No counter records how often this happens yet.

Where
Why it matters

Users resize a notes window or scroll a chat transcript with pictures in it, and each frame does a full view run. The targets: "0 root view runs after the first frame" when the retained structure is unchanged, "for any built-in content"; "md-resize (50 KB note) layout CPU <= 2 ms p95 per step"; resize frame CPU p95 <= 8.3 ms with 50 KB of text and no blank, stretched or shifted frame; scroll CPU p95 <= 1 ms fixed and <= 2 ms variable.

What would help

The merged proposals differ.

  • Make each node kind reusable (recommended). In relayout, take the aspect ratio from the retained pixels. Re-run the fitted styles from their rooms, as solve already does. Let fitted anchored overlays re-fit in place. Carry live-text and secure nodes through remount with their retained text state, as resize_only already carries them.
  • Per-subtree reusability. Relayout or remount around a non-reusable subtree and fully re-measure only that subtree. This is the fallback for any node kind the first option cannot cover.

Secure text has rules about what may be retained. Remount must keep the same redaction, and a test checks it.

Done when
  • md-resize with three images runs the view 0 times over 600 resize frames after the first.
  • vlist-resize with image rows runs the view 0 times per window move.
  • A new fit-overlay-resize case (an anchored_fit menu open during a resize) runs the view 0 times after the first frame.
  • A virtual list with a live-text clock and a secure field among its mounted rows runs the view 0 times per window move, and the secure text stays redacted.
  • All four cases are in the count budgets.
  • aspect_fit and anchored-fit tests pass, and rects equal a full-measure commit.
How to check

The count budgets read view runs from R0069, and R0100 compares every fast-path result with a fresh layout. Both run in T1.

Depends on
Part of
  • Theme: T07
  • Tracked in R0325
  • Phase 2, milestone 2b · priority P1 · size M
R0334Layout: nothing reports text that overflows its container or content cut off by a parentP1Phase 2bMT07
layout-lint · feature
What happens

PLAN.md section 6b promises no clipped text in any locale or size. It says every scene fails "on overflow, overlap, hard clips, tap targets < 44 pt" under layout-linter rules. No such linter exists. The only layout checks warn about a collapsed scroll viewport and about growth stacks placed on a viewport or before a sibling.

In #88, a Dialog description is laid out 584.5 pt wide inside a 480 pt card, and its right edge lands past the 600 pt window. No check noticed. It was found from a screenshot and --tree by hand.

Where
Why it matters

Text that runs past its card, or is cut with no way to read it, is a visible bug for every user and an accessibility failure. Agents get it as a screenshot to squint at, not as a finding. The targets: "0 findings outside a reasoned allowlist in the T1 sample and the nightly full sweep, with intentional clips declared by clip_ok", and layout that "explains itself to agents and people" for 100% of nodes in every gallery scene.

What would help

Add Runtime::layout_lint(). It returns findings with the node path, the call site and the rule.

1. A text's laid-out lines or ink extend past its own content box or its effective clip (the intersection of clipping ancestors), wrapped text included. 2. Truncation hides text with no way to reveal it: no tooltip, no expand and no accessible full value. 3. A child extends past a parent that neither clips nor scrolls. 4. In-flow siblings overlap. 5. Content cannot be reached because it is clipped with no scroll. 6. A zero-size element has content. 7. A hit target is under 44 pt. Accessibility owns the threshold. 8. A scroll viewport collapsed, as the existing check finds.

Intentional clips and overlaps are declared with El::clip_ok(reason) and El::overlap_ok(reason), not inferred. Debug builds warn once per call site. Tests and --tree include the findings, with an allowlist per scene. Release builds pay nothing.

Keep the findings API stable: a later headless check orchestrates these rules rather than re-implementing them.

Done when
  • The #88 reproduction gives an overflow finding.
  • A wrapped label clipped by a fixed-height parent gives a clip finding.
  • The kit gallery passes, and every allowlist entry and every clip_ok has a reason.
  • Each rule has a unit test with one true positive and one declared exception.
  • Release builds contain none of the lint code.
How to check

A gallery lint test runs in T1. The scene fuzz across widths, text scales and locales runs the lint nightly.

Part of
  • Theme: T07
  • Phase 2, milestone 2b · priority P1 · size M
R0335Virtual rows: nothing measures a 1M-row list, so PLAN's list targets are uncheckedP1Phase 2bMT07
layout-virtual-1m-bench · infra
What happens

PLAN.md section 8 sets targets for a 1M-row list with fixed and variable heights: list CPU p95 <= 1 ms and <= 2 ms, first viewport <= 100 ms, and <= 200 realized rows. Nothing measures them.

  • virtual_rows_time is #[ignore], goes up to 5,000 rows, and asserts nothing. It only prints.
  • The list case in layout_text_cost has 10,000 rows.
  • Kit's Table example has 100,000 rows.
  • Nothing measures filtering, appending at scale, or the memory a row costs.

So no number backs the PLAN row today, and a regression in any of these paths goes unseen. #203 already shows one O(rows) cost on append and filter.

Where
Why it matters

Chat histories, logs and tables reach a million rows, and their users notice a scroll hitch or a slow filter at once. The targets: "CPU p95 <= 1 ms fixed and <= 2 ms variable; first viewport <= 100 ms; filter <= 16 ms, reading each key at most once; <= 200 realized rows in that window; one append costs <= 1 + mounted key calls and O(log n) index updates, with no allocation proportional to n; <= 64 B per row; row tops exact to 1/64 pt". Very large lists must "cost what is visible, not what exists".

What would help

Add list-1m-fixed and list-1m-variable cases to layout_text_cost.

  • A 1440 x 900 pt window, 24 pt fixed rows, and seeded variable rows of 20 to 200 pt.
  • Each case scrolls, flings to the end, appends one row a frame, filters to 10% and back, and records the first viewport.
  • Report counts for T1 budgets: realized rows, key calls per append, key reads per filter, allocations against n.
  • Report timings for the reserved-hardware job.
  • Report retained bytes split into app data, keys and virtualizer overhead.

Counts are stable across machines, so they gate every merge. Timings gate only on fixed hardware.

Done when
  • T1 gates the counts: at most 200 realized rows, at most 1 + mounted key calls per append, each key read at most once per filter, and allocations that do not grow with n.
  • The reserved-hardware job fails if CPU p95 per scroll frame is above 1 ms fixed or 2 ms variable, the first viewport above 100 ms, or the filter above 16 ms.
  • Virtualizer overhead is at most 64 B per row, asserted from the heap split.
How to check

Count budgets in T1 read the counters from R0069. Timings pass or fail in R0245. Run locally with --profile perf.

Depends on
Part of
  • Theme: T07
  • Tracked in R0326
  • Phase 2, milestone 2b · priority P1 · size M
R0336Virtual rows: one row's height change re-sums every row in the listP1Phase 2bMT07
layout-virtual-height-index · perf
What happens

A virtual list keeps one f32 height per row and a cached vector of prefix sums. set_height marks the sums stale, and the next read in sums() rebuilds all n + 1 of them. A streaming chat row changes height every commit, so a 100,000-row history re-sums 100,000 floats per commit. set_estimate rewrites every height, and set_gap invalidates every sum.

The sums are f32 added in sequence, so the error in a row's top grows with n. Keys are stored twice: once in keys and again as the keys of the rows map.

PLAN names "a sum-tree height index for huge lists" as the layout pick, and this is not it.

Where
Why it matters

A user scrolling a long history while a reply streams pays O(rows) per commit, and the list gets slower as it grows. The targets: scroll "CPU p95 <= 1 ms fixed and <= 2 ms variable", "one append costs <= 1 + mounted key calls and O(log n) index updates, with no allocation proportional to n", "<= 64 B per row" and "row tops exact to 1/64 pt".

What would help

Replace row_heights and sums with an index over f64 heights that gives O(log n) update, prefix and offset-to-index search, and amortized O(log n) append. Keep the gap and the unmeasured-row count outside the index, so a gap or estimate change is O(1). Store each key once. The public behaviour stays the same.

Two shapes were proposed:

  • A B-tree sum index, like GPUI's SumTree list (recommended). It also supports insert and remove in the middle in O(log n), which #203's append and filter work needs, and it is what PLAN names.
  • A Fenwick tree. Smaller and faster for update and prefix, but an insert in the middle rebuilds it in O(n).

The two timing goals in the records differ: under 50 µs for an update plus lookup, or at most 5 µs median. Gate on the counted node bound, and take 5 µs median as the timing goal.

Done when
  • set_height, append, prefix and offset-to-index search each touch at most 2 * log2(n) + 2 nodes (counted).
  • A gap or estimate change touches O(1) nodes.
  • Counted work for an update plus lookup grows no faster than log n across 10,000, 100,000 and 1M rows.
  • At 1M rows on the reference Mac, one height change plus first_visible takes at most 5 µs median in --profile perf.
  • With heights that are multiples of 1/64 pt, prefix(n) equals the exact sum at 1M rows. With random f32 heights it is within 1e-6 pt of an f64 Kahan sum.
  • All existing virtual-list tests pass.
How to check

Unit tests and the 1M-row count budgets from R0335 run in T1. The timing runs on reserved hardware.

Part of
  • Theme: T07
  • Tracked in R0326
  • Phase 2, milestone 2b · priority P1 · size M
R0337Virtual rows: a short window re-runs the whole view to mount more rows, and after eight passes every row of every list mountsP1Phase 2bMT07
layout-virtual-retry-in-place · perf
What happens

When measured row heights leave a gap in a virtual window, finish_from runs measure_view again from the root: the app's view, build, flatten and solve. The remount path's Retry falls back to measure_retry, also a full view run. Estimates that are wrong in either direction can leave the window short, and so can a viewport that changes size in the same commit. One scroll of a virtual_rows transcript can then cost several full view runs in one commit.

The loop has a cliff. On the ninth pass, force_all sets every list's range to 0..len. Passes 2 to 8 have no per-commit row budget either, because the budget is off on retries. A list of 100,000 keys whose rows have zero or near-zero height (collapsed groups, filtered rows that draw nothing) builds all 100,000 rows, their text and their scene nodes in one commit. For a 1M-row list that is a stall of seconds.

Where
Why it matters

A user scrolling chat or notes sees a long commit as a hitch, and the force_all cliff as a freeze. The targets: "0 view re-runs to fill a virtual window", "rows built across all retries are <= viewport + 400 per commit", "no cliff that mounts whole lists", "row builders run only for newly mounted rows", and "zero Rune-caused tasks over 8.3 ms after the first frame". The zero-height list must commit "in < 100 ms with a filled viewport".

What would help

Land it in two PRs.

1. Cap first. Replace force_all with a per-commit row budget shared by all passes and all lists, at most viewport + 400 rows in total. When a window is still short, mount by index past the measured rows up to that budget. Warn once in debug with the list's call site, and let the existing fill frames do the rest. Count fallback mounts and rows built across retries. 2. Retry in place. When measure_virtuals comes up short, build only the missing rows: virtual_rows builds them by index, and .virtualize rows already sit in selection.unmounted. Flatten them under the list in place, as remount_virtuals does, and re-solve. Fall back to a full pass only when the list's own subtree changed shape.

The in-place path touches memo's move-and-restore code. Keep the full-pass fallback and run the fuzz.

Done when
  • 100,000 zero-height rows commit with at most 400 rows built in total across all passes, and two such lists in one window share the budget.
  • With 50,000 zero-height rows before visible rows, scrolling reaches and draws the visible rows, with no blank frame longer than one frame.
  • A debug warning names the list's call site, and the fallback-mount counter is 0 on every canonical scene.
  • On md-virtual and list, with estimates at 50% and 200% of real heights and a viewport resize in the same commit, a state-change commit has exactly 1 view run and a scroll-only commit has 0.
  • Each retry builds no more than the missing rows.
  • Never-blank tests pass, and rects equal a full-measure commit.
How to check

Runtime tests and count budgets in T1, using R0069. R0100 checks rects against a fresh layout.

Depends on
Part of
  • Theme: T07
  • Tracked in R0325
  • Phase 2, milestone 2b · priority P1 · size M
R0338Layout: one commit can re-run the view dozens of times across retries, and nothing names the causeP1Phase 2bMT07
layout-bounded-view-runs · perf
What happens

Each retry loop in a commit has its own limit, and nothing caps the total.

  • The commit measures once, then settle_layout_reads re-measures up to PASSES = 2 times while a Cx::layout read moves.
  • A focus request that mounts a field discards the measurement, measures again and settles again. A caret move does the same.
  • Each measurement can run the view up to 9 times to fill short virtual windows.

Reading the code, one commit can take up to 9 measurements, each with up to 9 view runs. Nobody has measured how close real scenes get. Separately, ECHOES = 4 lets layout feedback alone cause four commits in a row. A read that oscillates costs three view runs a commit for four commits, and then its rects are forced.

No counter records view runs per commit (FrameStats has commits, layout nodes, glyphs and shaped runs only). No warning names the read or the retry that caused the cost.

Where
Why it matters

A long commit is a dropped frame at 120 Hz, and the app author cannot see why it happened. The target is "at most 3 view runs in any commit of any test or trace, enforced in code", "at most 1 view run in >= 99% of commits in each scene", and "0 layout reads reach PASSES or ECHOES in the gallery and examples". Frames must fit the budget: on the reference Mac, "p95 <= 4 ms and 0 frames over 8.3 ms per run". Layout should also explain itself, so the warning must name the source.

What would help
  • Give each commit one view-run budget of 3, shared by every retry source: short virtual window, layout-read settle, focus and caret.
  • When the budget runs out, the commit keeps its last layout and the remaining work goes to the next frame, which takes the same path as the existing echo fallback.
  • Count view runs and each retry cause in the counters from R0069.
  • Add a debug perf_warn that names the Cx::layout or Cx::layout_with call site, the retry source and the moved delta. It fires when a commit uses more than one view run on two commits in a row, or uses up the budget.

R0337 removes the virtual source from the view-run count; this issue bounds the rest.

Deferring past the budget can show one frame with an unsettled read. The echo limit makes the same trade today, and the warning makes it visible.

Done when
  • An adversarial test that combines an oscillating read, a focus change, a caret move and a short virtual window in one commit makes at most 3 view runs, and settles within 4 frames.
  • The warning names the file:line of the oscillating read.
  • A debug harness assertion fails any T1 test with more than 3 view runs in one commit.
  • The kit gallery and examples produce no warning.
How to check

T1 tests and the harness assertion, plus the per-scene count budgets that read the new counters.

Depends on
Part of
  • Theme: T07
  • Tracked in R0325
  • Phase 2, milestone 2b · priority P1 · size M
R0339Perf warnings: nothing says when the same unchanged subtree is rebuilt on every commitP2Phase 2bST07
api-rebuild-warn · feature
What happens

Rune's debug perf warnings name several slow patterns: a virtualize list that builds every row to mount a few, a callback that blocks the main thread, a poll that reports a change when nothing changed, a window that draws while idle, a slow first frame, and a memo whose root already had another key. Each warns once per call site, and RUNE_PERF_WARN=0 silences them.

None catches the most common slow pattern: a large subtree that the view builds again, identically, on every keystroke. The app still works, so the author has no reason to look until the window gets slow. Rune has no per-subtree fingerprint today, so it cannot tell an unchanged rebuild from a real change.

Where
Why it matters

App authors write plain views, and the only way they learn that a 500-node sidebar rebuilds on every keystroke is a profiler. The target is that "a debug warning names any subtree of 200 or more nodes rebuilt unchanged 30 commits in a row", as part of code in the documented style being fast without hand-written elision. Misuse is reported "at the call site with the fix".

What would help

In debug builds:

  • For each keyed subtree of 200 or more nodes, compute a fingerprint of the flattened result (styles, text and visuals per node). Compute it only past the size threshold, so small subtrees cost nothing.
  • When a subtree's fingerprint stays the same for 30 commits in a row that ran the view, warn once with its call site. Suggest wrapping it in memo with a Versioned version from R0329.
  • RUNE_PERF_WARN=0 silences it, as it does the others.

The fingerprint costs debug time. The size threshold bounds it, and a counter check keeps it bounded.

Done when
  • A misuse case warns at commit 30 and not at 29, naming the call site.
  • A subtree that changes once in 30 commits does not warn.
  • A 199-node subtree does not warn.
  • Debug commit time on the feed scene rises by under 5% (counter-based check).
  • The feed example and kit-gallery raise no warning.
How to check

The cases join the misuse suite from R0035, which runs in T1.

Depends on
Part of
  • Theme: T07
  • Tracked in R0324
  • Phase 2, milestone 2b · priority P2 · size S
R0340CI: no lane runs the layout parity check against ChromiumP2Phase 2bST07
layout-css-parity-lane · infra
What happens

Once R0331 adds scripts/layout-parity, nothing runs it. The repository's GitHub workflows build and deploy the docs site only (site.yml and www.yml). A parity check that runs only by hand decays: a change to the Taffy adapter or the --html exporter can move rects away from Chromium, and nobody sees it until an app does.

Chromium also changes its own layout between versions. Without a pinned browser, a failure could come from Chromium and not from Rune.

Where
Why it matters

Agents and app authors expect flexbox and grid to land where a browser puts them, and the web's static first frame must match the live layout. The target: on a generated corpus of at least 500 trees, "<= 0.01 pt on every element, or the element is covered by one of the deviations listed in the docs page, with at most 10 deviation classes; 0 unmatched nodes; export equals live on the corpus". That holds only if it is checked on every merge.

What would help
  • Run scripts/layout-parity in the post-merge T2 Linux lane on every push to dev.
  • Install Playwright's Chromium at one pinned version, and record the version in the JSON report.
  • Upload the report as a lane artifact.
  • A failure opens an issue through the lane's existing bisect path, naming the first failing tree and its deviation.
  • Bump the Chromium pin in its own PR, so a browser change shows as its own diff.
Done when
  • The lane runs on every push to dev.
  • The Chromium version is pinned and recorded in the report.
  • A seeded deviation (one tree changed so its rects move) fails the lane.
  • A clean run passes, with the report attached.
How to check

The T2 lane itself, with a seeded-deviation run when the lane is added and each time the Chromium pin changes.

Depends on
Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 2, milestone 2b · priority P2 · size S
R0341Layout: any aspect_fit or fitted anchored element makes every commit solve from the root twiceP2Phase 2bMT07
layout-fit-refit-memo · perf
What happens

An aspect_fit element is laid out in two steps. Flatten gives it its room style, so it fills the free space. After the first root solve, solve sets the largest box at the ratio inside that room and runs a second root compute_layout, so siblings and alignment follow.

Flatten writes the room style back on every measurement, replacing the fitted style the last commit stored. Taffy then sees a changed style and dirties the ancestor spine. solve runs the second root solve whenever any aspect_fit node exists, whether or not anything changed. Clean subtrees hit Taffy's cache, but the spine and every dirty node are computed twice.

fit_anchored adds a third solve and place when an anchored_fit overlay fits on neither side of its anchor.

research/32 set a trigger for this: two or more full-tree solves on more than 5% of commits. While one aspect_fit is on screen, every measured commit hits it. Comparing styles cannot skip the second solve, because flatten has already stored the room style.

Where
Why it matters

Media grids, picture cards and menus pay one or two extra root solves on every hover or keystroke. The targets: "commits with >= 2 compute_layout calls are <= 5% in each scene, including scenes with aspect_fit pictures and anchored_fit menus", and on the reference Mac "p95 <= 4 ms and 0 frames over 8.3 ms per run".

What would help

The merged proposals differ.

  • Memoize the fit (recommended). Store, per node, (room size, ratio, scale) to fitted size from the last commit. When the inputs match, flatten writes the fitted style directly and one solve is enough. If the first solve then gives a different room, fall back to the second solve. Do the same for anchored_fit, keyed by (anchor rect, viewport, zoom). Taffy does not change.
  • Fold `aspect_fit` into measure and scope `fit_anchored` to the overlay subtree. This removes the second pass outright but changes how Taffy sizes these nodes. Keep it for later if the counter shows anchored refits still above budget.
Done when
  • On a scene with four aspect_fit pictures and an anchored_fit menu, under hover and typing, at most 5% of commits make two or more compute_layout calls.
  • An unchanged commit runs one root solve.
  • Invalidation tests give the two-pass result: a sibling that changes the room, a new parent constraint, a scale change, a scroll that moves the anchor, and an anchor zoom.
  • Results equal the two-pass results in the existing aspect-fit and anchored-fit tests.
How to check

Count budgets read solve counts from R0069, and R0100 compares results with a fresh layout. Both run in T1.

Depends on
Part of
  • Theme: T07
  • Tracked in R0325
  • Phase 2, milestone 2b · priority P2 · size M
R0342Layout: per-pass lookups find lists, anchors and scroll rows by scanning every nodeP2Phase 2bST07
layout-per-pass-scans · perf
What happens

Several lookups in each layout pass scan the whole node list:

  • measure_virtuals finds each list node by path string, then that list's children by parent, then its scroll node by path, each with a full scan, per list and per pass.
  • apply keeps virtual lists alive with nodes.iter().any(|n| n.path == *path) for each list.
  • anchor_index scans every earlier node for the anchor key. step_up calls it, and walks up the tree call step_up again and again.
  • Scroll anchoring's anchor_row scans from parent + 1 to the end of the list at each level, without stopping at the subtree's end.

The maps these lookups need already exist. place() rebuilds node_index (id to index) every pass, and path_ids maps paths to ids. So the cost is lists x nodes, or anchors x nodes, for no reason. No measurement of the share exists yet.

Where
Why it matters

A window with several virtual lists or many anchored overlays pays these scans on every commit, and the cost grows with the whole tree, not with what changed. The targets: each count "<= dependency closure + moved-span roots" with the layout phase "<= 0.5 ms p95 on the reference Mac", and scroll containers with anchoring and virtualization that match CSS and UIKit.

What would help
  • Find lists and scroll nodes through path_ids and node_index.
  • Find a list's children from its index and subtree end, not by a scan over all nodes.
  • Build a per-pass map from key to first index for anchors, filled in the pass that already walks every node, so it adds no extra walk.
  • Bound anchor_row's child walk with subtree ends.
  • In debug, assert that each lookup equals the scan it replaces.
Done when
  • Node visits per pass for these lookups, index construction included, are at most N + O(lists + anchors + mounted children), with N counted once, not once per list or anchor.
  • On md-virtual and memo-chat, measure_virtuals plus the virtuals retain take at most 1% of commit time, in paired runs with --profile perf.
  • The debug equivalence asserts pass on every test.
How to check

The debug asserts run throughout T1. The visit count joins the count budgets from R0069.

Depends on
Part of
  • Theme: T07
  • Tracked in R0541
  • Phase 2, milestone 2b · priority P2 · size S
R0343Keys: anchors, layout reads, focus_return and Tx requests resolve a bare key to its first match anywhere in the tree, with no warningP1Phase 2bMT06
api-key-ambiguity · feature
What happens

Keys are unique only among siblings, but several lookups take the first match in the whole tree:

  • anchor_index returns the first earlier node with the anchor's key, and step_up walks use it.
  • Cx::layout and layout_with resolve through KeyIndex::first or key_index::scan_first.
  • focus_return finds its trigger with nodes.iter().find on the key.
  • Tx::fly_text and the Tx scroll requests take a key the same way.

The README documents the rule and warns that rune-kit keys its own parts label, value, icon and control. Nothing reports a lookup that more than one node matches. So if every row has a more-button keyed alike, every row's menu anchors to the first row's button. A view that reads Cx::layout("title") in a second card gets the first card's rect. An app key label can resolve to a Select option's label. Kit's SplitView and Sidebar use fixed keys (sidebar-toggle, main-pane, sidebar-list), so with two split views in one window, focus returns to the first one's list.

Rune already has a scoped form for one case: Tx::scroll_into_view_in(scope, key).

Where
Why it matters

Users see menus open under the wrong row and focus jump to the wrong pane. Authors get no signal. The targets: "a key that more than one node matches warns in debug with both paths and call sites, for every API that resolves a key, and release resolves to the documented tree-order first match", and every kit component that resolves its own parts passes a two-instances-per-window test. Misuse should be "reported at the call site with the fix". Layout tooling should flag misuse with 0 warnings on the gallery and examples.

What would help

1. In debug, warn once per key and call site when a bare key matches more than one node. Name both node paths and both .key call sites, and suggest a key path such as settings/label. Cover anchors, Cx::layout and its variants, focus_return, flights, every Tx request that takes a key, and Tx::focus once #173 lands. Release keeps tree-order first match. 2. Add scoped forms on the scroll_into_view_in model: anchored_in(scope, key, ..), Cx::layout_in(scope, key) and focus_return_in(scope, key). A scope is a node path, so it can't be ambiguous itself. This relies on unambiguous paths (R0321). 3. Move Kit Shell, SplitView, Sidebar, menus and popovers to scoped keys under their own element's path, including overlays portaled out of the subtree. 4. Add a guide table listing every key-resolving API, each with a misuse case (R0035).

Lookups go through the per-pass index (R0342), so the ambiguity check costs no extra scan.

Done when
  • An ambiguous bare key warns in debug with both paths and both call sites, for every API in the guide table.
  • Two rows using anchored_in each anchor their menu to their own button, also when the menu renders in an overlay layer.
  • Cx::layout_in reads a different rect for each of two cards.
  • Two SplitViews in one window each return focus to their own list.
  • Unscoped lookups give the same result as before (test).
  • The gallery and examples emit 0 ambiguity warnings.
How to check

Runtime and kit tests in T1, and the misuse suite's key-ambiguity cases. A gallery run in debug counts ambiguity warnings and fails above 0.

Depends on
Part of
  • Theme: T06
  • Phase 2, milestone 2b · priority P1 · size M
R0344Layout: every commit re-places every node, rebuilds the node index and lays out every text, however little changedP2Phase 2bMT07
layout-place-o-changed · perf
What happens

After Taffy solves, place clears node_index and walks every node. For each one it inserts the id again, reads the box from Taffy, and recomputes local, target and inset from the parent's target. relayout then walks every text node and calls lay_out_text at the solved width. Both passes are O(nodes) on every commit, even when most of the tree came from reused memo spans whose rects did not change. When an anchored_fit overlay refits, place runs a second time.

research/38 measured this on layout_text_cost after memo reuse landed. stack (about 5,300 layout nodes and 2,040 texts, one switch flips per frame) commits in 3.25 ms p50 and 4.01 ms p95. tree (about 5,000 nodes, one row changes per frame) commits in 2.70 ms p50 and 3.24 ms p95. The view takes only 1.35 ms and 0.91 ms of that. research/31 found that Taffy itself spends 0.058 ms on stack when one switch flips, because its cache already skips clean subtrees. The rest is flatten, apply, placement and text passes over every node.

Where
Why it matters

A settings page, a form or a tree view that is not virtualized pays about 3 ms of CPU to flip one switch, in a frame of 8.3 ms at 120 Hz. The target is that "a localized change costs layout work proportional to what it affects": each count at most the dependency closure plus moved-span roots, and the layout phase (flatten, solve, place, text) at most 0.5 ms p95 on the reference Mac. It also serves "per-frame work scales with what changed", with frame p95 at most 4 ms on the reference Mac, and typing p95 at most 1 ms in a 50 KB document.

What would help
  • Carry reused spans into place. A span whose root did not move keeps its targets and its node_index entries, and place skips it.
  • For a span whose root moved, there are two options. Eager: set target = parent target + local for each node in the span, with no Taffy reads. This is simple but still O(span). Lazy: store the delta on the span root and apply it where targets are read (paint, hit testing, element queries). Lazy is recommended, because only it meets a count of moved-span roots rather than moved nodes. Eager is a fine first step if the counters show moved spans are small.
  • Keep node_index entries whose index did not change, instead of clearing the map.
  • Skip lay_out_text for nodes whose content width and text fingerprint match the retained layout.
  • Add per-commit counters for nodes placed, nodes translated, node_index writes and texts laid out, beside the ones from R0069.
Done when
  • On stack and tree, nodes placed, nodes translated, node_index entries written and texts laid out per commit are each at most changed + spine + moved-span roots.
  • The layout phase (flatten, solve, place, text) on stack is at most 0.5 ms p95 on the reference Mac.
  • stack and tree commit p50 drop by at least 20% in paired, alternating --profile perf runs, with the numbers in the PR.
  • Rects, hit testing and paint positions equal a fresh layout's in the incremental fuzz.
How to check

The new counters join R0158, so a merge that brings back an O(nodes) pass fails. R0100 compares resolved targets, after any lazy delta is applied, with a fresh layout. R0245 gates the 0.5 ms figure. Headless numbers leave out GPU upload and presentation.

Depends on
Part of
  • Theme: T07
  • Tracked in R0541
  • Phase 2, milestone 2b · priority P2 · size M
R0345Layout: the triggers for a Rune-native solver have not been re-measured since LayoutStore landedP2Phase 2bMT07
layout-relayout-boundary-trigger · research
What happens

research/32 sets three conditions for building a Rune-native layout solver once its earlier phases land, measured on layout_text_cost with --profile perf and paired medians:

1. Taffy takes more than 30% of frame CPU and at least 1.0 ms on a 120 Hz workload. 2. Rootward dirty propagation costs at least 0.5 ms on localized edits inside fixed-size or scrolling containers. 3. Two or more full solves happen on more than 5% of commits in real traces.

LayoutStore (the retained Taffy store in rune-taffy) changed all three costs, and nothing has measured them since. Dirty propagation still runs to the root. When a leaf changes, flatten ORs its dirty flag into every ancestor, and sync_node clears each dirty slot's cache. So a leaf edit inside a scroll view or a fixed-size box clears the cache of every ancestor up to the window root.

Without fresh numbers, R0556 can't be judged worth its risk, and nobody knows which of the layout cost targets still fail.

Where
Why it matters

The target is that "a localized change costs layout work proportional to what it affects": each count at most the dependency closure plus moved-span roots, and the layout phase (flatten, solve, place, text) at most 0.5 ms p95 on the reference Mac. Relayout boundaries are the main change left that could stop a leaf edit at its container. They are also invasive. A note with numbers decides whether to build them, and keeps the project from replacing Taffy on a guess.

What would help

After R0341 and R0344 land, measure each condition with the counters from R0069 and paired, alternating --profile perf runs:

  • On layout_text_cost cases stack, tree, md-virtual and memo-chat.
  • On two scripted real-app traces, such as a chat with a composer and a settings page.
  • For condition 2, a leaf edit inside a scroller in a 5,000-node tree, counting spine cache misses and the time they cost.

Write the results as a new research note. It gives numbers for each condition, lists the layout cost thresholds that still fail, and gives a go or no-go for R0556 tied to those failures. Replacing Taffy is out of scope.

Done when
  • A research note gives measured numbers for each of the three conditions, with the machine, profile and run count.
  • It records spine cache misses for a leaf edit inside a scroller in a 5,000-node tree.
  • It lists which layout cost thresholds still fail after the earlier fixes.
  • It gives a go or no-go for R0556, based on those failures.
How to check

Review of the note. The counters behind it stay in the count budgets, so a later change that moves them shows up at merge. Headless figures leave out GPU upload and presentation, and the note says so.

Depends on
Part of
  • Theme: T07
  • Tracked in R0541
  • Phase 2, milestone 2b · priority P2 · size M
R0346Tools: --tree gives each element's rect but not its style, box model or the code that built itP2Phase 2bMT07
layout-tree-explain · feature
What happens

--tree and Runtime::elements report one ElementInfo per element. It has the rect, target, visible rect, opacity, colours, roles, focus and scroll state. It has no layout style, no padding, border or margin, no intrinsic or content size, no overflow state, and no source location. An agent that sees a box in the wrong place can't tell from the tree whether the cause is a padding, a missing min_h(0.0), a shrink, or a parent that overflows. It has to read the view code and guess.

Debug builds already record #[track_caller] sites for handlers such as on_pointer_move and on_hover. The element constructors row, col, el and text don't record one, so nothing ties a node back to the line that built it.

Where
Why it matters

Agents and people both debug layout from the tree. The target is that "layout explains itself to agents and people: resolved style, box model, source and misuse are visible and correct", for 100% of nodes in every gallery scene, with box values within 0.01 pt of Chromium.

What would help
  • Put #[track_caller] on the element constructors and record the site in a cold field in debug builds only. Release El and Node keep their sizes.
  • Add to each --tree node:
    • style: the resolved style as CSS text;
    • box: resolved padding, border and margin in pt, from the layout output;
    • content: min-content and max-content sizes;
    • overflow: overflows parent, clipped, scrolls;
    • source: file:line of the call that built it.
  • A node Rune generates, such as a scroll viewport's inner box, reports its owner's source with a generated tag.
  • A memo-reused node reports the source from the build that made it, so reuse doesn't hide where it came from.
Done when
  • In debug, 100% of --tree nodes for every kit gallery scene carry style, box, content, overflow and source.
  • On the parity corpus from R0331, box and content values equal Chromium's computed values within 0.01 pt.
  • The overflow flags agree with the layout lint on the gallery, once the lint exists.
  • A test checks the source line of one known element, one generated wrapper and one memo-reused node.
  • The size test shows El and Node sizes unchanged in release.
How to check

A T1 test runs --tree over the gallery and asserts every node has the fields. The parity lane checks the box and content values against Chromium. The size test guards release memory.

Part of
  • Theme: T07
  • Phase 2, milestone 2b · priority P2 · size M
R0347Layout: common flexbox mistakes lay out silently wrong without a warning that names the fixP2Phase 2bMT07
layout-misuse-diagnostics · feature
What happens

The rune README lists three flexbox gotchas. Debug builds warn about a collapsed scroll viewport inside a .grow() container, and about growth placed on a viewport or before a sibling. Other common mistakes lay out wrong with no warning:

  • A nested column without .min_h(0.0) overflows its parent instead of shrinking, so the scroll inside never scrolls.
  • A scroll viewport's content can never exceed it, because an ancestor sized itself to content.
  • w_full inside a max-content scroll child resolves against the content, because flatten turns an auto or full width there into max-content.
  • A percent height resolves to auto because no ancestor has a definite height, so it has no effect.
  • grow in a parent whose main size is auto has nothing to grow into.

The author sees a layout that looks broken and has to know CSS well enough to guess why.

Where
Why it matters

Agents and new authors hit these first, and each one costs a debugging loop with screenshots. The targets: "5 misuse rules that flag 50 of 50 seeded mistakes and 0 of 50 correct layouts, with 0 warnings on the gallery and examples", and misuse "reported at the call site with the fix".

What would help

Add five debug warnings, once per call site. Each names the element, the cause and the fix:

1. A nested column overflows a scroll viewport for lack of min_h(0). 2. A scroll viewport's height follows its content, so it cannot scroll. 3. w_full or a percent width inside a max-content scroll child. 4. A percent height with no definite ancestor height. 5. grow on a child whose parent's main size is auto.

Each warning fires only when the result differs from the author's likely intent: a test with the fix applied must change the layout. Use the resolved style and source location from R0346 so the message points at the code that built the element. List the warnings in the README beside the gotchas.

Done when
  • Each of the five rules has a test that fires on a seeded mistake and stays silent on the fixed version.
  • On a corpus of 50 seeded mistakes and 50 correct layouts, every mistake is flagged and no correct layout is.
  • Each message names the app's file:line and the fix.
  • The kit gallery and examples raise 0 warnings.
  • Release builds contain none of the checks.
How to check

T1 tests, and a gallery run with these warnings treated as errors.

Depends on
Part of
  • Theme: T07
  • Phase 2, milestone 2b · priority P2 · size M
R0348Virtual rows: nothing measures how far visible rows move while estimated heights are corrected during a flingP2Phase 2bST07
layout-virtual-correction-drift · infra
What happens

Rows a virtual_rows list has not visited take an estimated height. When a fling mounts them, layout measures their real height and corrects the estimate. The README says these corrections keep the visible key in place. The tests check this at rest: paging with a keyed anchor, and first showings with short or tall estimates.

Nothing measures, frame by frame, how far the row under the reader moves while a fling mounts rows whose real heights differ from the estimate. That movement is what a reader sees as a jump. A correction that leaks one or two points a frame into the visible rows looks like jitter in a long chat or log, even when every settled position is right.

Where
Why it matters

Chat histories, logs and feeds have rows of very different heights, and readers fling through them. The target is that "scroll containers match CSS and UIKit", with "anchoring error and drift <= 0.5 pt on every frame" and anchoring held "across estimate corrections". The 1M-row list target asks for row tops exact to 1/64 pt.

What would help

Add a motion-gate scenario:

  • A list of 100,000 rows with seeded heights from 20 to 200 pt.
  • Two runs: the estimate at 50% and at 200% of the mean height. The API takes one estimate per list, so the seeded spread gives each row its own error.
  • A recorded input trace that flings from the top to the bottom and back.
  • Each frame, take the row that was under a fixed probe point in the previous frame. Its drawn top must move by exactly the scroll displacement the input asked for in that frame. Drift is the drawn movement minus that displacement.

Add the scenario to scripts/motion-audit/scenarios/ and run it as a test through R0166. If it fails, fix the correction in Rune, not the scenario.

Done when
  • Drift is at most 0.5 pt on every frame, for both estimates.
  • The motion gate has no jitter or jump findings for the scenario.
  • The scenario runs in T1 with the motion gate.
How to check

The motion gate in T1 runs the scenario on every merge. A change to the correction path in R0336 or elsewhere that adds drift fails it.

Depends on
Part of
  • Theme: T07
  • Tracked in R0326
  • Phase 2, milestone 2b · priority P2 · size S
R0349Virtual rows: rows deep in a long list may sit on a coarse grid because positions are f32P2Phase 2bMT07
layout-virtual-f64-positions · bug
What happens

The scroll offset is f64, but most of the path to the screen is f32. measure_virtuals converts the offset to f32. The space above the mounted window is folded into the list column's top padding as f32 (v.before). Taffy lays out in f32, and node targets are [f32; 4]. So a row's drawn top is an f32 near the list's absolute extent.

f32 has 24 bits of mantissa. Its step is 1/64 pt only below 131,072 pt, about 5,500 rows of 24 pt. It is 0.5 pt from 4,194,304 pt and 2 pt from 16,777,216 pt, about 175,000 and 700,000 rows of 24 pt. At the end of a 1M-row list of 23.5 pt rows (23.5M pt), row tops snap to a 2 pt grid, so neighbouring rows would be drawn 22 or 24 pt apart.

The README says render coordinates are rebased near the window. The only rebasing in the code is the glide, which samples its displacement rather than the absolute offset. Nobody has measured what a deep list draws.

Where
Why it matters

Logs, captures and chat histories reach hundreds of thousands of rows. Rows that jitter, overlap or open gaps near the end look broken, and a click can land on the wrong row. The target is a 1M-row list with "row tops exact to 1/64 pt" (PLAN section 8), and scroll containers with "drift <= 0.5 pt on every frame".

What would help

Start with a test, and change code only if it fails.

1. Build 1M rows of 23.5 pt and scroll to the end. Assert that each mounted row's drawn top is exactly 23.5 pt below the previous one, and that the scroll position matches the f64 offset to 1/64 pt. 2. If it fails, lay the mounted window out relative to its first row. Keep the f64 base outside Taffy, as the scroll offset already is, and add it at paint and hit testing. The space above the window then never enters f32 layout.

The height index from R0336 should give row tops in f64, so the base itself is exact.

Done when
  • The test passes at 1M rows and at a 10M pt extent.
  • A 600-frame scroll strip at the end of the list has no jitter findings in the motion gate.
  • Hit testing at the end of the list lands on the row under the pointer.
How to check

The runtime test runs in T1. A motion-gate scenario that scrolls the end of the list keeps paint positions honest. Both stay as regression guards once the fix lands.

Depends on
Part of
  • Theme: T07
  • Tracked in R0326
  • Phase 2, milestone 2b · priority P2 · size M
R0350Virtual rows: any state change re-reads every row's key unless the app passes a versionP2Phase 2bST07
layout-virtual-state-change-key-scan · perf
What happens

When app state changes, window_tree checks that a virtual_rows list still has the same keys. If the count is unchanged and no virtual_rows_version is set, it calls key(state, i) for every row and compares each with the stored key. A 1M-row list pays 1M key calls, plus any allocation key makes, on every commit. That includes each keystroke in a filter field beside the list, which changes nothing in the rows.

The version opt-in is documented. Only one benchmark case sets it (memo-chat in layout_text_cost), and nothing tells an app that it needs one. #203 covers the separate cost when the row count changes.

Where
Why it matters

An app that follows the docs and builds a long list with virtual_rows gets a commit cost that grows with the list, for edits that never touch it. Typing next to a 100,000-row table lags, and nothing says why. The 1M-row target asks for list CPU p95 at most 1 ms fixed and 2 ms variable, and a filter that reads "each key at most once". The elision target is that "code in the documented style is fast without hand-written elision", including O(1) key calls when one row is appended to a 100,000-row list.

What would help
  • When the row source is a Versioned<T> collection from R0329, take the version from its generation automatically. For example, a virtual_rows overload that takes the Versioned source, so the app writes no version by hand.
  • In debug builds, add a perf_warn that names the call site when a list over 10,000 rows scans its keys on two commits in a row without a version.
  • Document the pattern in the virtual rows docs, next to #203's change for count changes.
  • Count key calls per commit with the counters from R0069.
Done when
  • A 20,000-row list with no version triggers the warning in a test, and stays silent with a version.
  • With a Versioned source, key calls are 0 per commit when an unrelated field changes.
  • The virtual rows docs show the versioned pattern.
How to check

Runtime tests in T1 cover the warning and the counter. A count budget on a scene with a long list and a text field beside it holds key calls at 0 per keystroke.

Depends on
Part of
  • Theme: T07
  • Tracked in R0326
  • Phase 2, milestone 2b · priority P2 · size S
R0351Input: a burst of queued keystrokes runs one full commit per key in a single frameP2Phase 2bMT07
perf-routed-key-commits · perf
What happens

frame_step drains the input queue in order. Before it routes a key, key-up, IME, paste, physical key or file drop, it commits if an earlier handler changed state. The commit resolves the new tree, so focus moves and newly mounted fields see the key. This is correct, but it means N keystrokes drained in one frame run up to N full commits. Each commit can run the view and measure up to nine times while virtual windows settle.

Keys queue up when a frame runs long: a slow machine, a large view, or a paste of typed text from an input method. The extra commits then make that frame longer still, so typing latency compounds instead of recovering.

Where
Why it matters

People notice when typed characters appear late or in bursts. The targets are "typing stays inside one frame in large documents", with p95 at most 1 ms at 50 KB, and input-to-present at most 8.3 ms p50 and 16.7 ms p95 at 120 Hz (PLAN section 8). Bounded commits ask for at most one view run in at least 99% of commits in each scene.

What would help

Batch only the case that is safe:

  • Consecutive queued text keys target the same focused field.
  • The handlers between them changed nothing except that field's edit.

Apply those keys to the field's TextEdit in order, run its callbacks in order, and commit once. In every other case, such as a focus move, a key that a handler consumes, IME composition, a paste or a validating on_change that changes other state, fall back to one commit per key as today.

The ordering rules in frame_step carry correctness, so the change needs a differential test, not only a speed test.

Done when
  • 10 queued text keys into one field commit once.
  • A randomized key script (text, IME, paste, key-up, focus moves, validating on_change handlers) gives the same final text, callback order, undo groups and focus with batching on and off.
  • Commits per frame for a 10-key burst are reported by the counters from R0069.
How to check

Runtime key tests and the randomized differential script run in T1. A count budget on a typing scene with a queued burst holds commits per frame at 1.

Depends on
Part of
  • Theme: T07
  • Tracked in R0325
  • Phase 2, milestone 2b · priority P2 · size M
R0352Layout: cold style setters free and re-box the whole Style on every callP3Phase 2bST07
layout-allocation-churn · perf
What happens

CompactStyle keeps common fields inline and moves the rest into a boxed taffy::Style. Once a style has cold fields, every cold setter goes through modify_cold. It moves the Style out of its box, changes it, and from_style boxes it again. That is one free and one allocation per setter call, for the size, padding, gap, grow, shrink, basis, aspect, margin, inset and grid setters.

.absolute(left, top) always goes cold, even for 0.0, because its left and top are lengths, not auto. .pin(..) goes cold for any edge it sets. So el().absolute(4.0, 4.0).w(10.0).h(10.0) allocates three times, while .w(10.0).h(10.0).absolute(4.0, 4.0) allocates once. There are over 200 .absolute( and about 50 .pin( call sites outside tests.

Two more paths allocate every pass. Each grid layout boxes a fresh DetailedGridInfo. Each LayoutEngine::with_capacity(0) placeholder, used in the mem::replace hand-offs, allocates a 64-entry child_scratch.

Where
Why it matters

Allocations cost time and spread the heap, and a rebuilt view sets styles on every element. The target is that "a localized change costs layout work proportional to what it affects", with the layout phase at most 0.5 ms p95 on the reference Mac. Setter order should not change what a view costs.

What would help
  • Change the boxed Style in place and refresh the inline words from it. Drop back to inline only when has_cold_fields becomes false.
  • Store grid info only when a reader asks for it (the debug overlay), and reuse its box otherwise.
  • Make the placeholder store allocation-free, with empty Vecs and no child_scratch capacity.
Done when
  • A test shows that any order of absolute, w, h and padding on one element allocates at most once.
  • Laying out the same grid 100 times allocates nothing after the first, unless grid info is requested.
  • A placeholder store allocates nothing.
  • compact_style_setters_match_taffy_style (crates/rune-taffy/src/tests.rs:148) passes.
  • The stack scene's allocation count drops, with the before and after numbers in the PR.
How to check

Allocation tests in T1 use the counting allocator. The count budgets hold the stack allocation count, so a setter that starts re-boxing again fails at merge.

Part of
  • Theme: T07
  • Tracked in R0541
  • Phase 2, milestone 2b · priority P3 · size S
R0353Layout: compaction clears every cached layout, including subtrees that did not changeP3Phase 2bST07
layout-compaction-locality · perf
What happens

The retained Taffy store compacts when live slots fall to a quarter of capacity and capacity is over 64. compact_with_root walks by_key.values_mut() in hash order, moves each live slot to a new array, and clears its layout cache. After compaction, the next commit solves every node again, including subtrees that survived unchanged.

This happens after a navigation that shrinks the tree. A sidebar that stays while the main pane goes from a 5,000-node page to a 50-node one loses its cache and is solved from scratch. The new slot order also follows the hash, not the tree, so siblings and children land far apart in memory.

Only some cache entries hold slot ids: the out-of-flow candidates in the cold cache fields. Those need remapping or clearing. The sizes and positions in the rest of the cache stay valid when a slot moves.

Where
Why it matters

The commit right after a navigation is the one people watch: the new page should appear in one frame. Re-solving an unchanged sidebar adds work to that frame for no change in output. The target is that "a localized change costs layout work proportional to what it affects", with each count at most the dependency closure plus moved-span roots.

What would help
  • Keep cache entries across compaction. Remap the entries that hold slot ids through the remap table, or clear only those.
  • Optionally, compact in post-order from the root through curr_children, so a subtree's slots stay together.
  • Add a counter for Taffy cache misses per commit, beside the counters from R0069.
Done when
  • After a navigation that keeps a 500-node sidebar unchanged and replaces a 5,000-node page with a 50-node one, the next commit has no Taffy cache misses in the sidebar.
  • A test shows that cache entries holding slot ids are remapped or cleared.
  • Differential tests against the baseline store pass.
How to check

rune-taffy tests cover the remap. A count-budget scene in T1 runs the navigation and holds sidebar cache misses at 0.

Depends on
Part of
  • Theme: T07
  • Tracked in R0541
  • Phase 2, milestone 2b · priority P3 · size S
R0354Layout: Taffy computes content sizes and compiles block layout that Rune never readsP3Phase 2bST07
layout-taffy-unused-features · perf
What happens

rune-taffy enables Taffy's content_size and block_layout features, and crates/rune enables them again on its own taffy dependency. Cargo unifies features, so both lines must change to turn either off.

With content_size on, the flex, grid and block algorithms compute content-size contributions on every pass. BoxLayout::from_taffy keeps only location, size and padding plus border, so Rune discards the result. No Rune builder sets Display::Block, so block layout is compiled but no app tree reaches it. research/32 planned dropping both features.

Where
Why it matters

Work Rune throws away still costs time in every layout pass. The targets are that "a localized change costs layout work proportional to what it affects", with the layout phase at most 0.5 ms p95 on the reference Mac, and that "per-frame work scales with what changed".

What would help

Measure first, then decide each feature on its own.

  • Run layout_text_cost (at least stack, md-resize and md-virtual) with each feature off, in paired, alternating --profile perf runs, and report medians.
  • content_size: confirm that neither Rune nor Taffy's own layout reads it when the feature is off. Scroll extents are the case to check. If outputs are unchanged, drop it.
  • block_layout: the two source plans disagree. One drops it if unused; the other keeps it. Recommended: keep it unless the measurement shows a gain and neither the HTML export nor a planned builder, such as grid templates, needs it. Record the reason either way.
Done when
  • The measured difference for each feature is in the PR.
  • Each feature is either removed from both Cargo.toml files or kept with the reason in a comment beside it.
  • No layout test changes output.
  • Differential tests against upstream Taffy and the parity lane pass.
How to check

The rune-taffy differential tests from R0102 run in T1 and catch a change in output. The parity lane against Chromium checks scroll extents and any block layout use.

Depends on
Part of
  • Theme: T07
  • Tracked in R0541
  • Phase 2, milestone 2b · priority P3 · size S
R0355Virtual rows: .virtualize keeps every off-window row's element alive between commitsP3Phase 2bST07
layout-virtualize-unmounted-els · perf
What happens

A .virtualize list gets all its children from the view, and mounts only the window. On each pass, every child outside the window moves into v.selection.unmounted, a HashMap<usize, El>. The map is cleared at the start of the next pass and filled again. Its only reader collects text from off-window rows, for a selection that extends past the window.

That costs one hash insert per off-window row on every pass, retries included. It also keeps the whole off-window row forest in memory between commits. Eager .virtualize rows have no row source, so unlike virtual_rows rows they can't be rebuilt on demand. The selection reader needs something kept, but it needs only text and order, not the El tree.

The overbuild warning already points large lists to virtual_rows.

Where
Why it matters

Apps use .virtualize for sidebars and lists of a few hundred to a few thousand rows, such as the 300-row sidebar in memo-chat. Each holds its full row forest after it settles. The 1M-row target asks for at most 64 B per row and "no allocation proportional to n" for an append. Keeping whole El trees per off-window row is far above that.

What would help
  • When an off-window .virtualize row is built, store a compact record of its selectable text and order, and drop the El at the end of the commit.
  • Retries inside the same commit, from R0337, keep the Els until the commit ends, so they still find their rows.
  • Update only the records of off-window rows that changed since the last commit, so hash inserts follow changes, not list length.
Done when
  • Heap after settle for a 2,000-row .virtualize list drops by at least 80% of the row forest's size, measured with layout_text_cost --mode heap on a new case.
  • Hash inserts per pass are at most the off-window rows that changed since the last commit.
  • Copying a selection across off-window rows passes its tests.
  • In-place retries still find their rows.
How to check

Selection tests run in T1. The heap number goes in the PR, and a count budget on the new case holds hash inserts per pass.

Depends on
Part of
  • Theme: T07
  • Tracked in R0326
  • Phase 2, milestone 2b · priority P3 · size S
R0356Text fields: caret, selection and field contracts fall short of native fieldsP1Phase 2bXLT08
text-fields-tracking · tracking
What happens

This tracks native-quality caret, selection and deletion in Rune's text fields, and the field contracts that notes, chat and code apps need. Today:

  • Editing keys follow the build target, not the platform the user is on.
  • Left and Right move in logical order, so they run backwards in right-to-left text.
  • Word motion and word delete stop only at ASCII whitespace.
  • The caret has no affinity: it always draws downstream.
  • Backspace deletes a whole grapheme.
  • Caret tests cover Latin text and emoji graphemes. None covers right-to-left, bidi or complex scripts, and no test records what a native field does.
  • A plain field reports pristine after typing.
  • Fields have no maximum length or input filter.
  • The caret does not blink. #54, an open pull request, adds a blink.

Seven field issues from app teams are open: #125, #126, #127, #128, #129, #173 and #180. Each fix is small and touches a different part of edit/. The corpus and run-time key platform come first, because the motion fixes need an oracle and a way to test each mapping on one host.

Where
Why it matters

Users notice a field that moves, selects or deletes differently from their platform's own fields. The targets: caret movement, selection and deletion are correct for bidi, complex scripts, CJK and emoji, follow the bindings of the platform the user is on, and pass 100% of cases under each mapping against that mapping's oracle. Text fields meet a fixed list of behavioural contracts, each with a passing test in rune and in kit TextInput, TextArea and TextField where it applies, and every listed issue is closed by a test that reproduces it.

What would help

The children below, in this order: R0108 and R0357, then the motion fixes (R0364, R0365, R0367, R0366) checked against the corpus, then the contracts (R0110, R0371, R0368, building on #54). The reused issues stay open here until a reproducing test closes each one. The field context menu and paste forwarding in the kit wrappers are tracked with the menu and kit work.

Done when
  • Every child issue is closed.
  • #125, #126, #127, #128, #129, #173 and #180 are each closed by a test that reproduces it.
  • 100% of a sourced caret corpus of at least 300 cases passes under the Mac, Windows and Linux mappings.
  • KeyPlatform is detected at run time in every build.
How to check

The caret corpus and field contract tests in cargo test -p rune -p rune-kit --features rune-kit/markdown.

Issues
Part of
  • Theme: T08
  • Phase 2, milestone 2b · priority P1 · size XL
R0357Text fields: no right-to-left, bidi or complex-script caret and selection tests, and no native oracleP1Phase 2bMT08
text-caret-corpus · infra
What happens

Caret, word and selection tests cover Latin text, plus grapheme stepping over ZWJ emoji, flags and skin tones. No field test covers right-to-left caret movement, bidi boundaries, Indic clusters, Thai word breaks or soft-wrap affinity. The only right-to-left case in the edit tests checks that a Hebrew pill chip has a positive width.

No test records what a native field does with the same keys. So nothing says what correct is, and the motion fixes for visual arrows, word motion, affinity and Backspace have nothing to pass.

Where
Why it matters

Users who write Hebrew, Arabic, Hindi, Thai or Korean, or mix them with Latin, notice a caret that jumps the wrong way or a selection that splits a cluster. The target: caret movement, selection and deletion are correct for bidi, complex scripts, CJK and emoji, and match the platform's own field, with 100% of cases passing under each mapping against that mapping's oracle. The verification target asks for every hard subsystem to have an obviously correct reference, with at least 256 cases for editor suites.

What would help

A data-driven corpus in crates/rune/tests/caret_corpus/, run by one test file:

  • Each case is (text, width, key sequence, KeyPlatform) and its expected (anchor, focus, affinity, caret line).
  • At least 300 cases: Hebrew, Arabic with marks, mixed bidi with numbers, Devanagari, Thai, Lao, Khmer, Hangul, CJK, ZWJ emoji, flags, keycaps, tabs and pills, including Backspace and Delete.
  • Mac-mapping expectations are recorded from NSTextView by a Swift script. Windows and Linux expectations are recorded from Chromium contenteditable by a Playwright script, run on Windows and on Linux, since Chromium follows each OS's editing rules. Where AppKit and Chromium disagree, each mapping follows its own oracle.
  • Each case names its source. The regeneration scripts are committed.
  • Cases the code fails today are marked with the issue that fixes them, and that list only shrinks. R0364, R0365, R0367 and R0366 each remove their entries.

The runner uses the internal KeyPlatform entry point from R0108, so all three mappings run on one host.

Done when
  • The corpus has at least 300 cases across the scripts above, each naming its source.
  • Every case not marked as a known failure passes under each of the three mappings.
  • The corpus runs in under 10 s in cargo test -p rune.
  • The Playwright script reproduces the committed Chromium expectations.
  • Once the motion fixes land, the known-failure list is empty.
How to check

The corpus test in cargo test -p rune. A test fails if a known-failure entry starts passing without being removed, so the list stays honest.

Depends on
Part of
  • Theme: T08
  • Tracked in R0356
  • Phase 2, milestone 2b · priority P1 · size M
R0358Fonts: each window, overlay and measuring thread registers and maps its own font collection before the first frameP1Phase 2bLT08
text-font-store · perf
What happens

Font directory discovery runs once per process, behind a OnceLock, and on Linux it runs fc-list. It runs on main, the first time a text system is built, before the first frame.

Each TextSystem::new then builds an unshared fontique collection (shared: false). It registers the bundled or app fonts, and maps and scans the symbol files and up to 16 CJK files. runtime_for builds one per window. Overlay::new builds one per overlay when the app calls App::overlay, before launch. measure() builds one more per thread that measures.

On one Mac, the matched files came to about 315 MB of virtual mappings per text system (Apple Color Emoji alone is 188 MB). That is address space, not resident memory. Its time cost has never been measured. research/13 warns that system font enumeration can take 50 ms or more and should stay out of startup.

Where
Why it matters

Every window and overlay pays the font cost again, on main, before it can draw. The targets: "0 discovery operations on main before the first frame. 1 collection per process, and each font file mapped once. A cold fallback face costs at most 2 ms on main." Launch must also meet PLAN's targets: Mac hello p50 at or below 150 ms and p95 at or below 200 ms. After the first frame, no fonts are registered on main.

What would help
  • One process-wide FontStore, Send + Sync, with one shared fontique collection and source cache. Every TextSystem and measure() reads from it.
  • Bundled and app fonts register synchronously, so the first frame can draw Latin text.
  • Discovery and the symbol and CJK registrations run on a worker after launch. The GPU prewarm thread is one candidate, in parallel with device creation.
  • On a miss, an OS cascade query picks the face: Core Text (which closes #209), DirectWrite or fontconfig. Each file is mapped once per process.
  • A text that needs a fallback before the worker is done waits only for that face, and the wait is counted. Drawing without it and laying out again later would change the text's size after it shows.
  • Each runtime keeps its own family settings over the shared store, so two windows can use different app fonts.
  • A builder method adds font bytes or a file while running, for #114. AppSpec is built as a literal, so it gets no new field.
  • Fallback order stays deterministic for goldens.
Done when
  • 0 discovery operations on main before the first frame (count test), and the launch trace shows them on the worker.
  • One collection per process with two windows, an overlay and a measuring thread (count test).
  • Each font file is mapped once per process (count test).
  • A cold fallback face costs at most 2 ms on main on the reserved Mac.
  • A second window's text system costs at most 1 ms.
  • Two windows with different family settings each draw their own fonts (test).
  • The first CJK text after launch draws correct glyphs with no frame over 8.3 ms.
  • Hello launch holds or improves on every launch lane.
How to check

Count budgets in T1 for discovery, registrations and mappings. The hello launch bench under --profile perf on the reserved Mac, as paired alternating runs compared by median.

Part of
  • Theme: T08
  • Tracked in R0558
  • Phase 2, milestone 2b · priority P1 · size L
R0359Overlays: each overlay builds a full text system at App::overlay time, before launch and whether or not it showsP1Phase 2bST08
perf-overlay-lazy-text · perf
What happens

App::overlay calls Overlay::new at once, during app setup. Overlay::new builds a full TextSystem through TextSystem::for_window before the overlay has a window, and whether or not it ever shows. That work runs on main:

  • it registers every bundled or app font into a new font collection;
  • it memory-maps up to 16 CJK fallback files and loads the symbol fonts into that collection;
  • it allocates a zeroed 2048 x 2048 alpha glyph page, 4 MiB.

The font directory walk is cached for the process, but each text system registers and maps its own copy of the collection. A tray or menu-bar app with several overlays (a popover, a HUD, a toast, a command palette) pays this once per overlay before its first frame, and keeps the memory while the overlays stay hidden.

Where
Why it matters

Launch and memory targets: 0 font discovery operations on main before the first frame, one font collection per process with each file mapped once, at most 1 MiB of text memory per extra overlay, and a text-free overlay adding at most 2 MiB in all. Mac hello launch p50 at or below 150 ms and p95 at or below 200 ms, with 0 fonts registered on main after the first frame and no Rune-caused task over 8.3 ms after it.

What would help

After R0358 gives the process one shared font collection:

  • Create an overlay's text system after on_ready, or on its first show if that comes first, over the shared store, so no fonts register at App::overlay time.
  • Allocate the first atlas page when the first glyph rasterizes, so a text-free overlay never gets one.

TextSystem holds Rc caches (crates/rune/src/text.rs:143), so it is not Send and cannot be built on a worker and moved. Do the slow part, the shared collection, off main through the font store, and build the cheap TextSystem shell on main. Optionally pre-shape the overlay's first view on idle after on_ready.

Done when
  • An app with 4 overlays launches within 2 ms of the same app with none.
  • No overlay TextSystem exists before on_ready (unit test).
  • An overlay's first show presents correct text within one frame of the show call, with no frame over 8.3 ms.
  • Each extra overlay adds at most 1 MiB of text memory, and a text-free overlay allocates no atlas page.
How to check

scripts/bench-startup.py with a 4-overlay variant of the hello app, paired against the plain app, by median. A unit test for the on_ready rule and an atlas page count test (Atlas::page_count). Footprint from procwatch.

Depends on
Part of
  • Theme: T08
  • Tracked in R0560
  • Phase 2, milestone 2b · priority P1 · size S
R0360Text: a character no loaded font covers can draw as blank space, so lost text is invisible to users and to testsP1Phase 2bST08
text-missing-glyph-visible · bug
What happens

When no face in the font stack covers a cluster, shaping maps it to glyph 0 (.notdef) of some face. Many fonts draw .notdef as nothing. In #209, clusters in seven scripts drew as blank space in mono text, so the text looked like it had extra spaces. Nothing in Rune detects these clusters. Nothing logs them, counts them or lists them in --tree. A user can't tell that text is missing, and an agent's tree snapshot shows the text as if it drew.

Where
Why it matters

Lost text that looks like white space is worse than a visible box. Users read a different sentence, and tests pass. The target: "An uncovered cluster draws a visible missing-glyph box, and whitespace and default-ignorables never count as missing." The coverage lane also needs a count of missing clusters, so it can report "0 missing clusters where the OS has coverage" without parsing pixels.

What would help
  • After shaping, find clusters that map to glyph 0 and are not whitespace or default-ignorable code points (ZWJ, ZWNJ, variation selectors, bidi controls and the rest of the Unicode list).
  • Draw a visible box for each one. Two options: a bundled last-resort face, or a box Rune draws at the cluster's advance. Recommended: the drawn box, sized to the em and stroked in the text colour, since a bundled face adds binary size and looks different per face.
  • Count missing clusters per frame and per text node.
  • List the missing code points per node in --tree, and warn once per code point in debug.
  • Expose the count to R0361.
Done when
  • An uncovered cluster draws a visible box (snapshot test with a fixture font whose .notdef is blank).
  • Spaces, ZWJ, ZWNJ and variation selectors never count as missing (test).
  • --tree lists missing code points per text node (tree test).
  • A debug run warns once per missing code point.
  • The coverage lane reads the count instead of parsing pixels.
How to check

Snapshot and tree tests in cargo test -p rune, in T1. The coverage lane in R0361 reads the count on every platform.

Part of
  • Theme: T08
  • Tracked in R0558
  • Phase 2, milestone 2b · priority P1 · size S
R0361Fonts: no test checks that every script and emoji the system covers draws, in colour, on each platformP1Phase 2bMT08
text-coverage-lane · infra
What happens

Font tests check the bundled fonts, a CJK fallback when one is installed, keyboard symbols and a few emoji. examples/text_coverage.rs shows emoji, math and alignment scenes for a person to look at. No test compares Rune's font choice with the OS's own cascade, and no test checks that each colour emoji format draws in colour.

Apps found the gaps on real installs instead:

  • #2: a keyboard symbol drew as tofu on stock Ubuntu (closed).
  • #45: fontconfig-managed fonts outside the scanned folders were missed on NixOS (closed).
  • #67: Japanese text on macOS fell back to PingFang HK instead of Hiragino Sans.
  • #102: default-presentation emoji drew as outlines when DejaVu covered them.
  • #103: COLRv1 emoji fonts drew nothing on Fedora 44.
  • #209: on macOS, text in a script with no fallback list draws nothing, though the system has a font for it.

Each was a different platform and font inventory. Only a lane per platform finds the next one before an app does.

Where
Why it matters

A user who writes in a less common script, or sends an emoji, sees blank space, boxes or the wrong locale's glyphs. The target: any cluster the operating system's own text stack draws, Rune draws, in the right locale's glyphs, and emoji draw in colour. That means 0 missing clusters where the OS has coverage, 100% family agreement for the four Han locales, 100% of the emoji sequences in the OS emoji font in colour except where VS15 asks for text presentation, each of the four colour formats in colour, and a visible missing-glyph box for an uncovered cluster.

What would help

A coverage corpus pinned to a Unicode and emoji version:

  • one sample cluster per Unicode script;
  • Han samples for ja, ko, zh-Hans and zh-Hant;
  • every RGI emoji sequence in the OS emoji font;
  • COLRv0, COLRv1, sbix and CBDT fixtures that must draw with more than one colour.

On each lane, count missing clusters through R0360, and compare the chosen family with the OS cascade: CTFontCreateForString on macOS and iOS, IDWriteFontFallback on Windows, FcFontSort on Linux. Run on R0161, R0162 and R0168 (Ubuntu, Fedora and NixOS images), each with its font inventory recorded, and on the web through R0062 against the bundled fallback set. The iOS simulator row joins when its lane exists. A bundled-font subset runs in cargo test -p rune.

Done when
  • Each lane reports missing clusters, family mismatches and colour failures, and fails above 0.
  • The four colour formats draw in colour from fixtures in cargo test -p rune, and on every lane where the OS ships them.
  • Results are committed as a dated table in the docs, with the Unicode version and font inventory per lane.
  • macOS, Windows and Linux lanes pass first; web and iOS rows follow.
How to check

The per-platform lanes on every merge, plus the bundled subset in cargo test -p rune. A new font bug report gets a corpus case before its fix.

Depends on
Part of
  • Theme: T08
  • Tracked in R0558
  • Phase 2, milestone 2b · priority P1 · size M
R0362Fonts: Windows and Linux route fallback through fixed lists for five script groups, not through the system's fallbackP1Phase 2bMT08
text-fallback-windows-linux · bug
What happens

Off macOS, Rune finds fallback fonts by file name. The lazy script fallbacks name font files for five script groups: Hebrew, Arabic, Devanagari, Bengali and Thai. Fixed lists also name the symbol, emoji and CJK files. Any other script draws only if a face loaded for another reason happens to cover it. #209 shows the result on macOS: seven scripts draw nothing although the system has a font for them. Windows and Linux use the same design.

The systems already answer this question. Windows creates a DirectWrite factory at launch for glyph rasterizing, and IDWriteFontFallback::MapCharacters returns the face Windows itself would use for a run. On Linux, Rune already runs fc-list for discovery, and FcFontSort with a charset gives the system's ordered fallback.

No one has recorded which clusters draw blank on a stock Windows or Linux install, so the size of the gap is unknown.

Where
Why it matters

A user writing Armenian, Georgian, Tamil, Ethiopic or Khmer on Windows or Linux sees blank space where their text should be. The target is that any cluster the operating system's own text stack draws, Rune draws, in the right locale's glyphs: "0 missing clusters where the OS has coverage", 100% family agreement for the four Han locales, and colour emoji.

What would help

1. Run the coverage corpus from R0361 on stock Windows 11, Ubuntu and Fedora images, with installed fonts and locale pinned. Commit the table of clusters that draw blank. 2. When no loaded face covers a cluster, ask the system: IDWriteFontFallback::MapCharacters on Windows, FcFontSort with a charset on Linux. Load the face it names lazily into the shared store from R0358, mapped once per process. 3. Keep the fixed lists only as a fast path for scripts they already cover, so existing picks and goldens don't move. 4. Keep the order deterministic, so goldens are stable on a pinned image.

Done when
  • A committed table lists the blank clusters per image before the change.
  • After the change, the coverage corpus draws 0 blank clusters on those images wherever the OS has a font.
  • The chosen family matches the OS answer for each corpus script, the four Han locales included.
  • A cold fallback face costs at most 2 ms on main.
  • Fallback order is the same across runs on a pinned image (test).
How to check

The coverage lane from R0361 on the pinned Windows 11, Ubuntu and Fedora images, run on every change under crates/rune/src/text.

Depends on
Part of
  • Theme: T08
  • Tracked in R0558
  • Phase 2, milestone 2b · priority P1 · size M
R0363Text: nothing measures how long a typed character takes to reach the screenP1Phase 2bMT08
text-typing-latency · infra
What happens

PLAN section 8 sets two typing targets. Event to presented frame at 120 Hz: p50 at or below 8.3 ms and p95 at or below 16.7 ms. Physical key to photon on the Mac photodiode rig: p95 at or below 35 ms, compared against AppKit on the same rig.

Nothing measures either. The long-note bench reports CPU time per keystroke, headless. FrameEncoded::presents_at returns the refresh the display link aimed a frame at, not when it reached the screen (#175). Rune records real present times through its Metal layer hook, but that module is crate-private. Key events carry no OS event time.

So a change that delays an edit by one frame, or a preedit update that waits an extra frame, shows up in no number.

Where
Why it matters

Typing is where people feel lag first. A note app can pass the CPU bench and still show each character a frame late. The target: a typed character reaches the screen as fast as in the platform's native field, with "event-to-present p95 at or below 16.7 ms and p50 at or below 8.3 ms at 50 KB on the 120 Hz Mac, and p95 no more than one refresh behind the native field on each machine. Key to photon p95 at or below 35 ms. An edit is applied in the first frame whose commit starts after its event."

What would help
  • Stamp each key and IME event with the OS event time. Convert it to the presentation clock: mach_absolute_time on Apple platforms, QueryPerformanceCounter on Windows, CLOCK_MONOTONIC on Linux.
  • Tag the frame whose commit applies the edit. Take its actual present time from #175, through the frame record in R0121.
  • Keep p50 and p95 typing latency as procwatch gauges and in --tree.
  • Add a typing script: 1,000 keystrokes at 10 per second, into a Rune field and into NSTextView or a Chromium textarea, on the reserved 120 Hz Mac, a Windows machine and a Linux machine.
  • Use the photodiode rig on the Mac for key to photon.
  • Add a T1 test that an edit lands in the first frame whose commit starts after its event.
Done when
  • Typing latency p50 and p95 can be read from --tree and procwatch in any run.
  • At 50 KB on the 120 Hz Mac: p95 at or below 16.7 ms and p50 at or below 8.3 ms.
  • On each reserved machine, p95 is no more than one refresh behind the native field.
  • Key to photon p95 is at or below 35 ms on the Mac rig.
  • research/27 has a dated table for 5 KB and 50 KB fields and a preedit update.
  • The T1 test fails when an edit's frame is deferred by one.
How to check

The T1 frame test runs on every merge. The typing script runs on the reserved machines for each change that touches text, edit or input, and its numbers go in research/27. Say what each number leaves out: the headless T1 test has no present.

Depends on
Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 2, milestone 2b · priority P1 · size M
R0364Text fields: Left and Right move in logical order, so the arrows run backwards inside right-to-left textP1Phase 2bMT08
text-visual-arrows · bug
What happens

Left and Right call prev_char and next_char. They step through grapheme boundaries in logical (memory) order. Inside a Hebrew or Arabic run, the logical next character sits to the left on screen, so Right moves the caret left. In mixed text such as "abc שלום 123", the caret jumps across the run at its ends. Shift-arrows extend the selection the same way, and Option- or Ctrl-arrows use prev_word and next_word, also in logical order.

The key handler already receives the field's layout, which it uses for Cmd-arrows. Parley 0.12, which Rune uses, has visual movement on a layout (Selection::previous_visual, next_visual and their word forms).

Where
Why it matters

An Arabic or Hebrew user presses Right and the caret goes left. Every native field on macOS, Windows, Linux, iOS and the web moves visually. The target: caret movement, selection and deletion are correct for bidi, complex scripts, CJK and emoji, follow the bindings of the platform the user is on, and match that platform's own field, with "100% of cases pass under each mapping, against that mapping's oracle".

What would help
  • Left, Right and their Shift forms use Parley's visual movement through the field's layout. Once R0185 lands, they go through its facade, so movement crosses paragraph layouts.
  • Option- or Ctrl-arrows use visual word movement, with the word boundaries from R0365.
  • With no layout (a field not yet laid out), fall back to logical order, as today.
  • Keep the pill and trailing-block rules that the handler checks before plain arrows.
  • Up and Down keep their goal column.
Done when
  • Corpus cases in Hebrew, Arabic and mixed text such as "abc שלום 123" pass for Left, Right, Shift-arrows and word arrows under the Mac, Windows and Linux mappings.
  • Results match each mapping's recorded oracle in R0357.
  • A field with no layout still moves in logical order (test).
  • Existing caret and pill tests pass.
How to check

The caret corpus from R0357, run in T1 on every merge.

Depends on
Part of
  • Theme: T08
  • Tracked in R0356
  • Phase 2, milestone 2b · priority P1 · size M
R0365Text fields: word motion and word delete stop only at ASCII spaces, so a CJK sentence or foo.bar(baz) is one wordP1Phase 2bMT08
text-word-motion · bug
What happens

prev_word and next_word scan for ASCII whitespace. Every other character counts as part of a word. So Option+Backspace in Japanese or Chinese deletes back to the previous ASCII space, which can be a whole paragraph. foo.bar(baz) is one word, so a developer can't step over foo.

Double-click uses Unicode word boundaries (UAX #29, through unicode-segmentation). So the keyboard and the pointer disagree on what a word is. UAX #29 alone also puts no boundaries inside CJK, Thai, Lao or Khmer text, which need dictionary breaks.

Where
Why it matters

A Japanese user presses Option+Backspace to fix one word and loses a paragraph. A code app's users can't move by identifier. The target: caret movement, selection and deletion are correct for bidi, complex scripts, CJK and emoji, follow the platform's bindings, and match its own field, with "100% of cases pass under each mapping, against that mapping's oracle".

What would help
  • Take word boundaries from one segmenter, shared by word arrows, word delete and double-click.
  • It needs dictionary breaks for CJK, Thai, Lao and Khmer. Two options:
    • Reuse the segmenter Parley already links for its text analysis, if it exposes word boundaries. No second set of data ships.
    • Add icu_segmenter with dictionary data. This costs binary size, which counts against the 5 MiB Mac hello and 3 MiB gzip web targets.
    • Recommended: the first, measured; fall back to the second with its size recorded.
  • Add each platform's rules on top. macOS Option-arrow skips punctuation runs. Windows and Linux Ctrl-arrow stops at word starts.
  • Keep the pill rules: a pill stays one word.
  • Secure fields keep jumping to the ends.
Done when
  • Option-Right through "東京都に住んでいます" stops where NSTextView stops.
  • "foo.bar(baz)" stops per each platform's rule under the Mac, Windows and Linux mappings.
  • Thai and Khmer corpus cases stop at dictionary boundaries.
  • Double-click and word arrows agree on every corpus case.
  • The binary size change is recorded in the PR.
How to check

The caret corpus from R0357, run in T1 on every merge, against each mapping's recorded oracle.

Depends on
Part of
  • Theme: T08
  • Tracked in R0356
  • Phase 2, milestone 2b · priority P1 · size M
R0366Text fields: Backspace always deletes a whole grapheme, so one press removes an Indic conjunct or a whole combining-mark stackP2Phase 2bMT08
text-backspace-granularity · bug
What happens

Backspace removes text back to the previous extended grapheme boundary (prev_char), and forward Delete up to the next one (next_char). This is right for ZWJ emoji, flags and skin tones. But one press also removes a whole Indic cluster with its vowel sign, or a letter with all its combining marks. Recent Unicode grapheme rules group more Indic conjuncts into one cluster.

Native fields are thought to delete less in some of these cases. A Hindi user can fix a vowel sign without retyping the consonant, and a Vietnamese user can remove one tone mark. But nobody has recorded the native behaviour on any platform, so Rune has nothing to match.

Where
Why it matters

Writers in Devanagari, Bengali, Thai and other complex scripts correct text one mark at a time in native fields. If Rune removes the whole cluster, they retype it each time. The target: deletion is correct for complex scripts, CJK and emoji, and matches the platform's own field, with "100% of cases pass under each mapping, against that mapping's oracle".

What would help

1. Record Backspace and forward Delete in NSTextView on macOS and iOS, and in a Chromium textarea on Windows and Linux. Cover Devanagari, Bengali, Thai, Hangul, letters with combining marks, ZWJ emoji, flags, keycaps and variation sequences. Write down the OS and browser version for each. 2. Add the recordings as cases in R0357, at least 30 per platform. 3. Give Backspace its own step function, separate from caret movement, per platform. Arrows keep moving by grapheme. Forward Delete keeps its own rule, which the recordings may show differs from Backspace. 4. Leave the block rules at a line start as they are: list outdent and quote or code reset.

Done when
  • Recordings for at least 30 cases per platform are in the corpus, with their source named.
  • Backspace matches each platform's recording (corpus tests).
  • Forward Delete matches each platform's recording (corpus tests).
  • Caret movement still steps by whole grapheme (test).
How to check

The caret corpus from R0357, run in T1 on every merge under the Mac, Windows and Linux mappings.

Depends on
Part of
  • Theme: T08
  • Tracked in R0356
  • Phase 2, milestone 2b · priority P2 · size M
R0367Text fields: the caret has no affinity, so at a soft wrap it always draws at the start of the next lineP2Phase 2bMT08
text-caret-affinity · bug
What happens

A byte offset at a soft wrap names two screen positions: the end of one line and the start of the next. At a bidi run boundary, one offset also has two x positions. Parley's Cursor carries an affinity to tell them apart.

TextEdit stores only byte offsets for anchor and focus. Every caret draw and caret query builds its cursor with Affinity::Downstream. So End on a wrapped line puts the caret at the wrap byte, and it draws at the start of the next line, not at the end of its own. A click past the end of a wrapped line does the same.

Click hit-testing already reads the affinity Parley returns, to pick the cluster. That value is then dropped.

Where
Why it matters

A user presses End on a wrapped line and the caret jumps to the next line. Typing then looks like it lands in the wrong place, and an IME candidate window opens on the wrong line. The target: caret movement and selection are correct for bidi, complex scripts, CJK and emoji and match the platform's own field, with "100% of cases pass under each mapping, against that mapping's oracle".

What would help
  • Add a private caret affinity to TextEdit. It is private, so apps that build TextEdit don't break.
  • End, clicks and Up/Down set it. A click takes the affinity hit-testing already returns.
  • Caret paint, the caret rect, single-line scroll and the IME caret rect the platform input protocol asks for all read it.
  • Any edit, and any horizontal arrow except End, resets it to downstream.
  • Hidden secure fields ignore it.
Done when
  • End on the first line of a wrapped paragraph draws the caret at that line's end x (test).
  • A click past the end of a wrapped line draws the caret on that line (test).
  • Typing after End inserts at the wrap and the caret follows the text (test).
  • The IME caret rect matches the drawn caret at a wrap (test).
  • The bidi boundary cases in R0357 pass.
How to check

The caret corpus from R0357 and caret snapshot tests, run in T1 on every merge.

Depends on
Part of
  • Theme: T08
  • Tracked in R0356
  • Phase 2, milestone 2b · priority P2 · size M
R0368Text fields: the caret never blinks, and no system caret setting is readP2Phase 2bST08
text-caret-blink · feature
What happens

At this commit, a focused field draws its caret solid for as long as it has focus. Open PR #54 adds a blink: a fixed 0.5 s phase that restarts on input, stops in unfocused windows and under reduced motion, and rests after 60 s.

The PR does not read the system's blink settings. Windows has a caret blink time, which can be set to never blink. GNOME has cursor-blink and cursor-blink-time. macOS reads NSTextInsertionPointBlinkPeriodOn and NSTextInsertionPointBlinkPeriodOff from user defaults. Apps also can't turn the blink off, which a terminal-style or kiosk app may want.

Where
Why it matters

A solid caret is harder to find on a busy screen, and every native field on each platform blinks by default. Users who turned blinking off, often for motion sensitivity, expect it to stay off. The target: text fields meet a fixed list of behavioural contracts, "every contract has a passing test in rune and in kit TextInput, TextArea and TextField where it applies".

The blink also has a cost. A focused field is no longer free at rest: about 2 presents a second.

What would help

1. Land PR #54. 2. Read the system rate and off setting at launch and when they change: the caret blink time on Windows, the GNOME settings on Linux, the user defaults on macOS. iOS and the web keep the default rate. 3. Add an App builder method that turns the blink off. AppSpec is built as a literal, so this is a builder, not a new field. 4. Keep the cost small: damage only the caret's rect, stop in inactive and hidden windows, and stop after the rest timeout. 5. Add a motion-audit scenario for the blink, as every motion change needs.

Done when
  • A focused idle field presents at the system blink rate and no faster (frame-count test with a fake setting).
  • With the system setting off, a focused field presents nothing at rest.
  • The App builder turns the blink off (test).
  • Typing restarts the solid phase (motion-audit scenario).
  • Each blink damages only the caret's rect (test).
  • The kit TextInput, TextArea and TextField wrappers pass the same contract.
How to check

A frame-count test in T1 with a fake system setting, and a blink scenario in scripts/motion-audit, run on every merge.

Part of
  • Theme: T08
  • Tracked in R0356
  • Phase 2, milestone 2b · priority P2 · size S
R0369Text: the CoreText pixel tests accept ink ratios from 0.75 to 1.25, too loose to catch a weight regressionP2Phase 2bST08
text-coretext-bounds · infra
What happens

pixel_compare_tests renders Rune's text and compares it with the committed CoreText reference sheets. Its own comment calls the bounds loose: they catch a broken pipeline (missing glyphs, wrong blend, shifted rows), not the distance to CoreText. With font smoothing on, a row passes with an ink ratio anywhere from 0.75 to 1.25. With smoothing off, the range is 0.9 to 1.1. A row may also have up to 45% of its pixels more than 8 levels off and a mean error up to 25 levels (20% and 8 levels for whole-region cases).

The CHANGELOG reports a mean error of 0.06 levels at 2x and 0.10 at 1x on the report paragraph. The bounds sit far outside what the pipeline does today, so a change that thins or thickens Inter by 20% still passes.

The tests also return early and print skipped when no GPU adapter is found, and they compile only on macOS. A machine without a GPU shows them green.

Where
Why it matters

PLAN.md names text quality as its first risk: "text that's a shade thinner than CoreText reads as cheap" (PLAN.md:526-528). A Mac user notices a weight change across a whole app at once. The target is "Ink ratio 0.97-1.03 and MAE at most 0.5 levels per platform, scale and theme". The lanes must run "with 0 skips for the resources each lane declares". Today the only end-to-end CoreText check can neither see a 20% change nor fail on a machine that lacks a GPU.

What would help

1. Run both tests at HEAD and record each row's ink ratio, over-8 share and mean error. The test already prints them with table. Put the numbers in crates/rune/tests/coretext/README.md. 2. Set the bounds from those numbers plus a margin: ink 0.97-1.03 with smoothing on and off, over-8 share under 2%, and mean error at the measured value plus a small margin. If a row cannot meet 0.97-1.03 at HEAD, give it its own bound at the measured value plus 0.01 and note it for R0561. Don't keep the wide bound. 3. Add a test-only option that dilates Rune's outlines by 5%. Add a case that must fail with it on. 4. Let the lane require a GPU. When the lane says it has an adapter (the switch R0161 sets), a missing adapter fails the test. On that lane, run scripts/coretext-reference.sh before the tests so the SF and SF Mono sets run too.

Done when
  • Each row's bound is within 3% of its measured ink ratio, and the measured numbers are committed.
  • The over-8 share bound is under 2% for every row that meets it at HEAD.
  • A 5% dilation makes the test fail (test).
  • On the macOS GPU lane, the Inter, SF and SF Mono comparisons all run, with 0 skips.
How to check

cargo test -p rune text::pixel_compare on a Mac with a GPU, plus the dilation case. The macOS lane from R0161 runs it on every push to dev and fails on a skip.

Depends on
Part of
  • Theme: T08
  • Tracked in R0559
  • Phase 2, milestone 2b · priority P2 · size S
R0370Text: a run whose fallback font carries a trak table shapes the whole text a second timeP2Phase 2bST08
text-double-shape-trak · perf
What happens

Before shaping, layout_keyed predicts each style range's tracking from the trak table of the range's first font. After shaping, it walks every run. It compares the tracking that run's actual font needs with the tracking the run got. If any run differs by more than 1e-4, it builds and shapes the whole layout again with exact per-run spacing.

On macOS the system font comes first among the symbol fallbacks, and it carries a trak table. So text in Inter or another app font with a symbol that falls back to SF (a keyboard symbol in a shortcut label or a menu item) is shaped twice. The second build repeats the whole text, not only the mismatched run. shaped counts it once, so no count shows the cost today.

research/32 estimates the whole item (a resolved-style cache, the style_run_builder switch and the single-build trak) at 1.5 to 2.5 ms off md-open. It also estimates 40% to 50% off mixed-script and emoji text that double-shapes today. Those numbers are estimates, not measurements.

Where
Why it matters

Shortcut labels, menus and command palettes are full of these symbols. Each such label costs a second shaping when it mounts, which is when frames are tightest. The targets are "At most 4 ms of text work on main in any first-mount frame" and "Zero Rune-caused tasks over 8.3 ms after the first frame on the reference Mac, Windows and Linux machines". Typing must stay inside its budget too, "p95 <= 1 ms at 50 KB". A field with one fallback symbol shapes twice on every keystroke.

What would help

There are three options.

  • A. Predict the fallback before shaping (recommended). For each non-ASCII character the primary font's cmap lacks, find the first family in the stack that covers it. Use the same order as with_symbols. Feed that font's tracking into exact for the first build. Cache the result per font and character. ASCII text skips the step. Keep the second build only for a missed prediction, and count it in a new reshaped counter beside shaped.
  • B. Patch the mismatched runs after shaping. Parley's public API cannot reshape one run or change advances before line breaking, so this needs Parley changes.
  • C. Do research/32 item 9 in full. That means a resolved-style cache and style_run_builder instead of ranged_builder. It saves setup and allocations, but on its own it does not remove the second build.

Do A first. C can follow as its own change with its own md-open gate.

Done when
  • A shortcut label with a symbol the app font lacks, drawn in Inter on macOS, builds once: reshaped stays 0 (count test).
  • Glyph ids and positions are bit-identical to today's two-pass result on a corpus of labels, prose, CJK and emoji (test).
  • reshaped is exposed to the count budgets, and a prediction miss is a test failure on the corpus.
  • md-open CPU time before and after is recorded with --profile perf, as paired, alternating runs by median.
How to check

The count and bit-identity tests in cargo test -p rune text tests. crates/rune/src/text/core_text_tests.rs keeps checking tracking against Core Text on macOS.

Part of
  • Theme: T08
  • Tracked in R0560
  • Phase 2, milestone 2b · priority P2 · size S
R0371Text fields: there is no maximum length or input filter, so an app must trim the text after each editP2Phase 2bMT08
text-field-max-length · feature
What happens

TextEdit and text_input have no maximum length and no hook to filter what is typed. Say an app limits a name to 64 characters, or wants a field that takes only digits. It must trim the text in on_input_change after the edit has landed. That trim is a second change. It can move the caret, split the undo step in two, and, while an input method is composing, break the composition.

Every insert already passes through one place. Typing, paste and IME commit each call TextEdit::sanitize before replace or insert. Today that step drops control characters in single-line fields and folds CRLF in multi-line ones. Nothing an app supplies runs there.

Where
Why it matters

Forms, chat composers with a character limit, and number and code fields all need this. A native field enforces it with no visible flicker and keeps one undo step. The target is "Every contract has a passing test in rune and in kit TextInput, TextArea and TextField where it applies". A trim after the edit fails that contract: the caret jumps, Cmd+Z takes two presses, and a Japanese or Chinese composition can be cut mid-word.

What would help

Add two builder methods on TextEdit, applied inside sanitize or right after it:

  • max_chars(n): a limit in grapheme clusters, counted after the replacement. When a selection is replaced, the removed text no longer counts. An insert that would pass the limit keeps only the graphemes that fit. A base character and its combining marks stay whole. A grapheme is never split.
  • filter(f): a closure that maps the incoming text to the text that lands. Examples are digits only, or uppercase.

Both apply to typing, paste and IME commit, and the trimmed insert lands as one undo step. The preedit is never cut or filtered while composing; the limit applies to the commit. Programmatic writes through TextEdit methods (replace_text, insert) are not filtered, and the docs say so. Kit TextInput and TextArea forward both. A new builder method keeps app literals building, and TextEdit is not one of the types apps build as literals.

Done when
  • Typing, paste and an IME commit past the limit insert only up to it, as one undo step (tests).
  • Replacing a selection counts the removed text before the limit applies (test).
  • A grapheme with combining marks at the limit is kept whole or dropped whole (test).
  • A digits-only filter drops letters from a paste and leaves the caret after the last inserted digit (test).
  • The preedit is never cut while composing, and the commit is limited (replay test).
  • Kit TextInput and TextArea forward both, with one test each.
How to check

Unit and IME replay tests with the other edit tests in cargo test -p rune -p rune-kit --features rune-kit/markdown. The field contract list under R0356 gets these two contracts.

Part of
  • Theme: T08
  • Tracked in R0356
  • Phase 2, milestone 2b · priority P2 · size M
R0372Text: past 65,535 spans the ink index wraps, so later spans take earlier spans' colours, and layout cache hits are never checkedP2Phase 2bST08
text-ink-overflow · bug
What happens

Each span's colour travels through Parley as a brush, Ink(i as u16 + 1). Here i is the span's index, and 0 means the element's own colour. A text with more than 65,535 spans hits two failures. In debug builds the add overflows and panics at index 65,535. In release it wraps: span 65,535 draws in the element's own colour, span 65,536 in span 0's colour, and so on. A large syntax-highlighted file in one text reaches this count. From that point on, tokens silently draw in other tokens' colours.

Separately, the layout cache trusts its 64-bit key. On a hit, layout_keyed returns the cached layout without checking it against the text. Each entry stores a cost and a shape key, but no text length and no span digest. The hasher is fast and non-cryptographic, and its comment says it avoids only accidental collisions. If two texts ever collide, one draws the other's glyphs, and nothing notices.

Where
Why it matters

Code viewers, diffs and logs are where apps put the most spans. Wrong colours there look like a highlighting bug, and nothing reports them. A cache alias would show the wrong text, the worst kind of text bug. The target is "0 aliased spans or layouts, in release" with "Every text cache ... bounded in entries and bytes, and no input makes text alias other text".

What would help

1. Merge adjacent spans with equal style before indexing. This cuts the count for runs of plain tokens, and it is cheap. 2. Widen the brush index to u32. Ink is public, so this changes a public type: add a changelog/unreleased/ entry. Index overflow at u32 cannot happen within a text's byte length limits. 3. Verify every cache hit, in every build. Store the text length and an independent digest of the spans in each Entry, and compare them on a hit. To rule out a text collision too, there are two options:

  • Compare the text bytes (recommended). Keep the paragraph text with the entry and memcmp it on a hit. The scan costs about the same as the hash already computed each commit, and the copy is small next to a layout's estimated 64 bytes per text byte.
    • Add a second independent 64-bit hash. It needs no extra memory but leaves a 2^-128 chance of an alias.

Either way, a mismatch is a miss: shape again and replace the entry.

Done when
  • Texts with 65,535, 65,536 and 100,000 distinct spans in one paragraph draw every span in its own colour, in debug and release (tests).
  • A forced key collision, injected through a test-only key override, reshapes instead of aliasing, in release (test).
  • Verifying a hit adds at most one scan of the paragraph (count test).
  • The changelog entry for the Ink change exists.
How to check

Unit tests in cargo test -p rune text tests, run in debug and with --release. R0376 keeps the 100,000-span code view in its seeded run.

Part of
  • Theme: T08
  • Tracked in R0560
  • Phase 2, milestone 2b · priority P2 · size S
R0373Text: a new glyph builds two scalers and is rasterized on main inside the frame that first shows itP2Phase 2bST08
text-raster-prewarm · perf
What happens

Glyph masks are rasterized on the main thread, in paint, the first time a glyph is drawn at a given key. On a miss, glyph_emit builds a swash scaler at the glyph's size, only to check for a colour glyph. If the glyph is not colour, the CoreGraphics-matching pipeline builds a second scaler at units-per-em to extract the outline. That happens on every platform except the Windows DirectWrite path, and that path still builds the first scaler. So each new glyph pays for two scaler builds.

The cost shows up when a view opens. research/33 measured 9 ms of first-time glyph rasterization in a chat app's first paint. PLAN.md records an earlier stall of about 13 ms from unseen glyphs in the first frame. Rune already prewarms the GPU on a background thread, but nothing prewarms glyphs. So the first sheet, card or conversation opened after launch rasterizes its ASCII glyphs on main too.

Where
Why it matters

A user opens a sheet or a new conversation and its first frame stutters. That frame is the one they watch. The targets are "A cold fallback face costs at most 2 ms on main. At most 4 ms of text work on main in any first-mount frame" and "Zero Rune-caused tasks over 8.3 ms after the first frame". The cold first paint must also stay fast: "Mac hello p50 <= 150 ms, p95 <= 200 ms".

What would help

1. One scaler per new glyph. Decide colour from the font's tables (COLR, CBDT, sbix), cached per font. Build the upem scaler only for outlines, and the sized scaler only for colour glyphs. 2. Measure first. Record cold first-paint and later-open rasterization time on main, before and after, in research/33. 3. Prewarm after `on_ready`. Rasterize printable ASCII for the sans and mono slots at the theme's common text sizes. Use the window's scale, the theme's foreground luminance bucket and each subpixel step that ppem uses. Insert into the atlas. There are two ways to run it:

  • On main in idle frames, at most 2 ms per frame (recommended first). It reuses today's rasterizers and atlas unchanged.
    • On a worker, inserting finished masks on main. This frees main entirely. It belongs with R0698, since DirectWrite and the atlas need thread-safe access first.

The cold first paint itself is R0698's.

Done when
  • One scaler is built per new glyph (count test).
  • research/33 records cold first-paint and later-open rasterization time on main, before and after.
  • A later open of a view in the theme's common sizes rasterizes 0 prewarmed ASCII glyphs on main, and under 1 ms of glyph rasterization in total (count test, and a --profile perf measurement).
  • Prewarm never takes more than 2 ms of any frame, and it starts only after the first frame.
How to check

A glyph-raster count budget in cargo test -p rune: scalers built per new glyph, and glyphs rasterized on main by a view opened after prewarm. Frame timings come from --profile perf runs, paired and alternating, by median.

Part of
  • Theme: T08
  • Tracked in R0560
  • Phase 2, milestone 2b · priority P2 · size S
R0374Text: empty-glyph atlas entries, trak tables and per-weight maps are never prunedP2Phase 2bST08
text-unbounded-caches · bug
What happens

Three text maps grow without a bound.

1. Empty glyph entries. A glyph with no ink (a space, or a mark that rasterizes empty) is stored in the glyph map as None, keyed by font, size, subpixel phase, variation and pipeline. When an atlas page is evicted, evict_page drops the entries placed on that page but keeps every None entry, in both the glyph and icon maps. Nothing else prunes them. A size or variation animation creates new keys each frame, so the map grows for as long as the animation runs. 2. `trak` tables. Traks caches each font's trak table, keyed by blob id and face index, with no bound. It grows with every face the text system ever loads, including fonts an app registers at run time. 3. Primary maps. primary_traks and primary_axes are keyed by family, the weight's f32 bits and italic. A weight animation passes a new weight each frame, so both maps add an entry per frame.

Where
Why it matters

Animated type is a SwiftUI staple: a title that grows as a sheet expands, or a weight that springs on press. Each animation leaks a little memory per frame, and a long-running app never gets it back. The targets are "Every text cache is bounded in entries and bytes" and "Every cache stays within its entry and byte bounds", with "Drift <= 2 MiB" for the process.

What would help

Bound each map in entries and in bytes, and evict the least recently used by frame age:

  • None glyph and icon entries: 16,384 entries. Also prune None entries not used since the last page eviction when a page is evicted.
  • trak tables: 256 entries and 1 MiB of table bytes.
  • primary_traks and primary_axes: 1,024 entries each. Quantizing the weight key (for example to 1/100 of a unit) also keeps an animation from adding a key per frame without changing what draws.

Report each map's entries and bytes to procwatch gauges, so a running app shows them.

Done when
  • A 10-minute size and weight animation keeps every map under its entry and byte bounds (stress test).
  • An evicted page leaves no None entry older than the eviction (test).
  • Glyph output is unchanged with the bounds on (existing text tests pass).
  • Gauges report each map's entries and bytes.
How to check

R0376 drives the animation and checks the bounds every 100 frames, with one fault case per map. Unit tests in cargo test -p rune cover eviction.

Part of
  • Theme: T08
  • Tracked in R0560
  • Phase 2, milestone 2b · priority P2 · size S
R0375Text: the shaping scratch keeps the buffers of the largest text it ever shaped, and the stale budget undercounts layoutsP3Phase 2bST08
text-layout-scratch · perf
What happens

Each TextSystem keeps one Parley LayoutContext for its whole life. Only the uncached path, used for redacted text, swaps in a fresh context and puts the shared one back after. The context holds HarfRust's buffer and the shaping scratch, and they keep the room they grew into. research/31 found HarfRust's buffer at 4.3 MB after a 50 KB field. The same 50 KB field held 13.8 MB of Parley in all, about 270 bytes per byte of text. So after a user closes a large note, the window keeps megabytes of scratch it will not need again.

The stale-layout budget also undercounts. It charges 64 bytes per text byte plus 2 KB. Its own comment says fresh layouts hold 35 to 90 bytes per byte. research/31 measured 76 bytes per byte for short labels and about 270 for a 50 KB field. The 3 MiB budget applies separately to three caches (layouts, elisions and runs), so up to 9 MiB is charged. If large layouts hold 270 bytes per byte, the real stale heap can be about four times what is charged.

Where
Why it matters

A notes app opens a long note, closes it, and should drop back to its idle footprint. Today it keeps the high-water mark for as long as the window lives. The targets are "Every text cache is bounded in entries and bytes" and "Every cache stays within its entry and byte bounds", with "Pools at baseline within 5 s of the last blur" and "Drift <= 2 MiB" for memory.

What would help

1. After shaping a text over 64 KB on the cached path, replace the LayoutContext at the end of that frame. Parley has no shrink call, so replacing it is the way to give the room back. A fresh context costs a few small allocations on the next layout. 2. Use one stale budget per TextSystem across layouts, elisions and runs, not 3 MiB each. 3. Measure the heap layouts hold at HEAD with procwatch on long_note at 5, 50 and 200 KB. If the per-byte estimate is off by more than 25%, estimate cost from the layout's glyph, cluster and line counts instead, which the layout already knows.

Done when
  • After a 200 KB field closes and its entries age out, text heap is within 1 MB of its earlier baseline, with no further text shaped (procwatch test).
  • The three caches share one stale budget (test).
  • The stale-layout estimate is within 25% of measured heap on long_note at 5, 50 and 200 KB, and the numbers are recorded in research/31.
  • long_note type_mid p95 does not regress, from --profile perf paired runs by median.
How to check

A procwatch heap test in cargo test -p rune, plus the long_note memory case. R0376 keeps the budgets checked every 100 frames.

Part of
  • Theme: T08
  • Tracked in R0560
  • Phase 2, milestone 2b · priority P3 · size S
R0376Text: no stress test checks text memory and correctness under animation, huge spans, theme switches and random editsP2Phase 2bMT08
text-stress-gate · infra
What happens

Rune's text caches are each tested on their own. These include the shaped layouts, elisions and runs, the glyph and icon maps, atlas pages, colour glyphs, trak tables, the per-weight primary maps, and kit's syntax and Markdown budgets. Nothing runs them together under the inputs that grow them. Those inputs are size and variation animation, a large highlighted code view, theme switches across the luminance buckets, and long random edit sessions with IME.

The layout budget counts only entries not used in the last two commits. Nothing measures the working set, what mounted content holds. So a cache that grows with every animation frame or every theme switch goes unseen. The only seeded random-edit test checks marks and blocks in a rich model. It does not drive layout, glyphs or the IME.

Where
Why it matters

A notes or code app runs for hours with animated text, theme switches and a large highlighted file open. Unbounded growth shows up as memory that never comes back, and a wrong colour or a broken undo shows up as a bug no unit test hit. The targets are "Every cache stays within its entry and byte bounds" and "0 aliased spans or layouts, in release", "Drift <= 2 MiB", and "100 of 100 steps kept at 1 MB" for undo.

What would help

Add one seeded, headless stress test of 20,000 frames. It drives:

  • size and weight animation on a paragraph;
  • a 100,000-span code view;
  • theme switches across the five luminance buckets;
  • a random TextEdit session with typing, paste, undo, redo and IME preedit and commit.

Every 100 frames it checks each cache: layouts, elisions, runs, glyph and icon maps, atlas pages, colour glyphs, trak tables, the primary maps, and kit's syntax and Markdown budgets. Entries not used in the last two commits must stay within their entry and byte bounds. The working set must stay within what mounted content can hold, and it is reported. The edit session checks the model's invariants and that undo then redo gets back the same text and marks.

Each cache gets a test-only switch that removes its bound, and one case per switch must fail. Cache sizes and the working set go to procwatch gauges so the same numbers show in a running app.

Done when
  • The test runs in cargo test -p rune in under 60 s in debug.
  • Turning off any one cache's bound makes it fail (one case per cache).
  • Every 100 frames, each cache is within its bounds and the working set is reported.
  • The edit session's invariants and undo round trips pass for the whole run.
  • Cache sizes and the working set are reported as procwatch gauges.
How to check

The test itself, in cargo test -p rune, on every lane that runs the rune tests. A new text cache must add its bound and its fault case to this test.

Depends on
Part of
  • Theme: T08
  • Tracked in R0560
  • Phase 2, milestone 2b · priority P2 · size M
R0377Web: the focused hidden field is labelled 'Text input', so a field's own name and state never reach a screen readerP0Phase 2bMT09
text-web-field-a11y · bug
What happens

On the web, every Rune field shares one hidden textarea, and every secure field shares one password input. While a field is edited, one of them holds DOM focus. Their aria-label is fixed at "Text input" or "Password input". The field's own name, description, placeholder, multi-line, read-only, required and invalid state never reach them. The accessibility mirror skips input nodes entirely, so nothing else describes the field. Unfocused fields do not exist for a screen reader at all.

#109 found that "Email address" never reaches its field. The textarea also holds only a 512-unit window of the text, so a screen reader reading by line stops at the window's edge in a long field.

Where
Why it matters

Screen-reader users hear "Text input" for every field and cannot tell a login form's fields apart. The targets: "the web's focused element carries the field's own name and sits on the field's rect outside composition"; "100% of reader steps pass on each platform, including reading every line of a 1 MB field on the web through the sliding window"; each field carries "its own name" and "required and invalid states with an error relation"; and "secure fields expose nothing beyond what the platform's native secure field exposes".

What would help

1. Send the field's accessible name, description, placeholder, multi-line, read-only, required and invalid state with each sync, from the field's AccessKit node. 2. The bridge sets aria-label, aria-describedby (pointing at a hidden element holding the description), aria-placeholder, aria-multiline, aria-readonly, aria-required and aria-invalid on the focused sink, and clears them on blur. Set them before focus moves, and keep the element focused, so iOS keeps the soft keyboard open (#165). 3. The sink sits on the field rect outside composition, as R0119 places it. 4. Unfocused fields appear in the mirror as role="textbox" items with their name and value. A secure field's item never carries its value. Activating an item focuses the field. The focused field's item is hidden, so it is announced once. When #118 lands, the generated mirror carries these items. 5. When a screen reader moves the caret to the window's edge, the runtime slides the window and keeps the reader's position, so reading by line reaches the end of the field.

Done when
  • A Playwright accessibility snapshot shows the field's own name and state on the focused sink, for a plain, a multi-line and a secure field.
  • #109's "Email address" field is named "Email address", with its required and invalid states.
  • An unfocused field is listed and focusable, and a focused field appears once.
  • No secure value appears in a mirror item or sink attribute (test).
  • The attributes clear when focus leaves the field (test).
  • Moving by line from the start to the end of a 1 MB field reaches every line (Playwright, through the textarea's selection).
  • VoiceOver with Safari and NVDA with Chrome announce the field's name on focus.
  • The iOS soft keyboard stays open across a focus change between two fields on WebKit.
How to check

Web mirror tests in T1 and a Playwright snapshot step in scripts/web-input-smoke.mjs on the web lane. VoiceOver and NVDA steps run on the screen-reader lanes.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2b · priority P0 · size M
R0378Text fields: a right-click on a field opens no Cut, Copy, Paste or Select All menuP1Phase 2bMT09
text-field-context-menu · feature
What happens

Rune has a selection menu, but it opens only for selectable text that is not an input: is_selectable returns false for any node with input. It offers only Copy. So a secondary click, the Menu key or Shift+F10 on a text field does nothing unless the app builds its own menu. Every native field offers at least Cut, Copy, Paste and Select All, and macOS adds Look Up, spelling and Writing Tools there.

Apps rebuild the standard menu one by one, and they get the enabled states, secure-field rules and key equivalents slightly wrong in different ways.

Where
Why it matters

Anyone who right-clicks a field to paste notices nothing happens. The targets: Rune fields offer "a Cut, Copy, Paste and Select All menu" wherever the native field does, with 100% of the services matrix filled; and text fields meet the behavioural contracts apps need "in rune and in each kit wrapper", with a passing test for each.

What would help

1. A default field menu, opened by a secondary click, the Menu key or Shift+F10 when the field (or an ancestor) has no on_secondary_press. Items: Undo, Redo, Cut, Copy, Paste and Select All. 2. Enable each by state: Undo and Redo by history, Cut and Copy by a non-empty selection, Paste by clipboard content. Read-only fields disable Cut, Paste, Undo and Redo. 3. Secure fields omit Cut and Copy. 4. Each item carries the platform key equivalent, parsed as the existing Copy item does. 5. A secondary click outside the selection moves the caret to the click first, as native fields do. The Menu key and Shift+F10 open at the caret. 6. The app's on_secondary_press still wins. A builder method on the field adds items, and later services (Look Up, spelling suggestions, Writing Tools) add theirs through the same hook.

Open question: whether macOS shows Undo and Redo in a field's context menu. NSTextView does not by default; follow the recorded native menu per platform.

Done when
  • A secondary click in a field opens the menu, and each item acts on the field (headless popup tests).
  • Items are enabled and disabled by state, including read-only fields.
  • A secure field omits Cut and Copy.
  • The Menu key and Shift+F10 open the same menu at the caret.
  • A field with on_secondary_press gets the app's handler instead.
  • Kit TextInput, TextArea and TextField get the menu with no app code.
  • A changelog fragment describes the new default, since it changes what a right-click does in apps.
How to check

Popup-menu tests in T1 beside the selection menu's tests, with one per kit wrapper. The services matrix cell for the edit menu points at these tests.

Part of
  • Theme: T09
  • Tracked in R0571
  • Phase 2, milestone 2b · priority P1 · size M
R0379Text input: composition on blur, app edits, field removal and stale requests follows no recorded platform ruleP1Phase 2bMT09
text-ime-failure-paths · bug
What happens

When a window or overlay loses focus, cancel_composition sends an empty preedit. That clears the kana or pinyin Rune is showing. Whether the OS commits that text first, or the native field keeps it, depends on the platform and has not been recorded. The existing test asserts that the preedit is dropped.

On the desktops nothing checks that an input-method event still matches the text or the field it was meant for. An app that rewrites edit.text in on_input_change during a composition, or that removes the focused field, gets whatever the next event does. Only the web path rejects stale edits, with base and expected. No test interleaves these events, so a lost or duplicated character in one of these paths reaches users first.

Where
Why it matters

A user switching windows mid-conversion, or a chat app that clears its field on send while a composition is open, loses or doubles text. The target is that "no sequence of input-method events, app edits, focus changes and window events loses, duplicates or misplaces text, and composition ends as the platform's native field ends it", with "0 invariant violations in 100,000 seeded sequences per T1 run" and "100% of recorded blur and deactivation outcomes" matching.

What would help

1. Record what the native field does with composed text on blur, window deactivation and field removal: NSTextView on macOS, a Chromium textarea on Windows and Linux, and a GTK field with Fcitx5 and with IBus. Commit the recordings as R0114 fixtures. 2. Follow them per platform: commit where they commit, cancel where they cancel. Replace the blanket empty preedit in cancel_composition with that rule. 3. Route every path through the field id and revision checks of R0113, so a request for a removed or defocused field, or an old revision, changes nothing. 4. Add a seeded fuzz in T1 against a small reference model of the field and its composition state. It interleaves IME events, app edits, focus moves, field removal, hide and close, menu commands and stale web edits. After every step it asserts: offsets on char boundaries, anchor and focus in range, no preedit on an unfocused field, IME off when no field has focus, and no lost or duplicated characters against the model. A failing seed is printed and saved as a fixture.

Done when
  • Recordings exist for each listed platform and input method, with versions named.
  • Blur and deactivation during Japanese composition end it as each recording does (one replay test per platform).
  • An app that replaces edit.text during composition never sees duplicated or misplaced characters (test).
  • Removing the focused field mid-composition leaves IME off and no preedit in any field (test).
  • 100,000 seeded sequences pass in T1 in under 60 s in debug.
  • Removing the stale-request check on purpose makes the fuzz fail (mutation check in CI).
How to check

The fuzz and replay tests run in the T1 gate. The mutation check runs as a separate test that disables the guard behind a test-only switch and expects failure. Fcitx5 and IBus restart steps run on the Linux real-IME lane.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2b · priority P1 · size M
R0380Web: no browser lane drives the bridge's composition, selection and element placementP1Phase 2bST09
text-ime-lane-web · infra
What happens

Two hand-written sequences are all that check the web bridge's composition handling. scripts/web-input-smoke.mjs dispatches one synthetic compositionstart, compositionupdate, input and compositionend sequence for a reopened word. scripts/web-smoke.mjs dispatches one more for 日本語. Neither drives the browser's own composition path. Chromium's DevTools protocol can do that with Input.imeSetComposition and Input.insertText, and web-smoke.mjs already opens a CDP session on Chromium, but no scenario uses it. Neither script runs in CI. The only workflows are www.yml and site.yml, and neither calls them (R0062).

The bridge has its own replacement diff, with surrogate-pair and composition rules, and its own selection sync. Only a real browser runs that code. So a regression in composition, selection or the hidden field's position reaches apps unseen.

Where
Why it matters

Web users who type Japanese, Chinese or Korean, or who use dead keys or the emoji picker, hit these paths first. The target says "100% of the scenarios that apply to each adapter pass headless", with the web textarea and EditContext named. It also says "a failure becomes a replay fixture". This lane runs on hosted runners, so it can guard the web path before any desktop lane exists.

What would help

Extend the web smoke into a browser integration lane.

  • Load the scenarios from R0114. Play them on Chromium through CDP Input.imeSetComposition and Input.insertText, and on WebKit through dispatched composition and input events.
  • After each step, read the field's text, selection and preedit through the runtime's tree and compare them to the scenario's expected state.
  • Read the hidden field's getBoundingClientRect() and compare it to the caret rect the runtime reports. Until R0119 lands, record the offset without failing.
  • Run on push to dev and on workflow_dispatch, on hosted Ubuntu runners with Playwright's Chromium and WebKit.
  • When a scenario fails, write its event sequence in the replay fixture format and upload it as a workflow artifact.
  • Label the lane in the docs as browser integration, not real-IME coverage. Real OS input methods in Safari and Chrome run on R0189, and on the iOS lane.
Done when
  • At least 15 scenarios (ja, zh, ko, dead keys, emoji replacement, and cancel on blur) pass on Chromium and WebKit on every push to dev.
  • After R0119, the hidden field is within 1 CSS px of the caret during composition, and the lane fails when it is not.
  • A failing scenario uploads a fixture that the replay tests load unchanged.
  • The lane needs no self-hosted machine.
  • The docs say the lane covers browser integration and does not cover real input methods.
How to check

The lane itself, in the T2 web job. To show it catches regressions, change replacement in bridge.js so it drops the composition prefix on a branch. The lane must fail on that branch, and the uploaded fixture must reproduce the failure in the headless replay tests.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2b · priority P1 · size S
R0381macOS: nothing decides when RuneTextView may replace winit's view as the default text responderP1Phase 2bST09
text-ime-macos-default · feature
What happens

R0193 adds RuneTextView, a Rune-owned NSTextInputClient view, behind an opt-in switch. Nothing decides when it may become the default. Replay tests call the view's methods the way AppKit does, but they do not run a real input method. The first lane that types into a Rune field with Kotoeri, Pinyin, Zhuyin, 2-Set Korean or Telex is R0189. A default flipped on replay tests alone could ship a key-routing or menu regression that only a real input method shows.

The risk is real. Today the menu code finds winit's view by class name, sends key equivalents to it and commits marked text through it before a command. A new first responder changes every one of those paths.

Where
Why it matters

Every macOS app on Rune gets the new responder when the default flips. A broken shortcut or menu item is the first thing users notice. The target is that text input "uses each platform's own protocol in windows, overlays, panels and mobile views", in "100% of cases on every adapter and host type". It also says "100% of real-IME lane scenarios pass on the lane at each release cut". The flip should rest on that lane, not on replay tests.

What would help

Make the flip its own change, with its own changelog fragment.

  • Gate it on 14 consecutive days of green R0189 runs with RuneTextView on. The runs cover windows and non-activating panels, menus and key equivalents, at 100, 125, 150 and 200%.
  • A red run resets the count. The fix lands with a replay fixture first.
  • Flip the default in the builder and in the environment switch that R0193 adds. Keep the winit path selectable for one release.
  • Ship a Breaking (behaviour) fragment under changelog/unreleased/ that names the switch to go back.
Done when
  • The pull request that flips the default links 14 consecutive green runs of the macOS real-IME lane on the flagged view.
  • The changelog fragment is marked as a behaviour change and names the switch back to the winit path.
  • A test opens a window with the winit path selected and shows composition, menu key equivalents and shortcuts still work.
  • The menu key-equivalent tests pass unchanged with the new default.
  • A later release removes the winit path in a separate change, with its own fragment.
How to check

The macOS real-IME lane from R0189 keeps running after the flip. The macOS GUI tests, once R0061 runs them automatically, cover menus and shortcuts with both paths.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2b · priority P1 · size S
R0382Text input: TextEdit keeps no UTF-16 index, so a document offset on a large field means scanning from the startP1Phase 2bMT09
text-input-utf16-index · perf
What happens

TextEdit stores its text as one String, with byte offsets for the selection and no UTF-16 index. Platform text protocols speak document-absolute UTF-16 offsets. NSTextInputClient's selectedRange and markedRange, TSF's text-store selection and EditContext's selection all do. To answer one with a caret 900 KB into a field, Rune has to encode everything before the caret, so the cost grows with the document.

The web bridge avoids this today by not using absolute offsets. Mirror sends a window of at most 512 UTF-16 units on each side of the selection, with a byte base. Its comment says it reads "without scanning the document prefix". byte_at then scans only that window. The desktop paths need absolute offsets once R0113 lands. Each adapter would otherwise repeat a linear scan, or invent its own window. No measured number exists yet for a large field.

Where
Why it matters

An input method queries the field on every keystroke. A slow answer shows up as lag between a key and its composition in large documents: notes, logs, code. The target says text input works "at any document size", with "at most 4,096 units per query" and "under 1 ms per query".

What would help

Keep per-chunk UTF-16 prefix counts beside the String. For example, record the cumulative UTF-16 count at each 4 KB byte boundary, snapped to char boundaries. A byte to UTF-16 lookup is a binary search plus a scan of at most one chunk, and so is the reverse.

  • Update the counts on every edit path: insert, delete, replace_text, paste, undo and redo, IME commit, and secure fields. Rebuild only from the first changed chunk onward.
  • Expose two conversions, byte to UTF-16 and UTF-16 to byte, and use them in every adapter and in the web mirror.
  • Options: (a) prefix counts beside the String, small and with no storage change; (b) the rope and sum tree that PLAN names, the larger change. Recommend (a) now. It keeps the same conversion API, so (b) can replace it later.
Done when
  • On a 1 MB field with a 900 KB selection, each protocol query reads at most 4,096 units beyond its range.
  • Each query answers in under 1 ms on the reference Mac, in a --profile perf bench.
  • A seeded fuzz test applies random edits and checks both conversions against a full scan after every step, with 0 mismatches.
  • The index adds at most 1% to a field's text bytes. With 4 KB chunks and 4-byte counts, that is about 0.1%.
  • No adapter computes an absolute UTF-16 offset with encode_utf16().count() over the document prefix.
How to check

The fuzz test runs in T1. The bench runs under --profile perf with paired, alternating runs compared by median, and fails above 1 ms per query.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2b · priority P1 · size M
R0383Docs: no page shows which input methods and system text services a Rune field supports on each platformP2Phase 2bST09
text-input-matrix-docs · docs
What happens

The docs site has no page that says which input methods and text services work in a Rune field on each platform. An app author cannot find out whether Japanese input works in an overlay on Windows, whether dictation can replace a selection on macOS, or whether autofill works on the web. The answers live in code and in issues.

A hand-written page would go stale. The plan adds replay scenarios, a browser lane and real-IME lanes, and each one produces results that could fill such a page. Nothing turns those results into docs today.

Where
Why it matters

App authors pick Rune for a platform, and users meet the gaps. The targets: the docs carry an IME matrix built from executed results. The services matrix must have "100% of cells filled", and "a platform limit is allowed only where it is named": "the web has no spelling, Look Up or Writing Tools API for custom-drawn text, and Linux has no Writing Tools or Look Up". For assistive technology, "every applicable property is exposed on all 5 targets, or the matrix cell is n/a with a reason".

What would help
  • Have the replay tests from R0114, the browser lane and the real-IME lanes write one results file per run. Each row has a scenario or service, an adapter or platform, pass or fail, and the run that produced it.
  • A script builds two tables from those files and writes a docs page. The first is scenarios by adapter: macOS, TSF, Wayland, X11, web textarea, EditContext, overlays, app-drawn editors. The second is the services matrix: spell check, autocorrect and text replacements, dictation, Writing Tools, emoji picker, Look Up, purpose and keyboard type, secure entry, autofill, edit menu, text drag.
  • An empty cell names its open issue. A limit cell may only use a limit from the list above. A cell with no result fails the build.
  • Label the browser lane's cells as browser integration, not real-IME coverage.
Done when
  • A docs page shows both matrices, built only from results files.
  • Every cell is a pass with a run link, an open issue, or one of the named limits.
  • The build fails if a cell uses an unnamed limit or has no result.
  • The page names the pinned OS and input method versions each lane ran on.
How to check

The site build runs the generator. A check in T1 fails when a results row is missing or a limit is not on the allowed list. The page updates after each lane run on dev.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 2, milestone 2b · priority P2 · size S
R0384Touch scrolling: flings, edges and release velocity are not checked against UIScrollViewP1Phase 2bXLT10
motion-touch-uikit-parity · tracking
What happens

Touch scrolling is the scroll path for iOS (LayerHost), for web on phones, and for touchscreens on Windows and Linux. Each step of it differs from UIScrollView in a way the code shows. Nothing measures how far the result is from iOS.

  • Release velocity is the difference of the last two samples. On winit hosts each touch is stamped when Rune handles it, so touches handled in one run-loop turn get a dt near 0. Their velocity can hit the 8,000 pt/s clamp.
  • A release counts as a fling if it comes within 100 ms of the last move. Research names 40 ms.
  • The rubber band uses a fixed 300 pt dimension instead of the viewport's size.
  • Momentum that reaches an edge decays for the whole frame past it before the rebound starts. The overshoot then depends on the frame rate.

Fixing this takes several issues. A recorded corpus of UIScrollView flings has to exist first, so that the estimator and the edge constants can be tuned against it. Event timestamps from the OS have to reach the runtime before any estimator can work.

Where
Why it matters

On iOS, people compare every fling with the system's own scroll views. The target for touch: distance and duration within 2% of recorded UIScrollView trajectories, the rubber band within 0.5 pt, overshoot within 0.5 pt across 30-144 Hz, estimator error at most 5% median and 15% p95 (floor 20 pt/s), and 0 releases clamped from coalesced events. The same motion should follow the same path at any refresh rate, to within 0.5 pt for scroll.

What would help

Land the children in order: the corpus, then the estimator, with the edge hand-off and band alongside. The 5,000 pt/s transfer cap and the 40 ms stop rule come from Flutter and Android. Treat them as Rune's starting values to tune against the corpus, not as facts about UIKit. Every child that changes how a fling or an edge feels adds a changelog fragment and a before-and-after gate trace for the scenarios it changes.

Done when
  • All children are closed.
  • The touch thresholds above hold in the required check.
  • Every child that changed feel shipped a changelog fragment and a before-and-after trace pair.
How to check

The corpus replay tests from R0406 run in the required check before every merge to dev. Event timestamps come from R0405.

Issues
Part of
  • Theme: T10
  • Phase 2, milestone 2b · priority P1 · size XL
R0385rune-motion: store.rs and scene.rs are over the 800-line soft cap, and the motion fixes edit bothP1Phase 2bST10
motion-store-scene-split · refactor
What happens

scripts/file-size.sh warns on two rune-motion files. crates/rune-motion/src/store.rs has 1,079 non-test lines, and crates/rune-motion/src/scene.rs has 1,053. Neither is in scripts/file-size-exceptions.txt, so they sit between the 800-line soft cap and the 1,500-line hard cap.

Several planned fixes edit these files. Among them are the presence draw lane (R0388), the non-finite guards (R0387), the Scene dirty list (R0386) and the edge hand-off (R0389). The screen-travel X lane, the hard-coded springs and the wider retarget audit edit them too. The repo's rule is to move the area being touched into its own module, in its own PR, before adding to a file over the cap. Without the split, these fixes would grow both files and collide with each other.

Both files already have module folders. store/ holds tracks.rs and typed.rs. scene/ holds presence.rs, props.rs, trailing.rs and travel.rs.

Where
Why it matters

Every source of presented motion should be traced, and should keep its velocity continuous at every retarget unless the change is a declared cut. The fixes that get there edit the retarget, presence and present paths in these two files. Smaller files keep each fix's diff readable and let fixes land in parallel. The split also makes room for later code without crossing the 1,500-line hard cap.

What would help

Split by capability, with no behaviour change, one file family per PR.

  • Store: store/retarget.rs (animate_raw, retargeting and the retarget audit), store/layers.rs (additive layers and merges), store/pending.rs (schedule, cancel_pending, commit_scheduled) and store/time.rs (clock, node time scale and time_of). Construction, tick and lookups stay in store.rs.
  • Scene: scene/present.rs (compute, present_dirty and rest_of), scene/edges.rs (frame edges and snapping) and scene/output.rs (FrameOutput and the output buffers).

Move the code without editing it, apart from visibility (pub(super)). Keep the public API and lib.rs exports unchanged.

Done when
How to check

Run scripts/file-size.sh and the rune-motion tests in the required check. The motion-audit gate scenarios should produce the same findings before and after, which shows the moves changed no behaviour.

Part of
  • Theme: T10
  • Phase 2, milestone 2b · priority P1 · size S
R0386Motion: every animating frame scans all Scene nodes twice and all runtime nodes for scroll viewports and offset watchersP1Phase 2bMT10
motion-dirty-lists · perf
What happens

Three per-frame loops visit every node, however few of them move.

  • Scene::present_dirty walks the whole pre-order order twice. The first pass computes dirty nodes and their subtrees. The second clears every node's dirty flag. Scene::frame_at and Scene::present each call it.
  • step_scroll loops over every runtime node to find the ones with a scroll viewport. It runs in each animating frame and in catch-up steps. A dozen request paths also call it with dt = 0 (scroll requests, stick-to-bottom, sticky headers, caret reveal).
  • tell_scroll_offsets walks every node to find on_scroll_offset handlers, in every animating frame.

With 100,000 nodes and one animating leaf, each animating frame still makes at least four full passes. Research 37 found per-frame scans and ancestor walks costing 15-20% of busy time on a long card. A small spike that removed most of them cut that card's scroll p50 by 17%.

Where
Why it matters

Motion should cost only what moves. The target: visits per frame at most 2 x changed nodes + feature-list nodes + 64, differing by no more than 5% between the 10,000-node and 100,000-node trees. CPU p95 should stay at or under 4 ms on the reference Mac. Per-frame work should scale with what changed. A long chat or table with one spinner shouldn't pay for every row on each of 120 frames a second.

What would help
  • In Scene, push a node onto a dirty list when a track starts, is retargeted, snaps or is removed, and when a node is reparented. At present time, sort the list by pre-order index. Expand each entry to its subtree through a stored pre-order range, skipping entries already inside an expanded range. Clear only the listed flags.
  • In the scroll subsystem, keep a dense list of viewport node indices and of on_scroll_offset nodes. Rebuild it during flatten and apply, which already touch every node. self.scrolls already keys viewports by id. step_scroll and tell_scroll_offsets iterate that list.
  • In debug builds, assert that each list's result equals a full scan.
Done when
  • present_dirty visits only listed nodes and their subtrees. With 10,000 nodes and one animating leaf, it visits at most 64.
  • step_scroll and tell_scroll_offsets visit only viewport and watcher nodes.
  • Debug assertions match a full scan in every test, including a moving ancestor, an exit and a reparent.
  • Visits are at most 2 x (changed nodes + descendants whose drawn rect changed) + viewports + watchers + 64. The 10,000-node and 100,000-node runs differ by at most 5%.
How to check

Add count budgets to the 1,000 spring-animated quads scenario from R0278 and to a 100,000-node variant. They run in the required check. Debug assertions run in every rune and rune-motion test. Land this after R0385, so the Scene change goes into the split files.

Depends on
Part of
  • Theme: T10
  • Tracked in R0312
  • Phase 2, milestone 2b · priority P1 · size M
R0387Motion: a NaN or infinite target or velocity passes into the animation store unchecked, and runtime-built springs can panic a release buildP1Phase 2bMT10
motion-nonfinite-guard · bug
What happens

AnimationStore::animate_raw takes each target and lane velocity as given. A NaN from a layout division, an app's computed offset or a velocity estimate goes into a lane, then into the presented rect and the GPU instance.

The settle bound then takes the log of a non-finite amplitude. It falls back to MAX_SETTLE, so the track presents NaN and keeps the window drawing for up to 120 s. Pending delayed animations also use NaN to mean "inherit the velocity". An app's NaN velocity on a delayed animation therefore silently becomes inherit.

The Spring constructors check their ranges with assert!, which also panics in release builds. That is right for constants. A spring built from an app's runtime value is a different case: Spring::from_response(0.0, z) divides by zero, passes omega > 0 as infinity, and then panics in Spring::new.

The scroll steppers have no finite checks. Tx::scroll_to and friends push x and y as given, and clamp passes NaN through, so clamping to the content doesn't catch it. Only one sticky helper filters a non-finite value.

Where
Why it matters

Motion should hold up on bad input. The target: 0 non-finite presented values, 0 release-build panics through recoverable entry points, and every non-looping track settling within MAX_SETTLE after its last retarget. A user sees a NaN as an element that vanishes or flickers, a frozen scroll view, or a crash. An idle window that keeps drawing for two minutes costs battery.

What would help
  • Reject non-finite targets and velocities at the store, Scene, scroll and growth entry points. Release builds keep the lane's last finite value and treat the velocity as zero. Debug builds warn once per element and property, naming both.
  • Replace the NaN inherit marker in Pending with an explicit Option or flag, so a bad velocity can't mean "inherit".
  • Keep the panicking const constructors for constants. Add Spring::try_new, try_from_response, try_from_omega_zeta and try_from_stiffness_damping, returning Option<Spring>, and document them as the ones to use with app data.
  • Guard the scroll offset, momentum, glide and growth steppers the same way.
Done when
  • A property test fuzzes targets, velocities and curves with NaN, +/-inf, 0 and 1e9 s durations, 1e8 pt offsets and 1,000 retargets a second. It finds 0 non-finite presented rects, opacities or scroll offsets.
  • After the last retarget, every non-looping track settles within MAX_SETTLE.
  • Release builds never panic on these inputs through the store, Scene, scroll and try_ constructors.
  • Debug builds warn once per element and property, naming both.
  • Finite inputs give the same output as before.
How to check

The rune-motion and rune property tests run in the required check. Run the fuzz test in release as well, so debug_assert paths don't hide a panic. Land this after R0385, since it edits store.rs.

Depends on
Part of
  • Theme: T10
  • Phase 2, milestone 2b · priority P1 · size M
R0388Motion: removing or reviving an element mid-transition jumps its drawn fraction, because reversal re-solves 8 of its 9 effect lanesP1Phase 2bST10
motion-presence-draw-lane · bug
What happens

The presence effect vector Fx has 9 lanes: opacity, scale, offset x and y, offset fraction x and y, blur, hidden reveal, and draw. When a node is removed mid-entrance, remove re-solves fx_b so that the current look holds at progress p. When a node is revived mid-exit, revive re-solves fx_a the same way. Both loops run over 0..8, so the draw lane (index 8) is never re-solved.

When a transition's removal draw differs from its insertion draw, the drawn fraction jumps at the moment of the reversal. An example is Transition::asymmetric with a draw-on insertion and an opacity removal. Mid-entrance, the jump is (target - fx_a) * (1 - p). Revival mid-exit jumps the same way. An outline being drawn on snaps to a different length as the user dismisses it.

The reduced-motion Fx literal is also written twice, in compute and in rest_of. A tenth lane would have to be added in four places by hand.

Where
Why it matters

Every source of presented motion should keep its velocity continuous at every retarget unless the change is a declared cut. For opacity-like values, the limit is 1e-4 per second of undeclared change. A remove or revive is not a declared cut, so no lane may step at that moment. People interrupt transitions all the time, by dismissing a popover while it opens or reopening a row while it closes, so the jump shows up in normal use.

What would help
  • Add const FX_LANES: usize = 9;. Tie it to the array with type Fx = [f32; FX_LANES], or with a compile-time assertion on size_of::<Fx>(). Loop over 0..FX_LANES in remove and revive.
  • Define the reduced-motion transform once, as a function from Fx to Fx, and use it in both compute and rest_of.
  • Add tests for removal mid-entrance and revival mid-exit with asymmetric transitions that differ in every lane, draw included.
Done when
  • No 0..8 loop over Fx remains, and a compile-time check ties FX_LANES to the array length.
  • For an asymmetric draw transition, every Fx lane sampled just before and just after remove at the same timestamp differs by less than 1e-6.
  • The same test passes for revive mid-exit.
  • The reduced-motion Fx is defined once.
How to check

The new rune-motion tests run in the required check. They sample lerp_fx at the same timestamp across the call, so they stay exact at any frame rate. Land this after R0385, which moves the code in scene.rs.

Depends on
Part of
  • Theme: T10
  • Phase 2, milestone 2b · priority P1 · size S
R0389Touch scrolling: a fling's overshoot at an edge depends on the frame rate, and the rubber band ignores the viewport's sizeP1Phase 2bMT10
motion-touch-edge-handoff · bug
What happens

Edge hand-off. After a touch release, step_touch_scroll decays momentum for a whole frame. It switches to the omega = 14 critically damped rebound only on the next frame, starting from wherever the decay left it past the edge. The step is not split at the time the offset crosses the edge. A fling near the 8,000 pt/s clamp can travel up to about 133 pt past the edge in one 60 Hz frame before the rebound starts, and about 67 pt at 120 Hz. The overshoot therefore changes with frame rate and with where the crossing falls in the frame. No cap limits the velocity carried into the rebound. From the edge at 8,000 pt/s, a critically damped rebound alone peaks at v / (omega x e), about 210 pt.

Release::DecayClamped in rune-motion already solves the crossing time in closed form. Wheel momentum on both axes stops dead at the edge in the frame that passes it, and zeroes its velocity with no declared cut.

Rubber band. During a pan, the overscroll is over * 0.55 / (1 + |over| * 0.55 / 300). That is UIScrollView's formula with the dimension fixed at 300 pt. UIScrollView uses the viewport's own size. A 100 pt overpull gives 46.5 pt in every viewport. UIScrollView's formula gives 43.1 pt in a 200 pt viewport and 51.5 pt in an 800 pt one. rune_motion::rubber_band(overshoot, dimension) implements the right formula, and nothing calls it.

Where
Why it matters

The touch target: rubber band within 0.5 pt, and overshoot differing by at most 0.5 pt across 30-144 Hz. The same motion should follow the same path at any refresh rate, to within 0.5 pt for scroll. Every intended discontinuity, a transfer cap included, should carry a cut reason in the trace. A user on a 60 Hz phone and one on a 120 Hz phone should see the same bounce, and a small horizontal strip should resist differently from a full-height list.

What would help
  • Within a step, solve the time at which the decay reaches the edge, using the closed form DecayClamped uses. Run the rest of dt as the rebound from the edge.
  • Cap the velocity carried into the rebound. Start at 5,000 pt/s, the value Flutter uses, and tune it on the corpus. Record the cap as a declared cut in the retarget audit.
  • Apply the same crossing split to wheel momentum on both axes. Record the stop as a declared cut.
  • In the pan, call rune_motion::rubber_band with d equal to the viewport's extent on the panned axis. Read the extent on each step, so a resize during a pull takes effect without a jump.
  • Add a changelog fragment, because edge bounces change.
Done when
  • A 3,000 pt/s fling into an edge matches the 960 Hz reference within 0.5 pt at 30, 60, 120 and 144 Hz, at 8 crossing phases and with +/-4 ms jitter.
  • The rebound's initial velocity equals min(decay velocity at crossing, cap).
  • Wheel momentum on both axes passes the same rate test.
  • In a 200 pt and an 800 pt viewport, a 100 pt overpull gives the formula's displacement within 0.5 pt, on both axes and at both edges.
  • Resizing the viewport during a pull changes the displacement with no step over 0.5 pt.
How to check

The unit tests run in the required check. The motion gate's cadence and jitter variants keep the result frame-rate independent. Compare against the UIScrollView edge-hit flings in R0406 once they are committed. Land this after R0385.

Depends on
Part of
  • Theme: T10
  • Tracked in R0384
  • Phase 2, milestone 2b · priority P1 · size M
R0390Motion trace: the retarget audit sees only some store springs, so velocity jumps elsewhere go unseenP1Phase 2bMT10
motion-trace-all-sources · infra
What happens

AnimationStore::audit_retargets(true) turns on a velocity check at retargets. It measures a lane only when four things hold: the property class is spatial, the curve is a spring, no explicit lane velocity is passed, and the start is not delayed (crates/rune-motion/src/store.rs:722-730). For those lanes, crates/rune-motion/tests/quality.rs:4-28 asserts a largest jump under 0.001 pt/s. The trace writes the counters into each frame's quality field (crates/rune/src/tooling/trace.rs:224-230), and scripts/trace-quality.py sums them. No row in the gate's RULES reads them, so a regression fails only that one unit test.

Everything else goes unaudited:

The README says so too: these diagnostics leave out renderer-owned growth and scroll, explicit velocity changes and instant cuts (crates/rune-motion/README.md:207-210). Some of these jumps are intended. A growth fold moves its height straight to the window's edge (growth.rs:216-223), and a glide caps its speed at a retarget. Nothing in the trace tells an intended cut from a bug.

Where
Why it matters

A velocity jump at a retarget reads as a hitch: the element brakes or kicks for one frame. People see it when a list reflows under a moving row, or when a flight is re-aimed mid-air. The motion target is that every source of presented motion is traced and keeps its velocity continuous at every retarget, unless the change is a declared cut. That means 100% of (source, operation) pairs traced and audited. Undeclared spatial jumps stay at or under 0.001 pt/s for analytic sources and 0.5 pt/s for stepped ones, and opacity at or under 1e-4 /s. Every intended discontinuity (catch, instant change, transfer cap, reduced motion) carries a cut reason. The audit target asks for 100% inventory coverage, with findings only from the Rust rules.

What would help

1. Commit the inventory as a Rust table beside the gate rules, one row per (source, operation): store spring retarget, store explicit lane velocity, store delayed start, store non-spatial class, glide retarget, momentum start, touch edge hand-off, growth retarget, content slide detach, flight re-aim and text flight. 2. Give each row an audit hook that records (source, operation, element, class, v_before, v_after, cut). cut is an optional CutReason, such as Catch, Instant, TransferCap, ReducedMotion or Fold. Store rows extend RetargetAudit. Runtime rows go to a collector with the same shape. The trace writes both per element. 3. Add velocity-snap to RULES. Rule has one threshold, so there are two options: give this kind a per-class table (0.001 pt/s analytic, 0.5 pt/s stepped, 1e-4 /s opacity), or split it into a spatial kind and an opacity kind. We recommend one kind with a per-class table, so allow rows name one kind. 4. Count and report declared cuts. Don't flag them.

This follows R0156, so the rule lives only in Rust. It also follows R0385, because the hooks edit both files.

Done when
  • The inventory is committed, and a test fails when a listed pair writes no audit entry in its scenario.
  • velocity-snap is in RULES, with limits of 0.001 pt/s analytic, 0.5 pt/s stepped and 1e-4 /s opacity.
  • A test plants a wrong explicit lane velocity at a retarget, and velocity-snap flags it.
  • Every intended discontinuity in the inventory writes a cut reason, and cuts are reported apart from findings.
  • Current scenarios pass, or carry allow rows with a reason, a max and an issue link.
  • The README's diagnostics paragraph lists what the audit covers.
How to check

The required check runs the rune-motion and gate tests: the inventory-coverage test, the planted-velocity test, and scripts/motion-audit over every scenario with the new rule on. Each new motion source adds an inventory row, and the coverage test keeps it audited.

Depends on
Part of
  • Theme: T10
  • Tracked in R0585
  • Phase 2, milestone 2b · priority P1 · size M
R0391Motion: screen paths restart X progress on the Y spring and ignore lead, so per-axis springs, width_leads and lead do nothing on matched and launched pathsP1Phase 2bMT10
motion-travel-x-lane · bug
What happens

A screen path (LayoutAnim::screen(), which match_geometry, launch and retarget_drawn use) moves a node on a two-lane TRAVEL progress track. start_path animates lane 0 on anim.x. It then calls animate_raw for both lanes on anim.y, with lane velocities [px, py] (crates/rune-motion/src/scene/travel.rs:110-129). When given a lane velocity, animate_raw never skips an unchanged lane (crates/rune-motion/src/store.rs:700-708), so lane 0 restarts on anim.y's curve. X keeps its start velocity but loses its curve. So LayoutAnim::axes(x, y) and width_leads() have no effect on a screen path.

start_path also never reads LayoutAnim::lead (crates/rune-motion/src/scene.rs:54-82). Parent-space frame changes honour it (scene.rs:558-569). On a screen path, a leading-edge lead does nothing, and nothing says so.

Apps hit both. The commit takes width_leads() or lead() from the element (crates/rune/src/runtime/commit/apply.rs:426-439), and passes the same LayoutAnim to retarget_drawn when a flight's layout moves (apply.rs:475-479). The tests miss it. screen_travel_takes_one_straight_path (crates/rune-motion/tests/scene.rs:254) uses one curve for both axes and checks only endpoints. The README says a width-leading screen path is not perfectly straight (crates/rune-motion/README.md:200), which the code doesn't do.

Where
Why it matters

A card that widens while it flies to its new place should fit its content first. Today its width lands when its height does. The motion target asks every source to keep its velocity continuous at every retarget and to follow the curve the app chose. Direct manipulation must hand velocity on, with the release spring within max(2%, 10 pt/s) of the hand. Each SwiftUI capability row needs an example and a gate scenario that checks the behaviour. A builder that does nothing in one travel mode, and says nothing, fails all three.

What would help

First settle the screen-path contract in the rune-motion README and in LayoutAnim's docs.

Axes:

  • (a) Per-axis curves: lane 0 on anim.x with px, and lane 1 on anim.y with py. The path bends when the curves differ.
  • (b) One straight path: both lanes on one curve, with axes and width_leads documented as ignored on screen paths.

We recommend (a). The commit already asks for width-leading on flights, and Kit rule 9 (the width animates faster) holds in flight too. Add a per-lane mask to animate_raw, or call it with one-lane target slices.

Lead:

  • (c) Support it: make TRAVEL four lanes, one for the leading and one for the trailing edge of each axis, each on its own curve.
  • (d) Document that screen paths ignore lead, and warn once per element in debug builds.

We recommend (d) for now. Option (c) doubles the lanes of every flight, and the SwiftUI rows don't need it. Come back to (c) when a component needs a lead in flight.

Add a changelog fragment, because flights that set per-axis springs change path.

Done when
  • A test samples a screen path with LayoutAnim::axes(fast, slow) at t = 0.1 s. Each lane's progress is within 1e-4 of its own curve's progress.
  • Both lanes reach 1.0 at rest, and each lane's start velocity equals its projected edge velocity.
  • A width_leads() flight's X progress reaches 0.99 before its Y progress does.
  • Debug builds warn once per element when a screen path gets a lead, and a test checks it. If (c) is chosen instead, a test shows the leading edge ahead of the trailing edge mid-flight, and both land exactly.
  • The README and LayoutAnim docs say which fields screen paths honour, and the note at README line 200 is corrected.
How to check

The rune-motion tests in the required check. In scripts/motion-audit/run.sh:51-57, the tab-strip and growth-reorder-flight scenarios stay clean. The retarget audit from R0390 then covers the explicit lane velocities this path uses.

Depends on
Part of
  • Theme: T10
  • Phase 2, milestone 2b · priority P1 · size M
R0392Motion: one 860-line commit function picks each element's layout motion through about 15 flagsP2Phase 2bMT10
motion-apply-layout-anim-reasons · refactor
What happens

apply() is one function, from crates/rune/src/runtime/commit/apply.rs:7 to line 869. Its file has 882 lines and no test code, so it is over the 800-line soft cap. In the per-node loop, the choice of how a frame change animates is a cascade of flags over about 100 lines:

  • instant for the commit (apply.rs:79, apply.rs:98);
  • lands and enters_at_once from El::instant_changes (apply.rs:346-349);
  • row_like, is_virtual and the aspect-snap set, which feed layout_instant (apply.rs:338-351);
  • stack_row for growth, virtual and horizontal rows (apply.rs:405-406);
  • follows_window for a window's resize step (apply.rs:409-410);
  • out_of_sight (apply.rs:412-413);
  • tx.relayout, tx.motion, and the element's lead and width_leads (apply.rs:414-440).

The result is a bare LayoutAnim. When it is LayoutAnim::INSTANT, nothing records which flag chose it.

That costs twice. Motion fixes all edit this one loop, so they collide there. And when the gate sees an element move at once, the trace carries only intent bits (crates/rune/src/tooling/trace.rs:130-153), not a reason. A finding can't say whether the jump was a window step, a growth row, a virtual window or a row out of sight, so a reviewer has to read the cascade by hand.

Where
Why it matters

The audit target asks for one rule set that covers the whole public motion surface, 0 unallowed findings, and a reason on every allow row. The motion target asks that every intended discontinuity carries a cut reason in the trace: catch, instant change, transfer cap or reduced motion. An instant layout change is the most common intended cut, and today it carries no reason. Each motion fix that touches this loop also risks changing an unrelated branch.

What would help

Do this in its own PR, before another motion fix adds to apply.rs. Move the choice into a new module, crates/rune/src/runtime/commit/layout_anim.rs:

pub(super) enum Reason { Animated, StackRow, OutOfSight, Instant, InstantChanges, RowLike, Virtual, AspectSnap, Relayout, WindowStep }
pub(super) fn layout_anim_for(node: &Node, tx: &Tx, ctx: &LayoutCtx) -> (LayoutAnim, Reason)

LayoutCtx holds the per-commit facts the cascade reads: the unseen set, the flights in the air, the aspect-snap set and the virtual lists. apply() calls layout_anim_for once per node. The trace writes the reason next to the intent bits of each element whose layout changed at once, and gate findings print it. Keep the order of the branches exactly as it is, so the findings don't move.

Done when
  • layout_anim_for and Reason exist, with one unit test per reason in a sibling tests file.
  • apply.rs is under 800 non-test lines, and scripts/file-size.sh passes.
  • Gate traces carry a reason for every instant layout change.
  • Every scenario in scripts/motion-audit gives the same findings before and after the move.
How to check

The unit tests and scripts/file-size.sh run in the required check. Run scripts/motion-audit on the commit before and after, and diff the findings: there must be no difference. The trace test asserts that an out-of-sight row and a window-step row each record their reason.

Part of
  • Theme: T10
  • Phase 2, milestone 2b · priority P2 · size M
R0393Motion: the scene seeds and retargets some lanes with hard-coded springs and epsilons instead of the element's ownP2Phase 2bST10
motion-scene-hardcoded-springs · bug
What happens

In three places, the scene picks motion the element didn't ask for.

1. Leaving a screen path. set_frame_drawn continues the node in parent space from its exact place and velocity. But it seeds the frame lanes with Spring::SMOOTH, a 0.5 s spring (crates/rune-motion/src/scene.rs:536-550). The per-axis retarget that follows skips any lane whose new target equals its current target (scene.rs:572-574, crates/rune-motion/src/store.rs:707-708). So that lane keeps the 0.5 s spring, whatever motion the element uses. The caller's LayoutAnim is in scope there, but the seed doesn't use it. 2. Re-inserting a present key. When insert finds the key already in the scene with a different frame, it retargets on tokens::REFLOW (crates/rune-motion/src/scene/presence.rs:33-35). NodeSpec carries no motion, so the scene has nothing better to use. 3. Collapsing additive layers. When a lane has too many stacked layers, the store merges them with a fixed Eps { pos: 1e-4, vel: 1e-3 } (crates/rune-motion/src/store.rs:795-805). It should use the class epsilon from class.eps(pixel_scale), as animate_raw does (store.rs:694). The class values (crates/rune-motion/src/props.rs:49-57) are 1/256 pt for spatial lanes at 2x, 1/1024 for opacity and colour, and 1e-5 for scale. So the fixed value is too tight for spatial lanes and too loose for scale.

Settle times and curves therefore drift from the token the app chose. A flight on a 0.2 s spring that lands next to its target can take 0.5 s to settle on one axis.

Where
Why it matters

An app picks a spring to set how something feels. When one axis of a card lands on a different spring, the card settles in two steps. The motion target asks every source to keep its velocity continuous and to follow its declared motion. Any departure must be a declared cut with a reason in the trace. These three are neither.

What would help

1. In set_frame_drawn, seed the X lanes with anim.x and the Y lanes with anim.y instead of Spring::SMOOTH, keeping the measured lane velocities. 2. Give insert an optional LayoutAnim, through a new entry point such as Scene::insert_with(id, spec, mount, anim) or a builder on the insert call, not a new NodeSpec field. Keep tokens::REFLOW as the documented fallback for insert. Have the runtime pass the element's own LayoutAnim. 3. In the additive collapse, use class.eps(self.pixel_scale) for the lane's class.

Add a changelog fragment, because settle times change a little.

Done when
  • A test: a node leaves a screen path with one lane's target unchanged, and that lane settles on the node's own LayoutAnim spring, not a 0.5 s spring.
  • A test: re-inserting a present key with a changed frame and an explicit LayoutAnim moves on that LayoutAnim.
  • A test: an additive colour lane collapses once it is within the class's position and velocity epsilons, and not before.
  • No Spring::SMOOTH or fixed Eps literal is left in scene.rs or store.rs outside tests and defaults.
How to check

The rune-motion tests in the required check. The tab-strip and growth-reorder-flight motion-audit scenarios stay clean. Once R0390 lands, the audit records the leave-path seed as an explicit-velocity retarget.

Depends on
Part of
  • Theme: T10
  • Phase 2, milestone 2b · priority P2 · size S
R0394Motion: a free content slide samples its spring once per 1/240 s substep where one exact sample per frame would doP3Phase 2bST10
motion-content-slide-exact · perf
What happens

When the top of a growth row's contents moves, the contents slide with the row. They are drawn outside the scene (crates/rune/src/runtime/motion/content_slide.rs:1-11). ContentSlides::step has two branches (content_slide.rs:50-69):

  • Attached. While the row's growth still opens toward the slide, the slide shrinks with the growth left. Its velocity is the change over the frame (content_slide.rs:53-60).
  • Free. Once it detaches, the slide loops over the frame's 1/240 s substeps and calls spring.sample once per substep (content_slide.rs:61-65).

In the free branch the target is fixed at 0, and Spring::sample is a closed form. So one sample over the whole steps * SUBSTEP gives the same result. Scroll glides already step this way (glide_axis, crates/rune/src/runtime/scroll/offset.rs:192-205). The loop costs 2 samples per slide per frame at 120 Hz, 4 at 60 Hz and 8 at 30 Hz, and each adds f32 rounding, so a slide's path differs a little with frame rate. The detach is also invisible to the retarget audit.

Where
Why it matters

This is small, but it lies on the path every chat row takes when its padding or gap changes. The frame-rate target says the same motion follows the same trajectory at any refresh rate, with cadence jitter, a rate switch or a late frame: within 0.5 pt for growth and its slides. The cost target asks motion to cost only what moves, with CPU p95 at or under 4 ms on the reference Mac. Rounding that depends on the rate, and work that grows as the rate falls, both go against these targets.

What would help
  • In the free branch, call spring.sample(s.dy, s.v, 0.0, steps as f32 * SUBSTEP) once.
  • Keep the attached branch and its substep time accounting as they are, since that branch follows the growth integrator.
  • When a slide detaches (s.at = None), record a hand-off in the audit from R0390: velocity before and after, and source content slide.
Done when
  • There is one spring.sample call per free slide per frame.
  • A test steps one free slide at 30, 60, 120 and 144 Hz, and with ±4 ms jitter, and the slide lands on the same trajectory within 1e-3 pt at common times.
  • The existing detach and growth-retarget tests give the same results.
  • The detach shows up as a hand-off entry in the audit.
How to check

The unit tests in the required check. The growth-reorder motion-audit scenarios (scripts/motion-audit/run.sh:52-57) stay clean.

Part of
  • Theme: T10
  • Tracked in R0585
  • Phase 2, milestone 2b · priority P3 · size S
R0395Frames: no platform reports input-to-present latency or missed presents from real present timesP0Phase 2bXLT11
perf-telemetry · tracking
What happens

PLAN.md section 8 sets event-to-presented targets of p50 <= 8.3 ms and p95 <= 16.7 ms at 120 Hz, and < 0.1% missed presents. Interaction timing already times each input from arrival through queue wait, update and encode. But its present_wait ends at the refresh the frame aims at, not when the frame reached the screen.

macOS records presentedTime only under --trace. Other platforms have no present-time source, and they stamp input when Rune handles it, not when the OS saw it. No frame records GPU time, and nothing counts missed presents.

This takes several issues. A per-surface frame record, the metrics built on it, GPU time, stall markers, OS input timestamps and a present source per platform each touch different code and need different hardware to prove.

Where
Why it matters

The targets: input-to-present latency measured from real present times on every platform. p50 <= 8.3 ms and p95 <= 16.7 ms on the 120 Hz reference Mac and ProMotion iPhone, and p50 <= 16.7 ms and p95 <= 25 ms on the 60 Hz Windows, Linux and web references. Each platform within one refresh of a native control, with probe error < 0.5 ms. Motion presents on >= 99% of refreshes. Every criterion is checked continuously, against absolute targets and the native peer.

What would help

Land the frame record first. Then the hitch metrics, GPU time and the present-source note, all in phase 1. Then the per-platform present-time and input-timestamp work and stall attribution. The photodiode rig calibrates the probe.

Done when
  • All child issues are closed.
  • Each reference device in the perf matrix reports input-to-present p50 and p95 and missed presents from real present times.
  • Each device's probe error against an independent probe is stated and under 0.5 ms.
  • A web proxy counts toward no latency row, unless an external web present source or a recorded target revision covers it.
How to check

The children carry their own tests. The lanes publish the derived metrics with rev, backend, device and date.

Issues
Part of
  • Theme: T11
  • Phase 2, milestone 2b · priority P0 · size XL
R0396Frames: only macOS windows read when a frame reached the screen, and only they sample motion at that timeP1Phase 2bXLT11
motion-present-time-sampling · tracking
What happens

PLAN.md and research/15 say to sample every animation at the display's target presentation time, never at "now". Only macOS windows and overlays do. They take the display link's target. Everywhere else the frame time is Instant::now(): windows and overlays off macOS, the web host and LayerHost. Real present times are also read only on macOS. Swapchains run FIFO with a frame latency of 2, so jitter in when a frame is drawn becomes jitter in where motion lands on screen.

This is a tracker because each platform has its own source and its own fallback: rAF timestamps on the web, the CADisplayLink target timestamp for LayerHost, DWM and DXGI timing on Windows, presentation-time feedback on Wayland, and a refresh prediction on X11.

Where
Why it matters

The targets: sample-to-present p95 <= 1 ms on macOS, iOS, Windows and Linux Wayland, and sample-to-rAF-target p95 <= 0.5 ms on the web. >= 97% one-period frames on the 144 Hz Windows and 120 Hz Wayland machines and in Chrome and Safari. A stale source falls back within 2 frames with 0 jump findings. The same motion follows the same trajectory at any refresh rate, within 0.5 pt for scroll. Off macOS today, a spring jitters by however much the draw time varies.

What would help

Land the shared staleness rule first (R0398). A wrong prediction is worse than now, so a stale or non-monotonic source falls back to now. Then add one source per platform. Each platform records real present times where R0128 names a source, and a labelled proxy where it names none. Overlays use the same target source as windows on each platform.

Done when
  • All child issues are closed.
  • On reference devices, native windows, overlays and LayerHost reach sample-to-present p95 <= 1 ms.
  • The web reaches sample-to-rAF-target p95 <= 0.5 ms.
  • Every host records actual, predicted and proxy present times in separate fields.
  • A stale source falls back within 2 frames with 0 jump findings in scripts/motion-audit.
How to check

The reference-device lanes per platform, plus scripts/motion-audit scenarios that inject stale and jumping sources.

Issues
Depends on
Part of
  • Theme: T11
  • Tracked in R0395
  • Phase 2, milestone 2b · priority P1 · size XL
R0397Paint: build.rs is 1,219 lines, over the 800-line target, and mixes every paint concernP1Phase 2bMT11
arch-paint-build-split · refactor
What happens

crates/rune/src/runtime/paint/build.rs has 1,219 lines and no test code. Almost all of it is one method, Runtime::build. That method is the whole paint walk: exits and matched flights, opacity and layer fades, scale and rotation, pixel snapping, visibility culling, clip and outer scopes, soft edges, backdrop blur, text, native surfaces, video, effect slots, marks and hits. scripts/file-size.sh warns on any file over 800 non-test lines. This file is under the 1,500-line hard cap, so it is not in scripts/file-size-exceptions.txt, and it counts toward the warning total.

Every paint change edits this one function, so paint PRs collide. Retained paint needs seams between these areas. And nothing records the paint output today, so a refactor has no check that it changed nothing.

Where
Why it matters

The target: the required gate enforces module shape, and scripts/file-size.sh fails on a soft-cap warning count above its ceiling, which ends at 8 or fewer, down from 23. Renderers and compositors should read an owned, Send frame packet. Retained paint should visit at most 2 times the entries that changed. Those changes need the paint walk in modules with clear inputs. The paint differential harness that proves them needs a baseline to diff against.

What would help

1. First, add a test mode that writes each headless suite's per-frame instance, mark and hit streams to a hash file. Commit the baseline before any move. 2. Then move one area per PR into its own #[path = "runtime/paint/<area>.rs"] module, with no change in behaviour: clip scopes, text, images and video, layers and transforms, and marks and hits. The walk shares state across areas, so first gather that state into a walk-context struct that the area methods take by &mut. 3. Check the hashes in every PR. A changed hash means the move changed behaviour.

This is the first step of R0601, and it adds no retained behaviour.

Done when
How to check

scripts/file-size.sh and the stream-hash check, both in the required check (R0030).

Depends on
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 2, milestone 2b · priority P1 · size M
R0398Frame timing: no shared rule checks a frame target for staleness, monotonicity or a clock jumpP1Phase 2bST11
motion-frame-target-fallback · feature
What happens

A frame target is the time a frame is expected to reach the screen. Motion is sampled at it. Today only a macOS window has one, from its display link. The link converts the CoreVideo host time to an Instant, discards a tick that is late or less than three quarters of a period after the last one, and draws at once when the surface has rested. Those rules live in platform/display_link.rs and serve macOS only. Every other host passes Instant::now(), so it has no target to check.

The sibling issues add target sources for Windows (DWM prediction), Wayland (presentation feedback), web (the rAF timestamp) and LayerHost (the embedder's target timestamp). Each source can go stale: a suspended display link, a hidden tab, a monitor change, a missed callback. A target can also go backwards, and a clock-domain conversion can drift. With no shared rule, each host would handle these cases its own way, and motion would jump differently on each platform.

FrameClock already keeps motion on its trajectory across a late frame (hold never moves the clock back, and step charges the gap). It does not judge whether the target it is given is believable.

Where
Why it matters

A stale or backwards target shows as a jump: a scroll or spring moves too far, then stops. The targets: "A stale source falls back within 2 frames with 0 jump findings", with sample-to-present p95 <= 1 ms on macOS, iOS, Windows and Wayland and sample-to-rAF-target p95 <= 0.5 ms on web. Motion must also follow "the same trajectory" at any refresh rate, rate switch or late frame, within 1/64 device px for scene tracks and 0.5 pt for scroll.

What would help

Add one FrameTarget policy in frame/. Every host feeds it the source time, the period and its own receipt time, and takes back the target to sample at. It:

  • converts the source time to the runtime clock;
  • keeps targets monotonic, clamping one that goes backwards;
  • treats the source as stale when no update arrives within 2 periods, or the target leads now() by more than 3 periods, and then falls back to now() plus one period;
  • returns to the source once two consecutive updates agree, and re-locks after a rate change.

Move the macOS display link's stale-tick rules behind it where they are the same rule. Hosts call the policy instead of passing raw targets.

Done when
  • Every host that passes a frame target goes through FrameTarget.
  • With a mocked source, a suspended source falls back within 2 frames, a backwards target is clamped, and a 120 to 60 Hz change re-locks within 3 frames, each with 0 jump findings.
  • After a suspend and resume, motion continues on its trajectory with 0 jump findings beyond it.
  • The macOS window's targets are unchanged in the existing display-link tests.
How to check

Headless tests with a mocked source run in the required check. The scripts/motion-audit scenarios for rate switches and late frames run with the policy in place, and the audit reports 0 jump findings.

Part of
  • Theme: T11
  • Tracked in R0396
  • Phase 2, milestone 2b · priority P1 · size S
R0399Paint: nothing compares a second paint path's output against build() frame by frameP1Phase 2bMT11
perf-paint-differential · infra
What happens

Runtime::build is the only paint path. It walks every node in one pass and writes instances, marks, hits, surfaces and layer scopes. Any faster path, such as subtree skips, a slot index or a retained list patched in place, must produce what build() produces on every frame. Nothing checks that today.

PLAN.md asks each hard subsystem to have a fast path plus a reference path, with differential tests between them. Layout, text and the renderer have references (the renderer has rune-ref). Paint has none. research/37 measured the paint walk at 25 to 62% of a scroll frame and put retained paint per subtree off as large, high-risk work, citing fades, clips, sticky headers and hover. Without a harness, each step toward retained paint would need its own hand-written checks.

Where
Why it matters

A retained path that drifts from build() shows as a missing hover, a wrong clip or a stale fade, often only in one app. The targets: "On all suites, the harness shows identical resolved geometry (instances after group transforms), marks, hits, resource updates and scope balance between retained and legacy paths run in independent runtimes", and fallbacks stay "under 1% of frames". The harness is also what lets per-frame work "scale with what changed" without losing correctness.

What would help

Add a test mode, selected with RUNE_PAINT=legacy|retained (or a test-only setting), that:

  • runs every runtime and kit headless suite in two independently created runtimes, one with the candidate path and one with build(), under one virtual clock and deterministic atlas allocation;
  • per frame, compares resolved geometry (instances after any group transforms), marks, hits, surfaces, resource updates (images, atlas uploads) and clip and layer scope balance;
  • compares rune-ref pixels instead where draw order may differ legitimately;
  • names the first differing node path and frame on failure;
  • covers layer_opacity, matched crops, unclipped flights, sticky headers and exiting nodes in its scenes.

It starts with legacy on both sides, so it proves itself before any candidate exists. The split of build.rs is R0397. The harness roughly doubles T1 time for the paint suites, so partition them across jobs.

Done when
  • The harness runs over all runtime and kit headless suites in T1 and passes with legacy on both sides.
  • A seeded one-field mismatch in instances, hits, marks, surfaces and resource updates each fails, naming the node path.
  • A seeded unbalanced clip or layer scope fails.
  • The paint suites' T1 wall time stays within the CI budget after partitioning, with the number recorded in the PR.
How to check

The harness is a required T1 job (R0030). Seeded-mismatch tests sit beside it, so the oracle cannot go quiet.

Depends on
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 2, milestone 2b · priority P1 · size M
R0400Paint: build() visits every node, including subtrees scrolled or clipped out of viewP1Phase 2bMT11
perf-paint-subtree-skip · perf
What happens

The paint walk runs for paint_index in 0..n_nodes. Before it starts, it clears and resizes its scratch arrays (inh_scratch, drawn, drawn_scale, seen) to n_nodes. For each node it computes a screen rect and tests it against the viewport and clip, and records the result in seen[i]. A culled node paints nothing, but the walk still visits each of its descendants and repeats the test for each. A long scrolled page therefore costs the whole tree on every frame, not the part on screen.

research/37 measured the paint walk at 25 to 62% of a scroll frame. It also found the board's long-card scroll still misses the 8.3 ms budget: 82 frames over 8.3 ms, with p95 15 ms.

Where
Why it matters

Scrolling a long document or list is where a missed frame is easiest to see, and where wasted work costs battery. The targets: on the reference Mac, "p95 <= 4 ms and 0 frames over 8.3 ms per run", and "nodes visited <= the counted definition"; for very large lists, scroll CPU p95 <= 1 ms (fixed rows) and <= 2 ms (variable rows); and for motion, visits <= 2 x changed + feature-list nodes + 64, differing by <= 5% between 10,000-node and 100,000-node trees.

What would help
  • Store subtree_end for each node at flatten time, so a node's descendants are the range i + 1 .. subtree_end.
  • When a node is culled or clipped out and nothing beneath it can paint outside it, jump the walk to subtree_end in one step.
  • Size scratch only for the visited ranges, or keep it at its high-water mark and stop clearing the whole length.
  • Exclude subtrees that hold content painting outside their parent: exiting nodes, matched flights, sticky headers, unclipped flights and raised nodes. Mark these at flatten time so the check is one flag read.
Done when
  • On a 5,000-node page scrolled to the middle, build() visits at most the visible nodes plus their ancestors (count test).
  • Instances, marks and hits are identical to the full walk in the paint differential harness on all suites.
  • The board long-card scroll workload shows a lower paint-walk share and p95, measured with --profile perf in paired, alternating runs.
  • Visited nodes per scroll frame differ by <= 5% between 10,000-node and 100,000-node trees with the same viewport.
How to check
  • The paint differential harness (R0399) runs both walks over every suite in T1.
  • A count budget test records nodes visited per frame for the 5,000-node page and the 10,000/100,000-node pair.
  • A --profile perf scroll benchmark records the before and after median, with outliers kept.
Depends on
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 2, milestone 2b · priority P1 · size M
R0401Windows: frames record no present time, and motion is sampled at draw time with no prediction of when the frame showsP1Phase 2bLT11
perf-present-time-windows · feature
What happens

On Windows, Rune does not know when a frame reached the screen. The present-time module states that only macOS has a source; other platforms write no present time. So latency and missed presents cannot be measured on Windows, and a missed vsync looks like a frame that presented on time.

Motion timing has the same gap. A Windows window passes no frame target, so motion is sampled at Instant::now() when the frame starts. The surface is FIFO (AutoVsync) with a maximum frame latency of 2, so the frame reaches the screen one or two refreshes later, by an amount that varies. A spring sampled at draw time and shown a variable time later moves unevenly, even when every frame is on time.

Windows exposes what Rune needs. DWM reports the next vblank and the refresh period (DwmGetCompositionTimingInfo). DXGI reports per-present statistics (IDXGISwapChain::GetFrameStatistics: present count, refresh count, sync QPC time), and DirectComposition does the same for composition swapchains. All of these use the QPC clock, which Rune's host clock already reads.

Where
Why it matters

Without a present time, nobody can say whether a Windows app feels as quick as a native one. The targets: input-to-present on 60 Hz Windows references at "p50 <= 16.7 ms, p95 <= 25 ms", and "a platform with no real present source fails this criterion"; Windows DX12 ">= 99% at display rate"; sample-to-present p95 <= 1 ms and >= 97% one-period frames on the 144 Hz Windows machine; and every platform at "at least 99% one-period frames" with input-to-present p95 at most 2 periods.

What would help

1. Real present times. After each present, read DXGI frame statistics (or DirectComposition's for composition swapchains). Match them to frame ids through the present count, and write them to the frame record (R0121). wgpu owns the swapchain, so reach it through wgpu's HAL access if it exposes the swapchain, or add an accessor upstream. A backend with no statistics, such as Vulkan on Windows, reports present time as unsupported, never as the scheduled time. 2. Predicted present. Each frame, read DWM composition timing and predict the present as the next vblank plus the measured queue depth in periods. Pass that as the frame target through the shared policy (R0398), which falls back when timing is missing or stale. 3. VRR. While variable refresh is active, skip prediction and report that state separately.

Keep actual, predicted and proxy present times in separate fields, so a prediction never counts as a measured present.

Done when
  • On the Windows lane, 99% of presented frames carry a present time within 0.5 ms of PresentMon's for the same frame.
  • Missed presents in a scripted spring scene match PresentMon within 1%.
  • Windows windows pass a predicted target on DX12; on the 144 Hz reference machine, sample-to-present p95 is <= 1 ms.
  • Unsupported paths report "unsupported" in the frame record, and the present-source note (R0128) lists them.
  • Unit tests with recorded timing samples cover a refresh change, an occluded window, VRR and missing statistics.
How to check
  • A paired PresentMon comparison runs on the Windows lane.
  • Unit tests with recorded DWM and DXGI samples run in the required check.
  • Cadence and hitch numbers come from R0124 on the 144 Hz reference machine.
Depends on
Part of
  • Theme: T11
  • Tracked in R0396
  • Phase 2, milestone 2b · priority P1 · size L
R0402Windows: no reserved 144 Hz machine measures frames, latency, launch or memoryP1Phase 2bMT03
perf-lane-windows · infra
What happens

Every Windows performance number comes from an issue reporter. #47 measured live resize on a 239 Hz RTX 4070 machine. #99 found a ~215 ms DX12 check before the first device. #80 asks to control GPU memory policy for a client that stays open all day. Rune never measures its own Windows paths.

Those paths include DX12 through DirectComposition, which composites alpha on every GPU. They include steady presenting: after a change, Rune keeps presenting at the display's rate for 1 s, so that a G-Sync or FreeSync panel changes its rate once per interaction, not on every hover. They also include the precompiled shader path that #182 found unused. Present times are recorded only on macOS, so on Windows there is no real present source for input-to-present or missed presents.

Where
Why it matters

Windows users on 144 Hz panels are the ones who see a stutter, a slow launch or memory growth. The targets:

  • 60 Hz Windows reference: input-to-present p50 at most 16.7 ms and p95 at most 25 ms. At high refresh, p95 is at most 2 periods. Within one refresh of a Win32 control measured by the same probe.
  • At least 99% one-period frames at display rate on DX12, and at least 97% on the 144 Hz machine for motion.
  • Hello launch p95 at most 250 ms. Hello footprint within 1.2x of a native hello on the same machine.
  • On reserved 120 Hz Windows hardware, at least 5 windowed scenarios per verified candidate, with missed presents under 0.1% during scroll.
What would help
  • Reserve a Windows 11 PC with a discrete GPU and a display that runs at 60 Hz and 144 Hz. It runs on push to dev, nightly and on dispatch, never on pull_request.
  • Reuse the harness from R0125, with the Windows real present source from R0401. Inject input with SendInput.
  • Run the scenes from R0065 and the latency scenarios at both rates. Read DXGI frame statistics and a PresentMon capture side by side, so the two sources check each other.
  • Add launch timing, private working set, and the 10 s idle sample (0 presents at rest, and steady presenting ends 1 s after the last change).
  • Check every Windows row of R0066 with the same paired-run and noise-floor rules as the macOS lane.
Done when
  • Each dev push gets results from at least 5 windowed scenarios within 2 h.
  • A nightly run checks every Windows row of the perf matrix at 60 Hz and 144 Hz and fails on any violation.
  • DXGI statistics and PresentMon agree within 0.5 ms on present times, or the run is marked invalid.
  • Launch, private working set and idle presents are recorded per rev, with backend, device and date.
How to check

A seeded 3 ms stall in the scroll scenario turns the lane red. A build that keeps presenting after the 1 s steady window fails the idle sample. The nightly report keeps it proven.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 2, milestone 2b · priority P1 · size M
R0403Frames: a slow-frame report does not separate pace and drawable waits or name the first-use work that ran longP1Phase 2bST11
perf-stall-attribution · feature
What happens

With RUNE_PERF on, a slow interaction is reported in phases: queue wait, update, encode and present wait. While a frame runs long, a watchdog samples the UI thread's stack. Two things are missing.

First, the waits are not split out. On Metal, pace() blocks until at most IN_FLIGHT - 1 frames are still on the GPU. The window acquires its drawable before latching live values. Both waits fall inside the existing phases, so a slow frame cannot say whether it waited on the GPU, on a drawable or on its own work.

Second, a stack sample names functions, not resources. It does not say which pipeline compiled, which font registered, how many bytes were shaped or uploaded, or which blocking platform call ran. So a 30 ms first-use stall still needs a profiler to explain. The only stall warning is a debug-build check at 8 ms.

Where
Why it matters

A one-off 30 ms freeze the first time a menu opens is what users remember. To fix it, a developer or agent first needs to know what ran. The targets: "Zero Rune-caused tasks over 8.3 ms after the first frame on the reference Mac, Windows and Linux machines", hitch-time ratio <= 1 ms/s in flagship scripts, and T1 counts of "0 pipelines built and 0 fonts registered on main after the first frame". GPU frame cost and presentation cadence should be "recorded on every frame".

What would help
  • Add pace wait and drawable wait as separate fields in the frame record (R0121).
  • Add scoped markers, each one Instant read at start and end: font registration, pipeline compile (with its kind), text shaping (bytes), image upload (bytes), blocking platform call (with its name), accessibility tree build.
  • Keep markers in a fixed-size per-frame buffer, so recording allocates nothing.
  • A slow frame's ui.frame or ui.interaction span and dev_stats carry its top markers by time.
  • With telemetry off, a frame checks one cached flag and nothing else, as the interaction module does today.
Done when
  • An injected 20 ms stall inside each marker kind is named correctly in a --profile perf build.
  • A frame that waits in pace() or for a drawable reports that wait in its own field.
  • Recording allocates nothing (alloc test).
  • With telemetry off, the frame path does only the cached flag check (test).
  • The first-use suite reads the markers, and names the work behind every frame over one refresh.
How to check
  • Unit tests inject stalls per marker kind and assert the report.
  • crates/rune/tests/alloc.rs covers marker recording.
  • The first-use suite reads the markers in T1 and on the platform lanes.
Depends on
Part of
  • Theme: T11
  • Tracked in R0395
  • Phase 2, milestone 2b · priority P1 · size S
R0404Perf: no scripted suite runs first uses in a fresh process, so one-off stalls are found by handP1Phase 2bMT03
perf-first-use-suite · infra
What happens

A first use shows its cost only in a fresh process with cold caches. Examples are the first fade, blur or card open, the first CJK or emoji text, the first 5K image, the first overlay or Wayland layer shown, a first drag-out, a first prefs write, and the first screen-reader activation. The measured costs are large. With macOS's shader cache cleared, building the one uber pipeline takes 89 ms, against 0.94 ms warm. On a task board, the first frame takes 86 to 172 ms of CPU and opening the diagram card takes 136 ms, of which 27 to 38 ms is shaping text seen for the first time.

Rune prewarms a renderer on a background thread, but nothing checks that each first use stays off the main thread. real-frames.py drops the warmup when it summarises, and the canonical scenes run warm. The stall issues name a first-use suite in their acceptance criteria, but none exists.

Where
Why it matters

Users notice a one-time hitch the first time they open a card or show an overlay, and that is often the moment they judge the app. The targets: 0 Rune-caused main-thread tasks over 8.3 ms after the first frame on the reference Mac, Windows and Linux machines, and a hitch-time ratio of at most 1 ms/s in flagship scripts. The pre-merge counts: 0 pipelines built and 0 fonts registered on main after the first frame, and image upload bytes per frame under the committed cap. Wall-clock suites run nightly on every platform lane.

What would help
  • Add a first-use runner on real-frames.py, using the scenes from R0065. Each scenario:
    • starts a fresh process;
    • optionally clears the system shader cache and Rune's caches (the cold run);
    • waits for a scripted ready condition after on_ready;
    • performs one first use;
    • reports each main-thread task over one refresh, with its stall markers from R0403 and the hitch-time ratio.
  • Give every first use listed above its own scenario.
  • Run it nightly, cold and warm, on the reserved lanes. Start with R0125, then the Windows and Linux machines. Clearing the system shader cache needs a dedicated machine.
  • Add a headless mode that reports the counts for the pre-merge check: pipelines built on main after the first frame, fonts registered on main, and bytes uploaded in one frame.
Done when
  • Every first use listed above has a scenario.
  • The reserved lanes run the suite nightly, cold and warm, and fail on any Rune-caused main-thread task over 8.3 ms.
  • The headless count half runs before every merge and fails on a pipeline built or a font registered on main after the first frame.
  • Results record the rev, backend, device, cache state and date.
How to check

On a branch, build the fade pipeline lazily on the first fade. Both halves must fail: the nightly lane on the task over 8.3 ms, and the headless check on the pipeline count.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 2, milestone 2b · priority P1 · size M
R0405Input: events on Windows, Linux, web and iOS are stamped when Rune handles them, so latency and fling velocity miss the OS event timeP1Phase 2bLT11
platform-input-timestamps · feature
What happens

An input event's arrival time comes from the NSEvent timestamp on macOS. Everywhere else it is Instant::now() when Rune handles the event. Time the event spent queued before the event loop ran is missing from every latency figure.

Touches are worse. They are not an input kind for arrival time at all. The winit host stamps each touch with the time it handles it, on a clock that starts with the first touch. Web touches go through the same function. The velocity estimator takes two samples at a time. When several touch moves arrive in one event-loop turn, their dt is near 0, so velocity spikes and hits the 8,000 pt/s clamp, or is not updated at all. On web, getCoalescedEvents() samples are never read. LayerHost has no touch method; an embedder calls Runtime::touch with whatever time it has.

Where
Why it matters

A fling that comes out too fast or too slow feels wrong at once, and a latency number that leaves out queue time looks better than the app is. The targets: 60 Hz Windows, Linux and web at input-to-present "p50 <= 16.7 ms, p95 <= 25 ms"; "touch release velocity within 10% of the least-squares reference; no fling reaches the speed clamp from coalesced events"; release springs that start "within max(2%, 10 pt/s) of the hand velocity"; touch estimator error "<= 5% median and <= 15% p95"; and input-to-present p95 at most 2 periods on every platform.

What would help

Carry the OS event time on every pointer, touch and wheel sample in shell::Event (R0199), into the frame record (R0121) and the velocity estimator, coalesced samples included. Sources:

  • Windows: WM_POINTER* with GetPointerInfoHistory for coalesced samples and their PerformanceCount times; GetMessageTime for other messages. Rune subclasses the window procedure today only for custom-frame windows, so this needs a subclass on every window it drives. Turn off winit's touch path there, or input arrives twice.
  • Wayland: wl_pointer and wl_touch event times, mapped through the wp_presentation clock. X11: the server time.
  • Web: PointerEvent.timeStamp, with every getCoalescedEvents() sample.
  • iOS: UITouch.timestamp through a LayerHost touch method.

Map each to the runtime clock. Keep receipt time as the fallback, and force times to be monotonic within a gesture.

Done when
  • Tests convert each platform's event time to Instant within 1 ms.
  • An injected 20 ms event-loop stall shows as 20 ms more input-to-present on the Windows and Linux lanes.
  • 4 coalesced touch moves delivered at once, with event times 4 ms apart, give a velocity within 5% of the true speed.
  • Web passes every getCoalescedEvents() sample to the estimator.
  • Out-of-order or equal timestamps never give a non-finite or clamped velocity.
  • Each input is matched to the first frame that shows its effect, including a test with a frame that shows none.
How to check
  • Headless tests with synthetic timestamps in the required check.
  • The Windows GUI lane (R0063) injects input with InjectSyntheticPointerInput.
  • Replays on the Wayland and web lanes.
Depends on
Part of
  • Theme: T11
  • Tracked in R0395
  • Phase 2, milestone 2b · priority P1 · size L
R0406Scroll: no recorded native gestures check that Rune's flings and drags move as UIScrollView's doP1Phase 2bLT10
motion-gesture-corpus · infra
What happens

Only hand-written unit tests check Rune's fling physics, against Rune's own expectations. The one rate test checks that an edge return that starts out of range is frame-rate independent. Nothing compares a fling's release velocity, distance, duration or edge behaviour with UIScrollView. Nothing checks that content under a dragged finger or pointer keeps up with it.

Research 15 asks for a recorded gesture corpus to tune the velocity estimator and score scroll feel. PLAN.md asks for the estimator to be tuned on one. No corpus, replay format or trajectory rule exists, so every touch-feel change is judged by eye.

Where
Why it matters

Scrolling should match the native toolkit for each kind of input. The touch target: distance and duration within 2% of recorded UIScrollView trajectories, and estimator error at most 5% median and 15% p95 (floor 20 pt/s). Drags should lag the hand by at most 1 refresh. Every criterion should be checked continuously, against absolute targets and the native peer. The estimator, edge hand-off and drag velocity issues can't show they are done without this corpus.

What would help

1. Format. Define a replay format for timestamped input: event time, phase, position, and coalesced samples. Each stream carries the native view's offset at every display-link tick and UIKit's own release velocity from scrollViewWillEndDragging. Keep it general enough for trackpad and wheel traces, which the desktop survey adds later. 2. Recording. Record on a pinned iOS version and device, with a UIScrollView in the same process logging contentOffset per CADisplayLink tick. Record flings by hand for realistic coalescing, and add synthesized drags for exact repeatable speeds. Recordings hold only positions and times, with no personal data. Keep the corpus under 1 MB. 3. Harness. Replay each stream into a headless Runtime at 60 and 120 Hz, aligned by event time. Compare per-frame offsets. 4. Rules. Add trajectory and lags-hand rows to the motion gate's RULES. Define a fling's duration as the time until speed drops below 1 pt/s. 5. Docs. Document the format, device, OS version and how to record more next to the corpus.

Done when
  • At least 40 UIScrollView flings are committed, slow to fast, including edge hits and releases after a pause, each with UIKit's release velocity.
  • Pointer and finger drag recordings are committed.
  • Replay tests check release velocity, distance, duration and edge behaviour. The required check fails when a fling leaves 2% in distance or duration, or a drag lags by more than 1 refresh.
  • The format, device, OS version and recording steps are documented next to the corpus.
How to check

The replay tests run in the required check from R0030. They fail before the estimator lands, so mark those rows as failing with a link to R0407 until it lands. OS event times come from R0405. Re-record one fixture when the pinned iOS version changes.

Depends on
Part of
  • Theme: T10
  • Tracked in R0384
  • Phase 2, milestone 2b · priority P1 · size L
R0407Touch scrolling: fling speed comes from the last two samples, so flings are noisy and coalesced events hit the 8,000 pt/s clampP1Phase 2bMT10
motion-touch-velocity-estimator · feature
What happens

touch_move sets the release velocity to (along - last) / dt over the last two samples. On winit hosts, each touch is stamped when Rune handles it, on a clock started by the first touch, not with the event's own time. Touches handled in the same run-loop turn get a dt near 0. A 2 pt move over 0.1 ms reads as 20,000 pt/s, and touch_scroll_end clamps it to 8,000 pt/s. A slow, careful lift can fling the list to its end.

Even with good timestamps, a two-sample difference is noisy at the end of a gesture. A release counts as a fling if it comes within 100 ms of the last move. Research and Android use 40 ms.

rune-motion's VelocityTracker fits least squares over 100 ms and 20 samples, with a 40 ms stop rule. Nothing in rune or rune-kit uses it.

Where
Why it matters

Release velocity is what makes a fling feel right. The target: estimator error at most 5% median and 15% p95 against the recorded reference (floor 20 pt/s), and 0 releases clamped from coalesced events. Release velocity should be within 10% of the least-squares reference. Bad input should never produce a non-finite velocity. Drag velocity hand-off (R0408) reuses the same estimator.

What would help

The records offer two options.

1. Use the existing VelocityTracker (least squares) for touch release. 2. Add an impulse estimator over a ring buffer to rune-motion, beside VelocityTracker, and keep least squares as the reference it is scored against.

Option 2 is recommended. Research 15 explains why: least squares fits the middle of the window, so it is noisy at the release point, and impulse is robust to jitter. Also:

  • Use OS event times from R0405, and include coalesced samples.
  • Start the stop rule at 40 ms and tune it on R0406.
  • Ignore samples with dt <= 0. Return zero when fewer than two distinct times remain.
  • First measure clamp hits and error for the current code on the corpus, so the change has a baseline.
  • Add a changelog fragment and a before-and-after trace, because fling distances change.
Done when
  • Touch release velocity comes from the impulse estimator over the last 100 ms.
  • A finger held still for the stop-rule time before lifting throws nothing. A 50 ms pause gives no fling.
  • On the corpus, error against UIKit's recorded velocity is at most 5% median and 15% p95, with a 20 pt/s floor for slow releases. Error against the least-squares reference is within 10%.
  • No replayed release reaches the 8,000 pt/s clamp because of coalesced events.
  • The same fling at 60 and 120 Hz lands within 1 pt.
  • Duplicate, out-of-order and stationary samples give finite velocities in a property test.
How to check

The corpus replay tests from R0406 run in the required check. The property test runs with the rune-motion tests. The existing touch scroll tests in crates/rune/src/runtime/scroll/touch.rs keep passing.

Depends on
Part of
  • Theme: T10
  • Tracked in R0384
  • Phase 2, milestone 2b · priority P1 · size M
R0408Gestures: a drag's release can't hand its speed to the spring that settles itP1Phase 2bMT10
motion-drag-velocity · feature
What happens

Drag reports phase, position, size, start, travel and click count, but no velocity. Say an app lets go of a sheet, a slider thumb or a swipe-to-dismiss row. It commits a new target, and the frame spring starts from zero velocity. The element stops dead under the finger and then accelerates away from it, so the release looks lifeless.

The pieces are partly there. Anim has a Velocity::Uniform field, which Kit's pane uses with a velocity it computes from a spring. Row reorder reads the store's own velocity to keep a slide's speed. Apps have no measured hand velocity to give either one. SwiftUI's DragGesture.Value has velocity and predictedEndTranslation. PLAN.md says a release hands velocity to a spring.

Where
Why it matters

Direct manipulation should follow the hand and pass its velocity on. The target: at three release speeds, the release spring starts within max(2%, 10 pt/s) of the hand velocity. A catch jumps at most 0.5 pt and moves at the hand's velocity on the next frame. Drag lag stays at or under 1 refresh. On iOS, people notice a sheet or card that doesn't carry their flick at once.

What would help
  • Add Drag::velocity() -> (f32, f32) and Drag::predicted_end(deceleration) -> (f32, f32) as methods. Velocity is in pt/s in the element's local coordinates, divided by any scale it draws at, like dx and dy. The runtime builds Drag, so a pub(crate) field plus methods breaks no app.
  • Measure velocity with the shared estimator from R0407, on timestamped pointer and touch samples. A cancelled drag reports zero.
  • Add Tx::release_velocity(key, (vx, vy)). The next commit's frame spring for that key starts at that speed, converted per lane (x and y for position, and for width and height when a resize is released).
  • Use it in Kit's tab-strip drag and SplitView divider, and in the Slider from #149 when that lands.
  • Add a changelog fragment, because Kit's drags start to carry velocity.
Done when
  • Pointer and touch drags at 150, 600 and 2,400 pt/s, released into a spring, start it within max(2%, 10 pt/s) of the hand speed.
  • Inside a scaled and rotated parent, velocity() is in local points.
  • Catching a settling element jumps it at most 0.5 pt, and it moves at the hand's velocity on the next frame.
  • A cancelled drag reports zero velocity.
  • The docs show a swipe-to-dismiss example, and Kit's tab drag uses the API.
How to check

Headless tests cover the three speeds, the transformed parent and the catch. A gate scenario releases a tab drag and checks for 0 jump findings at release. Both run in the required check.

Depends on
Part of
  • Theme: T10
  • Phase 2, milestone 2b · priority P1 · size M
R0409Scrolling: no recorded survey shows what each desktop OS sends for trackpad, wheel and keyboard scrolls, or how native views move in replyP1Phase 2bMT10
motion-trackpad-inertia-survey · research
What happens

Rune's desktop scroll code rests on guesses about what each OS sends, and nobody has recorded the streams. Runtime::wheel applies deltas 1:1 because the platform is said to supply its own momentum phases (crates/rune/src/runtime/input/pointer.rs:408-410). The wheel lock treats a stream with no phases as a mouse wheel, or as most trackpads off macOS (crates/rune/src/runtime/scroll/x.rs:13-22). A line delta becomes 40 pt per line (x.rs:64-67). The window path keeps winit's phase and marks pixel deltas as precise (crates/rune/src/window/events.rs:429-441). The web path drops the phase (crates/rune/src/platform/web/input.rs:224-233). The research table says who supplies inertia on each platform (research/06-reactivity-animation.md:704-710), but its sources are docs, not recordings.

Open questions:

  • macOS: which phases and momentum phases winit passes for a flick, a slow drag, and a flick caught by a new touch.
  • Windows 11: does a precision touchpad send inertial wheel events to a winit window, or does inertia only come through DirectManipulation? Do high-resolution wheels send fractional line deltas?
  • GNOME and KDE Wayland: do libinput's finger source and axis stop reach winit, and does any momentum arrive?
  • X11: what does XInput2 smooth scrolling send?
  • Chrome and Safari on macOS: do wheel streams carry OS momentum, and can a mouse notch be told apart from trackpad pixels?
  • Keyboard: how far and how fast do Page Down and arrow repeat move NSScrollView, Chromium and GTK4?

Without the answers, the physics issues may add inertia the OS already adds, or leave a platform with none.

Where
Why it matters

Desktop users judge scroll feel on the first swipe. The scrolling target asks Rune to match the native toolkit for each kind of input on each platform. That means elastic overscroll on macOS. For whole notches, no frame moves over 35% of the notch at 120 Hz, and the glide lands within 150 ms ± 1 frame. Precise deltas are never glided. Windows precision touchpads and Linux trackpads coast within 10% of Chromium's and GTK4's distance. The gesture target asks for offsets within max(2 pt, 5%) of the native trace per frame, and keyboard scrolls within 10% of the native trajectory. All of these need a recorded native reference. The measurement target asks that each published number records rev, backend, device and date.

What would help

Record the raw winit events on each platform: delta and unit, phase, momentum phase where there is one, and timestamp and its clock. For the same input, record the native reference offset on each frame.

  • Platforms: macOS (built-in trackpad, Magic Trackpad, a notched mouse, a free-spinning wheel), Windows 11 with a precision touchpad and a notched mouse, GNOME Wayland, KDE Wayland, X11, and Chrome and Safari on macOS.
  • Gestures: two-finger flick, slow drag, flick then catch, one mouse notch, a burst of notches, Page Down, and an arrow key held for 1 s.
  • References: NSScrollView on macOS, Chromium on Windows, GTK4 on Linux.

Use the format of R0406, so one replay harness reads both. With each stream, store the device, OS version, browser, driver, scroll settings (lines per notch too), and the Rune and winit revisions.

Add a research note at the next free number in research/, with one table per platform. Each table gives phases, momentum, line or pixel deltas, the timestamp source, whether notches can be told apart, who supplies inertia, and so what Rune must add.

Done when
  • The research note has a table for every platform above, and a fixture backs each row.
  • Fixtures for every platform and gesture are committed with their recording metadata, and a headless replay test loads them.
  • Each fixture that has a native reference carries per-frame offsets from NSScrollView, Chromium or GTK4.
  • R0586, R0595, R0589 and R0596 each cite the note's answer for their platform.
How to check

A headless test loads every fixture, checks its metadata fields, and replays its events through Runtime::wheel_event. The physics issues' tests replay the same fixtures against the native offsets. Record the fixtures again when Rune moves to a new winit major version, and diff the tables.

Depends on
Part of
  • Theme: T10
  • Tracked in R0584
  • Phase 2, milestone 2b · priority P1 · size M
R0410Overlays: wheel, IME and secure input are dropped, and winit-backed overlays also drop the secondary clickP1Phase 2bMT11
platform-overlay-input-parity · feature
What happens

Overlays on winit windows (macOS panels, Windows, X11 and XWayland) handle cursor move and leave, modifiers, focus, keys (with KeyPolicy::OnDemand) and the left mouse button. They have no arm for MouseWheel, Ime or any other button. Layer-shell overlays also route the secondary click and touch, but they read no wl_pointer axis events, have no IME, and push every key with repeat: false, so a held key never repeats. No overlay takes secure input; only windows hold a SecureInput claim.

So a command palette, popover or launcher in an overlay cannot scroll with the wheel or trackpad, cannot take CJK or other IME input, and on winit-backed overlays cannot open a context menu. A password field in an overlay does not turn on secure event input.

Where
Why it matters

Overlays hold some of an app's most used surfaces: launchers, palettes, HUDs and popovers. A palette that ignores the wheel or cannot take Japanese input feels broken next to a native one. The targets: desktop app services that "match Electron on macOS, Windows and Linux", 100% Native except where no OS API exists; and text input that "uses each platform's own protocol in windows, overlays, panels and mobile views", in 100% of cases on every adapter and host type, with the candidate window within one line height of the caret.

What would help

Once shell::Event exists (R0199), route every overlay through the window input path:

  • wheel and trackpad with phases;
  • all buttons, so the secondary click reaches on_secondary_press;
  • IME through the text-input protocol (R0113);
  • secure input, taken on focus of a secure field and released on blur and on hide.

On layer-shell, add wl_pointer axis events (with their source and stop events for phases) and key repeat from wl_keyboard repeat_info. Keep the existing layer-shell secondary click and touch paths. Respect OverlayInput and KeyPolicy as today. A macOS non-activating panel must still not take focus; test that with the launcher example.

Done when
  • An overlay scrolls with the wheel and trackpad on macOS, Windows, X11 and layer-shell.
  • A secondary click reaches on_secondary_press in winit-backed overlays, and still does on layer-shell.
  • A focused field in an OnDemand overlay passes the IME conformance cases on a macOS non-activating panel, a Windows WS_EX_NOACTIVATE overlay and a layer-shell overlay.
  • A secure field in an overlay takes secure input on focus and releases it on blur and on hide, with claims counted.
  • Held keys repeat in layer-shell overlays at the seat's rate and delay.
  • The launcher example's panel still does not activate on macOS.
How to check
  • Headless overlay input tests for wheel, buttons, IME and secure-input claims.
  • GUI-lane cases on macOS, Windows, X11 and a layer-shell compositor.
Depends on
Part of
  • Theme: T11
  • Phase 2, milestone 2b · priority P1 · size M
R0411Compose: lab and cursed-settings write app state and call invalidate from Compositor::render, which a read-only FrameView cannot serveP2Phase 2bMT11
arch-compositor-state-writes · refactor
What happens

A compositor's render gets Frame.rt: &mut Runtime<S>. Two in-repo compositors use that to write app state during the frame.

  • Lab reads the frame's CPU and GPU times, then writes rt.state.perf and rt.state.now, and calls rt.invalidate() so the view shows the new numbers.
  • Cursed-settings owns its demo clock, flush timing and demo pointer in the compositor. It writes st.now, st.flush_requested, st.flush_t0 and st.cursor, and calls rt.invalidate() when any of them changed.

R0412 replaces Frame.rt with a read-only FrameView. A read-only view cannot serve these writes, so both examples would break, and so would any app compositor that does the same. Nothing lists which compositors read and which write.

Where
Why it matters

A compositor that measures the frame, or owns a visual clock, has a real reason to feed state back to the view. If the read-only view removes that path with no replacement, those apps have no way to move. The targets: compositors "read an owned, Send frame packet, not the runtime", and after the deprecation date "Frame exposes no &mut Runtime". Apps pin revs, so "a renamed or removed stable item keeps a #[deprecated] alias for at least one fold and 30 days".

What would help

1. List every in-repo compositor's reads and writes of Frame.rt, and record which writes have no read-only replacement. 2. Add Frame::update(impl FnOnce(&mut S) + 'static). The runtime queues the closure and applies it on the main thread before the next commit. A queued update marks the view dirty, so invalidate() is no longer needed. 3. Migrate lab and cursed-settings to Frame::update. Use the two examples as fixtures for the queued path. 4. Keep Frame.rt for at least one fold and 30 days after Frame::update and FrameView reach dev.

If an update must land in the same frame, as lab's numbers might, say so in the docs: it lands in the next commit, one frame later, which is fine for a readout.

Done when
  • Neither lab nor cursed-settings uses Frame.rt.
  • A queued update lands in the next commit and redraws the view (headless test).
  • A compositor that queues no update causes no extra commit or frame (test).
  • The inventory of compositor reads and writes is in the PR description.
  • A changelog fragment describes Frame::update.
How to check
  • Headless tests drive a compositor that queues an update and assert the next commit and frame.
  • Lab and cursed-settings build in cargo check --workspace --all-targets, and their headless scripts produce the same frames as before.
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 2, milestone 2b · priority P2 · size M
R0412Compose: a compositor receives &mut Runtime<S>, so effects couple to every runtime internalP2Phase 2bMT11
arch-compositor-frame-view · refactor
What happens

A compositor gets a Frame whose rt field is &mut Runtime<S>. Every host builds it that way: window, overlay, web and LayerHost. Most compositors only read from it: instances, marks, the text atlas, the clear colour, t, images, element rects and the pointer. The showreel compositor and the rune-fx tests read exactly that. But because the field is a mutable borrow of the whole runtime, an effect can write past the runtime's invariants. A frame also cannot be handed to anything that is not the runtime: not a worker thread, not a recorded packet, not a test fake.

Two in-repo compositors also write. Lab writes rt.state.perf and rt.state.now and calls invalidate(). Cursed-settings writes its clock, flush and cursor state and calls invalidate(). R0411 gives those writes a queued replacement first.

Where
Why it matters

An effect that can reach any runtime field breaks whenever that field moves, and pins the renderer to the main thread. The target: "Renderers and compositors read an owned, Send frame packet, not the runtime", and "after its deprecation date, Frame exposes no &mut Runtime". Apps get time to move: "a renamed or removed stable item keeps a #[deprecated] alias for at least one fold and 30 days".

What would help
  • Add FrameView<'_, S>: a read-only borrow of the frame's instances, marks, atlas, images, clear colour, size, scale and t, plus &S, element rects and the pointer. Add Frame::view().
  • Migrate the in-repo compositors (showreel, the rune-fx tests and the crate tests and examples that implement Compositor) to view(). Lab and cursed-settings move once the queued update exists.
  • Mark Frame.rt #[deprecated], with an earliest removal date at least one changelog fold and 30 days after the deprecation reaches dev.
  • After that date, remove it with a **Breaking:** fragment that names Frame::view() and the queued update as replacements.

The owned, Send frame packet a worker can take is later work under R0601; this view is the borrowed step before it.

Done when
  • Frame::view() exists and every in-repo compositor compiles without Frame.rt.
  • Frame.rt is #[deprecated], with its earliest removal date in the changelog, at least one fold and 30 days out.
  • After that date, Frame exposes no &mut Runtime (API snapshot).
  • The removal ships with a Breaking fragment naming the replacements.
How to check
  • The API snapshot and semver checks (R0027) run in T1.
  • The rune-fx tests and the compositor tests in crates/rune/tests run in T1.
  • The deprecation date is checked against the fold history before the removal PR merges.
Depends on
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 2, milestone 2b · priority P2 · size M
R0413Web: motion is sampled when the frame handler runs, not at the requestAnimationFrame timestamp, and frames carry no input timeP2Phase 2bMT11
motion-web-raf-timestamp · feature
What happens

The web host steps the clock to Instant::now() inside RedrawRequested. winit drives redraws with requestAnimationFrame but does not pass on the callback's timestamp. If the handler starts 3 ms late, motion is sampled 3 ms late. Motion then jitters with main-thread load, even when the browser presents on every vsync.

Input has the same gap. input::time::arrived stamps each event with Instant::now() when Rune handles it. Only macOS reads a native event time. The DOM's event.timeStamp is dropped.

Nothing records when a frame was presented or why it was requested. WebGPU gives no presentation feedback. Because of this, #166's 30 frames a second at rest on an iPhone were found by hand, and their cause is still unknown.

Where
Why it matters

Web users in Chrome and Safari see motion stutter whenever a handler runs long, and nobody can measure their latency. The targets: web sample-to-rAF-target p95 <= 0.5 ms; >= 97% one-period frames in Chrome and Safari; a stale source falls back within 2 frames with 0 jump findings. Latency references at 60 Hz are p50 <= 16.7 ms and p95 <= 25 ms, and a platform with no real present source fails that criterion. So the web estimate below is a labelled proxy and counts toward no latency row. At rest, the target is 0 presents and 0 submissions.

What would help

1. Frame target. All rAF callbacks in one frame get the same timestamp. So the smallest change: just before each request_redraw, the bridge (crates/rune/src/platform/web/bridge.js) registers its own rAF callback, which stores the timestamp, and RedrawRequested reads it. The other option is for Rune to drive the canvas from its own rAF loop and drop winit's redraw. That gives full control but is a larger change. I recommend the first option. Set the target to the timestamp plus one period. Take the period as the median of the last 8 rAF deltas, ignoring deltas over 1.5 periods (skipped callbacks). After a hidden tab resumes or a gap over 100 ms, apply the rule from R0398. 2. Input time. Convert event.timeStamp to the frame clock as Instant::now() - (performance.now() - timeStamp) and use it as the arrival time. 3. Present estimate. Record the rAF timestamp of the frame after submit as a present estimate in the proxy field of the record from R0121. Label it as an estimate in every report. R0128 records that this is the web's source. 4. Reason. Record why each frame was requested: input, live value, animation, compositor, timer or resize.

Done when
  • The web host's frame target is the rAF timestamp plus the estimated period.
  • In a headless browser test with a 6 ms busy handler, each sample time is within 0.5 ms of its callback's timestamp plus the period.
  • Tests cover skipped callbacks, a 60 to 120 Hz change and a resumed tab, with 0 jump findings.
  • A test checks event timestamp conversion, and that each input is matched to the frame that drew its effect.
  • The web lane reports input-to-next-rAF latency, labelled as an estimate and kept apart from present-based metrics.
  • Frames requested per second are reported with a reason for each, and an idle app reports 0.
How to check

A Playwright scenario in scripts/web-smoke.mjs asserts the record fields and the busy-handler timing in Chromium and WebKit. A web scenario in scripts/motion-audit checks for jump findings.

Depends on
Part of
  • Theme: T11
  • Tracked in R0396
  • Phase 2, milestone 2b · priority P2 · size M
R0414Web: no lane measures launch, input latency, cadence or idle frames, and Safari is skippedP2Phase 2bMT03
perf-lane-web · infra
What happens

scripts/web-smoke.mjs already checks that an idle page submits no frames and requests no animation frames over 600 ms. It measures nothing about launch, input latency or cadence. No workflow runs it. Headless WebKit has no WebGPU adapter, so the script logs WebKit as unavailable and moves on.

The bugs found so far came by hand. #166 found 30 frames a second at rest on an iPhone. #104 found resize flicker. A 600 ms idle window is too short to catch a slow timer.

Where
Why it matters

Web users on phones pay for wasted frames in battery, and a slow first frame looks like a broken page. The targets: web hello's "first canvas frame p95 <= 1 s on a pinned mid-range Android phone in Chrome and on an iPhone in Safari, warm HTTP cache"; web input-to-present "p50 <= 16.7 ms, p95 <= 25 ms"; 0 presents at rest on every host; "First-frame time is recorded per rev"; and wall-clock suites nightly on the web lane.

What would help

Grow web-smoke into a nightly perf lane:

1. Measure navigation start to first canvas frame, input to next requestAnimationFrame latency (labelled an estimate), cadence during a spring scene, and a 10 s idle sample. Use the rAF timestamp from R0413, so cadence is measured at the frame time. 2. Run desktop Chrome and real Safari on the Mac lane machine. Run Chrome on a pinned mid-range Android phone and Safari on an iPhone over the device lane from R0248, with a warm HTTP cache. 3. A skipped engine fails the run. 4. Map each number to its target through R0066. Record rev, browser, device and date.

Done when
  • Real Safari and Chrome results appear every night, on desktop and on the pinned phones.
  • A skipped engine fails the run.
  • An idle page that draws any frame in 10 s fails the lane.
  • Web hello's first canvas frame p95 is at most 1 s on the pinned phone with a warm cache.
  • A first-frame regression over 10% fails the device lane.
How to check

The nightly web lane and its per-rev report. Reverting a fix for #166 on a dispatched run proves the idle sample fails.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 2, milestone 2b · priority P2 · size M
R0415Scrolling: with keeps active, one frame can run the whole paint walk four timesP2Phase 2bST11
perf-keeps-rebuild · perf
What happens

A frame's motion step calls build() once. Then, while keep_on_screen or scroll anchors are active, it loops up to three more times: follow_keeps() moves the scroll offset to make up for the kept node's drawn displacement, and then build() runs again. Each build() clears node-sized scratch arrays (inh_scratch, drawn, drawn_scale, seen, stuck, sticky_frame), resizes them and walks every node.

follow_keeps also finds each kept node by scanning the whole node list for its path. That costs O(keeps × nodes) on every pass.

A chat transcript that keeps a row in place while content above it grows can pay four full paint walks in one frame. A headless profile at an older rev measured the paint walk alone at 25-62% of a scroll frame. That was one walk, so four can blow the frame budget.

Where
Why it matters

Users notice it as a hitch in a chat or log view at the moment new content pushes a kept row: the frame that has to hold the row still is the one that runs long. The targets: <= 1 full paint build per frame, and on the reference Mac CPU p95 <= 4 ms with 0 frames over 8.3 ms per run.

What would help

Work out the keep compensation before the single build(), so a frame builds once.

  • Option A (recommended). Compute each kept node's drawn position from Scene's presented values and the scroll offsets of its ancestors, without a paint walk. Then apply the offset change and build once.
  • Option B. Keep the extra pass, but rebuild only the affected viewport's subtree. This depends on subtree skipping in paint, so it lands later and is more complex.

In both options, find kept nodes through an index from path or id to node slot, refreshed at commit, instead of a scan over all nodes. Keep the loop in debug builds as an assertion that a second follow_keeps pass changes nothing.

Keep compensation is subtle, especially with sticky clamping and clamped keeps at either end. The frame-by-frame geometry check below guards it.

Done when
  • build() runs once per frame in every gate scenario (counted).
  • Presented keep geometry and scroll offsets are identical, frame by frame, before and after the change in the keep-stuck, growth-reorder and nested-keep scenarios, including clamped keeps at both ends.
  • A debug assertion checks that a second follow_keeps pass is a no-op.
  • follow_keeps visits no nodes beyond the kept nodes and their viewports (counted).
  • The existing keep tests pass.
How to check

The keep tests and count budgets run in the required check, with a build-count assertion. A nested-keep scenario is added to scripts/motion-audit and passes, as every motion change must.

Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 2, milestone 2b · priority P2 · size S
R0416iOS: LayerHost samples motion at Instant::now() and records no input or present timeP2Phase 2bMT11
perf-present-time-ios · feature
What happens

LayerHost::frame steps the clock to Instant::now(). The embedding app's CADisplayLink knows targetTimestamp: on ProMotion, that is when this frame will reach the screen. Motion therefore jitters by however long the host waits before it calls frame().

The frame is presented with no presented handler. The Metal hook that reads each drawable's presentedTime for macOS windows is compiled only for target_os = "macos". An embedded iOS surface therefore has no frame telemetry. EmbedFrame reports only CPU time.

Touches have no OS time either. The embedder has no API to pass UITouch.timestamp. The window touch path times touches on a clock that starts with the first touch, and Runtime::touch takes a time on any steady clock.

Where
Why it matters

iPhone users feel uneven motion when the embedding app's main thread is busy, and no one can measure their latency. The targets: on the ProMotion iPhone, input-to-present p50 <= 8.3 ms and p95 <= 16.7 ms, from real present times; >= 99% one-period frames and < 0.1% missed at 120 Hz; sample-to-present p95 <= 1 ms on iOS. In the UIKit shell, every simulator case passes on each push to dev.

What would help

1. Add LayerHost::frame_at(target: Instant), and keep frame() as frame_at(Instant::now()). Document how to convert CADisplayLink.targetTimestamp to the host clock with the same arithmetic as since_boot. A target that is stale or behind the clock falls back by the rule from R0398. 2. Build the presented-handler hook for iOS as well as macOS, attach it to the LayerHost's layer, and feed the record from R0121. A skipped drawable counts as missed. 3. Add an embedder input call that takes UITouch.timestamp and converts it with since_boot, so touches carry their OS time. 4. R0128 records the iOS source.

These are new methods and leave existing calls unchanged. Add a changelog entry for them.

Done when
  • frame_at exists, frame() behaves as before, and embed_cost passes a target.
  • A headless test shows that frames called 3 ms late with an exact target produce positions identical to on-time frames.
  • A test converts UITouch timestamps to Instant correctly.
  • In the iOS simulator, LayerHost frames carry a present time from the presented handler, and skipped drawables are marked as missed.
  • Input-to-present latency is reported for touch input.

The device numbers come with the iOS device perf lane: over a 60 s run on a ProMotion iPhone, 99% of frames carry a present time, plus the cadence rows.

How to check

The headless frame_at and timestamp tests run in the required check. The iOS simulator run in the platform lane checks the present records. The iOS device perf lane carries the device numbers.

Depends on
Part of
  • Theme: T11
  • Tracked in R0396
  • Phase 2, milestone 2b · priority P2 · size M
R0417Linux: Rune reads no presentation feedback on Wayland or X11, so frames have no present time and motion is sampled at draw timeP2Phase 2bLT11
perf-present-time-linux · feature
What happens

Off macOS, a window has no frame target. target is always None, so the frame steps to Instant::now() at draw time. Present times are recorded only on macOS. The module says other platforms "have no reliable source and write neither".

Wayland's presentation-time protocol (wp_presentation) reports, for each commit, when it was shown or that it was discarded, along with the refresh period. Rune does not bind it. The X11 Present extension sends complete events, and Rune reads no timing on X11 either. Latency and cadence go unmeasured on Linux, and motion jitters with draw time.

Where
Why it matters

On a 120 Hz Linux desktop, motion lands unevenly whenever draw time varies, and no number shows it. The targets: Linux input-to-present p50 <= 16.7 ms and p95 <= 25 ms at 60 Hz, and a platform with no real present source fails that criterion. Linux Vulkan on X11 and Wayland must show >= 99% one-period frames at display rate. Sample-to-present p95 must be <= 1 ms on Linux Wayland, with >= 97% one-period frames on the 120 Hz Wayland machine, and the 120 Hz Linux machine must hold at least 99% one-period frames on Wayland and X11.

What would help

The sources, in the recommended order:

1. Wayland `wp_presentation`. Bind it on winit's wl_display through the raw handles, on a separate event queue so winit's own dispatch is not disturbed. Request feedback on the window's wl_surface just before each queue.present, so it attaches to the commit that wgpu makes, and match replies in commit order. A presented reply gives the actual time and refresh period. A discarded reply marks the frame as not shown. Convert the protocol's clock (from clock_id) to Instant. 2. X11 Present. Select PresentCompleteNotify for the window and match events by serial. Where the server sends none, predict from the monitor refresh and label the frame as predicted. 3. Vulkan `VK_KHR_present_wait` or `VK_GOOGLE_display_timing`. These are not exposed through wgpu's public API. Use them only if the first two leave gaps.

Feed actual times to the record from R0121, keeping actual, predicted and discarded presents in separate fields. Predict the next present as the last presented time plus the period, and pass it as the frame target, with the fallback rule from R0398. Sessions with no source report unsupported. R0124 reads the result, and R0128 records each session type.

Done when
  • Wayland windows pass a predicted frame target and record actual present times.
  • On a 120 Hz Wayland reference machine, sample-to-present error p95 <= 1 ms.
  • On GNOME Wayland, a wlroots compositor and X11, 99% of frames carry a present time within 1 ms of the compositor's own timing log.
  • Discarded presentations count as missed, not presented.
  • Unit tests with recorded feedback cover discarded frames and a refresh change.
  • The X11 behaviour is documented with its measured error, and unsupported sessions report unsupported.
  • A stale source falls back within 2 frames with 0 jump findings.
How to check

Unit tests with recorded feedback run in the required check. The Linux lane compares present times with compositor-side timing logs on Wayland and X11. A Linux scenario in scripts/motion-audit checks the fallback.

Depends on
Part of
  • Theme: T11
  • Tracked in R0396
  • Phase 2, milestone 2b · priority P2 · size L
R0418Linux: no reserved machine measures frames, latency, launch or memory on X11 and WaylandP2Phase 2bMT03
perf-lane-linux · infra
What happens

Linux behaviour depends on the compositor. On GNOME Wayland a covered window spins a core at 100% and its poll and timers stop (#139). On Wayland a layer-shell overlay that the compositor stops painting blocks the event loop inside vkQueuePresentKHR (#169). Rune measures none of this. No machine records frame cadence, input-to-present latency, launch time or memory on X11 or Wayland, so a Linux regression shows up only in user reports.

Where
  • #139 (covered window on GNOME Wayland).
  • #169 (layer-shell present blocks the event loop).
  • PLAN.md section 8 (PLAN.md:500-504): performance runs on reserved hardware.
  • .github/workflows/ has no reserved-hardware job.
Why it matters

Linux users see stutter, spinning cores and stalls that no lane reports. The targets: "60 Hz Windows, Linux and web references: p50 <= 16.7 ms, p95 <= 25 ms" input-to-present; "Linux Vulkan (X11 and Wayland)" at ">= 99% at display rate"; "0 presents, 0 submissions" at rest; Linux hello memory "within 1.2x of a native hello on the same machine"; a 120 Hz Linux machine on Wayland and X11 in the reference set; and wall-clock suites "on a nightly schedule" on the Linux lane.

What would help

1. Reserve a 120 Hz Linux machine with three sessions: GNOME Wayland, a wlroots compositor and X11. Record it in the machine manifest. 2. Run the canonical scenes from R0065 with present times from wp_presentation on Wayland, once R0417 lands. Use the same harness as R0125. 3. Run the idle sample with covered and hidden windows. 4. Run PSS memory probes at launch, after a hide and over repeated cycles. 5. Publish results per session every night, with rev, backend, device and date, pooled over at least 5 paired runs.

Done when
  • Nightly results appear for GNOME Wayland, wlroots and X11.
  • Every number records rev, backend, device and date.
  • Cadence, input-to-present, idle presents and PSS are each a pass or fail check against the targets above.
  • A paired regression fails the lane.
How to check

The nightly Linux lane and its published reports. Reproduce #139 on a dispatched run to confirm the idle sample catches it.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 2, milestone 2b · priority P2 · size M
R0419Paint: build() looks up each node's presented pose in a hash mapP3Phase 2bST11
perf-paint-slot-index · perf
What happens

The paint walk reads each node's presented pose with Scene::presented(n.id) and its animated properties with Scene::get(n.id, prop). Scene::presented finds the node's slot by hashing its id in an FxMap. Scene::get does that lookup and then a second one, of (node, prop), in the motion store's own index. build() makes these calls at more than ten sites: presence, hover, press, press scale, scale, offset and ancestor radius. Several of them run for every node on every animating frame.

The runtime already holds nodes in a Vec in a fixed order between commits, so the slot of each node is known at commit time. Hashing it again on every frame is work the frame does not need.

No profile at HEAD isolates these lookups. This is a small, low-risk part of making the walk cost scale with what changed.

Where
Why it matters

The paint walk runs on every animating frame over every node, so per-node overhead grows with tree size, not with what moved. The target: worst-case frames fit the budget, with p95 <= 4 ms and 0 frames over 8.3 ms per run on the reference Mac, and per-frame work that scales with what changed.

What would help

Keep slot_of: Vec<u32> parallel to the runtime's nodes, refreshed at each commit, when nodes are added, removed or reordered. Add slot-based reads to Scene, such as presented_at(slot) and get_at(slot, prop), and have build() use them.

For the second lookup, in the store's (node, prop) index, there are two options:

  • A (recommended). At commit, also cache for each slot the track ids of the few properties build() reads (hover, press, press scale, scale, offset). Then a node read needs no hashing at all.
  • B. Leave the store lookup alone, count it, and keep it for a later change.

Go with A if the walk-visit counts from R0399 show the track lookups are a real share of build() time. Otherwise B keeps the change small.

Done when
  • A debug counter shows 0 node-id hash lookups per node in build().
  • Track lookups in build() are counted, and are 0 per node if option A is taken.
  • Instances are byte-identical to before on every suite in the differential harness from R0399.
  • A test inserts, removes and reorders nodes across commits and checks that slot reads match id reads.
How to check

The paint tests and the differential harness run in the required check. The lookup counter sits in the count budgets, so a new hash lookup in the walk fails the budget.

Depends on
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 2, milestone 2b · priority P3 · size S
R0420macOS: every window and overlay creates its own CVDisplayLink, and an overlay makes a new one on every showP3Phase 2bMT11
platform-macos-display-links · perf
What happens

Each surface creates its own CVDisplayLink. A window creates one when it is made, and again after events or a failed creation. An overlay creates one when it attaches a surface. Dropping a DisplayLink stops it and releases the Core Video link.

An overlay that releases its GPU surface when hidden drops its link with the surface. So it creates a new link on every show. N animating surfaces run N links, each with its own Core Video callback thread waking the main thread.

The repo's own research advises against both patterns. On macOS 14 and later it recommends CADisplayLink with a pinned preferredFrameRateRange. It also says to keep any CVDisplayLink alive for the life of each display, because tearing links down has caused Core Video crashes elsewhere. PLAN plans CADisplayLink with preferredFrameRateRange.

Where
Why it matters

Apps that show and hide HUDs, menus or popovers pay for a new link and a new thread on each show. An app with several animating windows runs a Core Video thread for each one. The targets: no unrequested Rune thread wakes at rest, and the thread count returns to baseline after a hide. Motion must hold at least 99% one-period frames on the ProMotion Mac.

What would help
  • On macOS 14 and later, use one CADisplayLink per screen, with preferredFrameRateRange pinned to the display's maximum while anything on that screen animates. Without the pin it can throttle to 30 Hz.
  • Below macOS 14, use one long-lived CVDisplayLink per CGDirectDisplayID.
  • Fan each tick out to the surfaces registered on that screen. Each surface keeps its own opportunity claim, the Low Power Mode cap and the rested-draw path. A surface that moves to another screen re-registers.
  • Stop the shared link when no surface on its screen is animating. Never release it while the display exists.
  • Keep a revert switch to the per-surface link for one release.
  • Measure cadence before and after on R0125, including #204's scroll scenes.

This changes the timing of every Mac app, so it needs the paired cadence runs and a changelog entry.

Done when
  • Showing and hiding an overlay 100 times creates no new display link after the first (counted).
  • With three animating surfaces on one display, one link runs.
  • With all surfaces idle, no link runs and no Core Video thread wakes the main thread.
  • On the reference Mac, no scene's one-period frame share drops by more than 0.5 points.
  • The revert switch is documented and restores today's behaviour.
How to check

A macOS GUI test counts link creations and running links. The macOS lane compares one-period shares in paired, alternating runs, by median. scripts/motion-audit runs on the same scenes.

Depends on
Part of
  • Theme: T11
  • Phase 2, milestone 2b · priority P3 · size M
R0421Render: paint parity with Chromium for shadows, borders, gradients and images is measured by hand and never gatedP1Phase 2bMT12
render-chromium-parity-gate · infra
What happens

PLAN section 9, risk 2, says shadows, gradients and borders must be indistinguishable from the Chromium-rendered web kit, or better. scripts/kit-diff.py measures this. It renders each @opencode/ui story in headless Chromium at 2x beside the same scene in Rune's gallery, then reports two numbers per story:

  • similarity: 100 × (1 − mean |web − rune| / 255) over RGB;
  • off: the percentage of pixels whose largest channel differs by more than 24/255.

No baseline is committed and no lane runs the script. The only workflows deploy the site. The metrics also miss the regressions that matter most:

  • Off ignores any difference up to 24/255, so a uniform 3/255 shift is invisible to it.
  • Whole-image similarity spreads a local defect over the whole story. If every shadow shifts by 3/255 and shadows cover 10% of the image, similarity drops by about 0.12, which is within noise.
  • Text dominates the differences today, so paint changes are hidden behind glyph differences.
Where
Why it matters

Rune's look is judged against OpenCode Desktop, which Chromium draws. A shadow that is 3/255 too dark or a gradient that bands is the kind of difference people notice side by side, and today nothing catches it. The target: "similarity >= 99.5, off <= 0.5% and no tile with a mean difference above 2/255 on every story, on 4 of 4 platforms. No story drops more than 0.2 similarity, and no tile's mean rises by more than 1/255, in one change. Gradient banding is no worse than Chromium's +10%."

What would help

1. Paint-only mode. Blank text on both sides: transparent text in the Storybook CSS and in Rune's gallery. Text parity keeps its own lane, with the same harness and text on. 2. Pin the inputs. Pin the story set, the OpenCode commit and the Chromium version. 3. Local metrics. For each 32 px tile, record the mean and the maximum channel difference. In paint mode, count off at 8/255. Add a banding metric for gradient and shadow stories, such as the count and width of flat runs along the gradient axis, compared with Chromium's. Add an edge and alpha check for borders. 4. Baselines. Commit a baseline for each story and scheme. A developer blesses baselines with a script. CI never writes them. 5. Lanes. Run first in R0168 (lavapipe plus Playwright's Chromium) and R0268, then on Windows and macOS. Fail when a story loses more than 0.2 similarity or a tile's mean rises by more than 1/255. Report each story against the absolute target too.

Fixes for stories that miss the target go to a separate tracker, so this gate can land first.

Done when
  • Baselines are committed for every pinned story in light and dark.
  • A deliberate 3/255 shadow change fails the gate and names the stories and tiles it moved.
  • The web lane runs the same comparison against the same baselines.
  • The banding metric is reported for gradient and shadow stories and fails above Chromium's value +10%.
  • Each platform has a report row with the number of stories that meet similarity >= 99.5, off <= 0.5% and no tile above 2/255.
How to check

The gate runs on every change in the Linux and web lanes, and later in the Windows and macOS lanes. To prove that it fails, a fixture change shifts one shadow by 3/255.

Depends on
Part of
  • Theme: T12
  • Phase 2, milestone 2b · priority P1 · size M
R0422rune-fx and rune-light: shader passes have no golden or differential tests in CIP1Phase 2bMT12
render-fx-light-goldens · infra
What happens

rune-light has 4 tests. Three check render targets and bind groups: growing the primitive buffer keeps the targets, and no GI resources are allocated without GI. The fourth checks that every built-in pipeline is precompiled. Shadow, GI, glass and field output is checked only by the light verify example, which compares the GPU visibility texture with a CPU estimator. Nothing runs that example.

rune-fx has 24 tests across blend, fills, in-layer composition, bind groups, simulation and lazy pipelines. They check relations. For example, a fill in a faded layer matches the same fill faded, and grain is symmetric in both blend modes. None compares a family's output with a stored image. A shader edit that brightens every glow by 10% passes every test. scripts/check-reference.sh runs only rune-fx's blend test, and only by hand with --gpu.

Where
Why it matters

Effects are what people notice first in the showreel and in glass-heavy apps. Without goldens, nobody sees a regression until they look at a demo. Two targets need this. "Each of the 8 rune-fx families and 5 rune-light passes has a golden in both modes", and "rune-fx and rune-light draw within 2/255 of their goldens on every native and WebGPU target." Goldens also feed the 20-run determinism check.

What would help
  • One golden per rune-fx family and per rune-light pass, in both of Rune's blend modes (srgb_blend on and off): 26 in all. rune-light picks its encoding from the format it draws into, so each of its goldens uses the format the frame hands it in that mode.
  • Fixed time, fixed seed and a fixed simulation step count for fire. Render on lavapipe with a tolerance of 2/255 per channel.
  • Render each golden 20 times, and require byte-identical output.
  • Keep each rune-light scene under 256 primitives near any tile. Past that, the field pass is order-dependent until its overflow fix lands.
  • Bless goldens with a script, never in CI. Run them in R0168. Other native and WebGPU targets compare against the same images in their own lanes.
Done when
  • 26 goldens (13 passes in 2 blend modes) exist and pass on lavapipe within 2/255.
  • Each golden is byte-identical over 20 runs.
  • Changing one shader constant in any pass fails that pass's golden.
How to check

The goldens run in the Linux lane on every change. A test edits one constant in a copy of each shader, to prove that its golden catches the change.

Depends on
Part of
  • Theme: T12
  • Tracked in R0685
  • Phase 2, milestone 2b · priority P1 · size M
R0423CI: no job checks that the renderer and compositors draw the same bytes on every runP1Phase 2bST12
render-determinism-job · infra
What happens

Goldens, differential tests and side-by-side comparisons are useful only when one input always gives the same bytes. Today nothing checks that. rune-ref's differential test renders each corpus scene once per adapter and compares it with the CPU oracle within a tolerance. No job renders the same scene many times on one adapter and compares bytes. Determinism has been checked only by hand.

Order-dependent GPU code exists. rune-light's field pass gathers the primitives near each tile with atomicAdd into a workgroup list of at most 256 entries. The per-pixel minimum that follows doesn't depend on order, and a comment in the shader says so. But when more than 256 primitives fall near one tile, which ones the list keeps depends on the order in which threads ran. That bug looks like a flaky golden, and a job that repeats each render is the only reliable way to find it.

Where
Why it matters

A flaky golden costs time and erodes trust in every other test. People start re-running failures until they pass, and real regressions slip through. The target: "20 of 20 runs are byte-identical on every lane, rune-light dense scenes included." It belongs to the goal that "every renderer and compositor gives byte-identical output run to run".

What would help
  • In every lane, render the canonical corpus 20 times with frozen inputs: time, seed, bundled fonts, scale and resources. Include the rune-fx and rune-light scenes from R0422. Compare bytes within the lane.
  • On a mismatch, name the scene, the first run that differed, and the first differing pixel, and save both images as artifacts.
  • Add one dense rune-light scene with more than 256 primitives near a tile, so the field pass's overflow path is covered.
  • Add a test-only shader whose output depends on thread order, for example one that writes its atomicAdd result into the colour. The job must fail on it and name its scene.
  • Differences between adapters stay a tolerance check in R0267. This job compares bytes only within one lane.
Done when
  • Every canonical scene, rune-fx and rune-light scenes included, gives byte-identical output in 20 of 20 runs on every lane.
  • The deliberately order-dependent test shader fails the job and names its scene.
  • A failure report names the scene and run, and keeps both images.
How to check

The job runs in each GPU lane on every change to dev. Its own test is the order-dependent shader, which must keep failing.

Depends on
Part of
  • Theme: T12
  • Tracked in R0519
  • Phase 2, milestone 2b · priority P1 · size S
R0424Images: native decode ignores ICC profiles, so Display P3 photos draw desaturated and differ from the web buildP1Phase 2bMT12
render-image-icc · bug
What happens

Native image decode reads the EXIF orientation from the decoder, applies it, and converts the pixels to RGBA8 as they are. It never reads the ICC profile. A Display P3 PNG or JPEG, such as any recent iPhone photo or screenshot, shows its P3 values as if they were sRGB, so it looks desaturated. Adobe RGB images and grey images with a profile are wrong too.

The web build asks createImageBitmap for colorSpaceConversion: 'default', so the browser converts using the profile. The same image looks different in the native build and the web build.

Where
Why it matters

Any app that shows photos, avatars or screenshots draws them duller than Safari, Chromium or Photos does, and native and web builds of one app disagree. Three targets cover this. Colour: "<= 1/255 per channel against the pinned Chromium, and native equals web within 1/255." Images: "Every format Chromium decodes in the fixture set also decodes natively within 1/255 of the web build." Paint: images match Chromium on every platform.

What would help
  • On the decode worker, read the profile with ImageDecoder::icc_profile() before DynamicImage::from_decoder.
  • Convert to the working space with a pure-Rust colour engine. The working space is sRGB until R0628 decides on wide gamut. Cache one transform per profile hash, in a small bounded cache.
  • Skip the transform for untagged images and for sRGB profiles, so they cost nothing new.

Engine options:

1. `moxcms` (recommended). It is pure Rust and already in the lockfile through image. If it is compiled under Rune's current features, this adds no new crate, which matters for #124. 2. `qcms`. Pure Rust and small, but a new dependency. 3. `lcms2`. Complete, but it binds a C library and adds a C build. Not recommended.

Keep the conversion behind the existing image features.

Done when
  • Fixtures (P3 PNG, P3 JPEG, Adobe RGB JPEG, grey with an ICC profile) decode within 1/255 of Chromium's sRGB output.
  • Native and web give the same pixels for each fixture, within 1/255.
  • Decode time for untagged images is unchanged, by paired --profile perf runs compared by median.
  • The PR states the decode cost for a tagged 12 MP JPEG.
  • The dependency count is unchanged, or the PR says which crate is added and why.
How to check

The fixtures run as CPU decode tests with the crate's tests, and as a comparison in the web lane. The decode-time comparison is recorded in the PR.

Depends on
Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 2, milestone 2b · priority P1 · size M
R0425Render: the first fade, blur or backdrop compiles its layer and composite pipelines on the UI threadP1Phase 2bMT12
render-layer-pipeline-prewarm · perf
What happens

The prewarm thread builds one renderer, which has the uber pipeline for the frame format (Bgra8Unorm). Everything an isolated layer needs is built later, on the thread that draws, the first time a frame uses it:

  • For the first layer, the Rgba16Float content pipeline, plus one layer composite pipeline for each target format.
  • For the first PlusLighter layer, a pair of additive pipelines.
  • For the first layer blur, the blur pipeline with its 5 specializations.
  • For the first backdrop blur, the backdrop blur pipelines.

This cost was measured on a cold shader cache. One uber pipeline state takes 89 ms on the native backend even with its MSL precompiled, almost all of it GPU code generation. With precompiled MSL, a first layer blur takes 45 ms and a backdrop blur 29 ms. So the first fade, blur or backdrop after an install or an OS update can drop several frames at 120 Hz. The individual layer and composite pipelines have not been timed, and first_use_ms doesn't list them.

Some of this work repeats itself. Without springs, the vertex entry is vs. Then the layer pipeline for Rgba16Float repeats the extra pipeline add_format just built, the layer pipeline for the frame format repeats the main pipeline, and the additive pair is two identical pipelines.

Where
Why it matters

The first opacity fade is often the first motion a person sees, such as a sheet or a toast appearing. A 45-89 ms hitch there makes the app feel slow on first use. The targets: "0 UI-thread pipeline creations after the first frame", "every built-in pipeline is precompiled or cached", and "zero Rune-caused tasks over 8.3 ms after the first frame".

What would help

1. Measure each lazy pipeline cold and warm with shader_first_use, and add the layer, composite and additive pipelines to first_use_ms. 2. After on_ready, build the layer-format, composite, additive, layer-blur and backdrop-blur pipelines on the prewarm thread or a worker, so launch isn't delayed. 3. Reuse self.pipeline and the existing extra pipeline when a descriptor is identical, instead of building it again. 4. If a frame needs a pipeline before it is ready, wait only for that pipeline, and count the wait with R0073.

Done when
  • After prewarm, the first fade, blur, backdrop and PlusLighter blend each create 0 pipelines on the UI thread, faded and unfaded, on native Metal, wgpu Metal and DX12.
  • first_use_ms lists the layer, composite and additive pipelines.
  • With a cold shader cache on the reference Mac, the first fade frame is at most 1 ms longer than a warm one, and no first use makes a frame longer than 8.3 ms (paired runs).
How to check

The count budgets enforce 0 UI-thread pipeline creations on every change. The first-use suite with a cold cache runs in the macOS lane, and the paired runs are recorded in the PR.

Depends on
Part of
  • Theme: T12
  • Tracked in R0640
  • Phase 2, milestone 2b · priority P1 · size M
R0426Render: no byte budget covers transient GPU pools, and nothing frees them while a window draws no framesP1Phase 2bMT12
render-transient-budget · perf
What happens

Transient GPU memory is spread over several pools:

  • layer targets, with their blur scratch and work textures;
  • backdrop copies;
  • the backdrop blur pyramid;
  • the instance buffer, which only grows;
  • rune-fx and rune-light render targets.

None of these pools has a byte budget. Each frees memory, if at all, only while a frame is drawn. A resting window draws no frames, so an idle window keeps whatever its last busy frame needed. Staging has its own bound, and retained El::cache layers have a 64 MiB budget, but nothing caps the total.

At 5K (5120×2880), one Rgba16Float target is about 118 MB. A blurred full-window layer with its scratch and work textures is about 354 MB.

Where
Why it matters

A glass-heavy window on a 5K display can hold hundreds of megabytes after its last blur, and it keeps them while it sits idle. People see it in Activity Monitor, and on iPhone it raises the risk of a memory kill. The targets: "the worst-case scene fits the default transient budget (3 window-sized Rgba16Float targets) plus the image budgets, with no fallback; when a scene can't fit, extra layers draw at reduced resolution with a diagnostic and opacity is never flattened", and "transient pools free within 2 s of last use, measured by wall clock even when no frame is drawn".

What would help
  • Add one TransientBudget for each device. Set it with a builder method, App::gpu_transient_budget, not a new pub field.
  • The budget covers layer targets with scratch and work textures, backdrops, the pyramid, the instance buffer, and compositor targets reported through Frame.
  • Entries age by wall clock and free 2 s after last use. A one-shot idle wake frees them without drawing a frame, so an idle window still draws nothing.
  • Over budget, evict the least recently used entries first. If the live frame still doesn't fit, draw the extra layers at reduced resolution and send one diagnostic through R0081.
  • Report the totals through R0284 and R0072.

The records disagree on the defaults: 3 window-sized Rgba16Float targets and 2 s, or 4× the drawable bytes and 5 s. Use 3 targets and 2 s. That is the stated target, and 2 s also meets the 5 s pool target. R0427 and R0431 build on this budget.

Done when
  • The worst-case scene fits the default budget with no fallback: 5K, 4 backdrop blurs, 3 blurred card-sized layers, a playing video and 20 disabled kit controls.
  • An idle window frees every transient pool within 2 s of last use, with no frame drawn.
  • A scene forced over a small budget sends one diagnostic. Outside the reduced layers, its pixels stay within 3/255 of the unbudgeted render.
  • The budget's total equals the sum of the transient fields in the GPU byte count.
  • The next blur after a free has no frame over 8.3 ms.
How to check

T1 tests on lavapipe cover eviction, the idle free and the fallback. The soak in the GPU lanes checks that bytes return to baseline.

Depends on
Part of
  • Theme: T12
  • Tracked in R0642
  • Phase 2, milestone 2b · priority P1 · size M
R0427Render: isolated-layer targets are pooled by plan index, so each fade and each scrolled disabled control allocates a textureP1Phase 2bMT12
render-layer-pool-aging · perf
What happens

Isolated-layer targets are stored by their position in the frame's layer plan. Each frame resizes the list to the plan's length, so when the plan gets shorter, the targets past the end are dropped. A target is reused only if the scope at the same index fits it. So:

  • A fade that starts and ends allocates a target when it starts and frees it when it ends. Ten fades allocate ten targets.
  • On the native Metal backend, every new texture is also filled with zeros by a blit pass before its first use.
  • Since #208, kit's disabled controls fade through El::layer_opacity, so each disabled control whose paint overlaps is its own layer. In a scrolling form, rows mount and unmount, the plan length changes, and targets are allocated during the scroll.
  • Blur scratch and reduced work textures belong to a target, so they come and go with it.

Retained El::cache layers already use the node's identity and a byte budget. Transient layers don't.

Where
Why it matters

Texture allocation and zero-fill happen in the frame. A form with disabled controls should scroll as smoothly as one without them. The targets: "0 GPU allocations in a steady frame on every path", "transient pools free within 2 s of last use, measured by wall clock even when no frame is drawn", and "pools at baseline within 5 s of the last blur".

What would help
  • Key targets, scratch and work textures by the scope's node identity: the paint walk's node index together with its path hash, as cached layers already do. Keep them in an LRU.
  • Charge every entry to R0426, and free an entry 2 s of wall-clock time after its last use from that budget's idle wake, so an entry is freed even when no frame is drawn.
  • Never flatten overlapping opacity to save memory. Over budget, the budget's reduced-resolution fallback applies.
  • Report the pool's bytes through R0072.
Done when
  • 10 fade-in and fade-out cycles of one element, each 300 ms with 300 ms gaps, allocate its target once (allocation counter test).
  • Scrolling a list with 20 disabled kit controls for 600 frames creates 0 layer targets after the first pass over the list.
  • An idle window frees unused targets within 2 s with no input and no frame drawn.
  • Layer goldens are unchanged.
How to check

T1 tests on lavapipe use the allocation counter. The count budgets for the fade scene and the disabled-controls form hold the numbers on every change.

Depends on
Part of
  • Theme: T12
  • Tracked in R0642
  • Phase 2, milestone 2b · priority P1 · size M
R0428Render: the UI thread waits on the GPU for a window's first frame, on Windows show, in native Metal pacing and when it joins an unfinished prewarmP1Phase 2bMT12
render-ui-thread-waits · perf
What happens

Four paths block the UI thread on the GPU, and no counter reports any of them:

1. First frame. After a window presents its first frame, the loop calls device.poll(wait_indefinitely()) and waits until the GPU has finished that frame (#164). 2. Windows show. While a window is cloaked, the loop waits on the GPU again before it lifts the cloak. 3. Native Metal pacing. pace() keeps at most IN_FLIGHT − 1 frames on the GPU. When the oldest frame isn't done, pace() waits up to 1,000 ms for it. 4. Prewarm join. When a window takes the prewarmed GPU and renderer and the prewarm thread is still working, the window joins that thread and waits for the whole prewarm.

Each wait is short on a warm machine. On a cold shader cache, after a GPU reset or under GPU load, any of them can become a stall that people see.

Where
Why it matters

A wait on the UI thread blocks input, resize and every other window in the app. The targets: "0 synchronous GPU waits on the UI thread after the first frame, except pacing waits that end within 1 refresh period", "no main-thread wait over one refresh", and, for launch, "the main thread never waits for GPU completion before the first frame shows".

What would help
  • Count synchronous GPU waits on the UI thread, and their duration, in FrameStats, next to R0073. Show the count in --trace and in the count budgets.
  • Replace the first-frame and cloak waits with a completion signal that the loop checks, such as a submitted-work-done callback that wakes the loop. Show or uncloak the window when its frame is done. Never show an unfinished frame.
  • Limit a pacing wait to what is left of the current refresh period. If the GPU is still busy then, skip the frame instead of waiting longer.
  • When the prewarm thread hasn't finished, don't join it. Build lazily on a worker, and use the prewarmed result if it arrives first.
Done when
  • After the first frame, the UI-thread GPU-wait counter is 0 in steady frames and in every first-use scenario on macOS and Windows, except pacing waits that each end within 1 refresh period.
  • The first frame shows with 0 waits on GPU completion.
  • A window shows no later than today (paired --profile perf runs) and never shows an unfinished frame.
  • The counter appears in --trace output and in the count budgets.
How to check

T1 counter tests assert 0 waits in the steady and first-use scenarios. Paired launch runs in the macOS and Windows lanes are recorded in the PR.

Depends on
Part of
  • Theme: T12
  • Tracked in R0640
  • Phase 2, milestone 2b · priority P1 · size M
R0429macOS: no lane runs the precompiled-metallib freshness test, and a miss compiles at runtime with no logP2Phase 2bST12
perf-metallib-staleness · infra
What happens

On the native Metal backend, every built-in pipeline, including rune-fx and rune-light, loads precompiled from builtin_native.metallib. Each pipeline is keyed by a hash over its WGSL, entry point, constants and layout slots. When a shader or its layout changes and nobody runs scripts/precompile-metal-shaders.sh, the key misses. The pipeline then compiles at runtime, as it did before the library existed.

The measured cost of a miss on a cold shader cache, on macOS:

First usePrecompiledRuntime compile
layer blur45 ms727 ms
backdrop blur and composite29 ms394 ms
FxRenderer::new1.26 s3.63 s
LightRenderer::new127 ms1.39 s

rune-light's builtin_shaders test catches a stale table. But it returns early unless the native backend is active, and no lane runs it. At runtime, a miss only increments a counter, so a stale build ships without anyone noticing.

Where
Why it matters

One forgotten regeneration turns a 45 ms first blur back into 727 ms, and a 1.26 s effect renderer back into 3.63 s, with nothing to show why. The targets: "every built-in pipeline is precompiled or cached on macOS, iOS and Windows", "0 pipelines built ... on main after the first frame", and "100% of rows enforced or marked failing with an open issue".

What would help
  • Run cargo test -p rune-light --features rune/metal-backend --test builtin_shaders with RUNE_GPU_BACKEND=metal in R0125 on every push to dev, and on PRs that touch a .wgsl file or a bind group layout.
  • At runtime, when a pipeline whose WGSL is a known built-in (builtin::known) misses its key, send one diagnostic per process that names the pipeline's label. App shaders are expected to miss, so they stay silent.
  • Point the failure message at scripts/precompile-metal-shaders.sh, as the test already does.
Done when
  • A deliberately stale built-in shader fails the macOS lane.
  • A runtime miss for a built-in sends one diagnostic, and an app shader sends none.
  • The lane runs the test on every push to dev.
How to check

The macOS lane runs the freshness test on every push. A unit test forces a miss for a known source and checks for exactly one diagnostic.

Depends on
Part of
  • Theme: T12
  • Tracked in R0640
  • Phase 2, milestone 2b · priority P2 · size S
R0430macOS: an overlay with release_gpu_when_hidden builds a new device, renderer and atlas on every showP2Phase 2bST12
perf-overlay-device-reuse · bug
What happens

When an overlay with release_gpu_when_hidden hides, it gives its surface back and calls park_gpu with its device and renderer. Hosts other than macOS keep both in a slot for 5 minutes, and the next surface takes them. On macOS, park_gpu drops both. So when the last surface hides and an overlay shows again, the show:

  • makes a new Gpu through Gpu::for_surface;
  • makes a new Renderer, which builds its uber pipeline;
  • allocates a new glyph atlas, which is 2048×2048 R8, 4 MiB, zero-filled on the native backend;
  • makes new staging;
  • invalidates the text atlas and images, so every glyph and image is uploaded again.

On a cold shader cache, Renderer::new alone took 110 ms. Warm, it took 1.2 ms. So the cost of a show depends on the shader cache, and the memory goes up and down on every show and hide. The overlay soak counts devices on every host, but it reads memory only on Windows and Linux. On macOS its memory reading always returns 0.

Where
Why it matters

Tray HUDs, dictation panels and command palettes show and hide many times an hour. Each show should feel instant. The targets: "a text-free overlay adds <= 2 MiB", "no main-thread wait over one refresh", "owned resource counters return exactly to the warmed baseline when release is asked for", and "growth over 100 cycles is under 1 MB".

What would help

Park the GPU on macOS as the other hosts do:

  • Keep the device and a trimmed renderer, with its pipelines, in the park slot for PARKED.
  • Release drawables, atlas pages, staging chunks and transient pools.
  • On the next show, take the parked pair. Upload only the glyphs and images that frame draws.

Keep the macOS reason for dropping the window itself: hidden screen-sized panels empty Mission Control's Space thumbnails. That reason applies to the window, not to the device. The measurement depends on R0247, which adds a memory reading on macOS.

Done when
  • Repeated show and hide of the last surface on macOS makes one device (soak starts == 1).
  • Parked memory is at most 2 MiB above an app that never showed the overlay.
  • Every show after the first fits in one frame at 120 Hz, 8.3 ms.
  • Over 100 cycles, memory grows by less than 1 MB.
How to check

overlay_soak runs on macOS in the macOS lane, with the memory reading from R0247. A show-time measurement is recorded in the PR.

Depends on
Part of
  • Theme: T12
  • Tracked in R0642
  • Phase 2, milestone 2b · priority P2 · size S
R0431Render: backdrop copies and the blur pyramid are never freed after blurs stop, and live resize reallocates them at every sizeP2Phase 2bST12
render-backdrop-free · perf
What happens

ensure_backdrop keeps one viewport-sized copy of the frame for each format that a backdrop slot or a backdrop blur reads. If the existing copy isn't exactly the viewport's size, it is replaced with a new texture. Sizes are not bucketed, so during a live resize each new size allocates a new copy, which is one per frame. Nothing ever frees a backdrop.

The blur pyramid grows in steps and never past a cap, so it doesn't allocate on every frame. But it isn't freed either once blurs stop. At 5K (5120×2880), the copies and the pyramid stay held for the rest of the session: about 59 MB for a BGRA8 copy, 118 MB for an Rgba16Float copy and about 86 MB for the pyramid. That is up to about 263 MB.

Where
Why it matters

A window that showed one frosted sheet holds hundreds of megabytes of copies at rest, and a live resize with glass on screen makes a texture allocation on every frame. Both show up as memory in Activity Monitor and as hitches while resizing. The targets: "transient pools free within 2 s of last use, measured by wall clock even when no frame is drawn", "pools at baseline within 5 s of the last blur", and "0 GPU allocations in a steady frame".

What would help
  • Round backdrop sizes up to 64 px buckets, as layers do. While a resize makes the window smaller, keep the larger bucket instead of allocating a new one. Copy and sample only the viewport's region, and pass that region to the shaders that read the backdrop, so a larger texture doesn't shift their UVs.
  • Free backdrops and the pyramid 2 s of wall-clock time after the last backdrop slot or blur, using the idle wake from R0426, so they are freed even when no frame is drawn.
  • Charge both to the budget, and count them in R0072.
Done when
  • 2 s after the last blur, the GPU byte count reports 0 for backdrops and the pyramid, with no frame drawn in between.
  • A drag from 1200×800 to 1600×1000 in 100 equal steps, with a blur on screen, makes at most 12 backdrop allocations.
  • The first blur after a free has no frame over 8.3 ms.
  • Backdrop blur goldens are unchanged.
How to check

T1 tests on lavapipe, in the style of crates/rune/tests/backdrop_blur.rs, count allocations during the resize and read the byte counts after the idle free.

Depends on
Part of
  • Theme: T12
  • Tracked in R0642
  • Phase 2, milestone 2b · priority P2 · size S
R0432Windows: only the uber shader ships as DXBC, so blur, backdrop, video, alpha and effect pipelines compile with FXC on first useP2Phase 2bMT12
render-dxbc-builtins · perf
What happens

On Apple platforms, builtin_native.metallib precompiles every built-in pipeline, including rune-fx and rune-light. On Windows, only the uber shader ships as bytecode (uber.vs.dxbc, uber.fs.dxbc). wgpu's DX12 backend translates every other built-in pipeline from WGSL through Naga to HLSL, then compiles it with FXC, on the thread that draws, the first time it is used: backdrop blur, layer blur, video surfaces, the straight-alpha pass for transparent windows, springs, and every rune-fx and rune-light pipeline.

dxbc.rs puts the FXC compile of the uber shader at about 250 ms on a desktop CPU. With bytecode, that pipeline takes about 2 ms. The other pipelines have not been timed on Windows. On macOS, before they were precompiled, their cold first uses cost 87 ms to 3.6 s each. Even the shipped uber bytecode goes unused today, because its WGSL hash was taken from a CRLF checkout (#182).

Where
Why it matters

On Windows, the first fade, blur, video or effect after an install or a driver update can stall the UI thread for hundreds of milliseconds. The targets: "every built-in pipeline is precompiled or cached on macOS, iOS and Windows", "0 UI-thread pipeline creations after the first frame", and "zero Rune-caused tasks over 8.3 ms after the first frame".

What would help
  • Extend the DXBC capture to every built-in pipeline, with the same key scheme as gpu/metal/builtin.rs: WGSL, stage, entry point, constants and layout slots. Hash the WGSL with LF line endings, so a CRLF checkout matches (#182).
  • Add a freshness test for each blob that compares the HLSL wgpu generates now with the HLSL the blob came from, as uber_dxbc_is_fresh does today.
  • On a runtime miss for a known built-in, send one diagnostic and fall back to WGSL.
  • Build the pipelines from bytecode on the warm thread after the first frame, as part of R0425, and count any that a frame still builds with R0073.
  • The blobs are small, tens of KB each.
Done when
  • On DX12, after the first frame, the first fade, blur, backdrop, video frame and each effect kind create 0 pipelines on the UI thread.
  • first_use_ms reports each built-in pipeline at 5 ms or less with bytecode on the reference Windows machine.
  • A freshness test for each blob runs in R0162 on an LF checkout, and a stale blob fails it.
  • A runtime miss for a built-in sends one diagnostic.
How to check

The Windows lane runs the freshness tests and the pipeline-counter budgets on every change. The first_use_ms numbers are recorded in the PR.

Depends on
Part of
  • Theme: T12
  • Tracked in R0640
  • Phase 2, milestone 2b · priority P2 · size M
R0433Effects: EffectSite carries no reduced-motion flag, so the showreel and rune-light keep animating under Reduce MotionP2Phase 2bST12
render-fx-reduced-motion · bug
What happens

Rune reads the system's Reduce Motion setting into Runtime::reduced_motion. rune-fx supports it per layer: FxLayer::reduced(true) sets a flag, and looping noise effects then draw a fixed calm pose. But nothing passes the setting to effects by default:

  • EffectSite, the record a compositor gets for each effect slot, has no reduced-motion flag and no clock.
  • Each compositor that turns slots into FxLayers writes that code itself. The lab passes its own toggle with .reduced(...). The showreel never does, so its fire, pulse, electric and noise effects keep moving for people who asked for less motion.
  • rune-light's time-driven passes take a time field and have no reduced-motion input.

So whether an effect follows Reduce Motion depends on whether each app remembered to wire it.

Where
Why it matters

Some people turn on Reduce Motion because moving effects make them dizzy or sick. A heat-haze or electric effect that keeps moving fails them in exactly the place the setting is meant for. The targets: "under Reduce Motion, effects draw a still frame and request no frames", "every animated effect draws its calm pose and requests no frames", and a setting change takes effect "<= 1 frame after the OS notification".

What would help
  • Add EffectSite::reduced_motion() and EffectSite::time(), filled by the runtime. Use accessor methods, not new pub fields.
  • Move the slot-to-FxLayer code that the showreel and the lab each write into rune-fx, as a slot adapter that reads the flag and the clock from the site. Under reduced motion it applies the calm pose by default: it freezes effect time and simulation history, draws each family's still frame, and reports the slot as not animating, so it requests no frames.
  • Give rune-light the same input, so its time-driven passes draw a still frame.
  • Move the showreel and the lab onto the adapter, with no reduced-motion code of their own.
Done when
  • With reduced motion on, every rune-fx family and rune-light pass draws byte-identical frames at t and t + 1 s.
  • With reduced motion on and nothing else changing, an effects window requests no frames after the first.
  • Toggling the setting changes the next frame, within 1 frame of the notification.
  • The showreel and the lab follow Reduce Motion with no app code of their own.
How to check

rune-fx and rune-light tests in the required check cover the frame comparison and the frame requests. Under reduced motion, the goldens in the Linux lane render the still frame.

Part of
  • Theme: T12
  • Tracked in R0685
  • Phase 2, milestone 2b · priority P2 · size S
R0434rune-fx: a faded effect compiles its pipeline inside the open pass on its first frame, and panics if its format was never addedP2Phase 2bMT12
render-fx-warm-formats · perf
What happens

FxRenderer::prepare warms pipelines only for the renderer's own format. A slot inside an isolated layer draws into that layer's Rgba16Float target, and a faded El::effect is always inside one. So on the first faded frame, draw_layer_in builds each effect's pipeline through pipes.get with the render pass open, one at a time. That frame is usually the effect's entrance fade, where a hitch shows most. On a cold cache where the precompiled metallib doesn't apply, each pipeline costs 20-150 ms. That is 2 to 18 refreshes at 120 Hz.

draw_layer_in also panics with FxRenderer::add_format first when the compositor never added the target's format. The showreel and the lab add Rgba16Float by hand. A compositor that forgets crashes on its first faded effect.

build_every_pipeline already builds all 32 pipelines (8 families, 2 blends, 2 formats). But it is #[doc(hidden)], and only tests and a rune-light bench call it.

Where
Why it matters

A user sees the first glow or frosted card stutter as it fades in, and then never again, so the app looks flaky rather than slow. The renderer's target is 0 UI-thread pipeline creations after the first frame, with every built-in pipeline precompiled or cached on macOS, iOS and Windows. The motion target is that first entrances present with no interval over 1.5 refreshes on the reference Mac, that their first frame matches a warm-cache render, and that an animating frame's encode creates 0 pipelines. The panic misses the target of 0 panics on descriptors the API can report.

What would help

1. Register Rgba16Float in FxRenderer::new. Core layers use only that format (crates/rune/src/render/layers.rs:8). For any other unknown format, draw_layer_in skips the slot with one diagnostic and a counter, and doesn't panic. 2. Make prepare warm the prepared kinds for both the window format and the layer format. A miss is then built in parallel before the pass opens, and R0073 counts it. 3. Add a public prewarm, for example FxRenderer::prewarm, that the compositor glue calls from on_ready, after the first frame, on a background thread where the backend allows it. It builds the kinds the app declares, or all 32 when it declares none. It should share the background path with R0425.

The two source proposals differ on step 3. Warming both formats in prepare alone still compiles on the UI thread on a cold cache. Recommended: do all three. The on_ready prewarm meets the target, and prepare is the counted fallback.

Done when
  • On native Metal, wgpu Metal and DX12, the first faded and the first unfaded frame of each of the 8 effect families create 0 pipelines on the UI thread, as R0073 counts them.
  • draw_layer_in doesn't panic when add_format was never called. A test covers the default layer format and an unknown format (one diagnostic, counter +1).
  • On the reference Mac with a cold pipeline cache, the first entrance of each effect kind presents with no interval over 1.5 refreshes. Its first frame matches a warm-cache render pixel for pixel.
  • The prewarm adds 0 ms before the first frame, because it starts from on_ready.
How to check
  • rune-fx tests in the required check, with lazy_pipelines.rs updated to the new counts.
  • The cold first-entrance recording from R0280 in the reference-device lane.
Depends on
Part of
  • Theme: T12
  • Tracked in R0640
  • Phase 2, milestone 2b · priority P2 · size M
R0435rune-light: no sRGB-blend mode, so the lab and cursed-settings encode the UI twice under the window defaultP2Phase 2bMT12
render-light-srgb-blend · bug
What happens

rune-light takes linear input. Its README asks for a linear base and premultiplied linear text. Its composite sRGB-encodes the output only for a target that is neither sRGB nor float. Into Rgba16Float it writes linear values.

Windows blend in sRGB by default. The lab and cursed-settings create their LightRenderer on an Rgba16Float target and never read Frame::srgb_blend. Their fs_blit decodes the lit stage with from_srgb, as if it were sRGB-encoded. So one frame mixes three encodings:

  • The UI is drawn as sRGB-premultiplied values, then lit as if it were linear, so the lighting runs in gamma space.
  • The lit stage is already linear and is decoded again. By arithmetic, a linear 0.5 becomes 0.21.
  • rune-fx output in the same frame follows FxRenderer::set_srgb_blend and stays correct.

rune-light has no equivalent of set_srgb_blend. The README Output paragraph still says the composite encodes sRGB for any non-sRGB target. That is wrong for float targets.

Where
Why it matters

The lab and cursed-settings are the templates for lit UI. Anyone who copies them gets the wrong contrast and shading, and fx and lit layers that don't agree in one frame. The colour target is goldens that pass in both blend modes with no double encode. The effects target is that rune-fx and rune-light draw within 2/255 of their goldens on every native and WebGPU target.

What would help
  • Add LightRenderer::set_srgb_blend(on), like rune-fx's. When it is on, decode base and text to linear before shading. Write the output in the frame's encoding, which is sRGB-premultiplied for an sRGB-blend frame.
  • In the lab and cursed-settings glue, read Frame::srgb_blend and pass it to both rune-fx and rune-light. Remove from_srgb from fs_blit where its source is linear.
  • Fix the README Output paragraph and the fs_blit comments.
  • If the default output changes for apps that draw into float targets, add a changelog fragment.
Done when
  • With lights off, a base colour passes through the lit stage within 1/255 in both blend modes, on a float target and on an 8-bit target.
  • R0422 has lab goldens for both blend modes, and they pass within 2/255.
  • No blit in the examples decodes a linear source.
  • The README states the output encoding for each kind of target.
How to check

The pass-through test and the goldens from R0422, in the Linux lane.

Depends on
Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 2, milestone 2b · priority P2 · size M
R0436Theme: tok and Kit::neutral alphas are tuned for linear blending, so dark-mode borders and hovers may draw fainter under the sRGB defaultP2Phase 2bST12
render-tok-alphas · bug
What happens

tok::Theme says its alphas are tuned for linear-light blending. So its white overlays on dark sit well below their CSS values. Kit::neutral is built from tok::theme with blend_over: None. theme::for_blend converts only colours authored for sRGB blending, and only in linear windows. Windows blend in sRGB by default, so tok alphas now draw unchanged, under the blending they were not tuned for.

By arithmetic, in dark mode over the 19/255 background:

TokenLinear blendsRGB blend
card_border (white, 5%)67/25530/255
hover (white, 1.6%)41/25522/255

If this holds in a running app, every dark card border and hover in Kit::neutral draws with about half the contrast it was designed for. Nobody has checked it against Storybook yet.

#87 is a separate defect: forced hover fills composite differently from real hover. Both change neutral fills, so they should share one re-bless.

Where
Why it matters

Dark-mode users of any Kit::neutral app see borders and hover states that are faint or missing next to the web kit. The colour target is SDR output within 1/255 per channel of the pinned Chromium. The paint target is similarity >= 99.5, off <= 0.5% and no tile with a mean difference above 2/255 on every story, on 4 of 4 platforms.

What would help

1. Reproduce. With scripts/kit-diff.py, capture a dark card border and hover fill in the kit gallery and in the matching Storybook story. Record both pixel values. 2. If they differ, choose one:

  • (a) Retune tok alphas for sRGB blending, so they match their CSS sources directly. This is simple, but apps that set srgb_blend(false) then need compensation in the other direction.
    • (b) Mark tok colours as linear-authored and let for_blend convert them in sRGB windows. This mirrors what it does today for sRGB-authored colours in linear windows, and keeps both modes right.

Recommended: (b), if the conversion is exact for neutral foreground and background pairs, as srgb_equivalent is today. Otherwise (a). 3. Re-bless the kit gallery with before and after stills, and fix the tok.rs comment. Add a changelog fragment, because every Kit::neutral app changes visibly.

Done when
  • The PR records the before and after pixel values next to the Storybook reference.
  • A dark card border over the 19/255 background draws within 2/255 of the Storybook pixel, in both blend modes.
  • No neutral story's similarity drops in R0421.
  • tok.rs states which blending its alphas are authored for.
How to check

Kit goldens in the required check, and kit-diff through R0421 in the Linux lane.

Depends on
Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 2, milestone 2b · priority P2 · size S
R0437Web: no one has checked which renderer features work on WebGL2P2Phase 2bMT12
render-webgl2-audit · research
What happens

WebGL2 is an opt-in webgl feature. It does not compile on wasm32 today (#115). It also never runs when navigator.gpu exists but has no adapter (#116). When it does run, the device is requested with downlevel_webgl2_defaults limits, raised to the adapter's texture resolution. WEB.md says the target has no WebGL fallback.

Nobody has listed what the renderer needs that WebGL2 may lack:

  • Isolated layers, layer blur and the backdrop blur levels render into Rgba16Float. Rendering to it needs EXT_color_buffer_float or EXT_color_buffer_half_float.
  • WebGL2 has smaller uniform and texture limits. Nobody knows if the uber shader's register footprint fits.
  • rune-fx needs VERTEX_STORAGE, so it can't run on WebGL2 (#120).
  • Fills are sRGB-encoded twice on WebGL2 (#117).

The results also inform the Linux GL backend in #23.

Where
Why it matters

WebGL2 is the only GPU path on browsers and devices without WebGPU. Today the result there is unknown: a page may draw wrong colours, drop effects or panic, and nobody sees it until a user reports it. For WebGL2, the effects target is that each effect family matches WebGPU within 2/255 or uses a documented, capability-checked fallback with one diagnostic, never a panic. wasm32 builds must need no fragile wgpu features. The renderer must have 0 silent paths, and canonical scenes must agree within 2/255 across backends.

What would help

After R0268, #115 and #116 land:

1. Run every renderer integration test and canonical scene on WebGL2, in headless Chromium and in Playwright WebKit. 2. Record a matrix in WEB.md. Rows: isolated layers, layer blur, backdrop blur, effect slots, each rune-fx family, each rune-light pass, video, images and atlas sizes. Columns: each engine. For each cell, write works, fallback or fails, and the limit or extension involved. 3. For each gap, add a capability check at device creation and a fallback with one diagnostic and a counter. Examples: Rgba8Unorm layers when float colour buffers are missing, or drawing a blur's fill without the blur. Open one issue per gap that needs more than a fallback. 4. Replace the WEB.md statement with the matrix and the list of fallbacks.

Done when
  • WEB.md has the feature matrix for WebGL2 in Chromium and WebKit.
  • Every canonical scene renders on WebGL2 with 0 GL errors and 0 panics.
  • Each fallback emits one diagnostic and increments a counter, and a test asserts both.
  • Each effect family matches WebGPU within 2/255, or the matrix lists it with its fallback.
How to check

The WebGL2 rows of R0268. They run on every change, so the matrix stays current.

Depends on
Part of
  • Theme: T12
  • Phase 2, milestone 2b · priority P2 · size M
R0438Drag out: the drag snapshot renders a full frame and waits for the GPU inside a pointer moveP3Phase 2bST12
perf-dragout-async · perf
What happens

On macOS, starting a drag-out draws the last frame's instances again, into a new window-sized texture. Then it copies the dragged element's crop to a buffer and blocks on device.poll(wait_indefinitely) until the GPU finishes. This runs in the CursorMoved handler on the main thread, and in the same way for overlays. The texture is allocated again on every drag: 16 MB at 2560x1600 in BGRA8, and 59 MB at 5K. The whole frame redraws, but only the crop is read. Nobody has measured the stall yet. It grows with the scene's GPU time, plus the allocation.

Any fix must keep one constraint. AppKit needs the drag session started inside the same mouse-dragged event. So the session can't simply start later, when an async readback lands.

Where
Why it matters

The user grabs a file or a card. The first move, the one that starts the drag, freezes until the readback finishes, so the drag feels sticky at the moment it should feel most direct. The render target is 0 synchronous GPU waits on the UI thread after the first frame, except pacing waits that end within 1 refresh. The performance target is zero Rune-caused tasks over 8.3 ms after the first frame on the reference machines.

What would help

Options:

  • (a) Start the readback earlier. When a press lands on an element that has a drag-out handler, render only that element's rect into a crop-sized texture and call map_async. By the time the pointer crosses the drag threshold, the image is usually ready. The session then starts with it, inside the move event, with no wait.
  • (b) Start the session at once with a placeholder image of the element's size. Swap in the snapshot when map_async lands, through the dragging session's item enumeration.
  • (c) Keep the blocking wait but render only the crop. This cuts GPU work and the allocation, but it still waits.

Recommended: (a), with (b) when the readback isn't ready at the threshold. In every case, render only the crop and reuse one small pooled texture.

Done when
  • No drag-out start calls device.poll with a blocking wait, and a test or source check guards it.
  • On the reference Mac, with a 1,000-instance scene, the frame that starts the drag stays under 8.3 ms.
  • The snapshot texture is the size of the crop, not of the window.
  • The drag image still matches what the user grabbed, and the crop test at crates/rune/src/drag_out/mod.rs:489 still passes.
How to check

The UI-thread GPU-wait counter from R0428, in a drag-out scenario in the first-use suite, plus a trace on the reference Mac.

Depends on
Part of
  • Theme: T12
  • Tracked in R0640
  • Phase 2, milestone 2b · priority P3 · size S
R0439Images: the first draw of a large image copies and uploads it whole in one frame on the UI threadP1Phase 2bMT13
render-image-chunked-upload · perf
What happens

Decode and mip building run on worker threads. The first draw is different. ImageAtlas::place runs on the UI thread. For an image larger than the 1024 px atlas page, it allocates a page of the image's exact size, then copies the chosen mip level into it row by row while it holds the Pixels mutex. In the same frame, upload_images creates a texture of that size and writes every dirty row.

A 5K screenshot drawn at full size (5120 x 2880) moves about 59 MB through this path in one frame. An 8192 x 8192 image moves about 256 MiB. That is one long frame, plus a page-sized CPU allocation and a GPU allocation in the same frame.

place also refuses any side over 8192 px with a fixed check. It doesn't check max_texture_dimension_2d, as NativeSurface import does, so a device whose limit is lower can fail to create the texture.

Where
Why it matters

A user opens a large screenshot in a chat or a gallery, and the app drops several frames at that moment. The targets are "no scenario adds more than 2 ms of render or media work to the UI thread" with "<= 4 MB of non-video uploads in any frame", and "zero Rune-caused tasks over 8.3 ms after the first frame" with "image upload bytes per frame under the committed cap". The bounded-result target also asks that a too-large raster ends in "a bounded result such as a raster clamped to the device's maximum texture size".

What would help

1. Upload large levels in row bands through the staging ring, at most 4 MB a frame. Keep a per-image progress row so the next frame continues where the last stopped. 2. Stage straight from the decoded mip or Pixels buffer, copying outside the Pixels mutex (clone the Arc of the level, then release the lock). This builds on #163, which removes the page copy. 3. Keep drawing the previous, smaller mip until the full level has landed, then switch in one frame. A partly uploaded level never draws. 4. Clamp the chosen level to max_texture_dimension_2d and draw the largest level the device allows.

The records proposed per-frame caps from 4 MB to 16 MB. 4 MB matches the upload budget above; at 4 MB a 5K image lands in about 15 frames and an 8192 squared image in about 64.

Done when
  • No frame uploads more than 4 MB of non-video image data (count budget).
  • The frame that first shows a 5K image takes <= 2 ms more main-thread time than a steady frame (paired --profile perf runs).
  • An 8192 squared image shows at full resolution within 70 frames, pixel-identical to a one-frame upload.
  • An image over the device's maximum texture size draws at the largest allowed level.
  • No frame draws a partly uploaded level.
How to check

The count budget from R0263 on an image scene asserts upload bytes per frame. A headless test compares the final pixels with a one-frame upload, and a test with a lowered device limit checks the clamp. The PR records paired, alternating --profile perf runs of the first-show frame on the reference Mac.

Depends on
Part of
  • Theme: T13
  • Tracked in R0600
  • Phase 2, milestone 2b · priority P1 · size M
R0440Video: a playing 24 fps clip makes a 120 Hz window present 120 frames a second instead of the clip's rateP1Phase 2bMT13
render-video-pacing · perf
What happens

While any drawn video plays, the paint build sets videos_active, and the frame loop counts that as animation (AnimSource::VIDEO). So every refresh runs the paint build again. The "same frame" check that would skip a present requires rt.surfaces to be empty, so a frame with a video is never treated as unchanged. On macOS the pull checks hasNewPixelBufferForItemTime, but a refresh with no new buffer still builds and presents.

A 24 fps clip on a 120 Hz display therefore presents about 120 frames a second, five times what the clip needs. A 30 fps clip costs four times. A grid of video tiles multiplies the cost, and laptops and phones pay it in battery for the whole playback.

Where
Why it matters

The targets say "a 24 fps clip presents 24 +/- 1 frames/s when nothing else moves", "video presents at most at the clip rate plus one, and shows every clip frame", and at rest "0 presents per second beyond the caret or media rate on every host". Video must also play "with A/V drift <= 40 ms and <= 1 dropped frame per minute at the clip rate".

What would help

1. Each player reports when its next frame is due, from the item time and the clip's frame duration (or the next sample time for variable-rate clips). 2. The frame loop schedules a wake at that time, slightly early so the pull adds no latency, instead of treating videos_active as continuous animation. 3. same treats a frame as unchanged when every surface's generation is the same as last frame and the paint is unchanged, so a refresh without a new buffer isn't presented. 4. Any other running motion keeps the window at the display rate, and the clip still shows each frame once, at its time.

At 120 Hz a 24 fps clip is exactly 5 refreshes a frame. At 60 Hz it is 2:3 pull-down; keep frame times on refresh boundaries so it doesn't judder.

Done when
  • With nothing else moving on a 120 Hz display, a 24 fps clip presents 24 +/- 1 frames a second and a 60 fps clip 60 +/- 1 (SurfaceStats).
  • A/V drift stays <= 40 ms and dropped frames <= 1 per minute.
  • With a UI animation beside the clip, the clip still shows every frame once at its time.
  • After a seek, and on a variable-frame-rate clip, the next frame shows within 1 refresh of its time.
  • The last frame before pause or end is presented.
How to check

A headless test with a virtual clip counts presents per second at 24, 30 and 60 fps. The macOS lane plays a committed synthetic clip in a window and reads SurfaceStats. A count budget on the video scene keeps the present rate from creeping back. R0648 later measures drift and dropped frames on every platform.

Part of
  • Theme: T13
  • Phase 2, milestone 2b · priority P1 · size M
R0441Web: drawing any NativeSurface, a Player placeholder included, ends the app instead of showing a placeholderP1Phase 2bST13
render-web-native-surface · bug
What happens

The web shell checks rt.surfaces every frame. If any native surface is drawn, it shows the error "native video surfaces are unsupported on web" over the canvas and ends the event loop. SurfaceRenderer::new also panics on wasm.

On the web a Player fails at creation, then pushes a grey 32 x 18 placeholder into its surface, as on every platform without a backend. So a cross-platform app that draws el().video(...) stops on the web the first time the video is on screen. An app that feeds its own ByteFrames to a NativeSurface, which needs no platform import at all, stops the same way. The video module docs and the README promise that other platforms report Failed and draw a neutral placeholder.

Where
Why it matters

A user opens a web build of an app with a video tile, and the app stops with an error banner; nothing else on the page works. The targets say "surfaces never end the app" with "0 panics", that "a NativeSurface never ends the app on any platform", and that the web build is "a first-class target in every browser engine".

What would help

1. Remove the rt.surfaces check from the web frame and never end the loop for it. 2. On wasm, draw Source::Bytes frames (the placeholder and app-fed ByteFrames) through the image path: upload the BGRA bytes as an image and draw them with the surface's fit, radii and clip. Report any other source once through diagnostics and draw the placeholder colour in its rect. 3. Make SurfaceRenderer construction on wasm return a renderer that does nothing, or skip it, instead of panicking. 4. Keep Player reporting Failed with a readable message. A real web backend is R0646.

The records also offer a smaller first step: skip native-surface draws and fill each rect with the placeholder colour. That stops the crash but leaves app-fed byte frames blank, so the image path is the recommended fix.

Done when
  • A web app that draws el().video() shows the placeholder and keeps running and taking input for 5 s.
  • A web app that feeds ByteFrames to a NativeSurface draws them and keeps running for 5 s.
  • Nothing traps or panics, and the diagnostic logs once per surface kind.
  • The README states what the web draws for each surface source.
How to check

A browser test in the web lane from R0268 and R0062 loads an app with a video element and a byte-fed surface (examples/video-tiles uses byte planes off macOS), sends input for 5 s, and checks for no trap, a live event loop and the placeholder pixels.

Depends on
Part of
  • Theme: T13
  • Tracked in R0719
  • Phase 2, milestone 2b · priority P1 · size S
R0442Windows: the shared-texture cache returns a resource by name without checking it again, so a producer that reuses a name at a new size gets a stale or mismatched copyP1Phase 2bST13
render-windows-shared-texture-name · bug
What happens

NativeSurface::push_shared takes a D3D shared texture by name. On Windows, Importer::texture opens the name once, checks its GetDesc (2D, one mip, one sample, BGRA8, and the frame's width and height), and caches the ID3D12Resource by name. Every later frame with the same name returns the cached resource before any check.

A producer that recreates its texture under the same name, at a new size or even the same size, gets the old resource back. copy then wraps it with texture_from_raw using the new frame's size. The SAFETY comment there relies on the resource having been "checked to be ... of desc's size", which no longer holds. The result is a wrong-size copy, a validation error, or stale pixels from a texture the producer has already released. No test covers native_surface/windows.rs.

Where
Why it matters

This is the only zero-copy video import path on Windows, so a video or camera producer that resizes its output hits it. The user sees a stretched, cropped or frozen picture, or the app trips a D3D validation error. The targets ask for "0 CPU copies per frame where the platform offers GPU import (... D3D shared textures on Windows)", for "0 silent paths" and "0 panics on unsupported descriptors", and for every hostile case to end in "a readable failure".

What would help

1. Add a generation to shared frames through a new push_shared variant (for example push_shared_generation), so existing calls keep working with generation 0. 2. Key the import cache by name and generation. On a new generation, drop the old entry and open the name again. 3. Call GetDesc on every cache hit (a cheap query) and compare width, height and format with the frame. On a mismatch, reopen the name once; if it still doesn't match, return the existing readable error. 4. Document that a producer that recreates a texture under the same name must bump the generation.

The records also proposed keying by name, width and height. That catches a resize but not a same-size recreation, so name plus generation with the per-hit check is the recommended key. The per-frame owned texture that copy creates is a separate allocation issue and isn't part of this fix.

Done when
  • A texture reused by name at a new size is reopened or refused with a readable error, and is never copied with a mismatched descriptor.
  • A texture recreated at the same size under a new generation shows the new texture's pixels.
  • A texture with the wrong format is refused with a readable error.
  • native_surface/windows.rs has tests for reuse, recreation and a wrong format.
How to check

The new tests create shared textures on WARP and run in the Windows lane from R0162 and R0063, with a producer that resizes and recreates under one name.

Depends on
Part of
  • Theme: T13
  • Phase 2, milestone 2b · priority P1 · size S
R0443Recorder: stop and dropping the last handle block the calling thread for up to 5 s, though the docs say a few millisecondsP2Phase 2bST13
platform-media-blocking-calls · perf
What happens

On macOS, Recorder::stop sends Stop to the recorder's own thread and waits for the reply with recv_timeout(REPLY_PATIENCE), which is 5 s. Dropping the last handle mid-recording runs finish, which calls the same stop and waits the same way (except on the recorder thread itself).

The doc comment on stop says it blocks "for the few milliseconds that takes". That holds when the thread answers quickly. When AVAudioRecorder is slow to finalize, or the recorder thread is busy, the caller waits up to 5 s. Callers are usually button handlers or view state drops on the UI thread, so the window stops drawing and taking input for that time.

Where
Why it matters

A user taps Stop on a voice note, and the app can freeze for seconds. The targets ask for "zero Rune-caused tasks over 8.3 ms after the first frame" and "no main-thread wait over one refresh", and say Recorder work ends in a safe result with "no thread hangs".

What would help

1. Add a stop that returns at once: it sends Stop, moves the state to a stopping state, and delivers the finished Recording (or the error) through the recorder's waker and a getter such as last_recording(). The recorder thread reports the result when it finalizes. 2. Keep the blocking stop for now, marked deprecated, and document that it can wait up to 5 s. 3. In finish, send Stop without waiting. The recorder thread already owns finalization; drop hands the wait to it, so the file is still finalized after the last handle drops. 4. Add a slow mode to the fake backend so tests can delay the reply.

Changing stop's return type in place would break apps, so a new method is the safer route. Add a changelog fragment for the new method and the deprecation.

Done when
  • The new stop and dropping the last handle each return in <= 1 ms on the calling thread with a fake backend that takes 1 s to reply.
  • The finished file and its duration arrive through the waker, and the file is complete after a drop.
  • The docs for stop and the README state the wait honestly.
  • A changelog fragment records the change.
How to check

Headless tests in crates/rune/src/recorder/tests.rs with the slow fake time both calls. The macOS lane records, drops the last handle and opens the file with Player to confirm it was finalized.

Part of
  • Theme: T13
  • Tracked in R0600
  • Phase 2, milestone 2b · priority P2 · size S
R0444Images: decode requests run first in, first out and can't be cancelled, and concurrent decodes have no memory boundP2Phase 2bMT13
render-image-decode-scheduler · perf
What happens

On native targets each ImageCache request sends a Job with a strong Image to a shared channel, served by up to four decoder threads. Three things follow.

  • No cancel. The job holds the image strongly, so a request the view has already dropped still decodes, and holds its memory until the job ends. The web path already holds the image weakly and skips unwanted requests.
  • First in, first out. After a fast scroll through a thumbnail grid, every image scrolled past decodes before the ones now on screen.
  • No memory bound across workers. image::Limits::max_alloc (256 MiB) covers only the decoder's own buffers. into_rgba8 can copy, and MipSteps::new copies the full RGBA buffer again for mip 0 before the smaller levels are built. One 8192 squared decode takes about 0.6 to 0.8 GiB transiently, and four can run at once.

The README says the cache "decodes on one worker"; the code starts up to four.

Where
Why it matters

After a fling, the visible thumbnails arrive last, so the grid stays blank while hidden images decode. Four large images at once can push memory up by gigabytes. The targets ask that rendering and media "never cause a one-off main-thread stall", that GPU and image memory are "bounded" within "the image budgets", and that one large decode peaks at "at most 1.5 times its RGBA size".

What would help

1. Hold a Weak in Job. Skip a queued job whose image has no strong handle, and discard a running job's result before upload. Dedupe by content key must still work when a cancelled id is requested again. 2. Replace the channel with a priority queue: images drawn in the last frame and the most recent requests go first, with aging so no request waits behind more than 64 newer ones. 3. Admit a job only while the summed estimated peak (width x height x 4 x 1.5) stays under a byte budget, 512 MiB by default, set by a builder method on ImageCache. 4. Build mip 0 in place in the decoded buffer, and build smaller levels into one half-size scratch buffer. 5. Fix the README's worker count.

Done when
  • A request dropped before its job starts is decoded 0 times (counter test).
  • After a fling through 1,000 thumbnails, the first visible image starts decoding within one decode time, and no request waits behind more than 64 newer ones.
  • Summed transient decode memory stays under the budget with four 8192 squared images queued.
  • One 8192 squared decode peaks at <= 1.5 times its RGBA size (counting allocator).
How to check

Headless image tests with a synthetic slow decoder check order and cancellation. Peak memory is measured with procwatch's counting allocator, as in crates/rune/tests/alloc.rs.

Part of
  • Theme: T13
  • Phase 2, milestone 2b · priority P2 · size M
R0445Images: ImageCache::load and rgba hash the whole buffer on the calling thread, and web decode runs in one main-thread taskP2Phase 2bMT13
render-image-hash-off-thread · perf
What happens

ImageCache::load and ImageCache::rgba compute a blake3 hash of every byte before they queue the decode, because the hash is the content key used to dedupe. They run on the caller's thread, which is usually a handler on the UI thread. For a 256 MiB RGBA buffer that is an estimated 40 to 120 ms single-threaded, all in one frame. svg hashes its bytes the same way.

On the web there are no decoder threads. load, rgba and svg requests run input.decode() inside one spawn_local task on the main thread: the whole decode, SVG rasterization and mip chain in one go. Only url and file fetches slice their mip work across tasks, and even there SVG rasterizes in one piece before the sliced mips.

Where
Why it matters

An app that pastes a large image or loads a screenshot from memory drops frames at that moment, on every platform. On the web the stall is longer, since the decode runs there too. The targets ask that "no scenario adds more than 2 ms of render or media work to the UI thread" and "zero Rune-caused tasks over 8.3 ms after the first frame".

What would help

1. load, rgba and svg return an Image at once under a provisional id from a counter (never a memory address). 2. The decode worker computes the content key (bytes, plus width, height and format for rgba, as today). If the key matches a live entry, the worker merges the two handles so they share one decode and one atlas entry. 3. On the web, decode load, rgba and svg inputs in slices with a task between them, as land_in_slices does for mips, and slice SVG rasterization or move it after a next_task yield.

Done when
  • load and rgba of a 256 MiB buffer each return in <= 1 ms on the caller (paired --profile perf runs on the reference Mac).
  • Two loads of identical bytes still share one decode and one atlas entry.
  • Two rgba calls with the same bytes and different dimensions don't merge.
  • On the web, no task that decodes a 4K image runs longer than 8.3 ms.
How to check

The existing dedupe tests in the image test module cover merging, with new cases for the provisional id. A timing test with a 256 MiB buffer runs in --profile perf and the PR records paired runs. The web lane records long tasks while it loads a 4K image through load.

Part of
  • Theme: T13
  • Tracked in R0600
  • Phase 2, milestone 2b · priority P2 · size M
R0446Media: the surface completion thread polls every 1 ms while a clip plays, and a paused Recorder wakes 30 times a secondP2Phase 2bST13
render-surface-completion-poll · perf
What happens

Two background threads wake far more often than their work needs.

Surface completion. SurfaceRenderer starts a rune-video-completion thread. It blocks on its channel between batches, which is fine. Once woken, it loops on device.poll(PollType::Poll) and sleeps 1 ms until the queue is empty. While a clip plays, new work is submitted every frame, so the queue is rarely empty and the thread wakes about 1,000 times a second. The comment explains why it doesn't use a fence wait: that would hold wgpu's snatch lock and serialize queue.present behind GPU work.

Paused recorder. The macOS recorder thread loops on recv_timeout(Recorder::METER_INTERVAL), which is 33 ms. While paused, each timeout returns false and loops again, so a paused recorder wakes about 30 times a second doing nothing. The README says "an idle or paused recorder draws no frames", which is true, but its thread still runs.

Where
Why it matters

Both cost battery on laptops and phones with no visible effect. The targets ask for "0 unrequested Rune thread wakes, CPU <= 0.1% of one core" at rest on every host, and for every frame's GPU cost and cadence to be recorded without extra work.

What would help

1. Register queue.on_submitted_work_done for each submission that needs a completion report, and let the poll the frame loop already does fire it. The completion thread then waits on its channel only, and never waits under the snatch lock. 2. Keep one bounded path for the last frame before idle: when the frame loop stops polling, the thread polls with a growing back-off (1 ms, then 8 ms) until the queue is empty, so the final frame still reports. 3. If callbacks can't be driven that way, the smaller fix is the back-off alone, from 1 ms to 8 ms while frames keep arriving. 4. On the recorder thread, block on recv() with no timeout while paused, and go back to the meter timeout on Resume.

The first option is recommended; it removes the loop instead of slowing it.

Done when
  • While a 30 fps clip plays, the completion thread wakes at most 2 times per presented frame (counter).
  • A paused Recorder wakes its thread 0 times a second.
  • The final frame still completes and reports after the window goes idle.
  • Present timing is unchanged (SurfaceStats over 600 frames).
How to check

A headless counter test on the completion thread with a fake submit loop, and a recorder test that pauses and counts loop iterations. The macOS lane plays the video scene and counts thread wakes.

Part of
  • Theme: T13
  • Phase 2, milestone 2b · priority P2 · size S
R0447Wayland: every show of a layer-shell overlay blocks the UI thread on a registry roundtrip and a configureP1Phase 2bMT14
platform-wayland-layer-reuse · perf
What happens

Hiding a layer-shell or XWayland overlay drops its Live state, so each show calls LayerSurface::new again. Each show then does all of this:

  • opens a new connection on winit's wl_display and runs registry_queue_init, a blocking roundtrip;
  • binds the compositor, layer shell, seat, output and cursor-shape globals again;
  • loops on blocking_dispatch until the compositor sends configure;
  • creates a new wgpu surface and a new rune-layer-watch thread.

The old watch thread is only told to stop. It exits within one poll timeout, so a HUD that shows often churns threads. If the compositor never configures the surface, the blocking_dispatch loop never returns, and every window of the app freezes.

The same hide path breaks release_gpu_when_hidden (#142). park returns at once unless the backing is Backing::Window. On Wayland the renderer, atlas and device are never released, and a hidden screenshot overlay can hold one or two full-screen frames (23.8 MB each at 3024x1964 RGBA, as measured in #142).

Where
Why it matters

A push-to-talk or capture HUD on sway, KDE or Hyprland stalls the app's UI each time it appears. On a slow compositor that stall is visible in every open window. The targets are: "No one-off main-thread stalls, and failures never freeze the frame loop", with "no main-thread wait over one refresh". Another is: "Every platform holds 120 Hz in motion ... and costs nothing at rest or while hidden", where "the thread count returns to baseline" and growth over 100 hide cycles stays under 1 MB. Linux cells must also pass on every declared desktop.

What would help

1. Keep the layer surface, its queue and its watch thread across hides. Unmap with a null-buffer commit, and remap on show. 2. Share one registry and event queue per process, so a second overlay does not add a roundtrip either. 3. Make the first creation asynchronous: commit, return a pending surface, and finish when the watch thread sees configure. The UI thread never waits on the compositor. 4. Make park handle the layer and XWayland backings, so release_gpu_when_hidden frees the renderer and atlas on Wayland.

Some compositors treat a null-buffer commit differently, so test on sway, KWin and Hyprland.

Done when
  • Showing and hiding an overlay 100 times costs 0 UI-thread roundtrips after the first show, and the thread count stays constant.
  • A fake compositor that never configures does not hang the event loop.
  • With release_gpu_when_hidden, a hidden Wayland overlay frees its renderer and atlas, and #142 closes.
How to check

The Linux GUI lanes in R0071 (sway, KWin, Hyprland) run a 100-cycle show and hide with counters for UI-thread roundtrips, threads and resident memory. A unit test with a fake compositor covers the case where configure never comes.

Depends on
Part of
  • Theme: T14
  • Tracked in R0654
  • Phase 2, milestone 2b · priority P1 · size M
R0448Prefs: set rewrites and fsyncs the whole file on the calling thread, and two handles drop each other's keysP2Phase 2bMT14
perf-prefs-off-main · perf
What happens

Prefs::set serializes every key to pretty JSON and writes the whole file through a temporary file and a rename. It calls sync_all before the rename, and on Apple platforms Rust's sync_all is F_FULLFSYNC, which waits for the drive to flush. All of this runs on the calling thread, usually main. It runs even when the new value equals the old one. An app that saves a pane width on each drag step pays a full rewrite and a drive flush per pointer event.

Each Prefs value also holds its own copy of the map, loaded at open. Two handles for the same app id, for example one in settings and one in a window, each write their whole map. The last writer's map replaces the file, so keys the other handle set are lost.

Where
Why it matters

Users see dropped frames while they drag a splitter or move a slider that saves its value. On a slow or busy disk the stall can last tens of milliseconds. Users also lose settings when two parts of an app write prefs. The targets are: "No one-off main-thread stalls, and failures never freeze the frame loop", with zero Rune-caused tasks over 8.3 ms after the first frame. Another is that desktop app services match Electron on macOS, Windows and Linux.

What would help

1. Skip the write when the serialized value equals the stored one. 2. Keep serialization on the caller, so set still returns PrefsError::Serialize at once. 3. Coalesce disk writes on one background worker per file with a short debounce. Flush and join the worker on exit and on drop. 4. Merge on write: re-read the file and apply only the keys this handle changed or removed. Two handles then keep both sets of keys. 5. Add Prefs::flush(), which waits for pending writes and returns the last I/O error. 6. Update the module docs and add a changelog fragment, since set no longer reports I/O errors itself.

Done when
  • Prefs::set on a 64 KB file returns in under 50 µs.
  • An unchanged set writes nothing.
  • Two handles that set different keys both find their keys in the file after flush.
  • Tests: ordered updates land in order, concurrent sets keep the last value, a failed write is reported by flush, and the value is on disk after flush.
How to check

Unit tests in crates/rune/src/prefs cover each case above. A timing test runs set on a 64 KB file in a --profile perf build and checks the median against 50 µs.

Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 2, milestone 2b · priority P2 · size M
R0449Wayland: startup shortcuts register one portal session at a time before the first frameP2Phase 2bST14
perf-wayland-startup-shortcuts · bug
What happens

Host::new attaches the shortcut guard before the window draws. The guard registers every shortcut the app queued at startup, one after another, on the main thread.

On Wayland each registration goes to the GlobalShortcuts portal. The backend gives each binding its own portal session, so that unregister works on portal version 1. register sends the command to the portal worker and blocks on its reply. The reply can wait for the portal's consent dialog, which Rune allows up to 120 s. With five startup shortcuts, the first frame waits for five session setups in a row, and longer if the desktop asks the user to approve them.

Where
Why it matters

A Linux user on GNOME or KDE Wayland sees a blank window, or no window, until the portal answers. Rune's launch rule says slow work starts from on_ready, after the first frame. The targets are: "Launch to first content meets PLAN's targets and the native peer on every platform", with Windows and Linux hello p95 at or under 250 ms. Another target is no one-off main-thread stalls and "no main-thread wait over one refresh". Linux must also work on each declared desktop.

What would help

1. Move startup registration out of Host::new. Start it after on_ready, on the portal worker, and do not block the main thread on replies. 2. Bind all startup shortcuts in one portal session where the portal version allows it. Keep a session per binding only where unregister needs it on version 1. 3. Deliver each result through the waker. Errors go to shortcuts.errors and to the log as now. 4. Document that a startup shortcut is active a short time after the first frame, not before it.

Done when
  • On Wayland, an app with five startup shortcuts shows its first frame as fast as the same app with none, within run-to-run noise.
  • The main thread makes 0 blocking portal calls before the first frame.
  • All five shortcuts fire after the portal grants them, and a refused one reports its error.
How to check

The launch lane in R0071 runs paired, alternating launches with zero and five startup shortcuts against a test portal, and compares the median time to first frame. A unit test with a fake backend checks that registration starts after on_ready.

Depends on
Part of
  • Theme: T14
  • Tracked in R0654
  • Phase 2, milestone 2b · priority P2 · size S
R0450Wayland: portal file dialogs open with no parent window, so they are not modal and may open behind the appP2Phase 2bST14
platform-wayland-dialog-parent · feature
What happens

The FileChooser portal takes a parent_window string, so the desktop can make the chooser a transient child of the app window. Rune records the focused window's X11 id and formats it as x11:<hex xid>. On Wayland that id stays 0, and the string is empty. GNOME and KDE then show the chooser as a free window. It is not modal, it is not centred over the app, and it can open behind the app window or on another workspace.

Where
Why it matters

A Linux user clicks Open and sees nothing, because the chooser opened behind the window. Or they keep working in the app while the chooser floats free. Native GTK and Qt apps do not behave like this. The targets are: "Desktop app services match Electron on macOS, Windows and Linux", and "Linux works on each declared desktop ... Every cell passes on every declared desktop, or carries a documented protocol limit in the capability registry."

What would help

1. When a dialog opens on Wayland, bind zxdg_exporter_v2 (xdg-foreign-unstable-v2) on winit's display. Export the focused toplevel's wl_surface, and pass wayland:<handle> as parent_window. 2. Keep the exported handle alive for the dialog's life, and destroy it when the portal responds or the request closes. 3. Fall back to an empty string when the compositor lacks xdg-foreign, and record that as a protocol limit in R0134. 4. Extend portal_format.rs with the wayland: form. 5. Check #143's folder mode on GNOME at the same time, since the fix touches the same request.

Done when
  • On GNOME and KDE Wayland, the chooser opens as a transient child of the app window.
  • The portal format test covers the wayland: form and the empty fallback.
  • A compositor without xdg-foreign still opens the chooser, with an empty parent.
  • #143 is fixed or has a separate cause recorded.
How to check

A unit test covers the parent string formats. The Linux GUI lane in R0071 runs a test portal that records the parent_window it receives, and checks that it starts with wayland: on GNOME and KDE.

Depends on
Part of
  • Theme: T14
  • Tracked in R0654
  • Phase 2, milestone 2b · priority P2 · size S
R0451Web: the wasm is about 1.74 MB gzip with fonts off, and nothing works it down to the 1.5 MB brotli targetP2Phase 2bLT14
platform-web-size-reduce · perf
What happens

The Rune home page (rune-www) builds with default-features = false, so it has no embedded fonts and no SVG renderer, and it uses opt-level = "z", fat LTO and wasm-opt. Its .wasm measured about 1.74 MB gzip. Brotli usually does better than gzip, but nobody has measured whether this build meets the target in research/11-platform-shells.md: under 1.5 MB Brotli for the initial .wasm.

Apps with default features, such as examples/web-hello, also embed Inter (Regular, Medium, SemiBold) and IBM Plex Mono. That is about 1.38 MB of TTF in crates/rune/assets, linked into the .wasm. The build script prints only raw and gzip sizes. Nothing records which crates make up the wasm, so no one knows where the bytes go.

Where
Why it matters

A phone user on a slow link waits for the wasm before anything draws. Each extra megabyte adds seconds on a mid-range Android phone. The targets are: "Each .wasm at most 1.5 MB brotli", "the cold load at most 2.2 MB brotli, and a regression above 3% fails." Launch must also meet "Web hello first canvas frame p95 <= 1 s on a pinned mid-range Android phone".

What would help

Start from the Brotli numbers and the twiggy attribution that R0224 records at HEAD. Take the largest contributors first, and land each step as its own PR with its size change recorded:

1. Load the default fonts by URL on the web and keep embedding as an option. This moves about 1.38 MB of TTF from the .wasm into the cold load, where the browser can cache it. 2. If attribution shows two font stacks linked into the wasm, remove one. Do this only behind the text goldens. 3. Trim script and segmentation data to what the app's fonts cover. 4. Confirm that WebGPU-only builds link no shader compiler code. If they do, gate it behind webgl.

Removing a font stack is a text change with its own parity risk. It needs its own PR and passing goldens.

Done when
  • The rune-www .wasm is at most 1.5 MB with brotli -q 11.
  • The default-features web-hello .wasm is at most 1.5 MB Brotli, and its cold load, fonts included, is at most 2.2 MB Brotli.
  • Text goldens pass after any font-stack change.
  • Each step's PR records its size change.
How to check

The size gate from R0224 records Brotli sizes per rev and fails a regression above 3%. The text parity tests and goldens run on every font-stack change.

Depends on
Part of
  • Theme: T14
  • Tracked in R0725
  • Phase 2, milestone 2b · priority P2 · size L
R0452Windows: Windows can silently remove the overlay pointer hook, and Rune never noticesP2Phase 2bST14
platform-windows-hook-health · bug
What happens

Overlays on Windows track the pointer with one shared WH_MOUSE_LL hook on its own thread. The hook tells each overlay where the pointer is. Each overlay then sets or clears WS_EX_TRANSPARENT, so clicks pass through its empty parts and reach its controls.

supported() reports only that SetWindowsHookExW succeeded once, at thread start. Windows removes a low-level hook whose callback takes longer than LowLevelHooksTimeout, and it does not tell the app. After that, overlay hover stops and click-through stops toggling, but supported() still says true. The callback makes this more likely than it needs to be. On each mouse move it locks a mutex, clones the observer list, which allocates, and calls every observer before it returns.

Where
Why it matters

A user of a Windows overlay app, such as a HUD or a meeting capsule, finds that its buttons stop reacting after the system was busy for a moment. The app has to restart to fix it. The target is: "Windows apps behave like native Windows 11 apps on every DPI, GPU and input device", and that includes recovery in under 1 s with no restart.

What would help

1. Keep the callback to a post: store the point in an atomic, or post a thread message, then call CallNextHookEx and return. Move the observer fan-out to the hook thread's message loop. 2. Add a heartbeat. If GetCursorPos shows the cursor moving for 2 s with no callback, uninstall and reinstall the hook. 3. Log a removal once per process, and show the hook state and reinstall count in surface_stats. Use a method or a new field, as the stats type allows. 4. Make supported() reflect the live state.

Done when
  • A test that blocks the hook thread past LowLevelHooksTimeout sees the hook reinstalled and overlay hover resume within 1 s after the stall ends.
  • The hook callback does no allocation and takes no lock.
  • surface_stats reports the hook state and reinstall count.
How to check

A Windows GUI lane test in R0063 injects a stall into the hook thread, moves the cursor with SendInput, and checks that the overlay's hit state changes again. A unit test checks that the callback path makes no heap allocation.

Depends on
Part of
  • Theme: T14
  • Tracked in R0654
  • Phase 2, milestone 2b · priority P2 · size S
R0453Accessibility: with a reader attached, tree updates cost more than what changed and bounds lag what is drawnP1Phase 2bXLT15
accessibility-tree-cost · tracking
What happens

The tree is built only after an assistive client asks for it. From then on, each turn that changes something the tree shows rebuilds it from the last frame and sends the nodes that changed. The README calls this "free until asked".

Once a client is attached, the cost and accuracy depend on four things this tracker covers:

  • The walk. Each update walks every element (a11y_walk loops over all nodes) and does work in proportion to depth. A long list or a big canvas pays for its unchanged parts on every change. (R0461)
  • Bounds. The update stamp doesn't change on a Tx::live_only pan or zoom, so bounds stay where they were at the last commit. (R0458)
  • Standing down. On macOS and Windows, once any client reads the tree, it keeps rebuilding until the window closes, even after the client leaves. (R0470)
  • Measurement. No benchmark measures frame cost with a client attached in the worst scenes. (R0466)

These are four separate pieces of work: a walk rewrite, a change to the bounds model, per-platform activation plumbing, and new benchmark scenes. They share one success measure, so a tracker holds them.

Where
Why it matters

Screen reader users run Rune apps with a client attached all the time. If the tree costs frames, they get the jank everyone else is spared. The targets:

  • "At 6,000 elements: full build at most 4 ms, incremental at most 0.5 ms, idle turn at most 5 us. Accessibility time at most 1 ms at p95, and frame p95 with a client within 10% of without."
  • "With a screen reader active: incremental update p95 <= 1 ms, scroll-only p95 <= 0.1 ms."
  • "With a reader active: <= 0.3 ms extra per keystroke at 200 KB."
  • "The tree stands down only on a real platform or AccessKit signal, and then does 0 walks."
What would help

Land the children. Each one adds count budgets to the merge gate, so a regression fails without wall-clock timing. The client-cost scenes record the timing numbers under --profile perf.

Done when
  • Every child is closed.
  • At 6,000 elements, recorded --profile perf runs meet: full build at most 4 ms, incremental at most 0.5 ms, idle turn at most 5 us.
  • With a client attached, accessibility time p95 is at most 1 ms, scroll-only at most 0.1 ms, and frame p95 within 10% of the run without a client.
  • A keystroke in a 200 KB field costs at most 0.3 ms extra.
How to check

Count budgets in the merge gate, and the client-attached cost scenes from R0466 under --profile perf, with paired, alternating runs compared by median.

Issues
Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P1 · size XL
R0454Accessibility: an app can't announce a message without drawing a live regionP1Phase 2bMT15
a11y-announce · feature
What happens

Some events have nothing to show: a file saved, a task finished, a search that found 12 results. To tell a screen reader user about one, an app has to draw a status element and mark it with El::live_region. Rune has no API to announce a message without drawing something.

On desktop, live regions reach the platform through AccessKit, and a unit test covers them. The web mirror has no live regions, so even a drawn status element is silent there. Kit fields work around this by drawing an extra error text with an assertive live region next to the field.

Where
Why it matters

A blind user who saves a file or runs a search hears nothing unless the app drew a status line. Many designs don't have one. The target: "Status and error changes are announced without moving focus on every target (WCAG 4.1.3)", with "5 of 5 targets speak each case as specified, and focus does not move".

What would help

Add Tx::announce(text, LiveRegion).

  • The runtime keeps two hidden nodes under the root, one polite and one assertive. It owns them, so the app's view doesn't change. announce sets their text, and AccessKit raises the platform's announcement.
  • The same text twice must still be heard twice. Change the node every time, for example by alternating a zero-width suffix.
  • Several calls in one turn join into one message, in call order.
  • Focus never moves.
  • On the web, route the same nodes to #118's persistent aria-live regions. They must exist before the first message, since browsers ignore a region that appears together with its text.
  • On Windows, NVDA and Narrator read UIA live regions differently. If the lanes show a live-region change isn't read, raise a UIA Notification event as well.

The state lives in the accessibility subsystem, not in a new Runtime field.

Done when
  • announce yields an update with the live node's new text, and focus is unchanged.
  • The same text twice gives two updates.
  • Two calls in one turn give one message that holds both texts in order.
  • VoiceOver, NVDA, Narrator, Orca and the browser pairs speak the message in the speech lanes.
How to check

Unit tests in crates/rune/src/a11y/tests.rs in the merge gate. Delivery to real screen readers is checked by the speech lanes. The web part is checked by the mirror tests once #118 lands.

Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P1 · size M
R0455Accessibility: row actions such as Archive or Delete can't be offered to screen readersP1Phase 2bMT15
a11y-custom-actions · feature
What happens

Rows often have actions that a pointer reaches by swiping, hovering or dragging: Archive, Delete, Pin, Move. A screen reader user reaches them through a menu of custom actions on the row, such as VoiceOver's Actions rotor. Rune exposes only AccessKit's standard actions: click, focus, context menu, expand and collapse, increment and decrement, set value, text selection and scrolling. El has no builder for a custom action.

So a row action that a pointer reaches only by hover or drag has no route for assistive technology at all. The same gap blocks keyboard and AT alternatives for Kit's drag-only operations.

AccessKit 0.25 (the version in Cargo.lock) supports CustomAction on a node and Action::CustomAction requests, so the platform adapters already carry them.

Where
Why it matters

A VoiceOver, NVDA or Orca user can't archive a message or delete a row without the pointer. The targets: long content can be navigated by a reader, and "row actions are offered as custom actions" that "run their handlers on all 5 targets". Also: "Every control states its name, role, value, state and actions completely and truthfully".

What would help
  • Add El::a11y_action(id, label, handler). id is a stable string. The runtime maps it to an AccessKit CustomAction id that stays stable across rebuilds, and sets the label as its description.
  • Run the handler through the action queue, as Click is run, so it gets a Tx, and a disabled or exiting node refuses it.
  • Runtime::accessibility_action accepts the custom action by its string id, for tests.
  • --tree lists custom actions by label.
  • The web mirror exposes them as named buttons after the row, until #118 maps them.
  • Kit's List, ListItem and sidebar rows accept them (Kit wiring can follow separately).
  • Document the mapping on each platform: AXCustomActions on macOS, UIA, and AT-SPI's Action interface.
Done when
  • A row with two custom actions exposes both by name in the tree and in --tree.
  • accessibility_action with a custom action runs its handler once.
  • A disabled row refuses its custom actions.
  • The macOS lane reads AXCustomActions and performs one, and the UIA, AT-SPI and web lanes find and run them.
How to check

Unit tests and goldens in the merge gate. The platform accessibility lanes check delivery through each platform's API.

Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P1 · size M
R0456Accessibility: no test covers a screen reader restarting, a refused adapter, or a build without the accessibility featureP1Phase 2bMT15
a11y-failure-paths · infra
What happens

Headless tests cover two lifecycle paths: a tree that sends nothing while inactive, and a reopened surface whose new adapter gets the whole tree. Nothing tests the paths through real adapters, and several failures are silent:

  • Reentrant activation. On macOS, activation can reenter tree delivery and abort opening a window (#150).
  • A refused macOS adapter. AccessKit can't subclass a view that key-value observing has already subclassed. Rune then keeps no tree for that window and prints one line to stderr. Neither --tree nor procwatch shows it.
  • The feature turned off. An app built with default-features = false drops every platform adapter with no warning. That is easy to do while trimming dependencies, because accessibility is one of six default features.
  • A restarted reader. Nothing tests that a screen reader that quits and starts again gets the whole current tree from the same adapter.
  • Actions on removed nodes. Actions for removed or exiting nodes are refused, but no test makes an action arrive in the middle of a commit or a modal opening.
Where
Why it matters

When accessibility fails silently, a screen reader user gets an empty window. The developer sees nothing, because the app looks fine. The targets: "Accessibility never takes an app down and never disappears without a visible diagnostic", with "0 panics across the fault tests", "after re-activation or a failed delivery, the next update holds the current tree", and "each refusal shows as a procwatch warning and in --tree". And real assistive technology drives Rune in automated lanes on each platform.

What would help
  • Headless tests through AccessibilityLink:
    • activation arriving during a commit;
    • activation arriving during a modal opening;
    • actions for removed nodes;
    • actions for nodes in an exiting subtree.
  • Record every adapter refusal (macOS subclassing, adapter construction failures) as a procwatch warning, and as a flag on the surface in --tree.
  • With the accessibility feature off, debug builds print one line at startup, and --tree says the platform adapters are off.
  • In the macOS, Windows and Linux lanes, quit and restart VoiceOver, NVDA and Orca in the middle of a scenario. Assert that the tree comes back with its expected content and that an action works. Hosted runners can make restarts flaky: retry once, and count infrastructure failures apart from product failures.
Done when
  • Each fault path has a headless test, with 0 panics.
  • A refused adapter appears in --tree and as a procwatch warning.
  • A build without the feature warns once in debug, and --tree says so.
  • The macOS, Windows and Linux lanes recover the expected tree after a screen reader restart, and an action works.
How to check

Headless tests in crates/rune/src/a11y/tests.rs in the merge gate. Restart scenarios run in R0238, R0240 and R0237.

Depends on
Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P1 · size M
R0457Accessibility: a field can't point to its visible label, help text or error message, or say it is requiredP1Phase 2bMT15
a11y-field-relations · feature
What happens

El takes a label string and a description string, but it has no relations to other nodes and no required state.

Kit works around this by copying strings:

  • Field copies its label onto a group, and joins its help text into the group's description.
  • TextInput and TextArea copy the error string into the editor's description.
  • TextArea also draws the error as a separate assertive live region, with nothing that links the field to that node.

A screen reader can't move from a field to its error or its help, and a required field isn't announced as required. If the visible label and the copied string drift apart, the reader says one thing and the screen shows another.

AccessKit 0.25 (the version in Cargo.lock) has labelled_by, described_by, error_message and required properties, so the adapters can carry them.

Where
Why it matters

A screen reader user filling in a form can't find out why a field is invalid, or that it is required, without hunting for the text. That fails WCAG 1.3.1, 3.3.1 and 3.3.2. The targets: each field carries "its own name, purpose for autofill, required and invalid states with an error relation", with "every applicable property exposed on all 5 targets, or the matrix cell is n/a with a reason". And every control states its name, role, value and state truthfully.

What would help

Add El::labelled_by(key), El::described_by(key), El::error_message(key) and El::required(bool). Set the AccessKit relations and the required property from them. On the web, map them to aria-labelledby, aria-describedby, aria-errormessage and aria-required.

Key resolution needs care. active_descendant looks in the node's own subtree first and then takes the first match in the whole tree. A label or an error is usually a sibling or a cousin of its field, so in repeated rows that fallback would point row 2's field at row 1's label. Two options:

1. Reuse the active_descendant rule as it is. This is simple, but wrong in repeated rows. 2. Search outward: the subtree of each ancestor in turn, nearest first, and stop at the first match. For descendants this gives the same answer as active_descendant.

Option 2 is recommended. Share it with active_descendant so the two can't diverge.

An unknown key warns once in debug. The audit adds an "invalid with no error relation" rule (R0144). Kit's Field, TextInput, TextArea, Select and RadioGroup wire the relations in a follow-up.

Done when
  • A field with a label, help and an error exposes the three relations to the right node ids.
  • The relations still point at the right nodes after a remount, and in repeated rows.
  • Required is exposed.
  • An unknown key warns in debug.
  • fields.json shows the relations, and the AX, UIA, AT-SPI and web mappings expose them.
How to check

Unit tests, the Kit goldens in crates/rune-kit/tests/a11y/golden, and the audit rule in the merge gate. The platform accessibility lanes check each mapping.

Part of
  • Theme: T15
  • Tracked in R0676
  • Phase 2, milestone 2b · priority P1 · size M
R0458Accessibility: element bounds go stale after a live-only pan or zoomP1Phase 2bMT15
a11y-live-only-bounds · bug
What happens

The tree decides whether to send an update by comparing a stamp. The stamp holds:

  • the commit count;
  • a hash of scroll offsets;
  • focus;
  • the animating flag;
  • the viewport size and scale;
  • the window title;
  • the tooltip.

A Tx::live_only handler, such as a canvas pan or a pinch zoom that sets only live values, moves what is drawn without a commit. None of the stamp's fields change. So the tree keeps the bounds from the last commit until something else commits.

Scroll viewports avoid this: their offset is in the stamp and is expressed as a transform on the viewport node. Live offsets and scales have no such path. A naive fix that resends every child's bounds on each pan would make a 2,000-child canvas resend 2,000 nodes per frame.

Where
Why it matters

Zoom's focus tracking, the VoiceOver cursor outline, touch exploration and "click at element" in automation all point at where an element was, not where it is. A low-vision user who pans a canvas loses the magnifier's place. The target: "Bounds follow what is drawn, update cost scales with what changed", and "the bounds invariant holds across the a11y, live-only and motion suites".

What would help
  • Add a drawn generation to the stamp. Bump it when a live value changes a node's drawn transform (offset or scale), and not on frames where nothing moved.
  • Express a live offset and scale as a transform on the node that owns them, as scroll viewports already do. A pan then changes one node, not every child.
  • When motion settles, refresh once, so bounds match the final drawn rects.
  • Platforms apply AccessKit transforms differently, so the lanes confirm screen bounds on each platform.
Done when
  • After a live-only pan and a live-only zoom on a 2,000-child canvas, every child's composed screen bounds equal its drawn rect within 0.5 pt.
  • That update holds at most 3 nodes.
  • Nested live transforms, a clipped child and device scale 2.0 are covered.
  • After motion settles, bounds equal the drawn rects.
  • No update is sent when nothing moved.
How to check

Unit tests with node-count assertions in the merge gate, in crates/rune/src/a11y/tests.rs. The AT-SPI and UIA lanes confirm screen bounds.

Part of
  • Theme: T15
  • Tracked in R0453
  • Phase 2, milestone 2b · priority P1 · size M
R0459Accessibility: system settings are read only when a window is created or gains focus, so a change made while the app is in front waitsP1Phase 2bLT15
a11y-settings-live · bug
What happens

Native hosts read the accessibility preferences when a host is created and on WindowEvent::Focused:

  • Windows read Reduce Motion and Full Keyboard Access.
  • Overlays read Reduce Motion.

Nothing listens for a change. So a user who turns on Reduce Motion while the app stays in front, from Control Center, a menu-bar app or a keyboard shortcut, sees no change until focus moves. An overlay, tray panel or layer surface that never takes focus keeps the value it read at creation.

On Linux, Rune reads KDE's kdeglobals file or GNOME's GSettings through GIO. Inside a Flatpak sandbox without the schema, that lookup returns nothing, so it reads false.

The web already listens to matchMedia changes. Rune also has three separate watchers for other preferences, each with its own plumbing:

  • the macOS accent colour (NSSystemColorsDidChangeNotification);
  • the macOS scroller style;
  • the Linux portal's color-scheme (SettingChanged).

The settings readers still to come (contrast, Reduce Transparency, text size) would copy whichever of these patterns is nearest.

Where
Why it matters

A user with a vestibular disorder turns on Reduce Motion and keeps working. Animation continues until they happen to switch windows. The targets:

  • Rune applies "a change live" for every accessibility setting.
  • Reduced motion is honoured "<= 1 frame after the OS notification on macOS, Windows, GNOME, KDE, Flatpak (portal), web and iOS, for windows, overlays and LayerHost".
  • "A setting change redraws within 1 frame and 100 ms of the OS notification".
What would help

Add one preference watcher per process, owned by the platform layer. It listens to:

  • macOS: NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification on NSWorkspace's notification center, and Full Keyboard Access.
  • Windows: WM_SETTINGCHANGE (SPI_SETCLIENTAREAANIMATION, SPI_SETHIGHCONTRAST, text scale) through the existing SetWindowSubclass pattern or a message-only window, plus UISettings change events.
  • Linux: the XDG portal's Settings.SettingChanged for org.gnome.desktop.interface enable-animations, folded into the portal_appearance worker. Fall back to the GSettings changed signal when there is no portal, and watch kdeglobals on KDE.
  • Web: route the existing matchMedia listener through the same entry point.

The watcher coalesces bursts into one re-read per turn. It re-reads every setting and wakes every window, overlay, tray and layer host to apply it. Hidden hosts included: they apply it when shown. No focus change is needed. Every setting reader added later goes through the same watcher. The iOS reader is separate work.

Done when
  • A fake watcher event changes Cx::system_reduced_motion in the next frame for every open window and overlay, with no focus change.
  • A mocked-source test for each of macOS, Windows, GNOME and KDE.
  • Inside Flatpak, the portal path reads the setting and its changes. Without a portal, GSettings is used.
  • All setting readers go through the watcher.
  • The README describes live updates.
How to check

Unit tests with a fake source in the merge gate. The platform GUI lanes toggle the real setting and measure the time to the redraw.

Part of
  • Theme: T15
  • Tracked in R0675
  • Phase 2, milestone 2b · priority P1 · size L
R0460Virtual rows: nothing shows that the keyboard or a screen reader's cursor reaches rows past the mounted windowP1Phase 2bLT15
a11y-virtual-list-reach · feature
What happens

Only a virtual list's mounted rows have nodes, both in the accessibility tree and in focus traversal. The list reports its key count as the set size and each row reports its index (crates/rune/src/a11y/tree.rs:395-397). A screen reader that moves to the next item can only step to a row that exists.

How many rows exist past the viewport depends on the paint overscan. An index-built list keeps 2 viewports per side mounted, but at most half a viewport of new rows mounts per side in one commit (crates/rune/src/el/virtual_list.rs:161-168). Just after a jump or a first showing, a reader can find only half a viewport past the edge. Nothing holds rows for a reader apart from paint.

The keyboard has the same edge. Tab order and arrow keys choose from mounted, focusable nodes only. Each step reveals the new focus, and that reveal is what moves the window. From reading the code, End in a listbox goes to the last mounted row, not the last row.

A reader's ScrollIntoView and page scrolls already reach the scroller, and Tx::scroll_into_view reaches a row that was never built. But no test checks a walk across the mount boundary, forward or back, for focusable or plain rows.

Where
Why it matters

A VoiceOver or NVDA user reading a chat log, a file list or a table can stop at the last mounted row, or lose their place when the window moves. The target is that a reader's own cursor reaches row 10,000 and the last line, then returns to row 1, "with set size and index correct at every step. Real reading never stops at a mount boundary." Scroll containers must have "every row reached in order with correct set size and position."

What would help

1. While a client is active, keep at least one viewport of semantic rows on each side, whatever the paint overscan and the per-commit budget. With no client, mount counts stay as they are. 2. ScrollIntoView on the first or last mounted row scrolls so that the next rows mount. ScrollUp and ScrollDown page the list. 3. In a listbox, make End, Home, PageUp and PageDown go by row index, not by mounted node. 4. Add headless walks on a 10,000-row virtual_rows list in two setups: rows in one focus group (a listbox), and rows that are each a Tab stop. Fix what fails.

This issue provides the mechanism. A later certification issue runs each reader's own next and previous commands, and the reader-cursor target counts only when that passes.

Done when
  • With an active client, every frame has nodes for at least one viewport of rows on each side, including the frame after a jump and a first showing. With no client, mount counts don't change.
  • Listbox setup: Down reaches all 10,000 rows in order, Up returns to row 1, End reaches row 10,000, and one Tab leaves the list.
  • Tab-stop setup: Tab reaches all 10,000 rows in order, and Shift+Tab returns.
  • A ScrollIntoView walk on the next tree node goes from row 1 to row 10,000 and back, with the right position and set size at every step, for focusable and plain rows.
  • Scroll actions page to the last row, which reports position 10,000 of 10,000.
  • No row is skipped or repeated when the window moves.
  • The same walk reaches the last line of a 200 KB Markdown transcript and returns.
How to check

Runtime and AccessKit tree tests in the merge gate, with no wall-clock assertions. A count test checks the semantic buffer with and without a client.

Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P1 · size L
R0461Accessibility: each tree walk visits every node and costs nodes times depth while a client listensP1Phase 2bLT15
a11y-walk-linear · perf
What happens

While a client listens, any turn that changes more than scroll offsets walks and fingerprints every element (crates/rune/src/a11y/tree.rs:150-165). Three per-node calls walk the node's ancestors:

So one walk costs about nodes times depth, three times over. a11y_active_descendant is worse. It runs an ancestor walk on each node after the owner, and if that finds nothing it scans every node (crates/rune/src/a11y/node.rs:239-245). The walk also fingerprints subtrees that nothing touched. And the first tree after a client turns on is built in a single turn.

The walk already passes some state down from the parent (crates/rune/src/a11y/tree.rs:322-330). ExitMask fills a per-node flag once a frame for the same reason (crates/rune/src/runtime/paint/exit_mask.rs:1-13). Reachability and focus-group membership can work the same way.

Nothing records the cost. a11y_cost is #[ignore]d and prints medians only. Its scene is a flat list of 2,000 rows, which makes 6,000 elements but only about 4 levels, so the depth term never shows (crates/rune/src/a11y/tests.rs:347-390).

Where
Why it matters

Users of VoiceOver, NVDA and Orca pay this cost on the main thread at every commit, so deep Kit screens drop frames only for them. The targets at 6,000 elements are "full build at most 4 ms, incremental at most 0.5 ms, idle turn at most 5 us". With a screen reader active, "incremental update p95 <= 1 ms, scroll-only p95 <= 0.1 ms". "Nodes visited <= the counted definition." No Rune-caused task may run over 8.3 ms after the first frame.

What would help

1. Once per walk, fill reachability, the ancestor-opacity check and focus-group membership top-down into Vecs, as ExitMask does. Role, fingerprint and build read from them. 2. Build a key index once per walk and resolve active-descendant keys through it. Keep the rule that the owner's own rows win. 3. Skip subtrees whose fingerprint inputs haven't changed since the last walk. Keep a11y_check_sent on in test builds as the safety net. 4. Build the first tree after activation in slices of at most 4 ms. The adapter already answers with a placeholder until the tree arrives (crates/rune/src/a11y/mod.rs:46-51). 5. Make a11y_cost report p50, p95 and p99. Add depth 30 and depth 100 variants. Feed its counts to R0256 and R0158.

Long-field runs and the 64 KiB cap are handled in R0679.

Done when
  • An ancestor-step counter reads at most 2n per walk at depths 5, 30 and 100 on 6,000 elements.
  • Active-descendant resolution does at most one index lookup per referencing node.
  • A turn that toggles one checkbox among 6,000 elements visits no more nodes than its count budget.
  • Turning a client on causes no slice over 4 ms and no frame over 8.3 ms, first tree included.
  • On the reference Mac with --profile perf, at 6,000 elements: full build at most 4 ms, incremental median at most 0.5 ms and p95 at most 1 ms, scroll-only p95 at most 0.1 ms, idle turn at most 5 us.
  • In test builds the sent tree still equals a full build across the a11y, live-only and motion suites.
  • The PR gives a11y_cost before and after, as medians of paired, alternating runs.
How to check

The ancestor-step and node-visit counters run as count tests in the merge gate. Timing comes from a11y_cost under --profile perf and is recorded through R0256.

Depends on
Part of
  • Theme: T15
  • Tracked in R0453
  • Phase 2, milestone 2b · priority P1 · size L
R0462Windows: an accessibility update that arrives during a nested UIA call is dropped, and the runtime thinks it was sentP1Phase 2bST15
a11y-windows-dropped-update · bug
What happens

The Windows adapter keeps its state in a RefCell and delivers each tree update with try_borrow_mut (crates/rune/src/a11y/windows.rs:77-80). The borrow is held while the subclass answers WM_GETOBJECT, and UIA can send a nested one during that answer (crates/rune/src/a11y/windows.rs:31-38). If an update arrives then, try_borrow_mut fails and the update is thrown away without a log line.

By that point the runtime has already recorded the update's nodes as sent (crates/rune/src/a11y/tree.rs:168-185). Adapter::send and Adapter::sync return nothing, so the runtime can't learn that delivery failed (crates/rune/src/a11y/mod.rs:181-186, crates/rune/src/a11y/mod.rs:219-226). The next diff leaves those nodes out. Narrator or NVDA then reads stale names, values or focus until something else changes those nodes. Window focus changes go the same way and are dropped the same way (crates/rune/src/a11y/windows.rs:40-43).

On macOS the same reentry panics inside AccessKit instead (#150). A fix should give both adapters one rule.

Where
Why it matters

A Windows screen reader user hears an old value or misses a focus move. Nothing in the app or its logs shows why. The target: "Accessibility never takes an app down and never disappears without a visible diagnostic", and "After re-activation or a failed delivery, the next update holds the current tree."

What would help

Make send report whether the adapter took the update. Then use one of two repairs:

1. Mark the tree for a full update and wake (recommended). When delivery fails, set the runtime tree's full flag and request a wake. The next turn then sends the whole current tree, after the callback has returned. This is simple and always correct. It costs one full update, and only in a rare case. 2. Queue and merge. Keep the refused update and deliver it with later ones, in order, once the borrow is free (at the end of the subclass callback or on the next turn). This sends less. But AccessKit has no way to merge TreeUpdates, so Rune would have to keep the order itself. #150 sketches this approach inside AccessKit.

Apply the same rule to focus-state updates and to the macOS path. Log each deferred delivery under RUNE_A11Y_LOG. Add a test seam so that a fake adapter can refuse a delivery.

Done when
  • A headless test with a fake adapter that refuses one delivery shows that the next delivery holds those nodes, with current values.
  • A Windows lane test forces a nested WM_GETOBJECT during an update, then reads the current values.
  • A refused focus-state update is delivered again.
  • Across 1,000 refuse-then-accept cycles in the headless test, no update is lost or reordered.
  • RUNE_A11Y_LOG=1 logs each deferred delivery.
How to check

The fake-adapter test runs headless in the merge gate. The nested call runs in R0240.

Depends on
Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P1 · size S
R0463Layout: Kit scenes are never checked at 320 pt wide, at large text or in pseudo-locales, so clipped and unreachable content shipsP1Phase 2bLT15
layout-scene-fuzz · infra
What happens

PLAN.md promises that "every scene is fuzzed across window sizes, text scale, long German, RTL, CJK, light/dark", failing on overflow, overlap and hard clips (PLAN.md:393). No such sweep exists. Kit's visual diff renders each story at one width, 720 pt unless a story sets another, in light and dark (scripts/kit-diff.py:37-39, scripts/kit-diff.py:115).

So clipped and unreachable content ships, and people find it by hand. In #88, a Dialog description is one line 584.5 pt wide inside a 480 pt card and runs past the 600 pt window, because text(description) has no wrap (crates/rune-kit/src/dialog.rs:48-50). In #109, at 195 px wide (a 390 px phone at 200%), fields run off the right edge with no way to scroll to them.

Where
Why it matters

Someone who sets large text, or narrows a window to 320 pt beside another app, loses labels or can't reach a field. Under WCAG 1.4.4 and 1.4.10 that is an audit failure. The targets are "no clipped or overflowing text at any tested width, text scale or locale" and "0 two-axis scrolling at 320 pt outside allowlisted tables and code". By the end of phase 3: "0 lint findings, with no allowlist ... no clipped, overlapping or unreachable content, except truncation a component marks and whose full text stays reachable."

What would help

Build a harness on R0334 that runs every Kit gallery scene (kit-gallery --scene), new ones included, across:

  • widths 320, 375, 480, 768, 1024, 1280, 1440 and 2560 pt;
  • zoom 1.0, 1.5 and 2.0;
  • light and dark;
  • pseudo-locales that replace strings: German at 1.4 times the length, Arabic and CJK.

It fails on:

  • text clipped by an ancestor that doesn't scroll;
  • two text boxes that overlap;
  • a focusable node outside every reachable scroll area;
  • two-axis scrolling at 320 pt outside tables and code (WCAG 1.4.10).

Truncation passes only when the component marks it with clip_ok and the full text stays reachable, through the accessible name plus a tooltip or expansion.

The merge gate runs a fixed sample, and a nightly job runs the full sweep. #88 is the first regression case. Each allowlist entry needs a reason, and the list only shrinks. The text-scale axis (1.0, 1.5 and 2.0) joins when R0681 lands. Right-to-left runs join once layout follows text direction. In R0239, repeat the 320 px and 200% cases with real browser zoom.

The two source plans chose different widths (320, 375, 768, 1280 against 320 to 2560) and different gates (every story on each merge against a sample plus nightly). The list above covers both sets of widths. Every axis combined comes to several hundred renders per scene, which is too much for every merge. So the recommendation is a sample in the merge gate and the full sweep nightly.

Done when
  • Every gallery scene runs automatically, new ones included.
  • Width, zoom, theme, pseudo-locale and reflow are axes of the sweep. Text scale is added once R0681 lands.
  • #88 fails the sweep before its fix and passes after.
  • The merge-gate sample and the nightly sweep have 0 findings outside the allowlist, and every entry has a reason.
  • The allowlist never grows. By the end of phase 3 it holds no clipped, overlapping or unreachable entry.
  • Kit fields and dialogs reflow at 320 pt with no two-axis scrolling.
How to check

The sample runs in the merge gate and the full sweep runs nightly. Both check geometry only, with no wall-clock assertions. The web lane adds real browser zoom at 320 px and 200%.

Depends on
Part of
  • Theme: T15
  • Tracked in R0675
  • Phase 2, milestone 2b · priority P1 · size L
R0464Docs: no single guide says what Rune does for accessibility and what an app must do itselfP2Phase 2bMT15
a11y-author-guide · docs
What happens

An app author has to piece together what Rune does for accessibility and what is left to the app. Rune's README covers the tree, the defaults it takes from each element, the actions and the --tree tools. Kit's README covers names, values, states and live regions per component. Neither one says, area by area, which WCAG jobs stay with the app: focus_return for content the app removes, announcements, custom actions, a keyboard path for drag operations, input purpose, and language. #109 and #111 list criteria that fall to the app, and no single place answers them.

The site has no accessibility page. Its overview says web accessibility is "still to come".

No example shows a form that passes. examples/ has no accessibility example, so the speech and browser lanes have no shared fixture, and each would have to build its own.

Where
Why it matters

An author who wants to pass an audit needs to know which criteria Rune and Kit meet and which are the app's job. Without a guide, apps ship gaps a guide would have caught, or assume the framework covers them. The targets: "An app built on Rune and Kit can pass an independent WCAG 2.2 A and AA audit ... with no criterion failing because of Rune or Kit". "the README, site and PLAN describe current coverage", and "Every enumerated claim matches the code." The lanes where "Real assistive technology drives Rune" need one fixture to drive.

What would help

1. Add a site page, linked from both READMEs and from the matrix in R0141, that extends the two README sections:

  • the app's duties per WCAG area, each with the El or Kit builder that meets it;
    • how to check an app with --tree, the audit from R0144 and the keyboard walk.

The page says what is covered and links to the tests. It must not read as a conformance claim. 2. Add examples/accessible-form: a sign-in and settings form built with Kit that passes the audit, the keyboard walk and axe-core. The speech and browser lanes share it as their fixture. 3. Give each Kit component's doc its keys and its role.

The page grows as R0467 and R0457 land.

Done when
  • The page exists and is linked from both READMEs and the WCAG matrix.
  • Every WCAG 2.2 A and AA criterion that the matrix marks as the app's has a section on the page, with the builder to use or a plain statement that the app handles it.
  • examples/accessible-form passes the audit, the keyboard walk and axe-core in CI, in Chromium, WebKit and Firefox, with an empty allowlist.
  • Every Kit component's doc lists its keys and its role.
  • Every API the page names exists at the rev it was checked against.
How to check

The example's tests run in the merge gate and in the web lane. A link check in the site build covers the page. The site has no such check today, so this issue adds it. The matrix rows that point to the page name the example's tests.

Depends on
Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P2 · size M
R0465Accessibility: no test checks that magnifiers can find the caret, and on the web it sits at the page cornerP2Phase 2bMT15
a11y-caret-tracking · bug
What happens

Magnifiers follow the text caret by asking the platform's text API for the caret's screen rect. macOS Zoom, Windows Magnifier and GNOME Zoom all work this way. Rune sends each field's lines as text runs with every character's position, plus the caret and selection in those runs, so AccessKit can answer. But no test checks that the rect AccessKit returns lands on the drawn caret. That holds for every platform, after a scroll, and in a window away from the screen origin.

On the web, the hidden text field is fixed at the page's top-left corner and is 1 px square. Browser features and magnifiers that follow the focused field find that corner, not the caret. R0119 moves that field to the caret for the IME. This issue adds the magnifier checks on top of that work.

Where
Why it matters

A low-vision user who has the screen magnified sees only the area near the caret. If the magnifier gets the wrong rect, the typing happens off screen. The targets: "Magnifiers can follow focus and the caret", and "Focus and caret rects are within 1 pt of the drawn rects". On the web, the focused element "sits on the field's rect outside composition."

What would help

Add lane checks that compare the platform's caret rect with Rune's drawn caret:

  • macOS: AXBoundsForRange of the selected range, in R0238.
  • Windows: the bounding rectangles of the UIA TextPattern selection, in R0240.
  • Linux: the AT-SPI Text caret extents, in R0237.
  • Web: a Playwright check of the hidden field's rect against the caret, in R0239.

Run each check in four cases: a single-line field, a multiline field, after a scroll, and in a window placed away from the screen origin. Moving the web field can scroll the page or reopen the iOS keyboard (#165), so run the web check in WebKit too. Fix what the checks find. Record magnifier tracking in the WCAG matrix as a dated human check.

Done when
  • The macOS, Windows and Linux lanes read a caret rect within 1 pt of the drawn caret in all 4 cases.
  • A Playwright check finds the web field within 1 px of the caret after typing, arrow moves, a scroll and a newline, in Chromium and WebKit.
  • The WCAG matrix records magnifier tracking with macOS Zoom, Windows Magnifier and GNOME Zoom as a dated human check.
How to check

The platform lanes and the web lane run these checks post-merge on every dev change. The human check is repeated before it is 6 months old.

Depends on
Part of
  • Theme: T15
  • Tracked in R0676
  • Phase 2, milestone 2b · priority P2 · size M
R0466Accessibility: nothing measures frame cost with a screen reader attached in the worst scenesP2Phase 2bMT15
a11y-client-cost-scenes · infra
What happens

Rune's frame numbers come from runs with no assistive client attached. When VoiceOver or NVDA is on, each turn that changed something rebuilds part of the accessibility tree and sends it at the end of the turn, after that turn's frames (crates/rune/src/window/events.rs:150-154). That work runs on the main thread, so it delays the next frame. Nothing measures it in the scenes where it costs most:

  • typing in a long field, where the field's runs are rebuilt on every keystroke and text over 64 KiB gets none (crates/rune/src/a11y/text.rs:11);
  • scrolling a 10,000-row list, which mounts rows and sends their nodes;
  • a live-only pan over a dense canvas;
  • opening a menu over a large view.

Frame stats have no accessibility term. FrameStats counts commits, layout nodes, glyphs and shaping (crates/rune/src/runtime/types.rs:443-448). Update time and node count print only under RUNE_A11Y_LOG (crates/rune/src/a11y/mod.rs:128-134). a11y_cost is ignored and uses one flat scene (crates/rune/src/a11y/tests.rs:360-390). A loss of feel that only screen reader users see would go unnoticed.

Where
Why it matters

Screen reader users should get the same 120 Hz feel as everyone else. The targets: "Accessibility time at most 1 ms at p95, and frame p95 with a client within 10% of without". "A keystroke in a 200 KB field sends at most the edited paragraph's runs plus 3 nodes". With a reader active, "<= 0.3 ms extra per keystroke at 200 KB". With a screen reader active, "incremental update p95 <= 1 ms, scroll-only p95 <= 0.1 ms".

What would help

1. Add the four scenes, each with an activated AccessibilityLink, to the count budgets in R0256. Count nodes walked and nodes sent per frame. 2. Add accessibility time (tree build plus adapter delivery) and nodes sent to the per-surface frame records from R0121. 3. On a named reference Mac and a named reference Windows machine, built with --profile perf, run each scene for 600 frames. Do 10 alternating runs with and without a real client (VoiceOver on the Mac, NVDA on Windows). Report p50, p95 and p99 of frame time and of accessibility time, and keep outliers. 4. Check each recorded run against the targets, and link every miss to an issue.

Don't gate on wall-clock time on hosted runners. The counts are the gate, and the timings are recorded.

Done when
  • The 4 scenes have count budgets in the merge gate.
  • Frame records report accessibility time and nodes sent per frame.
  • Recorded runs on both machines show accessibility time at most 1 ms at p95, and frame p95 with a client within 10% of the run without one. Or each miss links to an issue.
  • After R0679, a keystroke in a 200 KB field sends at most the edited paragraph's runs plus 3 nodes, and costs at most 0.3 ms extra.
  • Each record names the machine, the date and the rev.
How to check

Count budgets in the merge gate. Paired timing runs on named hardware, recorded with machine, date and rev, and repeated when the tree code changes.

Depends on
Part of
  • Theme: T15
  • Tracked in R0453
  • Phase 2, milestone 2b · priority P2 · size M
R0467Accessibility: no way to set the language of a window or of an elementP2Phase 2bMT15
a11y-language · feature
What happens

Screen readers choose a voice and pronunciation from the language of the text. Rune sets no language for them.

text::set_language is a process-wide hint for font fallback and shaping (crates/rune/src/text/language.rs:18-31), and it never reaches the accessibility tree. El has no language builder (crates/rune/src/el/a11y.rs), so no node carries a language. The generated web page and the static HTML export are both fixed to lang="en".

So VoiceOver reads a French app with an English voice, and reads a German quote inside an English paragraph with English rules. WCAG 3.1.1 (language of page) and 3.1.2 (language of parts) fail.

Each text system shapes in one language, and a change drops every layout it has shaped (crates/rune/src/text/language.rs:41-48). So a per-element language can't reuse that hint as it is.

Where
Why it matters

The target says each field carries "a language" (WCAG 3.1.1, 3.1.2). "Every applicable property is exposed on all 5 targets, or the matrix cell is n/a with a reason." An app should pass a WCAG 2.2 AA audit "with no criterion failing because of Rune or Kit".

What would help

1. Add a window language, set through a builder method on the app or window spec, changed at run time through Tx, and read through Cx. Don't add pub fields to AppSpec or Env, because apps build them as literals. When no window language is set, fall back to text::set_language. 2. Add El::lang(tag), which takes a BCP 47 tag. The subtree inherits it unless a child sets its own. Inline text needs a Span builder method for the same reason as above. 3. Use the resolved language in two places. It sets AccessKit's node language on the root and on each node whose language differs from its parent's. It is also the shaping locale for the subtree. Put the locale in the shape key, or caches will mix locales. 4. Write lang attributes in the web mirror. Write the window language on <html> in the generated page and in the --html export.

Done when
  • The root node carries the window language.
  • El::lang sets the node language and the subtree's shaping locale. A child inherits both unless it sets its own.
  • A paragraph with an inline span in another language exposes both languages.
  • The web mirror, the generated page and the --html export write lang attributes.
  • Shaping one string in two locales makes two cache entries. Changing one subtree's language reshapes only that subtree.
  • No pub field is added to AppSpec, Env or Span.
How to check

Unit tests, web mirror tests and export tests in the merge gate.

Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P2 · size M
R0468macOS: a window whose content view is already subclassed gets no accessibility tree, and says so only on stderrP2Phase 2bMT15
a11y-macos-subclassed-view · bug
What happens

AccessKit's macOS adapter works by subclassing winit's content view at run time. Sometimes the view's class already differs from the class it reports, for example under key-value observing or after another library swapped the class. AccessKit would panic on such a view. Rune checks for this case, prints one line to stderr and returns no adapter (crates/rune/src/a11y/macos.rs:12-25). The window then has no accessibility tree at all. VoiceOver finds an empty window, and neither --tree nor procwatch says why.

Nobody knows which of Rune's host kinds can reach this path. Windows and panel overlays both create their adapter from the winit window. Windows with a system material add Rune's own NSView class. The embedded CAMetalLayer host for AppKit views creates no adapter at all. No test opens each host kind and checks that it has a tree.

Where
Why it matters

A VoiceOver user meets a window with nothing in it. The target: "The macOS, Windows, Linux, web and iOS platform trees all come from the one AccessKit tree the runtime builds, for windows, overlay panels, layer surfaces and embedded hosts. Accessibility never takes an app down and never disappears without a visible diagnostic." Also: "Each refusal shows as a procwatch warning and in --tree. Every host kind exposes its expected content and working actions."

What would help

1. In R0238, open each host kind (window, panel overlay, a window with a system material, an embedded host) and assert the expected AX content and a press that works. 2. Add a test window whose content view is under key-value observing. 3. When subclassing is refused, still give the window a tree. Forward the accessibility selectors (accessibilityChildren, accessibilityFocusedUIElement, accessibilityHitTest:) from a subview that Rune owns. Forwarding can collide with AccessKit's subclass, so test both install orders. 4. Report every refusal as a procwatch warning and in --tree, through R0456. 5. For the embedded host, either expose the tree through the host's view or record the gap and its reason in the support matrix.

Done when
  • For every host kind, the lane finds the expected AX content and a press that works, or the support matrix lists the kind as n/a with a reason.
  • A test window under key-value observing gets a working tree.
  • A refusal shows as a procwatch warning and in --tree, not only on stderr.
  • Both install orders run with 0 panics.
How to check

The macOS lane runs post-merge on every dev change. The refusal path also runs in the fault tests from R0456.

Depends on
Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P2 · size M
R0469Accessibility: Reduce Transparency is never read on macOS, Windows or the web, so nothing can turn Rune's glass opaqueP2Phase 2bMT15
a11y-reduce-transparency · feature
What happens

Rune draws its own glass, backdrop blur (El::backdrop_blur) and translucent materials. It also wraps native materials (El::system_material). When a user turns on Reduce Transparency on macOS or iOS, or turns off transparency effects on Windows, native apps draw opaque surfaces instead. Rune never reads that setting. Its preference readers cover only reduced motion, dark mode and full keyboard access. So neither Rune nor an app can turn its glass opaque, and text keeps drawing over blurred, moving backdrops. Native NSVisualEffectView materials may already follow the setting, but nobody has checked.

This issue adds the reader and the flag. The opaque fallbacks for Rune-drawn blur, glass and Kit materials belong to the Rendering issue on Reduce Transparency, which uses this flag.

Where
Why it matters

Users turn this on so they can read text. Some have low vision, and some are bothered by the motion and visual noise of translucent layers. The targets: Rune follows "reduce transparency" "on every target and applies a change live". "Under Reduce Transparency, 0 backdrop-blur passes run and every material, rune-fx frost and rune-light glass draws its opaque fallback." "A setting change redraws within 1 frame and 100 ms of the OS notification". And Kit meets contrast minimums "against the surfaces each element is actually drawn on, including composited glass and blur".

What would help

1. Add Cx::reduced_transparency() and a Runtime setter for tests, following set_system_reduced_motion. Don't add a pub field to Env. 2. Add readers:

  • macOS: NSWorkspace.accessibilityDisplayShouldReduceTransparency, refreshed on NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification;
    • Windows: UISettings.AdvancedEffectsEnabled and its change event;
    • web: prefers-reduced-transparency with a change listener, where the browser implements it;
    • Linux: n/a with the reason, where the desktop has no such setting.

iOS follows with the iOS work. 3. Deliver changes within one frame through the watcher from R0459. 4. In the macOS lane, record in a dated note what native material views draw with the setting on. Then the render fallback handles only what stays translucent.

Done when
  • Cx::reduced_transparency() exists with a test override, and a change re-runs the view.
  • Each reader has a unit test.
  • The macOS and Windows lanes toggle the setting and see the flag change within one frame, with no refocus.
  • The web reader follows a change in a browser that supports the query. The matrix marks the others n/a with the reason.
  • A dated note records how native materials behave with the setting on.
How to check

Unit tests run in the merge gate, and the macOS and Windows lanes check the live change. The Rendering issue's count test (0 backdrop-blur passes with the flag on) uses this flag.

Depends on
Part of
  • Theme: T15
  • Tracked in R0675
  • Phase 2, milestone 2b · priority P2 · size M
R0470Accessibility: on macOS and Windows, once any client reads the tree, every change rebuilds it until the window closesP2Phase 2bMT15
a11y-tree-stays-active · perf
What happens

The README says the tree is free until asked: nothing is built until an assistive client asks for a surface's tree. After that, each turn that changed something the tree shows rebuilds it and sends the nodes that changed.

Only Linux can stop. Its adapter gets a deactivation handler, which tells Rune when the accessibility bus goes away, and Rune then drops the tree. On macOS and Windows, the adapters get only activation and action handlers. After one request the tree stays live until the window closes. Every turn that changes something walks and fingerprints it.

That first request need not come from a screen reader. Window managers, launchers, text expanders, password managers and input services read accessibility trees too. Nobody has measured how often this happens on ordinary Mac and Windows machines, or what it costs.

Where
Why it matters

If a common tool activates the tree, users with no screen reader pay its cost on every commit, and never know why. The targets: "The tree stands down only on a real platform or AccessKit signal, and then does 0 walks", and per-frame work "scales with what changed".

What would help

1. Measure first. On a reference Mac and a reference Windows machine, run common non-assistive tools. Log activations per hour (RUNE_A11Y_LOG=1 already logs them). Record the per-turn cost while the tree is active, from a11y_cost and R0256. Write the results and a decision in a research note. 2. Only if the cost matters, stand the tree down on a real lifecycle signal. That can be an AccessKit deactivation callback for macOS or Windows, added upstream, or a platform signal such as UiaClientsAreListening on Windows. Never stand down on inactivity alone. A passive client may still hold the tree, and it would then read stale nodes. 3. On reactivation, send the whole current tree, as a first activation does. 4. Whatever the decision, fix the README so it states the real behaviour on each platform.

Done when
  • A research note records activations per hour and per-turn cost on both machines, with a decision.
  • If a stand-down lands, it triggers only on a platform or AccessKit signal.
  • If a stand-down lands, the next activation gets the whole current tree.
  • If a stand-down lands, a headless count test shows 0 walks while the tree is stood down.
  • The README's "Free until asked" states the behaviour on macOS, Windows and Linux.
How to check

The research note is reviewed with its data. If a stand-down lands, a headless count test in the merge gate shows 0 walks while stood down, and a lane test deactivates and then reactivates the tree.

Depends on
Part of
  • Theme: T15
  • Tracked in R0453
  • Phase 2, milestone 2b · priority P2 · size M
R0471Scripts: headless scripts can find elements only by key and press them through the pointerP3Phase 2bMT15
a11y-scripts-drive-tree · feature
What happens

PLAN.md says the agent's view of the app is the same tree as accessibility's. Headless scripts don't use that tree. A script step names its target by key, and the key resolves in the runtime's own element list. A press is a pointer move, down and up at the centre of the drawn rect. --tree dumps the accessibility tree, and Runtime::accessibility_action runs an action on a node found by key, but only Rust tests can call it.

So an agent's script can pass on a control that a screen reader can't use: a box with only a hover handler, a control with no name, or one whose role offers no action. The pointer reaches the control, so the step succeeds.

Where
Why it matters

Agents and test authors use scripts to show that an app works. A script that drives the tree catches a broken control before a screen reader user meets it. The target: "Every control states its name, role, value, state and actions completely and truthfully, and offers and accepts only the actions its state allows", with "0 findings in Kit stories with an empty allowlist."

What would help

1. Add script steps that find a target in the AccessKit tree, by role and name or by automation id. The step then runs an accessibility action: click, focus, set-value, increment, decrement, expand, collapse or scroll. For example:

{ "type": "a11y", "role": "button", "name": "Sign in", "action": "click" }

2. A step fails with a clear message when no node matches, when several nodes match, or when the node doesn't offer the action. The message names the node's role and the actions it offers. 3. Recommend these steps in the agent docs for operating controls. Pointer steps stay as they are, for pointer tests.

This lands after R0140, so a hover-only box no longer offers a press for these steps to find.

Done when
  • A Kit form is driven end to end through accessibility steps alone: fill in fields, toggle a checkbox, pick a select option, press submit.
  • An accessibility step on a hover-only box fails and names the box's role and actions.
  • A step that matches no node, or several nodes, fails and lists the candidates.
  • The script docs and the agent docs describe the new steps.
How to check

Script tests in the merge gate. They use the form from R0464 once it lands.

Depends on
Part of
  • Theme: T15
  • Phase 2, milestone 2b · priority P3 · size M
R0472Kit: components miss states, names and keyboard paths that native controls haveP1Phase 2bXLT16
a11y-kit-semantics · tracking
What happens

Kit components set roles and states, and 26 accessibility goldens cover them. Gaps remain that a screen reader or keyboard user meets in ordinary forms and lists:

  • The Checkbox focus ring ignores border_focus, and the inline Select draws no ring.
  • Radio menu items read as checkboxes, and an indeterminate Checkbox draws a check.
  • TextArea, Select, RadioGroup and TextField show an error by colour only and don't report invalid.
  • Field clear and copy buttons and the sidebar row close can't be reached by keyboard.
  • Sidebar rows, tabs and table columns move or resize only by dragging.
  • The neutral theme's border_weak and light faint text fall below WCAG contrast.
  • Toast close and field copy buttons are 20 pt targets.
  • Nothing checks that every exported component has a golden, and nothing walks every story by keyboard.

Each gap is small. Together they make a WCAG audit fail on Kit. The fixes touch many components and need two shared checks, so the work is split into the issues below.

Where
Why it matters

The targets: every control states "its name, role, value, state and actions completely and truthfully", with 0 findings in kit stories. Every control "works from the keyboard alone", with 100% of stories passing and 0 allowlisted failures by the end of phase 2. Default themes have 0 failing meaningful contrast pairs. An app built on Rune and Kit can pass an independent WCAG 2.2 A and AA audit, "with no criterion failing because of Rune or Kit".

What would help

Fix the semantics in each component. Keep visuals that only focus shows keyboard-only, so the resting parity references stay clean. Each child adds or updates goldens and joins the keyboard walk, R0145, and the golden coverage check, R0078.

Done when
  • All children are closed.
  • The keyboard walk and the accessibility audit report 0 kit findings with an empty allowlist.
How to check

The kit a11y goldens, the keyboard walk and the contrast test run in the required merge gate.

Issues
Part of
  • Theme: T16
  • Phase 2, milestone 2b · priority P1 · size XL
R0473Kit: overlays need a layer list threaded through every function that might hold a menuP1Phase 2bXLT16
api-overlay-portal · tracking
What happens

Menu, Select, Popover, Tooltip, HoverCard, Combobox, Dialog, PopupList and TabStrip push their open content into a layer: &mut Vec<El>. The app must pass that list down and mount it with rune_kit::root. Every helper that might hold a select must take and forward the list. The kit has 13 public signatures with layer: &mut Vec<El>, and kit-gallery threads &mut Vec<El> in 132 places, down to its Story type.

A third-party overlay has to depend on the kit's root. Because overlays are mounted after the whole base, Popover content also comes after the whole page in Tab order, not right after its trigger.

On top of the layer list, builders end in several shapes, handlers are named several ways, and Popover, Menu, Select and Dialog dismiss differently. Fixing this means a core portal, new finishing methods on each overlay, deprecations, and a shared dismiss policy, which is several issues.

Where
Why it matters

App authors pay this cost in every view that might show a menu, and agents writing kit code get it wrong often. The target: "a component is one expression that returns one El, and its handlers follow one naming rule". 0 non-deprecated public kit APIs take &mut Vec<El>, and "every overlay's content comes right after its trigger in Tab and accessibility order".

What would help

Build on a declarative portal in core, so an overlay builder can return one El that paints and hit-tests above the window. Give each overlay builder a layer-free finishing method, deprecate the layer forms, settle one build shape and handler naming rule, and give overlays one dismiss policy. Paint and hit order must stay identical for existing apps.

Done when
  • All children are closed.
  • 0 non-deprecated public kit APIs take a layer list, and kit-gallery has 0.
  • Tab from every overlay trigger reaches its open content next (focus test over each overlay builder).
How to check

The kit API-shape test and the overlay focus-order test run in the required merge gate.

Issues
Part of
  • Theme: T16
  • Phase 2, milestone 2b · priority P1 · size XL
R0474Kit: the neutral theme's borders and faint text fall below WCAG contrastP1Phase 2bMT16
a11y-kit-contrast-tokens · bug
What happens

#109 measured the neutral theme. border_weak is 1.87:1 in dark and 1.14:1 in light, against the 3:1 that control edges need. In light, text_faint is 3.00:1 and text_accent is 3.99:1, against 4.5:1 for text.

A resting Checkbox, an off Switch and a TextField all draw their edge in border_weak, so their outlines fail WCAG 1.4.11. from_palette has contrast floors only for secondary text: 4.5:1 for muted and 3:1 for faint. It has none for edges, and none at all for the neutral theme. No test checks any token pair.

Where
Why it matters

Low-vision users can't find a checkbox or field edge at 1.14:1. Kit's defaults are what most apps ship. The targets: "Kit's default themes meet contrast minimums against the surfaces each element is actually drawn on", with 0 failing meaningful pairs in the default themes and only decorative pairs exempt. An app built on Rune and Kit can pass an independent WCAG 2.2 A and AA audit.

What would help

1. Add a token-pair contrast test over neutral light, neutral dark and 32 sampled from_palette seeds. 2. A table declares the pairs that carry meaning: text on each surface it is drawn on, a control edge on its adjacent surface, the focus ring on the page, and a state mark on its control fill. Targets are 4.5:1 for text, 3:1 for large text (at least 18 pt, or 14 pt bold), and 3:1 for non-text. 3. List decorative pairs, such as dividers that carry no meaning, with a reason each. 4. Raise the failing neutral tokens. The other option is to route control edges to a token that already passes, such as border_strong, which RadioGroup uses. Raising the tokens is preferred, since apps also use border_weak for their own edges. 5. Add 3:1 edge floors and 4.5:1 text floors to from_palette. 6. Parity themes outside the kit defaults, such as the OpenCode theme, run the same test and report their ratios, but don't gate.

Neutral pixel goldens change. Re-bless them with review and add a changelog entry.

Done when
  • The test passes for neutral light and dark and 32 from_palette seeds, with 0 meaningful-pair exemptions.
  • Every pair #109 lists passes.
  • Checkbox, radio, switch and text field edges are at least 3:1 at rest.
How to check

The kit token contrast test runs in the required merge gate, so a token change that breaks a pair fails there.

Part of
  • Theme: T16
  • Tracked in R0472
  • Phase 2, milestone 2b · priority P1 · size M
R0475Kit: sidebar rows, tabs and table columns can be moved or resized only by draggingP1Phase 2bMT16
a11y-kit-drag-alternatives · bug
What happens

SidebarRow::reorder, TabStrip's on_reorder and on_tear_out, and the Table's column resize handle act only through on_drag. A keyboard user can't move a row or a tab, or resize a column. A user who can't drag can't do it either.

A screen reader hears "Resize Name, separator". The separator has no value and no step, so the reader's increment and decrement do nothing.

WCAG 2.1.1 (A) requires a keyboard path. WCAG 2.2 2.5.7 (AA) requires a single-pointer path for drag operations. Kit's pane grip already shows the pattern: range_value, range_step and on_step.

Where
Why it matters

Keyboard and switch users can't organise their sidebar, tabs or table. The targets: every control "works from the keyboard alone" (WCAG 2.1.1 and 2.5.7 among them), with 100% of stories passing and 0 allowlisted failures by the end of phase 2. Every control "offers and accepts only the actions its state allows". An app can pass an independent WCAG 2.2 A and AA audit.

What would help
  • Table: give the resize separator range_value with the column's width, min and max, plus range_step, on_step and on_step_limit. Increment, decrement, Home and End then resize it. Add "Wider", "Narrower" and "Fit to content" to the column header's context menu as the single-pointer path. Keep the double press for reset.
  • Sidebar rows: on a focused row, Alt+Shift+Up and Down call the same drop(from, to) handler, and focus stays on the moved row.
  • Tabs: on a focused tab, Ctrl+Shift+PageUp and PageDown call on_reorder. Add "Move left", "Move right" and "Move to new window" to the tab's context menu. The last calls on_tear_out.
  • Add "Move up" and "Move down" to the sidebar row's context menu.
  • Make the keys overridable, since they can collide with app shortcuts.
  • When custom accessibility actions exist, offer the same moves through them.
Done when
  • Increment and decrement on a column separator change the width by one step, and it reports value, minimum and maximum (test).
  • The header context menu resizes a column with single presses (test).
  • A keyboard move on a focused sidebar row calls drop(from, to) once with the right indices, and focus stays on the moved row (test).
  • A keyboard move on a focused tab calls on_reorder once, and "Move to new window" calls on_tear_out (test).
  • The keyboard walk fails on any kit node with on_drag and no keyboard path, unless it is listed as decoration.
How to check

Kit tests, the table.json and shell.json goldens and the keyboard walk, R0145, run in the required merge gate.

Part of
  • Theme: T16
  • Tracked in R0472
  • Phase 2, milestone 2b · priority P1 · size M
R0476Kit: no manifest maps standard controls to kit components, so app authors find the gapsP1Phase 2bMT16
api-kit-manifest · infra
What happens

Nothing records which standard controls the kit covers. The kit README lists components in one prose paragraph. No file says which SwiftUI or @opencode/ui control each kit type stands for, or which controls have no kit type. It also doesn't say whether a component has a gallery scene, an accessibility golden or a keyboard test. App authors find the gaps when they reach for a control that isn't there. Known gaps include a slider (#149), tabs, a sheet and a stepper.

every_story_builds checks that each gallery story builds. It can't say whether a story covers a component's states, or whether a component has a story at all.

Where
Why it matters

App authors want to know what the kit gives them before they start. Reviewers want to see coverage move. The target is that the kit and core cover the standard desktop controls and hooks, with defined behaviour, and 100% of manifest entries are resolved. The list is: Button, Toggle, Slider, Stepper, Picker, TextField, SecureField, TextEditor, DatePicker, ColorPicker, ProgressView, Menu, ContextMenu, Popover, Sheet, Alert, TabView, List, Table, OutlineGroup, DisclosureGroup, NavigationSplitView, Toolbar, Label, Link, a search field, chips, avatar and a command palette. The core hooks are programmatic focus, focus change, autofocus, field selection change and a window-close veto. The docs must also be complete, compiled, tested and current.

What would help
  • Add crates/rune-kit/components.toml. Each entry gives the SwiftUI name, the @opencode/ui name, and one of three things: the kit type, an equivalent, or an issue number.
  • An implemented entry also gives the gallery scene id, the accessibility golden, the keyboard test, and whether it is interactive. It lists its states (checked, invalid, disabled, selected, expanded). It gives a short behaviour contract: its keys, its role and how it dismisses.
  • A test reads the manifest. It resolves each type in the public API snapshot from R0039, runs the scene and checks that the golden shows each listed state. It also runs the keyboard test for interactive entries.
  • Generate a catalog page from the manifest, so the README prose and the docs site stop drifting.
Done when
  • components.toml has an entry for every control and hook in the list above.
  • Each entry names a kit type, an equivalent or an open issue.
  • For each implemented entry, the test resolves the type, runs the scene, finds each listed state in the golden, and runs the keyboard test if the entry is interactive.
  • A catalog page is generated from the manifest, and regenerating it gives no diff.
How to check

The manifest test runs in the merge gate. A new component without an entry fails it, and so does an entry whose scene, golden or keyboard test is missing. Phase 3 work in R0691 turns the remaining issue entries into implemented ones.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 2, milestone 2b · priority P1 · size M
R0477Kit: adding a token to Palette, Type, Radius, Motion or Kit breaks every theme crate that builds them as literalsP1Phase 2bMT16
api-kit-schema-compat · feature
What happens

A theme crate builds Palette, Type, Radius, Motion and Kit as exhaustive struct literals. Palette alone has 68 public fields. When the kit adds a token, every theme crate outside the repo stops compiling. These five types are not on the AGENTS.md list of literal-built types, and no compat test covers them.

Glyphs already avoids the problem: the OpenCode theme writes ..glyphs::DEFAULT. #[non_exhaustive] can't help, because it also forbids struct-update syntax outside the defining crate. A theme can write ..Kit::neutral(dark).c today, but nothing documents it, and it builds a whole kit only to take one field.

Where
Why it matters

Theme authors and apps that pin a dev rev see a build break whenever a token lands. A public API break must not reach dev unannounced. 100% of the types in api/literal-types.list need an exhaustive-literal test. That list is AGENTS.md's 12 types plus Palette, Type, Radius, Motion and Kit. The kit target also says that adding a Palette or Type token keeps a ..base theme compiling.

What would help
  • Publish named base values: Palette::neutral(dark), Type::neutral(), Radius::DEFAULT and Motion::DEFAULT.
  • Document struct update from a base as the supported way to write a theme. Add a "Writing a theme" section to the kit README. Move themes/opencode to it.
  • Add the five types to api/literal-types.list from R0040. Their exhaustive-literal tests then fail on any new token. The author must ship a Breaking fragment that tells theme crates still on exhaustive literals to switch.
  • Add a test helper that lists the tokens a theme left at the base value. A branded theme can then see a new token that fell back to neutral.
Done when
  • themes/opencode builds each of the five types with struct update from a base.
  • A fixture adds a token to Palette and to Type, and a ..base theme still compiles.
  • Exhaustive-literal tests exist for all five types and fail on that fixture.
  • The helper lists the tokens a theme left at the base value.
  • AGENTS.md lists the five types with the others.
How to check

The compat tests and the theme crate build run in the merge gate. The fixture compiles in a test crate that depends on rune-kit the way an outside theme does.

Depends on
Part of
  • Theme: T16
  • Tracked in R0690
  • Phase 2, milestone 2b · priority P1 · size M
R0478Markdown: setting on_link, on_task or images, or writing the word mermaid in prose, turns off its cacheP1Phase 2bMT16
api-markdown-cache-gates · perf
What happens

Markdown::render caches its El tree only when no handler and no custom look is set. Setting any of these turns the cache off: on_link, on_link_secondary, on_task, images, on_image, a custom highlighter, a code frame, a link favicon, or copy-source selection. A chat app that opens links, ticks tasks or shows images is the app that needs the cache, and it loses it. Each commit then rebuilds, flattens and applies every settled reply.

With the mermaid feature on, the check is self.src.contains("mermaid"). Prose that only mentions the word also turns caching off, and the check scans the whole source on every build.

Where
Why it matters

Users of a chat transcript feel this as typing and scrolling that slow down as the history grows. The target is that code in the documented style is fast without hand-written elision. A plain-text token appended to a 50 KB reply with on_link, images and three code fences builds only the last two blocks and parses at most 2 KB. For streaming content, completed blocks are rebuilt 0 times unless a new reference definition, theme, find state or handler change invalidates them, and then only those blocks are rebuilt.

What would help
  • Send link, task and image presses through one handler on the Markdown root. It receives a block index and an item index. The cached subtree then holds no closures. The root handler is rebuilt on every build and calls the current closures.
  • Hash image content versions and the remaining look options into the digest. That includes a custom highlighter's id from Highlighter::key.
  • Replace the substring test with a flag the parser sets when it sees a Mermaid fence.
  • The cache uses the public cached API from R0182, so a third-party crate can do the same.
Done when
  • Markdown with on_link, on_task and images set is a cache hit on an unchanged second build.
  • After a cache hit, a replaced on_link closure is the one that runs.
  • A changed image version or highlighter key causes a miss.
  • Prose that mentions "mermaid" is cached. A Mermaid fence still renders its diagram.
  • The existing link, task and image press tests pass.
How to check

Extend the render-counter test in crates/rune-kit/src/markdown/tests.rs with each handler set. Add the replacement and invalidation tests beside it. The feed budget in R0485 keeps the result in the merge gate.

Depends on
Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P1 · size M
R0479Kit: nine overlay builders take layer: &mut Vec<El>, so an app can't place a Select inside a helper without forwarding a layerP1Phase 2bMT16
api-portal-kit · refactor
What happens

Each kit builder that opens an overlay needs the caller's layer list. Nine types do this, through ten public functions: Popover, Tooltip (build and render), HoverCard, Menu, Select, Combobox, Dialog, PopupList and TabStrip (build_layered). Dialog and PopupList return () and push everything into the layer. An app that puts a Select inside a helper function must pass a &mut Vec<El> through every function between the helper and root. kit-gallery has 132 &mut Vec<El> sites.

The layer mounts after the base, so overlay content also lands last in Tab and accessibility order. Rust can't overload build by arity, so a layer-free form needs a new name.

Where
Why it matters

App authors notice this as plumbing: every view helper grows a layer parameter in case a menu appears inside it. The target is that a component is one expression that returns one El, and 0 non-deprecated public kit APIs take &mut Vec<El>. Every overlay's content comes right after its trigger in Tab and accessibility order. Keyboard users need that order: every control works from the keyboard alone with a logical order, and 100% of stories pass with 0 allowlisted failures by the end of phase 2.

What would help
  • Add el(self, &Kit) -> El to each overlay builder. It builds the content with the core .portal(..) from R0328.
  • Deprecate build(&k, &mut layer). It keeps working as today and pushes into the layer.
  • Migrate kit-gallery and the kit examples to el first.
  • After the deprecation window, a Breaking change makes build(self, &Kit) -> El the portal form for every kit builder, and el stays as an alias. The fragment check from R0046 guards it.
Done when
  • Every overlay builder has a layer-free finishing method that returns El.
  • Each deprecated layer form still mounts its content, with one test per builder.
  • The accessibility goldens and gallery instance streams are unchanged, except for the documented focus order.
  • kit-gallery and the kit examples have 0 &mut Vec<El>.
  • A changelog fragment names el as the replacement.
How to check

The kit shape test from R0488, the goldens and every_story_builds run in the merge gate. A grep for &mut Vec<El> in kit-gallery stays at 0.

Depends on
Part of
  • Theme: T16
  • Tracked in R0473
  • Phase 2, milestone 2b · priority P1 · size M
R0480Kit: a plain Popover ignores Escape, and Popover, Menu, Select and Dialog dismiss three different waysP1Phase 2bMT16
api-kit-dismiss-policy · feature
What happens

The kit's overlays each close in their own way. Popover::on_close mounts only an outside-press scrim. Menu and Select mount a scrim and also make their surface modal, so Escape and outside presses close them and focus goes back to the trigger. Dialog makes its panel modal and chooses click-outside with its own flag. The runtime handles Escape only when a modal is active.

So a keyboard user can't close a plain Popover with Escape. The only way out is to Tab to its close button, if it has one. A Popover's content also mounts after the whole base view, and focus doesn't move into it on open. A keyboard user must Tab through every later control to reach it, and it stays open all that time. tests/popover_focus.rs passes only because the trigger is the only control in its base.

Where
Why it matters

This fails WCAG 2.1.2 (no keyboard trap), 2.4.3 (focus order) and 1.4.13 (content on hover or focus). The target is that every control works from the keyboard alone, in the platform's way, with no trap and a logical order. 100% of stories pass with 0 allowlisted failures by the end of phase 2. An app built on Rune and Kit must be able to pass an independent WCAG 2.2 A and AA audit. For the API, every overlay's content comes right after its trigger in Tab and accessibility order, and the kit uses one build shape and one naming rule.

What would help
  • Add one Dismiss policy with these options: scrim, Escape, click outside, focus return, and not dismissible. Popover, Menu, Select and Dialog all take it. Modal and non-modal surfaces get separate defaults.
  • Escape goes first to an active IME composition, then to the innermost open overlay. It closes that overlay and returns focus to the trigger. Escape on the trigger while the overlay is open does the same.
  • PopupList keeps no focus on purpose, so its Escape stays with the app's field.
  • In tab_order, put the stops of a portal anchored to an element right after that anchor. This builds on the portal from R0479. Moving focus into the content on open can use #173.
  • A Dialog that is not dismissible uses the policy rather than a missing on_close (R0150).
Done when
  • Escape closes a plain Popover, and focus returns to the trigger.
  • With two nested overlays, Escape closes only the inner one.
  • Escape during IME composition cancels the composition and leaves the overlay open.
  • Tab from the trigger reaches the open popover's content next, with 10 later controls in the base.
  • Popover, Menu, Select and Dialog take the same Dismiss options.
  • A changelog fragment notes the new Tab order for anchored portals.
How to check

Give tests/popover_focus.rs a base with 10 controls. Add the nested-overlay and IME tests to the kit focus tests. The keyboard walk runs over every kit-gallery story in the merge gate and catches regressions.

Depends on
Part of
  • Theme: T16
  • Tracked in R0473
  • Phase 2, milestone 2b · priority P1 · size M
R0481Kit: Select identifies options by label, so equal labels in two groups both show checkedP1Phase 2bMT16
api-select-option-ids · bug
What happens

Select stores its options as (group, label) strings. current, highlighted and on_choose compare and pass the label. When two groups hold an option with the same label, both rows show checked and both highlight. on_choose hands the app a label it can't map back to one option. Options also can't be disabled.

Groups have no semantics. A group header is a plain text row inside the listbox, and position_in_set counts across all groups. A screen reader says "option 7 of 12" and never names the group. List already does this right, with a group role and per-group positions. Combobox already has option ids and disabled options.

Where
Why it matters

Users see two checked options and can't tell which one is in effect. Screen reader users hear a flat list with no group names. The identity target is that identity is typed or checked, not a silent string convention, with 0 kit pickers that identify options by label. The kit target is that every control that shows checked or selected draws it distinctly and reports it in its golden. The semantics target is that every control states its name, role, value, state and actions completely and truthfully, with 0 findings in kit stories.

What would help
  • Add SelectOption { id, label, detail, disabled, group }, built through a constructor and builder methods.
  • Make current, highlighted and on_choose work by id.
  • Keep Select::new and Select::grouped as conveniences that use the label as the id.
  • Arrow keys skip disabled options. Pointer and accessibility activation on a disabled option do nothing.
  • Wrap each group's options in a role("group") labelled by its header, and count position_in_set within the group, as List does.
Done when
  • With the same label in two groups, one option shows checked, and on_choose receives its id.
  • The highlight follows the id after the options reorder.
  • Arrow keys skip disabled options, and pointer and accessibility presses on them do nothing.
  • The select-open golden shows named groups with per-group positions.
  • Existing label-based callers compile and behave as before.
How to check

Kit tests cover duplicate labels, reorders and disabled options. The accessibility golden covers groups. Both run in the merge gate.

Part of
  • Theme: T16
  • Tracked in R0690
  • Phase 2, milestone 2b · priority P1 · size M
R0482Markdown: a streaming reply is reparsed in full when it contains ']:' or streams beside another replyP1Phase 2bMT16
text-markdown-stream-parse · perf
What happens

The stream cache extends the previous parse only in narrow cases. Several common inputs make it reparse the whole reply on every token:

  • `]:` anywhere. extend gives up when the source contains ]:, because that could be a link reference definition. TypeScript index signatures ([k: string]: T), Python hints (-> list[int]:) and addresses ([::1]:8080) all contain it. Such a stream costs O(n²) over its length.
  • Two streams at once. Each cache keeps one last source per thread. Two replies streaming together replace each other's last, so both reparse in full every commit. Their dead prefixes stay in the budget until it evicts them.
  • `autolink(false)`. This path skips both caches and parses from scratch.
  • Even the good path is O(n). A lookup hashes the whole source. An extend deep-clones every earlier block and copies the whole source into a new key.
Where
Why it matters

Agent replies with code are the common case. Users see a long reply get slower as it grows, and two side-by-side streams slow down together. The target is that streaming a reply into kit Markdown costs work in proportion to the new text and to what it invalidates, at any reply length. Per commit, that is at most the new bytes plus the open block's last line plus 1 KB of parse and highlight work. Every cache is bounded in entries and bytes. Worst-case frames must fit the budget, with per-frame work that scales with what changed.

What would help
  • Find reference definitions as the parser does: at a line start, outside code fences, and only in new lines. Record which earlier blocks use each undefined label. When a definition arrives, rebuild only those blocks.
  • Track growing sources per stream. There are two options. Option one keeps a small set (8) of recent growing sources and matches by prefix. That needs no new API. Option two adds an explicit stream key. Option one is recommended, because Markdown has no stream key today. Store per runtime, with R0180.
  • Drop a superseded prefix as soon as its successor is stored.
  • Share the parsed prefix through Rc slices or a persistent vector, so an extend copies only the open block. Key a stream by its length and a hash of the new tail, not the whole source.
  • Let the autolink(false) path use the caches.
  • Count full reparses separately. A new line that holds a definition or reopens a closed block still needs one.
Done when
  • Streaming a 200 KB reply with TypeScript index signatures parses, hashes and copies at most the open block plus 1 KB per commit.
  • A definition that arrives after its link rebuilds that link's block, and the output matches a full parse.
  • Two interleaved streams each extend rather than reparse, and the cache holds no dead prefixes.
  • autolink(false) streams extend as well.
  • The parse equals a full parse at every commit in the seeded differential.
How to check

Count budgets from R0265 run in the merge gate, together with the seeded differential from R0271. The open-block limit tightens to the last line in R0483.

Depends on
Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P1 · size M
R0483Markdown: a growing code fence, table or paragraph is reparsed whole on every token, so one long block makes streaming quadraticP1Phase 2bMT16
text-markdown-block-continuation · perf
What happens

When a stream grows, extend reuses every top-level block before the last one. It then reparses from the start of the last block that begins on a finished line. That block is usually the one still arriving. pulldown-cmark can't resume a block where it stopped, so the whole open block is parsed again on every token.

For a reply that is mostly one long code fence, the fence is reparsed from its first line on each token. A 200 KB fence costs about 200 KB of parse work per commit, and the total over the stream grows with the square of its length. Highlighting adds more: the highlight cache key is a hash of the whole coloured prefix. Each finished line therefore misses the cache and rescans up to 32 KiB of the fence. Tables, lists and long paragraphs behave the same way.

The stream-parse fix in R0482 bounds work by the open block plus 1 KB. That is still the whole fence.

Where
Why it matters

Agents often stream long code, logs and tables. Users see the reply slow down as it grows, and frames drop near the end. The target is that a streamed reply costs, per commit, at most the new bytes plus the open block's last line plus 1 KB of parse and highlight work, at any reply length. The documented-style target asks the same for a 50 KB reply: a plain-text token parses at most 2 KB.

What would help
  • Fences: keep the open fence's parsed lines and append only new lines. Highlight new lines from the scanner state at the end of the last finished line.
  • Tables and lists: continue the open table from its last row and the open list from its last item. Reparse only that row or item.
  • Paragraphs: CommonMark pairs emphasis delimiters across a whole paragraph, so a new token can change earlier text. There are two options. Option one carries the delimiter stack forward, so the parse resumes at the last line. Option two records a proposed revision of the target that allows the open paragraph, with measurements of real replies. Option one is recommended. If it costs too much, take option two, with numbers.
  • Every continuation path must match a full parse, through the differential from R0271.
Done when
  • Per commit, parse and highlight work is at most the new bytes plus the open block's last line plus 1 KB. This holds on four fixtures: a growing paragraph, a 200 KB fence, a long table and a late reference definition.
  • The streamed output equals a full parse at every checkpoint of each fixture.
  • For paragraphs, either the counters meet the limit, or a revision with measurements is recorded.
How to check

Count budgets over the four fixtures, from the kit content budgets, run in the merge gate. The seeded stream differential checks every checkpoint.

Depends on
Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P1 · size M
R0484Markdown: a streaming reply rebuilds every block's El tree on each token, though earlier blocks are unchangedP1Phase 2bMT16
text-markdown-stream-render · perf
What happens

can_cache requires !self.streaming. While a reply streams, every commit rebuilds the El tree of every block. The runtime then flattens and applies the whole tree, though usually only the last block changed. The README says earlier blocks "stay mounted". They do stay mounted, but they are rebuilt and diffed on every token. A streaming reply is the most expensive element on a chat screen, and its cost grows with its length.

research/37 profiled an agent client while a reply streamed. Flatten took 12% of main-thread busy time, apply 10% and Markdown 5% (inclusive shares). One record scales a 7 KB measurement to about 2.5 ms per token at 50 KB and 10-14 ms at 200 KB. Those are estimates and must be measured at HEAD first.

Where
Why it matters

Users see frames drop and typing lag while a long reply arrives. The target is 0 rebuilds of completed blocks unless a new reference definition, theme, find state or handler change invalidates them, and then only those blocks. A token into a 50 KB reply with on_link, images and three code fences builds only the last two blocks. Worst-case frames fit the budget, and typing stays at a p95 of at most 1 ms at 50 KB and 2 ms at 200 KB.

What would help
  • While streaming, cache each closed top-level block's El under its own digest. The digest covers the block's source slice, the style and theme, the find state for that block, the reference-definition set it uses, and its handler identity.
  • Treat the last two blocks as open. A new line can turn a paragraph into a setext heading or a table.
  • When a new reference definition arrives, rebuild the blocks that use its label.
  • Keep block keys stable, so selection and find work across commits.
  • This needs handlers that don't block caching (R0478), the incremental parse (R0482), the public cached API (R0182), and green kit tests (R0018).
Done when
  • While a 200 KB reply streams, completed blocks are rebuilt 0 times when nothing invalidates them.
  • A plain token into a 50 KB reply with on_link set builds only the last two blocks.
  • Per-commit traversal, digest, flatten and apply work is bounded by the open blocks plus the invalidated blocks.
  • A theme change, a find query or a late reference definition rebuilds exactly the blocks it affects.
  • A line that turns a paragraph into a setext heading or a table renders correctly.
  • The streaming selection and find tests pass. Output equals an unmemoised render at every commit.
How to check

Count budgets from R0265 and the feed budget in R0485 run in the merge gate. A seeded test compares memoised and unmemoised output at each commit. A headless --profile perf bench measures per-token time at 50 KB and 200 KB, before and after.

Depends on
Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P1 · size M
R0485Perf: no count budget checks how much a keystroke or a streamed token rebuilds in an app written the documented wayP1Phase 2bMT16
api-elision-budget · infra
What happens

FrameStats has four fields: commits, layout nodes, glyphs and shaped runs. No budget reads them. Nothing counts the El nodes a view builds, the nodes that are mounted, the Markdown bytes parsed per commit, or the key calls virtual_rows makes. So nothing shows that an app written the documented way stays cheap as the kit and runtime change.

Each fix in this area has its own leaf test, such as the Markdown render counter. Every leaf test can pass while the combined scene still rebuilds everything. The combined scene is a feed with a composer, a long virtual_rows list, and a streaming Markdown reply with links, images and code. Today a handler on that reply, such as on_link, turns its cache off. A streaming reply is never cached.

Where
Why it matters

Chat and agent apps are the heaviest users of the kit. Their authors follow the documented rules and expect the result to be fast. The target is that code in the documented style is fast without hand-written elision. In the feed scene a composer keystroke runs the view at most once and builds at most 5% of mounted El nodes. A plain-text token appended to a 50 KB reply with on_link, images and three code fences builds only the last two blocks and parses at most 2 KB. Appending one row to a 100,000-row list makes O(1) key calls. Worst-case frames must also fit the budget, with per-frame work that scales with what changed.

What would help
  • Add FrameStats counters: El nodes built by the view (memo and cache hits excluded), mounted El nodes, Markdown bytes parsed, and virtual_rows key calls.
  • Add perf/budgets/feed.toml for R0330, on the budget runner from R0158. It has three scripts: a composer keystroke, a streamed plain-text token into a 50 KB reply with on_link, images and three code fences, and one row appended to a 100,000-row list.
  • A lower budget needs no fragment. A higher one needs a changelog fragment that says why.
  • The scene uses Versioned state from R0329, so no memo version is computed by hand.
Done when
  • FrameStats reports nodes built, nodes mounted, Markdown bytes parsed and key calls.
  • A keystroke runs the view at most once and builds at most 5% of mounted El nodes.
  • A streamed plain-text token builds only the last two Markdown blocks and parses at most 2 KB.
  • Appending one row makes the same number of key calls at 1,000 and at 100,000 rows.
  • Commit and view-run counts for the same script are equal in debug and release.
  • perf/budgets/feed.toml fails the merge gate when a count goes over budget.
How to check

The feed budget runs as a count budget in debug in the merge gate, and in release in one platform lane. It replays each script and compares the counters with the budget file. Wall time is not gated. The Markdown targets need R0484 and R0478, and the append target needs #203.

Depends on
Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P1 · size M
R0486Kit: toast, dialog close and field copy buttons are 20 pt targets, below WCAG 2.2's 24 pt minimumP2Phase 2bST16
a11y-target-size · bug
What happens

WCAG 2.2 criterion 2.5.8 (AA) asks that pointer targets be at least 24 by 24 CSS px. A smaller target passes if it has enough spacing: a 24 px circle centred on it touches no other target or its circle. Rune points equal CSS px at 1x.

Several kit buttons are 20 by 20 pt: the Toast close button, the TextInput copy button and the Dialog close button. Nothing checks target size, so small targets in rows and toolbars ship without anyone noticing. Rune has no way to grow a hit area beyond what an element draws, so a fix today means a larger layout box.

Where
Why it matters

People with tremor or limited fine motor control miss small targets, and so does anyone using a trackpad in a hurry. The target is that an app built on Rune and Kit can pass an independent WCAG 2.2 A and AA audit on macOS, Windows, Linux, web and iOS, with no criterion failing because of Rune or Kit. That means 0 Rune or Kit cells marked "fails" or "partial" by the end of phase 3 for desktop and web. Every control must also work in the platform's way, and 100% of stories pass the keyboard walk by the end of phase 2.

What would help
  • Add a target-size check that walks every kit-gallery story. Every enabled pointer target is at least 24 by 24 pt or passes the spacing exception.
  • Exempt only what the criterion allows: inline links in text, and targets whose size the platform sets.
  • Fix failing kit targets by growing the hit area while keeping the drawn size, so pixel parity with the reference holds. There are two options. Option one adds an El hit outset that extends hit testing past the drawn bounds. Option two wraps the glyph in a transparent 24 pt box. Option one is recommended, because option two moves layout and breaks parity.
  • The spacing check also catches a grown hit area that overlaps a neighbour.
Done when
  • The check runs over every kit story with 0 failures and no allowlist.
  • The Toast close, Dialog close and field copy buttons pass, with unchanged drawn pixels.
  • Each exemption the check applies is one that 2.5.8 lists.
  • A test shows a grown hit area takes presses in the extra margin.
How to check

The check runs with the rune-kit tests in the merge gate. The reference-parity stills confirm that drawn pixels did not move.

Part of
  • Theme: T16
  • Tracked in R0472
  • Phase 2, milestone 2b · priority P2 · size S
R0487Kit: Combobox and PopupList build every option on every commit and re-filter in each handlerP2Phase 2bMT16
api-combobox-virtual · perf
What happens

PopupList puts its rows in .virtualize(28.0). Rune's own docs say .virtualize builds every row on every commit, mounted or not. Only layout is windowed. Combobox clones all its options on every build with options.to_vec(). It calls filtered() from build, from on_change and from on_key. Each filter lower-cases every label and detail. A typed character runs at least two filters, and the exact count depends on the input path.

The debug overbuild warning fires only above 200 rows and four times the mounted count. The 200-row gallery combobox never trips it. PopupList::on_active passes a row index, while virtual_rows handlers find rows by key. This breaks the kit's own "build only mounted rows" rule, and app-audit flags the pattern.

Where
Why it matters

Users notice lag when typing into a model picker, a file finder or a command palette with thousands of entries. The documented-style target is that code written the documented way is fast without hand-written elision. The list target is that a filter takes at most 16 ms and reads each key at most once, with at most 200 realized rows. The kit's examples must also follow the rules they document.

What would help
  • Move PopupList to keyed virtual_rows. Each row is built inside its closure.
  • Filter once per (query, options version) into a shared Rc<[usize]>. Build, on_change and on_key all read that result.
  • Take options as Rc<[ComboboxOption]>, with labels and details lower-cased once.
  • Rows and the active descendant use option ids, so they stay right after a filter.
  • Add on_active_key. Keep on_active(index) as a deprecated wrapper that maps the key back to its index, with a changelog fragment.
  • Use the commit counters from R0069 to count rows built and filter runs.
Done when
  • A typed character in a 10,000-option Combobox builds at most 40 rows.
  • Typing and arrow navigation each run the filter at most once per event.
  • After a filter, the active descendant and the chosen option keep their ids.
  • Keyboard and selection tests pass, including option replacement and disabled rows.
  • Existing on_active callers compile and get the same index.
  • app-audit finds nothing in popup_list.rs.
How to check

Add a count test over a 10,000-option Combobox, and run scripts/app-audit on rune-kit, both in the merge gate. A count-budget scene keeps the row and filter counts from growing back.

Depends on
Part of
  • Theme: T16
  • Phase 2, milestone 2b · priority P2 · size M
R0488Kit: builders end in five shapes and name the same kind of handler four waysP2Phase 2bMT16
api-kit-build-shape · refactor
What happens

Kit builders finish in five different ways:

  • build(&k) -> El, the common form.
  • build(&k, &mut layer) -> El, for Popover, Menu, Select and Combobox.
  • build(&k, &mut layer) returning (), for Dialog and PopupList.
  • build(s, &k), for Table, Tree and the diff view.
  • build_layered, beside build, for TabStrip.

Handler names vary too. A value choice is on_select (Table, Tree, TabStrip, Menu, List, RadioGroup), on_choose (Select, Combobox, PopupList) or on_pick (SegmentedControl). TextInput's on_action is an accessory action, which is a different kind of handler. MenuItem::on_select takes Fn(&mut S), but ListItem::on_select takes Fn(&mut S, &mut Tx). Bool setters also differ. Button::disabled(false) and Select::disabled(false) leave a disabled control disabled, while RadioGroup::disabled assigns the value.

Where
Why it matters

App authors, and agents writing views, guess a name and get it wrong. A disabled(cond) that never clears leaves a control dead after its condition passes. The target is that a component is one expression that returns one El, and its handlers follow one naming rule. Every builder ends with build(self, &Kit) -> El, except data-bound builders listed in an exception file with one declared state argument. Value controls use on_change, commands on_press, and accessory actions a documented on_<action>. Bool setters both set and clear, and a behavioural test proves it.

What would help
  • Write the kit API rules in the kit README: one finishing method, build(self, &Kit) -> El. Data-bound builders (Table, Tree, TreeItem, the diff view) take their state as a declared extra argument and are listed in the shape test's exception file. Value controls use on_change(Fn(&mut S, V, &mut Tx)). Commands use on_press. Accessory actions use on_<action>, named for the action.
  • Add a shape test over the public API snapshot from R0039.
  • Make every bool setter assign its value.
  • Keep the old names as #[deprecated] aliases that name the new one. The layer forms go through R0479 first. Breaking renames carry a fragment (R0046).
Done when
  • The shape test passes, with only the exceptions in its file.
  • A behavioural test calls each bool setter with true, then false, and checks that the state clears.
  • Every old name is deprecated, with a note that names the new one.
  • The rules are in the kit README.
How to check

The shape and setter tests run in the merge gate. A new builder that breaks a rule fails the shape test unless it is added to the exception file with a reason.

Depends on
Part of
  • Theme: T16
  • Tracked in R0473
  • Phase 2, milestone 2b · priority P2 · size M
R0489Kit gallery: Table, the app shell, TabStrip, ShortcutRecorder, the context menu, ProgressCircle and Note have no sceneP2Phase 2bMT16
api-kit-gallery-scenes · feature
What happens

Seven kit components ship with no kit-gallery scene: Table, the app shell (SplitView with Sidebar, Page and Toolbar), TabStrip, ShortcutRecorder, the context menu (context_menu), ProgressCircle and Note. The gallery's every_story_builds test builds every registered scene with the neutral, palette and OpenCode kits in light and dark. None of these components is in a registered scene, so that test never builds them and scripts/kit-diff.py never compares them with a reference. An app author or agent who looks in the gallery for a usage to copy finds none.

Some already have accessibility tree goldens in crates/rune-kit/tests/a11y: Table, the shell, ProgressCircle, Note and ShortcutRecorder. TabStrip and the context menu have none. TabStrip appears only in a standalone example. The README itself says the context-menu, tabs and avatar stories have no gallery scene yet.

Where
Why it matters

The gallery is where people and agents learn the kit, and where regressions in look and build show first. A component with no scene can break in a theme or appearance without any test failing.

The coverage target asks for 100% of manifest entries resolved, with defined behaviour. The list includes Table, ContextMenu, ProgressView, Toolbar and NavigationSplitView. The docs target asks that every example has a headless test that asserts an interaction or a state change. The accessibility target asks that 100% of exported kit components have goldens for every declared state.

What would help
  • Add one scene per component in the matching stories file. Use the @opencode/ui Storybook id where a reference story exists, such as the context menu, so kit-diff can compare it. Otherwise use a rune- id.
  • Register each scene against its entry in the manifest from R0476.
  • Add accessibility goldens for TabStrip and the context menu. Reuse the existing goldens for the others, and add a state where a scene shows one the golden lacks, such as a selected table row or a recording ShortcutRecorder.
  • Add a keyboard test for each interactive component. Table: arrows and Page Up/Down. Shell: the sidebar shortcut and focus return. TabStrip: arrow roving and close. ShortcutRecorder: record, then Escape to cancel. Context menu: arrows, then Escape returns focus to the trigger.
Done when
  • Each of the seven components has a gallery scene, and every_story_builds builds it with the neutral, palette and OpenCode kits in light and dark.
  • TabStrip and the context menu have accessibility goldens. Every listed component has a golden for each state its scene shows.
  • Table, the shell, TabStrip, ShortcutRecorder and the context menu each have a keyboard test that passes.
  • Each scene is registered in the manifest. A scene with a reference story is listed in kit-diff.
  • crates/rune-kit/README.md no longer lists the context-menu story as missing.
How to check

every_story_builds in examples/kit-gallery, the crates/rune-kit/tests/a11y golden suite and the new keyboard tests all run on every merge. The manifest test fails if a manifest entry names a scene that does not exist. Run scripts/kit-diff.py on the scenes that have a reference story.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 2, milestone 2b · priority P2 · size M
R0490Kit: pure-data components such as Badge, Keybind, Divider and Note rebuild on every commit unless the app wraps them in memoP2Phase 2bMT16
api-kit-self-caching · perf
What happens

Markdown caches itself. It hashes its source and style with rune::memo::digest and reuses the built tree through rune::memo::cached. DiffView memoizes its rows. The kit's other pure-data components do neither. Badge, Divider, Keybind, ProgressCircle and Note take only plain values, but they build a fresh El tree on every view run, even when nothing they read has changed. Note cuts its whole source into pieces on every build. Then it rebuilds its facts, compare, steps and code pieces, with one row per code line.

research/38 measured what skipping an unchanged rebuild is worth for Markdown. In the md-same case, the commit p50 went from 0.851 ms to 0.167 ms, and allocations from 5,687 to 10 per commit (headless, --profile perf, paired runs). An app gets the same gain for the other components only by wrapping each one in memo with a version it works out by hand.

cached and digest are #[doc(hidden)], so the kit's one self-caching component relies on rune items that third-party crates are not meant to use.

Builders that take El children or callbacks, such as Card and ListItem, cannot be cached by a hash of their props. A closure made in the view is new on every run.

Where
Why it matters

Chat and agent apps show long lists of messages full of badges, keybinds, notes and code. Every keystroke in the composer rebuilds all of them, which costs CPU and frame time while the user types.

The elision target says code in the documented style is fast without hand-written memo. In the feed scene, a composer keystroke must build at most 5% of the mounted El nodes, and the sampled cache check must find 0 stale hits. The frame target asks that per-frame work scales with what changed, with p95 at most 4 ms on the reference Mac. The typing target asks for keystroke p95 at most 1 ms at 50 KB.

What would help
  • List the kit components whose inputs are all plain values. Start with Badge, Divider, Keybind, ProgressCircle, Spinner and Note. Add chips when they exist.
  • Wrap each one's build in cached(digest(..)) over its props and the token groups it reads (Palette, Type, Radius, or the fields it uses). A theme or appearance change then misses.
  • Leave out builders that hold El children or callbacks. Document in the kit README that an app memoizes them, with an example.
  • Do one component per PR, each with a hit test and a miss test, so a missed input shows up as one small revert.
  • Move to the public cache API once R0182 lands, so the kit uses only what a third-party crate could use.
Done when
  • A second identical build of each listed component is a cache hit (counter test).
  • Changing any one prop, or any token the component reads, is a miss (one test per component).
  • Tree and accessibility goldens are unchanged.
  • The rebuilt-node count for the kit-gallery list scene and the feed scene drops, and the count budget from R0158 holds it.
  • The kit README says which components cache themselves and which an app memoizes.
How to check

The hit and miss tests and the goldens run with cargo test -p rune-kit on every merge. The count budgets catch a component that stops caching. The sampled cache differential check catches a key that misses an input.

Depends on
Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P2 · size M
R0491Kit: visible and accessible strings such as Close, Copy, Clear and Search are English literals an app can't translateP2Phase 2bMT16
api-kit-strings · feature
What happens

Kit components write their own English names, descriptions and placeholders. Some examples are 'Close' on dialogs, toasts, popovers and sidebar rows, 'Copy' and 'Clear' on field buttons, and 'Loading' on spinners. Others are 'No results', 'Notifications', 'Hide sidebar' and 'Show sidebar', 'Resize sidebar', 'Record shortcut', 'Unread', and formatted ones such as Search {name}.

A grep finds 16 direct .label("..."), .description("...") or .placeholder("...") calls with a literal. More come from if expressions, struct defaults and format!, for about 25 in all. A few builders take an override, such as Combobox's search placeholder and List's empty text. Most do not. A translated app still reads English to its screen reader users, and some of these strings also show on screen.

Where
Why it matters

A user who runs a German or Japanese build of an app hears 'Close' and 'Search' from VoiceOver, Narrator or Orca, and sees English placeholders. WCAG 3.1.2 asks that each part's language is known, and a hard-coded English name inside a translated UI fails it.

The kit consistency target asks for 0 user-facing strings without an override in a generated inventory. The accessibility targets ask that every control states its name truthfully, and that fields carry their own language.

What would help

1. Add a KitStrings table with English defaults. It holds a plain string for each fixed name and a function for each formatted one. 2. Let the app set it without adding a pub field to Kit. The options are a runtime-scoped value in the component store, set once per runtime, or a Kit builder that keeps the table outside the literal-built fields. Recommended: the runtime-scoped value, because it needs no change to theme crates and one app-level call covers every window. 3. Carry the table's language with it, using the language API from R0467, so assistive technology knows the names' language. 4. Route every literal above through the table. Per-builder overrides that exist today keep working and win over the table. 5. Add a lint that lists every string literal or format! in a label, description, placeholder or visible-text position in crates/rune-kit/src, and whether a builder or the table covers it. Check the inventory in. The lint fails on a new uncovered string. 6. Components that cache themselves hash the strings they read.

Done when
  • The generated inventory has 0 strings without an override.
  • Every string listed above comes from KitStrings or a builder override.
  • A golden with a German KitStrings shows the German names in the accessibility tree and on screen.
  • The lint fails on a fixture that adds a new literal label.
  • themes/opencode compiles unchanged.
How to check

The lint, the inventory diff and the German golden run with cargo test -p rune-kit on every merge. The OpenCode theme crate building with no change shows the API is compatible.

Depends on
Part of
  • Theme: T16
  • Tracked in R0690
  • Phase 2, milestone 2b · priority P2 · size M
R0492Kit: no Tabs component for tab panels inside a page; TabStrip is a window-shell pieceP2Phase 2bMT16
api-kit-tabs · feature
What happens

rune-kit has one tab component, the shell's TabStrip. It is built for window tabs in a titlebar or a sidebar. Its tabs open and close on springs, shrink then scroll on overflow, reorder by drag, tear out, and close with a middle click. It has a tablist role but no panels. A settings page, inspector or dialog that needs tabs over panels has to build them by hand. That means the roles, the selection, the roving focus and the Tab order into the panel. @opencode/ui has a tabs story, and SwiftUI has TabView. The kit README lists the tabs story as having no gallery scene.

Rune's accessibility layer already maps tablist and tabpanel roles. Rune has no labelled-by relation, so a panel cannot point at its tab yet.

Where
Why it matters

Panel tabs are among the most common controls in desktop settings and inspectors. A hand-built version usually gets the keyboard model wrong. Arrows don't move between tabs, Tab stops on every tab, or a screen reader doesn't announce which tab is selected.

The coverage target lists TabView among the standard controls the kit must cover with defined behaviour. The accessibility targets ask that every control states its role, value and state truthfully. They also ask that every control works from the keyboard alone, in the platform's way, with a logical order and a visible focus indicator, and that 100% of stories pass with 0 allowlisted failures.

What would help

Add Tabs in its own module with the kit's build shape: Tabs::new(key, selected_id), one call per tab with an id, a label and a panel, .on_change(|s, id, tx| ..) and .build(&Kit) -> El.

  • Roles: a tablist holding tab elements, each with its selected state. One tabpanel for the selected tab. Name the panel after its tab. Until a labelled-by relation exists, the panel takes the tab's label as its name.
  • Keyboard: the tablist is one Tab stop with roving focus. Left and Right move between tabs (Up and Down when vertical), Home and End go to the ends, and all four skip disabled tabs. Arrows select as they move, which is the usual pattern when panels show at once. A manual_activation() option leaves selection to Space and Return. Tab moves from the tablist into the panel's first focusable element, or into the panel itself when it has none.
  • Build only the selected panel by default, so hidden panels cost nothing.
  • Read only kit tokens: the segmented control's look, or the OpenCode tabs look in the OpenCode theme.
  • Add a gallery scene, an accessibility golden and a keyboard test, and register it in the manifest from R0476.
Done when
  • The golden shows roles tablist, tab and tabpanel, the selected tab's state, and the panel named after its tab.
  • Left, Right, Home and End move focus and skip disabled tabs (keyboard test).
  • Changing the selection calls on_change with the tab's id (test).
  • Tab from the tablist reaches the panel's first focusable element next (keyboard test).
  • Only the selected panel is built (count test).
  • The scene builds for the neutral and OpenCode kits in light and dark, and the manifest entry for TabView resolves to it.
How to check

The golden, the keyboard and count tests, every_story_builds and the manifest test run on every merge. The kit keyboard walk covers the new story once it lands.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 2, milestone 2b · priority P2 · size M
R0493Kit: literal radii, fixed springs and TextStyle literals bypass the theme, and no lint catches themP2Phase 2bMT16
api-kit-token-lint · infra
What happens

Kit components are meant to read only theme tokens. The token schema's own doc says that components never name raw colours, sizes or fonts outside its fields. Many still do:

  • Radii. There are 54 numeric .radius( calls in non-test kit code, 14 of them in notes.rs. Select draws its popup at 4.0. Menu uses k.radius.sm for the standard look and 4.0 otherwise. A theme that sets k.radius.md restyles buttons and fields, but not menus, selects, dialogs or segmented controls.
  • Type. Dialog's title is a TextStyle literal at 15 pt. List and TextInput's copy row use TextStyle::new(14.0, ..) instead of k.ty, so a theme's type scale doesn't reach them.
  • Motion. Toast, the overlay, Note and the scroll bar use Spring::new with literal values instead of k.motion.
  • Colour. Note tints lines with literal alphas such as .alpha(0.12).

PLAN.md promises a lint that fails on raw style literals. None exists, so new literals land unnoticed.

Where
Why it matters

A theme author sets the radius, type scale or motion and finds half the kit ignores it. Every fix is found by eye, one component at a time. The same gap keeps a custom theme from looking like one design.

The kit consistency target asks for 0 token-lint findings outside a reviewed allowlist, with a reason per entry, and asks that adding a Palette or Type token keeps a ..base theme compiling.

What would help

1. Add scripts/kit-tokens, a small syn-based checker over crates/rune-kit/src. It fails on TextStyle::new( or a TextStyle { .. } literal, a numeric .radius(, a numeric size override on a TextStyle, Spring::new( with literal arguments, a Color:: constructor or hex literal, and a numeric .alpha(. neutral.rs and palette.rs, where tokens are defined, are exempt. 2. Geometry that is not a style choice, such as a 0.5 pt hairline or a glyph's inset, goes in crates/rune-kit/token-allowlist.toml with a reason per entry. 3. Map literals to existing roles where the values already match. For example, 4.0 is radius.sm and 6.0 is radius.md in both the neutral and the OpenCode theme, so the swap changes no output there. 4. Add new Radius or Type roles only where the web uses a distinct value. Radius is built as a literal by the OpenCode theme, so a new field must come with the schema change that keeps literal-built themes compiling. 5. Fix the findings, a component group per PR. Offer the same script for app code, as PLAN.md describes.

Done when
  • scripts/kit-tokens reports 0 findings outside the allowlist, and every allowlist entry has a reason.
  • The lint runs on every merge and fails on a fixture with a new literal radius, TextStyle and spring.
  • Changing k.radius.md restyles the menu, select, dialog and segmented control (test).
  • Changing k.ty restyles Dialog's title and List's rows (test).
  • OpenCode gallery output is unchanged (goldens).
How to check

The lint and the restyle tests run on every merge. The OpenCode goldens and scripts/kit-diff.py show the swap kept its look. A changelog entry notes output moves for non-OpenCode themes.

Part of
  • Theme: T16
  • Tracked in R0690
  • Phase 2, milestone 2b · priority P2 · size M
R0494Markdown: a ```diff fence builds one row and one wrapped text per line, with no capP2Phase 2bST16
api-markdown-diff-fence-cap · perf
What happens

A plain code fence renders as one text element. Its colour stops at the first 32 KiB or 8192 coloured ranges, so a 10,000-line block costs what its first several hundred lines do. A `diff fence works differently. It builds a keyed row and a wrapped text for every line, so it can tint added and removed lines edge to edge. For each line it also filters the whole highlight list (find matches and selection highlights) to that line's range. That makes it O(lines × highlights) per build.

Markdown does not cache a reply while it streams (!self.streaming in its cache gate). So a diff fence in a streaming reply is rebuilt on every commit. A 5,000-line pasted diff builds more than 10,000 El nodes per commit, and it keeps doing so after the fence closes while the reply is still streaming.

Rune's Span::bg draws a rounded background behind a span's runs, for inline code. It cannot tint a whole line edge to edge today, which is why the fence uses rows.

Where
Why it matters

Agents paste large diffs into replies. While such a reply streams, each token rebuilds thousands of rows, and the frame time grows with the diff, not with the new text. On a 120 Hz display that drops frames during the stream.

The content target asks that a streamed token cost at most the new bytes plus the open block's last line plus 1 KB of work per commit. The elision target asks that a token appended to a 50 KB reply builds only the last two blocks. This theme's exit criteria ask that a 5,000-line diff fence builds at most 4 El nodes.

What would help

Render a diff fence as one text, like a code fence, with per-line colour spans for added, removed and header lines, and the same colour cap. Split highlights by line in one pass, walking the sorted list with a cursor, so the split is O(lines + highlights).

The edge-to-edge line tint needs one of these:

1. A line background in rune text. A span or line attribute that fills the whole line box from edge to edge, painted with the text, as selection boxes are. One text element, no extra nodes, and it also serves marked lines in Note's code blocks. Recommended. 2. One text plus one tint layer. A canvas behind the text with a rect per tinted line, placed from the text's laid-out line boxes. This needs a way to read line positions after layout, and wrapped lines make it fragile. 3. One row per run of same-tint lines. No rune change, but the node count grows with the number of hunks, so it misses the 4-node cap.

Copy, selection, find highlights and the accessible text must stay as they are today.

Done when
  • A diff fence builds at most 4 El nodes, checked at 100 and 5,000 lines (count test).
  • Splitting highlights for a 5,000-line fence takes one pass (test on the split helper).
  • Added and removed lines are tinted edge to edge, including wrapped lines (render golden).
  • Copy, selection, find highlights and accessible text match today's output (existing Markdown tests plus a 5,000-line case).
How to check

The count test and the Markdown tests run on every merge. The streaming-diff case in the content budgets from R0692 keeps the cost in proportion to the new text.

Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P2 · size S
R0495Kit: TextInput, TextArea and TextField clone the whole TextEdit on each build, secrets includedP2Phase 2bMT16
api-text-field-edit-clone · perf
What happens

rune::text_input takes &TextEdit and clones it into the element, so it can clamp marks and the caret to text an app may have written directly. Each kit field's new (TextInput, TextArea, TextField) clones it again. A clone copies the full text, marks, blocks and soft breaks. So a field makes at least two full copies of its document on every view run, before layout. A 200 KB notes field copies about 400 KB per keystroke for nothing when the text did not change, and the copies grow with the document.

For a secure field, every copy holds the secret. TextEdit's Drop zeroes its text, so each copy is wiped when it goes. While a view is built, though, the app's value, the kit field's copy and the element's copy all exist at once. The element's copy stays in the retained node tree. That goes against the guidance on TextEdit::text to keep a secret in as few buffers as possible.

The revision counter, the per-commit check for direct writes to the public text field and the shared snapshot belong to R0187. This issue moves text_input and the kit fields onto that snapshot and removes their copies.

Where
Why it matters

Notes, chat and code apps keep long documents in a field. Copying the whole document on every keystroke wastes time inside the frame and grows with the document, which is the cost the typing target is set against. A password manager or login form gets extra live copies of a secret it expected to be held once.

The elision target asks that code in the documented style is fast without hand-written elision. The text-field target asks that every field contract has a passing test in rune and in kit TextInput, TextArea and TextField. This theme's exit criteria ask that a view run with an unchanged 200 KB field copies no text, and that a secure field holds exactly one zeroed-on-drop copy.

What would help
  • Kit fields hold the shared snapshot from R0187 instead of an owned clone. new keeps its signature, so no app code changes.
  • text_input takes the snapshot when the revision is unchanged. It runs sync_invariants and makes a fresh snapshot only when the text changed through a method or a direct write.
  • A secure field keeps a single snapshot, shared by the kit field, the element and the retained node. A replaced snapshot is zeroed when it is dropped.
  • Holding a borrowed &'a TextEdit in the kit fields would also remove the copy. But it adds a lifetime to three public types and breaks apps that name them, so the snapshot is preferred.
Done when
  • A view run with an unchanged 200 KB field copies no text in TextInput, TextArea and TextField (allocation test).
  • A direct write to the public text field shows on the next build in each kit field (test).
  • After a secure field's build, exactly one copy of the secret exists besides the app's own, and a replaced copy is zeroed (tracking-allocator test).
  • Existing kit field tests and goldens pass unchanged.
How to check

The allocation and secure-copy tests run on every merge with the rune and rune-kit suites. A typing benchmark at 200 KB, with --profile perf and paired runs, shows the per-keystroke view time before and after.

Depends on
Part of
  • Theme: T16
  • Phase 2, milestone 2b · priority P2 · size M
R0496Markdown: <br> and <details> are dropped and <kbd> draws as plain text, and no doc says what HTML doesP2Phase 2bMT16
text-markdown-html · feature
What happens

The Markdown parser enables strikethrough, tables and task lists. Footnotes are not enabled. It handles neither Event::Html nor Event::InlineHtml, and both fall through a catch-all arm. So:

  • Text between inline tags is kept, but the tags have no effect. <kbd>Ctrl</kbd> draws as plain 'Ctrl', and <sub>, <sup>, <ins> and <mark> draw as plain text.
  • <br> loses its line break. This matters most in table cells, where a line break can only be written as <br>.
  • An HTML block loses its lines. In <details><summary>Logs</summary>, the summary text disappears. The Markdown body inside, after a blank line, still draws, but always open and with no disclosure.
  • Footnote references draw as literal [^1].

No doc or test states any of this. The existing stream test feeds <span> and <div> only to check that a streamed parse equals a whole parse. GitHub-rendered READMEs and model replies use all of these tags often.

Where
Why it matters

A user reading an agent's reply sees a table cell's two lines run together, a keyboard shortcut drawn as plain text, or a 'Logs' section with no heading that can't be collapsed. An author can't tell what will render, because nothing says.

The content target asks that rendered content is correct, safe on hostile input and accessible. It asks for 100% of the spec cases for enabled extensions to pass, with unsupported HTML documented. The kit consistency target asks that every control shows and reports every state. A <details> element is a disclosure with an expanded state.

What would help

Support the safe subset GitHub renders, and nothing that runs or loads:

  • <br> is a line break, in table cells too.
  • <kbd> uses the kit's keycap style. <sub> and <sup> are smaller and shifted. <ins> is underlined, <del> is struck through and <mark> is highlighted, all from kit tokens.
  • <details> with <summary> is a disclosure: a button with an expanded state, closed by default, or open with the open attribute. The body is the Markdown inside.
  • Any other tag draws its text content as plain text. Comments are dropped. Nothing in HTML loads a URL, an image or a script. An <img> in HTML draws its alt text.
  • Enable footnotes.

Put the HTML handling in its own module, such as markdown/html.rs, since parser.rs is at 779 lines. Keep the streaming parse equal to a whole parse, including an open <details> while it streams. State the contract in the Markdown rustdoc. Vendor the CommonMark and GFM spec cases for the enabled extensions and run them.

Done when
  • A table cell with <br> draws two lines (tree test).
  • <kbd>, <sub>, <sup>, <ins>, <del> and <mark> draw their styles (golden).
  • <details><summary> draws a disclosure that opens and closes, and its golden shows the expanded state (test).
  • Other block HTML keeps its text content, and no HTML loads anything (test with <img>, <script> and <iframe>).
  • Footnotes render, with a link to the note and back.
  • The spec cases for the enabled extensions pass, and the rustdoc lists what is not supported.
  • The stream test still matches a whole parse at every byte for inputs with these tags.
How to check

The Markdown tests, the spec suite and the stream equality test run on every merge. The accessibility golden for Markdown shows the disclosure.

Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P2 · size M
R0497Mermaid: the scene cache is a 16-entry FIFO with no byte bound, so 17 diagrams on screen miss on every commitP2Phase 2bMT16
text-markdown-mermaid-cache · perf
What happens

Built Mermaid scenes live in one thread-local cache keyed by source, style, hover and font epoch. It holds 16 entries and evicts in insertion order. A hit does not refresh its entry, and there is no byte limit. A diagram that streams in inserts one entry per new line, since each prefix is a new key, and pushes other diagrams out. With 17 or more diagrams mounted, every commit that rebuilds them misses and lays all of them out again.

A Markdown reply whose source contains 'mermaid' is never cached as a whole. That gate is R0478. Until it lands, such a reply asks the scene cache for every diagram on every commit, so a miss means a full layout.

Each build of a diagram's elements also clones every piece's Shape into a canvas, and clones the hover shape. A Shape holds its ops in a Vec, so each clone copies every point.

Where
Why it matters

A design chat or architecture review can mount dozens of diagrams. Past 16, typing in the composer or a streaming token makes every diagram lay out again on each commit, which costs whole frames. One streaming diagram also evicts the finished ones above it.

The content target asks that every cache is bounded in entries and bytes, recent entries included. It asks for 0 rebuilds of completed blocks unless something invalidates them. The text services target asks that every text cache stays within its entry and byte bounds. The elision target asks that caches stay correct, with 0 stale hits.

What would help

1. Mounted diagrams hold their own scene. Keep a mounted diagram's scene and steady::Memory in state owned by its element, so an unchanged diagram never asks the cache. 2. The cache is for diagrams that may come back. It becomes an LRU bounded in entries and bytes, with a default of 64 entries and 8 MB, and a hit refreshes its entry. It counts each scene's shape points, labels and retained memory. An entry over a quarter of the byte budget is not cached. A growing diagram keeps only its newest prefix: inserting a longer prefix drops the shorter one. Take the numbers from R0265. 3. Share shapes. Put scene shapes behind Rc, so building elements does not copy points. This needs a cheap clone in rune, such as Shape holding Rc<[Op]>, done through public API as R0182 asks. 4. Report the cache's bytes and the mounted scenes' bytes as two gauges.

Done when
  • A cache hit refreshes the entry (test).
  • 32 mounted diagrams lay out 0 times on a commit that changes none of them (count test).
  • A diagram streamed line by line leaves at most one cache entry for itself and evicts no other diagram (test).
  • An oversize entry is not cached, and the cache never exceeds its entry or byte bound in a stress test.
  • Building a mounted diagram's elements copies no shape points (allocation test).
How to check

The cache, count and stress tests run on every merge with the rune-mermaid and rune-kit suites. The streaming-diagram case in the content budgets holds the per-commit cost.

Depends on
Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P2 · size M
R0498Kit: highlighting rescans an open code fence's whole prefix on each new line, and diff chunks lose lexer stateP2Phase 2bMT16
text-syntax-incremental · perf
What happens

Streaming fences. While a fence is open, Markdown colours it up to its last complete line. The highlight cache is keyed by a hash of the whole coloured text. So each new line is a new key: the scanner rescans the whole prefix, up to 32 KiB, and the cache stores another full copy of it. Picture a fence that grows to 30 KiB at about 40 bytes a line. That is about 750 rescans, roughly 11 MB scanned in total, with the newest one costing up to about 0.4 ms by the scanners' documented 0.01 to 0.5 ms per thousand lines. The cache always keeps every source the last two commits used, so these recent copies are not bounded.

Diffs. DiffState highlights each side in 128-line chunks, each on its own. A block comment or multi-line string that crosses a chunk boundary is coloured wrong after the boundary. Each chunk goes through the shared highlighter. So it also hits the 32 KiB cap, which cuts at the last line end: a line past the cut gets no colour, and one line over 32 KiB gets none at all. It also stores a second copy of the chunk's text in the shared cache. The chunk cache clears completely once it passes 512 entries.

Where
Why it matters

Agents stream long code blocks. Highlight work that grows with the fence's length on each new line takes frame time away from scrolling and typing as the reply grows. In a diff, comments and strings coloured wrong at random 128-line boundaries look broken.

The content target asks for at most the new bytes, plus the open block's last line, plus 1 KB of parse and highlight work per commit, at any reply length. It asks that every cache is bounded in entries and bytes, recent entries included. The text services target asks that every text cache stays within its bounds.

What would help
  • Resumable lexer state. Give the built-in scanners a state that can be saved at line starts: the language mode plus the nesting frames, which are already bounded (MAX_DEPTH, MAX_FRAMES). Keep, per fence, the line starts, the saved states and the tokens. A new line checks that the prefix is unchanged and scans only from the last saved state.
  • App highlighters made with Highlighter::new cannot resume. Give them an opt-in resumable form, and keep the whole-prefix call, cached, for the rest.
  • Diff chunks start from the saved state at their first line. A hunk with no earlier file context starts from the default state, as git's own highlighting does. Highlight chunks without the shared cache's extra copy. Once per-commit work is bounded, colour long lines to their end.
  • Bounds. Replace the chunk cache's clear-all with an LRU bounded in entries and bytes. Count recent entries in every bound.
  • The diff fence's row count is R0494. Split the diff files first (R0153), fix #196's panics, and scope the cache per runtime with R0183.
Done when
  • A fence growing to 30 KiB scans at most its new line plus 1 KB per commit (count budget).
  • Highlights at every commit equal a whole-source highlight (differential test).
  • A block comment across a chunk boundary is coloured as in a whole-file highlight (test).
  • A 100 KB single line in a diff is coloured to its end and scanned once (test).
  • The chunk cache and the syntax cache stay under their entry and byte bounds in a stress test, with recent entries counted.
How to check

The count budgets from R0265, the differential test and the cache stress tests run on every merge. The streaming-fence case in the content benchmark shows the per-commit cost.

Depends on
Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 2, milestone 2b · priority P2 · size M
R0499Kit: Kit::from_palette builds a whole neutral Kit on every view run, though the README says to build the kit in the viewP3Phase 2bST16
api-kit-from-palette-cost · perf
What happens

The kit README tells apps to get the kit inside the view. A window's blend mode can change at runtime (Tx::set_srgb_blend), and translucent tokens are solved for the mode in force when the kit is built. The OpenCode theme follows this cheaply: it caches one Kit per appearance and blend mode in a OnceLock.

Kit::from_palette does not cache. Each call builds Kit::neutral, then derives every token from the seed. When a secondary text colour misses its contrast target, it runs a 24-step bisection. An app that follows the README and seeds its kit from a palette pays this on every view run. TooltipStyle::neutral builds a whole Kit to read a few fields. No one has measured what this costs per view run.

kit-gallery caches its palette kits in a OnceLock per appearance. That makes them cheap, but they ignore a blend switch, which is what the README warns about.

Where
Why it matters

Apps that let users pick a seed colour, a common feature in editors and chat clients, build their kit this way. If the cost is real, it lands on every view run, including every keystroke. If it is small, the docs should say so, so app authors stop caching by hand and getting the blend mode wrong.

The elision target asks that code in the documented style is fast without hand-written elision, and that the feed scene's composer keystroke runs the view at most once.

What would help

1. Measure first. In the feed scene with --profile perf, record the allocations and time of one from_palette call per view run, with paired runs compared by median. 2. If it costs over 2% of view time, cache kits by (seed, focus, blend mode) in a map of at most 8 entries in the runtime component store, through the public store API from R0182. PaletteSeed and PaletteFocus hash through their colours. 3. Keep from_palette returning an owned Kit, served from the cache, so no app breaks. Add a method that returns a shared Rc<Kit> for apps that want to skip the clone. 4. Make TooltipStyle::neutral read the cached neutral kit. 5. If it costs 2% or less, record the number in the README instead, and leave the code as it is.

Done when
  • The measurement is recorded in the PR, with the scene, build profile and run count.
  • If cached: a second call with the same seed, focus and blend mode allocates nothing beyond the returned clone, or nothing at all through the shared form (allocation test).
  • If cached: the cache holds at most 8 entries, and a blend switch returns a kit solved for the new mode (test).
  • TooltipStyle::neutral does not build a Kit per call (allocation test).
How to check

The allocation and blend-switch tests run on every merge. The feed-scene measurement is repeated when palette code changes.

Depends on
Part of
  • Theme: T16
  • Tracked in R0690
  • Phase 2, milestone 2b · priority P3 · size S
R0500Kit: SplitView and Sidebar resolve their own parts by fixed keys such as "shell" and "sidebar-list", so two shells in one window collideP3Phase 2bST16
api-shell-fixed-keys · bug
What happens

Repeated local keys are fine in Rune: two siblings' children can both be called 'list'. The problem is that the shell finds its own parts again by bare key. SplitView keys its root 'shell', its main pane 'main-pane', its main column 'main-column' and its sidebar toggle 'sidebar-toggle'. Its focus-return markers point at those keys. Sidebar keys its list 'sidebar-list', and its rows return focus there.

The runtime resolves a focus_return key to the first node in the tree with that key. With two SplitViews in one window, closing the second shell's sidebar sends focus to the first shell's toggle. The same thing happens when an app has its own element keyed 'main-pane' earlier in the tree. Nothing warns.

TreeModel already handles this: its key defaults to 'tree', and its docs say to give each tree on screen its own.

Where
Why it matters

Apps with an inspector window, a split editor or a settings window that reuses the shell get focus jumping to the wrong pane after closing a sidebar. Keyboard and screen reader users lose their place, and the bug is hard to trace because it depends on tree order.

The identity target asks that identity is typed or checked, not a silent string convention. Every kit component that resolves its own parts must scope them by its own id and pass a two-instances-per-window test.

What would help
  • Add SplitView::id(key), with a default of 'shell', and Sidebar::id(key), which a SplitView passes down to the sidebar it holds.
  • Name every key the shell resolves itself from that id. focus_return matches a bare key, so there are two ways:

1. Derive unique keys from the id, such as {id}-sidebar-toggle, and keep today's names for the default id. No runtime change. Recommended. 2. Let focus_return take a path relative to an ancestor key, such as shell/sidebar-toggle. Cleaner, but it changes a rune API.

  • Audit the other kit components for keys they resolve themselves. At this commit the grep finds only the shell, but new components must follow the same rule. Add a two-instance test for each one that does.
  • Document the id in the shell's rustdoc, next to the TreeModel::key note.
Done when
  • Two SplitViews in one window collapse, focus and return focus independently (test).
  • An app element keyed 'main-pane' before the shell does not take the shell's focus return (test).
  • Every kit component that resolves its own parts passes a two-instances-per-window test.
  • Default output and keys are unchanged, and the existing shell tests and goldens pass.
How to check

The shell tests, the two-instance tests and the shell accessibility golden run on every merge.

Part of
  • Theme: T16
  • Tracked in R0690
  • Phase 2, milestone 2b · priority P3 · size S
R0501Kit: TreeModel can insert and clear but not remove, so deleting one node means rebuilding the treeP3Phase 2bST16
api-tree-remove · feature
What happens

TreeModel's public API can add a node (insert) and remove everything (clear). It has no way to remove one node. To delete a file from a file tree, an app clears the model and inserts every remaining node again. That allocates every id string again and costs O(n) for a one-node change. clear also resets the selection and the filter, and rebuilding drops every folder's open state and the keyboard cursor, unless the app saves and restores them by hand.

The model keeps nodes in a Vec addressed by index, with an id-to-index map, a list of roots and filter vectors that run parallel to the nodes. The visible rows are a cache that any change drops and rebuilds on the next read.

Where
Why it matters

File browsers, outline views and project sidebars delete one item at a time, often from a file watcher. With today's API the user sees every folder collapse and the selection jump after a delete. In a large tree the rebuild also costs a visible stall.

The coverage target asks that the kit covers the standard controls, OutlineGroup and List included, with defined behaviour. Removing an item is part of that.

What would help

Add TreeModel::remove(id) -> bool. It returns false when id is not in the tree.

  • Remove the node and its subtree: unlink it from its parent's children or from roots, and remove every id in the subtree from the index.
  • Keep indices stable. Mark the freed slots empty instead of shifting the Vec, and update the filter vectors to match. Compact when empty slots pass half the store. The rest of the model is never rebuilt.
  • Keep open state, selection and the filter for every other node.
  • If the cursor or a selected node is removed, select the next sibling, else the previous sibling, else the parent. Update the cursor and the range anchor the same way.
  • Call dirty, so the visible rows are worked out once on the next read.
  • Add a matching FileTree helper that removes by path.
Done when
  • Removing one node from a 50,000-node tree does not rebuild the node store or allocate ids. Only the visible-row cache is rebuilt (count test).
  • Open state, the filter and other selections survive a remove (test).
  • Selection and the cursor move to the next sibling, the previous sibling or the parent, as documented (test).
  • remove of an unknown id returns false and changes nothing (test).
  • Removing then inserting the same id works after compaction (test).
How to check

The tree tests in crates/rune-kit/tests/tree.rs and the module's own tests run on every merge. The file-tree accessibility goldens stay unchanged for trees that see no removal.

Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 2, milestone 2b · priority P3 · size S
R0502Hot reload: a saved view edit takes about 8 s to show, rune-dev assumes a private build host, and nothing measures the loopP2Phase 3XLT01
authoring-edit-loop · tracking
What happens

The README measures a median of about 8 s from saving a view edit to new pixels, for Settings. PLAN still says about 1 s measured and a 300 ms goal, from a spike on a plain binary. The launcher, scripts/rune-dev, runs the compiler on a remote build host by default, its default host is a machine name, and it knows one example by name. Only the last stage of the loop is timed, and nothing re-measures it.

Getting the loop to about a second takes several steps in order: make local builds the default so anyone can run it, stamp each stage so the slow ones are known, measure weekly on three platforms, cut the slow stages, and make sure a patch lands between frames.

This tracker closes when the weekly published numbers meet the targets below.

Where
Why it matters

An author or agent edits a view and waits about 8 s, or can't run the loop at all without the private build host. The targets: a view edit shows on screen in about a second with state kept, on macOS Apple silicon with a median of at most 1 s and p95 at most 2 s, and on Linux and Windows with a median of at most 2 s; 100% of measured edits keep app state and scroll; the default launcher mode is local; and numbers are re-measured weekly and published. The tooling target asks for save-to-first-new-frame p95 at most 1 s. The macOS target here uses that 1 s p95, which also meets the 1 s median and 2 s p95.

Done when
  • scripts/rune-dev hello patches a view edit on a machine with only the documented prerequisites, with local builds as the default and no machine names in scripts/.
  • The rune-hot-pixels line carries per-stage stamps, and a weekly lane publishes per-stage and total p50 and p95 for macOS, Linux and Windows over a committed 30-edit corpus.
  • On macOS Apple silicon, save-to-presented-frame p95 is at most 1 s. On Linux and Windows, the median is at most 2 s.
  • 100% of measured edits keep state and scroll.
  • An impl method body edit patches without a restart.
  • Patches apply at a frame boundary, or a test shows a frame never mixes generations, and the first presented frame reports its generation.
How to check

The weekly lane from R0236 publishes the numbers. The rune-dev smoke test and the hot-feature tests run in T1.

Issues
Part of
  • Theme: T01
  • Phase 3 · priority P2 · size XL
R0503Hot reload: a saved view edit takes about 8 s to reach pixels, and editing an impl method body forces a restartP2Phase 3LT01
api-hot-reload-latency · perf
What happens

The README records a median of about 8 s from save to GPU for Settings, over ten edits. The spike in research/08 measured 989 ms median on a plain binary, so most of the 8 s comes from Rune's own loop. Several stages are likely costs:

  • Watching. scripts/rune-dev wakes every 100 ms and stats every tracked file under crates/, examples/ and themes/, about 1,460 files, instead of using filesystem events.
  • The guard. The edit guard empties free function bodies before it compares two versions of a file, but keeps impl methods token-exact. Editing the body of impl Foo { fn view(..) } changes the comparison and forces a restart.
  • Crate size. Subsecond patches only the executable's tip crate. When views sit in a large tip crate, each patch rebuilds and relinks more than it needs.
  • Scheduling. The spike measured on a background-priority worker and found frame wakeups batched up to 208 ms.

Which stage costs most is unknown until R0236 lands.

Where
Why it matters

Every view edit an author or agent makes costs about 8 s of waiting, and an edit inside an impl block costs a full restart and loses state. The targets: a view edit shows on screen in about a second, with state kept. On macOS Apple silicon the median is at most 1 s and p95 at most 2 s, and on Linux and Windows the median is at most 2 s. 100% of measured edits keep app state and scroll. The tooling target asks for save-to-first-new-frame p95 at most 1 s. The macOS target here uses that 1 s p95, which also meets the 1 s median and 2 s p95.

What would help

Choose each change by the stage gain the stamps measure:

1. Replace the poll with filesystem events (FSEvents, inotify, ReadDirectoryChangesW), and keep the full scan as a fallback check. 2. Let the guard admit an impl method body edit when it proves the type's layout, its fields and every signature are unchanged. Keep restarts for changes to types, statics, macros and signatures. research/08 found that a cached trait object keeps calling old code, so the guard must keep restarting for trait impls behind dyn. 3. Document and test views in a leaf crate that is the tip crate, so a patch rebuilds only that crate. 4. Try research/08's options: a warm linker and compiler cache, and foreground scheduling for the build and the app.

If 1 s isn't reachable with Subsecond, record the measured floor per stage and why.

Done when
  • On macOS Apple silicon, save-to-presented-frame p95 is at most 1 s over the 30-edit corpus, with local builds.
  • On Linux and Windows, the median is at most 2 s.
  • Every measured edit keeps state and scroll.
  • Editing an impl method body on a tip-crate type patches without a restart.
  • Guard tests still restart on changes to types, statics, macros and signatures.
How to check

The weekly lane from R0236 reports p50 and p95 per stage and per rev, and turns red above target. An alert fires on a median regression of more than 20%. The lane does not gate merges on wall time. Guard tests run in T1.

Depends on
Part of
  • Theme: T01
  • Tracked in R0502
  • Phase 3 · priority P2 · size L
R0504Agents: no SwiftUI baseline says what first-try rate Rune should matchP2Phase 3MT01
api-rune-bench-baseline · research
What happens

R0209 measures how often an agent's first try at a Rune app compiles and matches its spec. A Rune-Bench number means little alone. A 70% first-try compile rate could be good or poor, depending on how often the same model gets the same task right in another framework.

Rune's stated feel target is SwiftUI. PLAN and research/16 plan a small benchmark of 30 to 50 tasks (generate, edit and repair), measured per model on every API change. Nothing measures the same tasks in SwiftUI with the same model, so there is no peer rate to compare against.

Where
Why it matters

Rune makes API choices (preludes, names, handler shapes, error text) to help agents. Without a peer rate, nobody can tell whether those choices close the gap or whether Rune is simply harder for the model. The target: agents get Rune apps right on the first try at least as often as with the peer. First-try compile median is at least 85% and tree match at least 75%, each at least the same model's SwiftUI rate, for three folds in a row. A fold is blocked when either rate drops more than 5 points and the 95% interval excludes 0.

What would help
  • Port every Rune-Bench task to SwiftUI on macOS, including the edit and repair tasks.
  • Write one behavioural spec per task that both ports are checked against: which controls exist, their labels and roles, and what each interaction changes. Read it from --tree for Rune and from the macOS accessibility tree for SwiftUI. Don't compare pixels or source.
  • Run the same pinned model, prompt protocol and number of runs per task for both. Report first-try compile and tree match with 95% intervals.
  • Commit both result sets side by side, and compute the comparison the target needs from them.
  • SwiftUI has much more training data. Report that as context; the absolute thresholds still apply.
Done when
  • Every Rune-Bench task has a SwiftUI port and a shared behavioural spec.
  • A SwiftUI checker reads the macOS accessibility tree and scores tree match the same way the Rune checker scores --tree.
  • Both result sets are committed with 95% intervals and the model and protocol named.
  • The comparison is computed from the committed results by a script.
How to check

A scheduled lane runs both sets on a macOS runner with Xcode, with the same model and protocol, and commits the results each fold. A test runs the SwiftUI checker on one known-good and one known-bad port.

Depends on
Part of
  • Theme: T01
  • Tracked in R0704
  • Phase 3 · priority P2 · size M
R0505Handlers: on_x, on_x_tx and on_x_any variants and 14 scroll requests multiply methods, and nothing measures whether fewer would helpP3Phase 3ST01
api-handler-variants · research
What happens

El has 50 public on_* methods. Several are pairs or triples that differ only in what the closure receives: on_press and on_press_tx, on_double_press_tx, on_layout_tx, on_drawn_layout_tx, on_drag_any, on_pointer_move_any and on_hover_change_any. Tx has 14 scroll_* requests that combine a target, an alignment, a scope and whether to animate: scroll_center, scroll_center_in, scroll_center_in_instant, scroll_to, scroll_to_with, scroll_to_instant and more.

Two designs could cut these. An IntoHandler<S, Marker> trait would let one on_press take closures of different shapes. A builder such as tx.scroll(target).align(..).instant() would replace the 14 requests. But a trait makes type errors longer, and research/06 chose a type-erased El partly to keep errors short for agents. Nobody has measured which shape agents get right more often.

Where
Why it matters

An agent picks between on_press and on_press_tx, or among 14 scroll requests, and each wrong pick is a compile failure or a wrong behaviour. The targets: one import gives a view everything it needs, a short name means one thing, and import errors cause at most 2% of Rune-Bench first-try compile failures; agents get Rune apps right on the first try at least as often as with SwiftUI, with first-try compile at least 85% and tree match at least 75%.

Changing the handler API touches every app. It should change only if the numbers say it helps.

What would help
  • Build two branches. One adds a trait-based handler that takes closures of different shapes. The other adds a tx.scroll(target).align(..).instant() builder. Keep today's methods on both, so the bench can compare.
  • Pick 20 Rune-Bench generate and edit tasks that use handlers or scrolling. Run each 3 times against each branch and against today's API, with the same pinned model and prompt protocol.
  • Adopt a change only if first-try compile does not drop and tree match rises by at least 5 points with the 95% interval above 0. Also record the median length of the compile errors the agent saw.
  • Record the decision for each branch under research/, with a follow-up issue if one is adopted.
Done when
  • A research note gives both comparisons with 95% intervals and error lengths.
  • Each branch has a decision: adopted with a follow-up issue, or rejected with the numbers.
  • The bench results and the task list are committed.
How to check

The committed results reproduce from the Rune-Bench runner with the branch revs named in the note.

Depends on
Part of
  • Theme: T01
  • Tracked in R0704
  • Phase 3 · priority P3 · size S
R0506Hot reload: a patch is applied on the devtools thread at any moment, so one frame may mix old and new codeP3Phase 3ST01
tooling-hot-patch-boundary · bug
What happens

PLAN says each reload is applied atomically and acknowledged by its first presented frame id, and that the latency numbers measure that frame.

In the hot build, subsecond::apply_patch runs inside the dioxus_devtools::connect callback, on the devtools thread, whenever a message arrives. Subsecond's handler then bumps the hub's generation and wakes the windows. The re-commit waits for the next frame. So a frame already in progress on the main thread can call the old version of one function and the new version of the next. Nobody has shown whether Subsecond's jump table makes that visible.

The rune-hot-pixels line reports a generation, but it comes from the headless snapshot path. Nothing ties a patch generation to the first presented native frame.

A separate problem is tracked in R0083: when a patched poll, key or IME handler panics, Rune calls the original against state the patch may have half-written. Once that retry is gone, mixing generations within one frame can't leave half-written state behind. So this issue is about atomicity and acknowledgement, not about state safety.

Where
Why it matters

An author saves an edit that changes a view and its handler together. For one frame, the new view may run with the old handler, or the reverse. Most of the time nobody sees it, which is why it should be tested rather than assumed. The latency numbers also need the first presented frame for each generation.

The target: the agent's inner loop is fast and its docs are true, with save-to-first-new-frame p95 at most 1 s and 0 PLAN or README lines that state an unbuilt capability as current.

What would help

1. Write a test under --features hot that delivers a patch while a frame is in progress and records which generation each patched call in that frame used. 2. If a frame mixes generations, queue the received jump table and apply it on the main thread at a frame boundary, before the re-commit. This adds at most one frame of delay. 3. Either way, stamp the first presented native frame after a patch with the patch generation, and report it. 4. If no fix is needed, change PLAN to say what the test showed.

Done when
  • The test shows whether a frame can mix generations, and the PR records the result.
  • If it can, patches apply only between frames, and the test passes.
  • The first presented native frame after a patch reports its generation.
  • PLAN's atomicity line matches what the code does.
How to check

The test runs in T1's hot-feature build, which R0036 adds.

Depends on
Part of
  • Theme: T01
  • Tracked in R0502
  • Phase 3 · priority P3 · size S
R0507Release: rune depends on path-only crates, three of them publish = false, and the rune package name is takenP2Phase 3MT02
api-publishable-deps · infra
What happens

crates.io rejects a crate whose dependencies are not on the registry. Today rune and rune-kit reach these workspace crates through path with no version:

CrateReached frompublishNotes
rune-motionrune, rune-kitfalse
rune-stagingrunefalse
procwatchrune (optional)false
rune-taffyruneallowedno description
rune-mermaidrune-kit (optional)alloweddepends on rune by path
runerune-kit, rune-mermaid, the OpenCode themeallowedno description

No one has listed the full closure over all features and targets, or the order in which to publish it. The workspace has no repository field.

The name rune on crates.io belongs to a scripting language, as #108 points out. A registry package needs another name, and every app's use rune::... must keep working.

rune-kit's dev-dependencies (procwatch, rune-ref, rune-theme-opencode) are also path-only. Cargo drops path-only dev-dependencies when it packages a crate, so they do not block publishing.

Where
Why it matters

The target: "cargo add of the published core and kit crates builds hello on macOS, Windows and Linux; every crate in the publication closure passes cargo publish --dry-run." Until this closure is publishable, nothing else on the release path can start.

What would help

1. Add a script that generates the closure of workspace path dependencies of rune and rune-kit over all features and every target (cargo metadata --all-features with no platform filter). It writes the closure and a publication order (leaves first) to a checked-in file that the release script reads. 2. Choose package names that do not collide, and reserve them early. One option is rune-ui (free, per #108) with [lib] name = "rune", so code still says use rune::.... Keep the rune-* names for the leaf crates. Record the choice in the stability docs. 3. Give each closure dependency a version beside its path, remove publish = false, and add description and repository. license is already inherited from the workspace. 4. Add the newly public leaf crates to semver-checks, because they become semver surfaces too.

Done when
  • The closure and order file is checked in, and running the generator again gives no diff.
  • Every crate in the closure has a version, a description, a license and a repository, and none is publish = false.
  • cargo publish --dry-run succeeds for every crate in order, against a local registry for crates that are not yet published.
  • The package names are reserved on crates.io.
How to check

R0508 runs the dry-run in order every week and before each release. A check in that job fails if the generated closure differs from the checked-in file.

Part of
  • Theme: T02
  • Phase 3 · priority P2 · size M
R0508Release: no check runs cargo package or a docs.rs build for the crates apps depend onP2Phase 3MT02
api-package-check · infra
What happens

No workflow runs cargo package, cargo publish --dry-run or a docs.rs-style doc build. The two workflows, site.yml and www.yml, build the docs site and the web page. Packaging can break without anyone noticing, and today it would break in several ways:

  • Path-only dependencies and publish = false crates in the graph (R0507).
  • No crate has [package.metadata.docs.rs], and no code uses cfg(docsrs). A docs.rs build uses default features on one Linux target, so macOS-only and feature-gated items would be missing from the docs.
  • Some test code includes files from other crates. crates/rune/src/gpu/metal/shader_tests.rs includes shaders from rune-fx and rune-light, and crates/rune-kit/src/markdown/tests.rs includes fonts from themes/opencode. cargo publish --dry-run builds only the library, so it passes, but the packaged crate's own tests do not build.
  • The rune crate tracks about 12.8 MiB of files, including three 0.54 MB precompiled metallibs and 1.35 MiB of fonts. crates.io rejects a compressed package over 10 MB, and nothing measures it.
Where
Why it matters

The target: "every crate in the publication closure passes cargo publish --dry-run and a docs.rs-equivalent doc build", and "cargo add of the published core and kit crates builds hello on macOS, Windows and Linux". A release that fails at publish time, or that publishes docs with half the API missing, costs more than a check that runs every week. The platform target also asks that an app "can be built ... on each desktop". A build from packages is the only one that proves the published files are complete.

What would help

Add a job that runs every week and before each release:

1. For each crate in the checked-in publication order, run cargo publish --dry-run and record the .crate size against the 10 MB limit. 2. Add [package.metadata.docs.rs] to each published crate (features and targets, including aarch64-apple-darwin). Run RUSTDOCFLAGS="--cfg docsrs" cargo doc --no-deps with those settings and -D warnings for broken intra-doc links. 3. Load the packages into a local registry, for example a directory registry from cargo vendor or cargo local-registry. Build examples/hello and a Kit consumer from it with no path and no [patch], and run their headless tests on Linux, macOS and Windows. 4. Post the result on #108 while that issue is open.

Decide whether the packaged tests must build. The plan's target needs only dry-run and docs. A simple fix is to exclude the test files that include files from outside the crate.

Done when
  • The job is green for every crate in the closure.
  • Each published crate has docs.rs metadata, and its docs build with --cfg docsrs and no warnings.
  • A consumer built only from the local registry passes its headless test on Linux, macOS and Windows.
  • The job reports each .crate size, and it fails above 9 MB, leaving a margin.
How to check

The scheduled package job, run again by the release script before it tags. A fixture that adds a path-only dependency to a closure crate must fail it.

Depends on
Part of
  • Theme: T02
  • Phase 3 · priority P2 · size M
R0509Release: there are no tagged versions, so apps can only pin dev revs and read the whole changelog to upgradeP2Phase 3MT02
api-release-process · infra
What happens

Every crate is at version 0.0.1 or 0.1.0, and git tag lists nothing. The README tells apps to add rune = { git = ..., rev = "<dev rev>" } and pin a dev rev. To upgrade, an app reads every changelog bullet since its last pin. CHANGELOG.md has a single ## dev section of 3,239 lines with 476 top-level bullets. Another 216 fragments are waiting in changelog/unreleased/. Only 4 lines mention "Breaking". scripts/changelog-fold can only fold fragments into ## dev. It has no idea of a release section.

So there is no point that says "these revs were checked together", no list of the breaking changes between two such points, and nothing for cargo update to use.

Where
Why it matters

The targets: "a qualified 0.x release from the verified branch ships within 31 days of the previous one whenever dev changed; each release publishes hello's crate count and clean build time with default and minimal features on a pinned runner". And for API breaks: "100% of changes semver-checks marks major ship a **Breaking:** fragment naming the replacement". App teams want a version to depend on, release notes that put breaking changes first, and a clear cost for each upgrade.

What would help

Add scripts/release:

1. Take a rev from the verified branch (R0169). Refuse any other rev. 2. Run R0508 and R0041 against the last release. 3. Bump the versions from semver-checks' verdict. Under 0.x, a major finding bumps the minor version, anything else bumps the patch. Check that the declared rust-version (R0219) still builds. 4. Fold the changelog into a ## <version> section, with Breaking items first, using the lint and fold from R0045. Each entry keeps its rev. 5. Tag the rev, publish in the checked-in closure order, and record hello's crate count and clean build time with default and minimal features on the pinned runner.

Add a scheduled cadence job. It fails when dev has changed and no release has shipped for 31 days. Update the README's "Add it" to show cargo add of the published crates, with the dev rev pin as the option for bleeding-edge apps.

Done when
  • scripts/release publishes to crates.io from a verified rev, and the tag's commit is on the verified branch.
  • Each release's notes list Breaking items first and include the crate count and clean build time.
  • cargo add of the core and Kit crates builds hello on macOS, Windows and Linux.
  • The cadence job runs, and three releases in a row ship within 31 days of each other.
How to check

The release script's own dry-run mode in the scripts test suite, the cadence job on its schedule, and the package check's local-registry build before each publish.

Depends on
Part of
  • Theme: T02
  • Phase 3 · priority P2 · size M
R0510Perf: no reserved-hardware lane measures frames, latency, launch or memory on any platformP1Phase 3XLT03
perf-lanes · tracking
What happens

Every frame, launch and memory number in the README and the research notes came from one-off runs on developer machines. PLAN §8 says reference devices get pinned before any number becomes a gate, and that performance runs on reserved hardware. None are pinned, and no workflow runs perf. The scripts that exist are headless or manual, and they say what they leave out: GPU execution, presentation, display timing and the window server.

This tracker covers the reserved-hardware lanes: the ProMotion Mac, Windows, Linux, web, iPhone and low-end lanes, real-GPU renderer lanes, the launch and first-use suites, native peers, the resize oracle, the photon rig, layout timing, GPU-time benches and perf bisect. It takes several issues because each platform needs its own machine, its own present-time source and its own native peer.

Where
Why it matters

Apps pin dev revs, and users feel dropped frames and latency that no check sees. The target: "wall-clock suites on a nightly schedule on macOS, Windows, Linux, web and iOS lanes, weekly on the low-end lane", pooled over at least 5 paired runs, each number recording "rev, backend, device and date". On reserved 120 Hz hardware, input-to-present p50 at most 8.3 ms and p95 at most 16.7 ms, with missed presents under 0.1% during scroll.

What would help

Lanes run on a nightly schedule, on push to dev and on dispatch, never on pull_request. Each lane uses quiet, pinned machines and records a manifest. No wall-clock number gates a hosted runner.

Done when
  • All children are closed.
  • Every row of the perf matrix runs at least nightly (weekly on the low-end lane) and fails its lane on a threshold violation.
  • A page lists the last run and verdict per lane.
How to check

The lane status page, and the seeded-regression drill in R0251.

Issues
Part of
  • Theme: T03
  • Phase 3 · priority P1 · size XL
R0511iOS: no ProMotion iPhone measures launch, cadence or footprintP2Phase 3MT03
perf-lane-ios · infra
What happens

PLAN §8 sets iPhone targets: hello first present p95 at most 250 ms, an idle footprint of at most 40 MiB, and 1,000 spring-animated quads at 120 Hz with CPU and GPU p95 at most 4 ms and under 0.1% missed presents. Nothing measures them on a device.

IOS apps host Rune through LayerHost. Its frame samples motion at Instant::now(), presents, and returns CPU time, but it records no input time and no real present time. The embed_cost example measures a LayerHost on a CAMetalLayer in no window, on the simulator or a Mac. A per-release device run would let a regression sit in dev for weeks while apps pin it.

Where
Why it matters

On an iPhone a missed frame or a slow launch is what users compare against UIKit. The targets: on a ProMotion iPhone, input-to-present "p50 <= 8.3 ms, p95 <= 16.7 ms", continuous motion ">= 99% one-period and < 0.1% missed", "iPhone hello p95 <= 250 ms", "iPhone <= 40 MiB", 0 presents at rest, and touch release velocity "within 10% of the least-squares reference". Wall-clock suites run nightly on the iOS lane.

What would help
  • Add a LayerHost example app in a minimal UIKit shell, built from embed_cost's scenes, with the 1,000-spring scene, a touch fling scene and an idle scene.
  • Add a device-run script for a tethered ProMotion iPhone: launch to first present, cadence and missed presents from the present-time source added by R0416, input-to-present for an injected touch, and footprint after 5 s idle.
  • Count presents at rest; R0126 makes a frame that changes nothing skip the present.
  • Run nightly, on push to dev and on dispatch, never on pull_request. Use the build from R0244 and the alarm rules of R0125: 5 paired runs, a noise floor, and a 10% paired regression turns the lane red.
  • Publish device numbers per rev with rev, backend, device and date. This lane carries the device numbers for R0416.
Done when
  • Launch, the 1,000-spring scene, the touch fling and idle footprint are published nightly from the iPhone.
  • The lane fails on hello p95 over 250 ms, footprint over 40 MiB, or 0.1% or more missed presents in the spring scene.
  • Input-to-present comes from real present times, not the scheduled refresh.
  • A regression alarm fires on the same rules as the macOS lane.
How to check

The nightly lane. Replay a rev with a seeded 30 ms launch delay and a rev that presents every frame at rest, and confirm each turns the lane red.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 3 · priority P2 · size M
R0512Perf: no lane runs on a low-end machine, so budgets hold only on fast hardwareP2Phase 3ST03
perf-lane-low-end · infra
What happens

Rune's frame and launch numbers come mostly from recent Apple silicon, and no lane runs on a slower machine. #204 shows how much headroom matters even on a fast Mac: at a light scroll load macOS keeps the main thread on efficiency cores, and the frame rate follows that clock (88.8 fps on the table scroll, 120.6 fps with the performance cores held up). A base laptop on battery, or a Windows laptop with integrated graphics, has much less headroom than the machines the numbers came from.

The plan also names two different low-end Windows GPUs: Intel Iris Xe here, and a UHD 620-class laptop in R0516 and in the GPU frame-time target.

Where
Why it matters

Many users run Rune apps on base laptops on battery. A budget that holds only on a fast Mac judders there. The targets: low-end references at 60 Hz hold ">= 99% in the 1,000-spring and table scenes", frame CPU "p95 <= 8.3 ms and 0 frames over 16.7 ms", and zero Rune-caused main-thread tasks over budget after the first frame. Wall-clock suites run "weekly on the low-end lane".

What would help
  • Pin an 8 GB base M1 MacBook Air at 60 Hz on battery, Low Power Mode off.
  • Pin one Windows 11 laptop on integrated graphics at 60 Hz on battery. Options: Iris Xe (newer, closer to today's base laptops) or UHD 620-class (slower, matches the GPU frame-time target). Recommended: UHD 620-class, so one machine serves this lane, R0516 and the iGPU lane of R0517, as listed in the one machine manifest from R0155.
  • Run both at a controlled room temperature after a 5-minute idle.
  • Each week and before each release, run the canonical scenes, R0404 and R0242, and check them against the low-end rows of R0066.
  • Use R0125's and R0402's scripts and alarm rules, so the lanes differ only in the machine.
Done when
  • Both machines are pinned and named in the committed manifest.
  • The weekly run checks the low-end rows for cadence, frame time, stalls and launch, and fails on a violation.
  • Each result records rev, backend, device, battery state and date.
  • A pre-release run is recorded for each release.
How to check

The weekly lane. Replay a known-bad rev (for example one with a seeded per-frame cost of 4 ms) and confirm the lane fails on both machines.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 3 · priority P2 · size S
R0513Perf: no photodiode rig measures key-to-photon latency or checks Rune's own latency numbersP2Phase 3MT03
perf-photon-rig · infra
What happens

PLAN §8 asks for physical key-to-photon latency on the Mac with p95 at most 35 ms, compared against native AppKit on the same rig. No rig exists. Rune's own latency figures are software numbers: FrameEncoded::presents_at returns the refresh a frame was scheduled for, and the real present-time module is crate-private (#175). Even with real present times, the software figure leaves out the keyboard, USB polling and display scanout, and nothing independent checks it.

Where
Why it matters

Typing latency is what users compare most directly against native text fields. The targets: "key-to-photon p95 <= 35 ms on the Mac rig", "probe error < 0.5 ms", and "hardware capture (high-speed camera or photodiode) measures the offset per scenario class at least once per quarter, and the offsets are committed".

What would help
  • Build a rig for the reference Mac from R0125: a photodiode on the panel and a USB HID microcontroller that sends a key press and times the luminance change at the text field's glyph position.
  • Run a Rune text field scene and an NSTextView peer from R0241 in paired, alternating runs, the same keys and the same fixture.
  • Join each rig sample to the frame record from R0121 for the same key, and compute the offset between input-to-present and key-to-photon per scenario class.
  • Calibrate the rig with a known-latency LED pattern driven by the microcontroller, so the rig's own error is stated.
  • Run each quarter and before each release. Commit the offsets and both distributions.
Done when
  • Key-to-photon p95 is published per release for Rune and the AppKit peer, from the same rig.
  • Rune's key-to-photon p95 is at most 35 ms.
  • The frame record's input-to-present differs from the rig by a stable offset, within 1 ms per key.
  • Rig error against the LED pattern is under 0.5 ms.
  • Offsets per scenario class are committed each quarter.
How to check

The rig run before each release and each quarter, with the LED calibration first. A drift of the offset by more than 1 ms between runs fails and opens an issue, since it means the software latency numbers no longer match what reaches the screen.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 3 · priority P2 · size M
R0514Resize: no check captures what the compositor shows during a live resizeP2Phase 3LT03
perf-resize-oracle · infra
What happens

Live resize is where users see presentation bugs. On Windows the content trails a right or bottom edge and stretches, and a left or top drag shifts the whole page (#47). On the web the canvas is cleared a frame before the redraw, so resizing flickers (#104). A headless scene cannot see either, and present times alone cannot show what the compositor displayed.

macOS has one check, live_resize_check, which posts drag events to AppKit and asserts a frame is drawn for each size in the same Core Animation transaction. It is manual, macOS-only, and checks Rune's side, not the composed screen. No check exists on Windows, Linux or the web, so a fix to #47 or #104 can regress unseen.

Where
Why it matters

A stretched or blank frame during a drag is visible at once next to a native app. The targets: live resize shows "0 such frames on any edge on macOS, Windows, Linux and web, excluding artifacts the native peer shows under the same script", resize frame CPU "p95 <= 8.3 ms with 50 KB of text", and "the content follows the edge within 1 refresh, on 5 of 5 platforms".

What would help

One harness for every desktop and web lane:

  • Drag every edge and corner of a window and of an overlay at 1x, 2x and across a display scale change, at display rate.
  • The app draws a frame counter and its own size into marker pixels at each edge, so a capture tells app frames from compositor frames.
  • Capture the composed screen at display rate: ScreenCaptureKit on macOS, Windows.Graphics.Capture, PipeWire on Linux, and a CDP screencast on the web (not a canvas readback).
  • Classify each captured frame as correct, blank, stretched, shifted or stale-size against the window's size at that time, by content, not timing. Measure edge lag in refreshes.
  • Run the native peer from R0241 through the same script; exclude a fault the peer also shows.
  • Run on R0125, R0402, R0418 and R0414.
Done when
  • Each lane reports blank, stretched, shifted and stale-size counts and edge lag per edge.
  • macOS fails on any count above 0.
  • #47 and #104 each have a failing case that turns green with their fixes; Windows and the web then gate at 0.
  • Resize frame CPU p95 is at most 8.3 ms with 50 KB of wrapped text.
  • A seeded fault (one skipped resize frame) is caught on every lane.
How to check

The nightly reserved lanes. The seeded skipped-frame build runs after any change to the harness, to prove the capture still sees faults.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 3 · priority P2 · size L
R0515Windows and Linux: input-to-present latency and cadence have never been measured on real GPUsP2Phase 3MT03
platform-real-hardware-pacing · research
What happens

Windows and Linux present through AutoVsync with frame latency 2. On Windows a window also keeps presenting every refresh for 1 s after a change, so a variable-refresh display does not swing its rate on each hover. The decision to keep wgpu on DX12 and Vulkan rests on numbers from software drivers: Mesa lavapipe, and vkd3d over lavapipe under Wine. Nobody knows whether frame latency 1, DXGI's frame-latency waitable object, or Wayland's FIFO and presentation-time protocols would cut latency or hold 120-144 Hz on real GPUs.

The DX12 swapchain is reachable today. The pinned wgpu-hal 30.0.1 exposes dx12::Surface::swap_chain() and waitable_handle() through Surface::as_hal, wgpu-types 30.0.1 has Dx12BackendOptions::latency_waitable_object, and Rune already calls as_hal::<Dx12>() on Windows. So the experiments need no upstream change.

Where
Why it matters

Windows and Linux users on gaming monitors notice a frame of extra latency and an uneven cadence. The target: every platform holds 120 Hz in motion, "at least 99% one-period frames over at least 10,000 frames per scene", "input-to-present p95 at most 2 periods", on "120-144 Hz Windows PCs on NVIDIA, AMD and Intel" and "a 120 Hz Linux machine on Wayland and X11". Windows apps "behave like native Windows 11 apps on every DPI, GPU and input device".

What would help
  • Run the frame telemetry and the cadence scenes on NVIDIA, AMD and Intel machines under Windows 11 and Ubuntu (GNOME on Wayland and on X11), on R0402 and R0418.
  • Read real present times from R0396.
  • Record input-to-present p50 and p95, presents per refresh, missed presents and the 1 s hold's cost.
  • On Windows, try frame latency 1 and the waitable object through latency_waitable_object and waitable_handle(). On Wayland, try wp_fifo_manager_v1 and presentation-time.
  • Write research/39 with per-GPU, per-OS numbers and a decision. File follow-up issues for each recommended change.
Done when
  • A research note with per-GPU, per-OS numbers for all three vendors is committed.
  • It records a decision on Windows frame latency and the waitable swapchain, with numbers.
  • Follow-up issues are filed for each recommended change.
  • The measured numbers become baselines in the Windows and Linux lanes.
How to check

The note's runs are repeatable from a committed script on the reserved lanes; each number records rev, backend, GPU, driver and date. The lanes then gate on the baselines.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 3 · priority P2 · size M
R0516Render: no benchmark holds GPU frame time to a budget on reference hardware, including worst-case glass and a low-end GPUP2Phase 3MT03
render-gpu-reference-bench · perf
What happens

PLAN §8 sets CPU p95 at most 4 ms, GPU p95 at most 4 ms and under 0.1% missed presents for 1,000 spring-animated quads and for an effects scene, on a 120 Hz Mac and a ProMotion iPhone. No benchmark measures GPU time for these scenes, for a worst-case glass window, or on a low-end integrated GPU, and no numbers are committed. The device asks for TIMESTAMP_QUERY when the adapter has it, but windows do not record GPU time per frame outside tests. The committed benches report headless CPU time.

Where
Why it matters

GPU time is the part of a frame no CPU bench shows. On a laptop's integrated GPU it decides whether glass and blur hold 120 Hz. The targets: "GPU p99 <= 4 ms for 1,000 spring quads and the effects scene on the reference Mac and iPhone; <= 6 ms for worst-case glass on the reference Mac; <= 12 ms at 1440p for kit gallery scrolling on the UHD 620-class laptop", and "missed presents < 0.1% during scrolling and animation at 120 Hz".

What would help
  • Add --profile perf benches that read GPU time from R0129 and present times over 2,000 frames.
  • Scenes: 1,000 spring quads and the effects scene on the reference Mac (R0125) and iPhone (R0511); a worst-case glass scene (5K, 4 backdrop blurs, 3 faded layers) on the reference Mac; kit gallery scrolling at 1440p on the UHD 620-class laptop from R0512.
  • Run 5 paired, alternating runs per scene. Commit the median p99 GPU time, CPU p95 and missed presents in a research note that says what each number leaves out.
  • File an issue for each scene that misses, linked from the note.
  • Add the scenes to the count budgets so their CPU-side work is gated on every merge.
Done when
  • GPU p99 is at most 4 ms for 1,000 spring quads and the effects scene on the reference Mac and iPhone.
  • GPU p99 is at most 6 ms for worst-case glass on the reference Mac.
  • GPU p99 is at most 12 ms at 1440p for kit gallery scrolling on the UHD 620-class laptop.
  • Missed presents are under 0.1% in each scene.
  • The note and its numbers are committed, and the scenes are in the count budgets.
How to check

The benches rerun on the reserved lanes before each release and nightly where the lane runs them. No hosted runner gates on them. A seeded extra full-screen blur pass must push the glass scene over 6 ms on the Mac, to prove the bench sees GPU cost.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 3 · priority P2 · size M
R0517CI: no lane runs the renderer on a real NVIDIA, AMD or Intel GPUP2Phase 3LT03
render-lane-hardware-gpu · infra
What happens

No CI job uses a GPU. The planned hosted renderer lanes use software rasterizers: lavapipe, WARP and SwiftShader. Driver bugs, timeout-and-recovery behaviour and real precision differences show up only on hardware. #72 is an example: on an NVIDIA-driven GNOME, an XWayland overlay moved to the integrated GPU and panicked the app. It was found downstream, not by a Rune test.

Where
Why it matters

Users run Rune apps on NVIDIA, AMD and Intel GPUs; a driver-specific crash or wrong colour reaches them first. The targets: "11 of 11 lanes green on every verified rev, with 0 skipped GPU tests and the expected adapter in each manifest", canonical scenes "agree within 2/255 across backends and vendors (blur within 3/255)", and a lost GPU device or a GPU switch gives "0 panics and 0 unresponsive windows" with "a correct frame within 500 ms on native".

What would help

Self-hosted runners for three tuples:

  • Windows on an NVIDIA GPU (DX12).
  • Linux on an AMD or NVIDIA GPU (Vulkan).
  • Windows on an Intel or AMD integrated GPU (DX12), the same machine as the low-end lane.

Each runs the renderer tests from R0162 and R0168, fault injection, the cross-backend corpus from R0267, and the display-change check. They run on push to dev and on dispatch only, never on pull_request, under the isolation rules from R0050. Each run records a manifest with vendor, device, driver version and rev, and fails when the adapter is not the expected one.

Done when
  • Each of the 3 hardware lanes is green on a verified rev.
  • Canonical scenes agree with the oracle or lavapipe within 2/255 for ordinary paint and 3/255 for blur on every vendor.
  • 0 GPU tests are skipped, and every manifest names the expected adapter.
  • Fault injection shows 0 panics and a correct frame within 500 ms on each vendor.
  • No job is reachable from a pull_request event.
How to check

The lanes on every push to dev. A scratch-branch drill confirms a pull_request cannot reach the runners. Replaying the #72 case (an overlay re-shown on another adapter) on the NVIDIA Linux runner must pass.

Depends on
Part of
  • Theme: T03
  • Tracked in R0510
  • Phase 3 · priority P2 · size L
R0518Perf: the only instruction-count bench measures the CPU oracle, not Rune's frame, and has never runP2Phase 3MT03
tooling-product-instructions · infra
What happens

The only instruction-count bench, crates/rune-ref/benches/instructions.rs, renders rune_ref::generate::seeded(24, 5) with the reference renderer. That is the CPU oracle, not a Rune product frame. Its check script records a toolchain manifest and refuses a missing baseline, but research/24 records that no Linux worker was available, so it has never run and no instruction number is claimed. PLAN promises instruction-count gates on Linux. A rise in Rune's own frame cost (view build, layout, paint, encode) is not counted anywhere.

Where
Why it matters

Instruction counts are exact, so they catch a small algorithmic regression that wall-clock noise hides. The target: "Nightly product instruction counts flag a rise over 0.5%", next to exact count budgets on canonical scenes on every merge.

What would help
  • Add a gungraun bench over product headless frames in canonical CPU mode from R0273: the settings bench script, a Markdown session and a virtual_rows scroll.
  • Run it nightly on ubuntu, with the Rust toolchain, Valgrind version, gungraun runner and workload pinned in a manifest.
  • Build the baseline at the current verified rev from R0169 in the same job and on the same worker, so the two sides share a toolchain.
  • Flag a rise over 0.5% with the callgrind diff by function.
  • State in the report that counts cover CPU frame work only, not GPU execution or presentation, and that x86 counts predict regressions, not Apple silicon timing.
  • Keep the reference-renderer bench as is; it measures the oracle.
Done when
  • The bench runs nightly and posts instruction counts per scenario.
  • A missing or invalid baseline fails the job.
  • A seeded 1% regression files an issue with the function diff.
  • The manifest of toolchain, Valgrind and workload is stored with each result.
How to check

The scheduled ubuntu workflow. A seeded commit that adds about 1% of work to the settings frame must fail the next nightly run and file an issue naming the functions that grew.

Depends on
Part of
  • Theme: T03
  • Tracked in R0520
  • Phase 3 · priority P2 · size M
R0519Verification: rune-ref skips four instance kinds, blur and the sRGB blend, and no matrix says which reference covers which subsystemP1Phase 3XLT04
headless-verification-references · tracking
What happens

rune-ref is a strict-f32 CPU oracle. A differential test checks the production renderer against it on generated scenes. The oracle accepts kinds 0-4 and 8-12 only. Segments and triangles (5, 6), images (7) and backdrop blur (13) are rejected. It also rejects any isolated layer with a blur. The main generator emits kinds 0-4 only. Dashed borders (10) and radial gradients (11) have their own corpora.

The GPU differential renders into an sRGB target, so srgb_blend is off. App windows default to sRGB-encoded blending. So the blend mode almost every app uses is never checked against the oracle. The differential runs on whichever adapter Gpu::instance picks.

Outside the renderer, no committed table says which hard subsystem has a reference, which generator feeds it, or how many cases must run. Springs, the editor and streamed Markdown have hand-picked tests only. Nothing measures test strength, and rune-taffy's unsafe never runs under Miri.

This takes several issues: one per missing kind or mode, one for the guard that keeps the list complete, one each for the non-render references, and nightly jobs.

Where
Why it matters

The oracle is the renderer's main regression guard. A change to how strokes, images or blur draw, or to sRGB blending, lands without a failing test. Users see it as wrong edges, colour shifts or blur drift.

Targets: "14 of 14 kinds and 2 of 2 blend modes", the differential "at <= 2/255 per channel with 0 outlier pixels (blur: <= 3/255)", and "a new KIND_* constant with no oracle arm fails a test". Every hard subsystem has "an obviously correct reference that is differential-tested on generated inputs on every merge", with at least 256 cases for the layout, editor, spring and streamed-Markdown suites. Mutation scores and Miri run nightly.

What would help

Land the kind guard first. It turns the gap into a ratchet that only shrinks. Then close the kinds and blend mode, and add the backend tolerances. In parallel, build the oracle matrix and add the non-render references to it. Then add the nightly strength job. rune-fx and rune-light goldens are tracked separately.

Done when
  • Every child issue is closed.
  • The generator emits, and rune-ref validates and evaluates, all 14 kinds, with opacity and blur layer scopes and backdrop slots.
  • The differential passes in both blend modes on every backend lane: at most 2/255 with 0 outliers, and at most 3/255 for blur.
  • Every row in the oracle matrix runs on every merge with its stated case count.
How to check

scripts/check-reference.sh --gpu on each backend lane, the kind guard test in T1, the oracle-matrix check from R0270, and the nightly job from R0526.

Issues
Depends on
Part of
  • Theme: T04
  • Phase 3 · priority P1 · size XL
R0520Perf: frame cost has few counters and no scene has a count budget, so regressions are found by hand-run research passesP1Phase 3XLT04
tooling-budgets · tracking
What happens

PLAN.md promises that each scene's cost is "counted exactly; CI fails if a scene exceeds the 8.33 ms budget model", and zero cost at rest is checked by "counters over a 10 s idle sample". Today FrameStats counts four things: commits, layout nodes, glyphs and shaped runs. frame/profile.rs prints phase times as one rune-frame-profile line. A few tests assert zero allocations on hot paths, each with its own counting allocator.

No scene's counts are compared with a committed number. Nothing counts view runs, layout passes, pipeline creations or GPU bytes. No subsystem reports its memory. procwatch reads footprint and CPU on macOS only. No test asserts that a settled host does nothing for 10 s, and the one soak test is opt-in. So a regression in frame cost is found when someone runs a research pass by hand, often weeks after the commit that caused it.

This takes several issues: counters first, then a shared scene suite and a table of targets, then one budget per subsystem, then idle and soak checks.

Where
Why it matters

A frame that does twice the layout work still fits the budget on a fast Mac, so nobody notices until it misses refreshes on a slower machine or at 120 Hz. Exact counts catch it at the commit that causes it, on any runner, with no wall-clock noise.

Targets: "frame cost is gated by exact counts on canonical and worst-case scenes on every merge". That means "at least 12 scenarios with budgets", among them a 10k-row virtual_rows append and filter, a 200 KB text field and a 100k-token Markdown stream, and "a seeded regression in each counter family fails T1". Also: "0 frames, 0 GPU submissions and 0 self-wakes over 10 s of settled virtual idle" for every host kind, and retained overhead "grows less than 1% over the second half of a 100k-frame soak". "Count budgets required in T1 on every merge", with "100% of rows enforced or marked failing with an open issue".

What would help

Measure first: counters, one allocator and procwatch on every desktop OS. Then the canonical scenes and the budget matrix that maps each target to a scene, a probe and a check. Then the subsystem budgets, which each read the same scenes. Budgets gate on counts only on hosted runners, never on wall clock. A raise needs --allow-raise, a changelog fragment and a Raised: trailer.

Done when
  • Every child issue is closed.
  • scripts/verify budgets --report lists each counter, scene and host with its budget, and shows no missing cell.
  • A seeded regression in each counter family fails T1.
How to check

The budget tests run in T1 on every merge. The soak and product instruction counts run in the nightly lane. The report command shows coverage.

Issues
Depends on
Part of
  • Theme: T04
  • Phase 3 · priority P1 · size XL
R0521Tooling: no inspector protocol exists, so every agent question is a fresh process and a full tree dumpP2Phase 3XLT04
tooling-inspector · tracking
What happens

PLAN.md describes an inspector protocol: versioned JSON over a socket, with the CLI and a GUI as clients. It also says every pixel traces to file:line and bug reports are replays. The crate README says there is no inspector socket and "the CLI flags stand in".

So an agent asks a question by launching the app again with --snap and --tree. Each question pays process start, GPU init and app init. The answer is a pretty-printed dump of every element plus the whole accessibility tree. The only live control is --hot-control in hot builds: a polled file with five verbs. Trees carry no source locations. Nothing answers "why is this invisible", and nothing records a window's input for replay.

This takes several issues. A session protocol is the transport. Source locations, compact views and explain queries are what it returns. The recorder and --check close the loop. Redaction keeps recordings safe to publish.

Where
Why it matters

Agents build and debug Rune apps. Each relaunch costs seconds, and each full dump costs tokens, so a debugging loop of 20 questions is slow and expensive. Target: "Agents inspect, drive and replay a running UI through a versioned protocol, every node traces to source, and a bug report is a replay." A warm snap of Settings should return in "p95 at most 50 ms over 100 requests". The compact tree should be "at least 5x smaller in bytes than --tree on the kit gallery". At least 10 recorded replays should "match at every checkpoint in T1".

What would help

Build the session on the unified headless host, so every script event behaves the same in session and single-window runs. Add source locations and compact views. Then add explain queries, the recorder with its replay suite, and --check. Land redaction before any recorder writes a fixture. This is a tooling channel, not a render command channel. Release builds have no listener.

Done when
  • Every child issue is closed.
  • An end-to-end conformance test attaches to a debug build of Settings. It queries the tree, sends input, asks an explain query, records the session, and replays it to the same checkpoint hashes.
  • The README's inspector line describes the shipped protocol.
How to check

Protocol conformance tests and the replay suite run in T1. Warm-snap latency is measured in the reserved perf lane.

Issues
Depends on
Part of
  • Theme: T04
  • Phase 3 · priority P2 · size XL
R0522rune-ref: layer blur and backdrop blur (kind 13) have no oracleP2Phase 3LT04
render-ref-blur · feature
What happens

Rune has two blur algorithms, and both are checked only by Rune's own tests.

  • Layer blur is a separable Gaussian. Above sigma 3 it blurs at a reduced resolution, with a scale of sigma / 3 clamped to 1-8. It uses an area prefilter, and it takes the prefilter and reconstruction variance out of the kernel's sigma.
  • Backdrop blur (kind 13) is a dual-filter pyramid. Its sigma per level is a measured constant table. It crossfades between two levels by variance, and it snaps its origin to the level's texel grid, so the blur stays put while content scrolls.

rune-ref rejects any isolated layer with a blur and any kind-13 instance. So no independent code says these compute what they claim. A change in a shader, a table constant or a crossfade formula cannot be told apart from intent.

Where
Why it matters

Blur is behind every sheet, sidebar and glass surface. Drift shows as a halo that grows or shrinks, banding between levels during a sigma animation, or a shimmer while scrolling. Target: "The differential holds at <= 2/255 per channel with 0 outlier pixels (blur: <= 3/255, and the blur approximation within 4/255 of a true Gaussian for sigma 2-32)." The CPU oracle should cover "14 of 14 kinds".

What would help

There are two separate checks.

1. Implementation. Write both algorithms in rune-ref as plain scalar code: the same passes, reduced sizes, prefilter, kernels, SIGMAS table, crossfade and origin snap. The differential then checks that the GPU runs the algorithm. Half-float intermediates make exact equality impossible, so use 3/255. 2. Approximation. Compare each scalar implementation with a true Gaussian at sigma 2-32 on a step edge and a point source. Record the error per sigma, and document the bound and method in research/24. Commit the per-sigma errors as a ratchet.

Accept blurred layer scopes and kind 13 in rune-ref validation, and teach the generator to emit them. Remove kind 13 from the guard's allowlist from R0074.

Done when
  • The layer blur and backdrop blur differential passes at 3/255 or less per channel, with 0 outliers.
  • The error against a true Gaussian is 4/255 or less for every sigma from 2 to 32. If a sigma exceeds that, the same PR fixes it.
  • The test fails if any sigma's error grows by more than 1/255.
  • Kind 13 and blurred layers leave the allowlist.
  • research/24 documents the tolerance and method.
How to check

scripts/check-reference.sh --gpu on the backend lanes runs the differential. The Gaussian bound is a CPU-only test in T1.

Depends on
Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 3 · priority P2 · size L
R0523Replay: a window's input cannot be recorded, so a bug report cannot be a replayP2Phase 3MT04
tooling-input-recorder · feature
What happens

PLAN.md says sessions "record inputs and timing (KB, not video) and replay to identical pixels", checked by a "replay determinism test on every change". Today nothing writes a --script file from live input. Rewind records what a window presented, the rects and opacity of changed elements, but not what caused it. Ev::public maps the internal script events to the public ScriptEvent form, but nothing maps the other way, from a live window to a script.

So a bug report is a description and maybe a video. Someone must rebuild the steps by hand, and timing bugs often don't come back.

State is the hard part. App<S> only needs S: 'static, so app state cannot be serialized in general. Setup work, such as a network reply or a file read, delivers results at wall-clock times that a replay cannot reproduce by running it again.

Where
Why it matters

A replay turns "it glitched when I dragged fast" into a failing test that bisects. Target: "A window's input, initial state, seed and setup results record to the --script format, and at least 10 recorded replays match at every checkpoint in T1."

What would help

Add RUNE_RECORD=path in debug builds. It writes the window's input stream in the --script format: the inverse of Ev::public, with virtual times. Each file also records:

  • window identity and size, and the env envelope from R0266;
  • a replay provider instead of serialized state: the scene name, or the AppSpec init, plus the RNG seed;
  • results that setup work delivered, with their virtual times. Replay feeds these in place of running the work, through the managed setup path from R0287. No Serialize or Send bound is added to app state;
  • a tree hash per frame as checkpoints.

Replay runs on the unified host from R0165. A strict script parse from R0288 rejects a file it cannot replay exactly. The writer passes every event through R0077 first. Secure-field text and its length are never written, and paths and tokens are replaced.

Add tests/replays/. Each case replays headless and asserts checkpoint hashes, and a failure reports the first mismatching frame.

Done when
  • A recorded session of Settings replays headless to the same hash at every checkpoint.
  • Every ScriptEvent kind round-trips through record and replay.
  • At least 10 replays in tests/replays/ run in T1, each from a scene name or AppSpec init plus recorded results.
  • A recording of a secure field holds no typed text or length.
  • The bug-report issue template asks for a recording.
How to check

The T1 replay suite, plus a round-trip test per ScriptEvent kind, and the redaction check on committed fixtures.

Depends on
Part of
  • Theme: T04
  • Tracked in R0521
  • Phase 3 · priority P2 · size M
R0524Tooling: no persistent session lets an agent load a scene, send input, step the clock and query the tree without relaunchingP2Phase 3LT04
tooling-session-protocol · feature
What happens

The only live control is --hot-control in hot builds. It is a JSON file that the hot runner reads every 16 ms. It has five verbs: tap, scroll, pause, step and quit. A request has an id, but a failed tap only prints to stderr. Each change writes a PNG and a tree next to it. Ordinary builds have no live control, and a running native window cannot be inspected at all.

Without hot builds, an agent relaunches the app for each question with --script, --snap and --tree. Each launch pays process start, GPU init and app init.

Where
Why it matters

An agent that debugs a screen asks many small questions. With a session, each answer costs one frame, not a launch. Target: "A versioned session (stdio, plus opt-in token-guarded loopback in debug builds that also attaches to a running native window) supports hello, load, input (every ScriptEvent), step, pause, snap, tree, query, explain and trace, each with request ids, typed errors and a behavioural test. A warm snap of Settings returns a complete artifact with p95 at most 50 ms over 100 requests."

What would help

Add --session: JSON lines over stdin and stdout, on the host from R0165, so input behaves as it does in single-window runs.

  • A versioned schema, published as JSON Schema. hello returns the protocol version, build id and capabilities.
  • Each request has an id, and each reply names it.
  • Verbs: hello, load (a scene or app state, with reset rules stated), input (any ScriptEvent, parsed by the strict parser from R0288), step dt, pause, snap (replies after the artifact is fully written), tree, query, explain, trace start and stop, quit.
  • A failed request returns a typed error, and the session stays usable.
  • Node ids are scoped to a generation. A stale id returns StaleNode.
  • A loopback transport compiled only into debug builds and enabled by a flag. It has a per-launch token and also attaches to a running native window. Release builds contain no listener.
  • Replace --hot-control with the same protocol over the hot runner.
Done when
  • A JSON Schema covers every message, and T1 has a behavioural test per verb and per ScriptEvent kind.
  • A stale node id, a bad token and a malformed request each return a typed error, and the next request succeeds.
  • A warm snap of Settings returns a complete artifact with p95 at most 50 ms over 100 requests on the reference Mac.
  • A debug native window accepts a loopback session. A test shows release builds contain no listener.
  • --hot-control is removed or maps onto the session.
How to check

Conformance tests run in T1. Latency is measured in the reserved perf lane with --profile perf.

Depends on
Part of
  • Theme: T04
  • Tracked in R0521
  • Phase 3 · priority P2 · size L
R0525Tree: --tree is a pretty-printed dump with the full a11y tree and no compact, queryable or marked viewP2Phase 3MT04
tooling-agent-tree-views · feature
What happens

--tree writes tree_json with serde_json::to_string_pretty. It holds one object per element with 12 fixed fields: path, role, rect, opacity, scale, blur, focus flags, inert, loop phase and fill. Many elements are layout wrappers with no role or name. After the elements, it appends the whole accessibility tree as a second dump. There is no way to ask for "buttons whose text contains Stop", no view of what changed since a frame, and no screenshot whose marks match tree ids.

An agent pays for every byte as tokens. On a large screen most of those bytes are default values and structure it does not need.

Where
Why it matters

Agents read trees to find a control, check a label or confirm a layout. A smaller, queryable tree makes each check cheaper and faster, and marks let a vision model and the tree agree on which box is which. Target: "The compact tree keeps role, name, value, state, rect, key and src for every semantic node and is at least 5x smaller in bytes than --tree on the kit gallery." Tooling docs should stay true, with "100% of flags and events in a generated reference".

What would help
  • --tree-format compact: one line per semantic node, with indentation for depth. Fields are role, name, value, state, rect, key and src from R0291. Default fields are dropped. Ids are stable and derived from keys and paths, so they survive a rebuild. Keep --tree as is for tools that read it.
  • --tree-query 'role=button text~Stop': returns matching nodes in compact form.
  • A session tree reply with since: <frame>, which returns only nodes added, removed or changed. It comes from R0524.
  • --snap --marks: draws numbered boxes on the PNG at each semantic node's rect, labelled with its compact id.
  • Each reply reports its byte count and an estimated token count.

Add the new flags to the flag table, so the generated reference lists them.

Done when
  • A round-trip test shows the compact tree keeps role, name, value, state, rect, key and src for every semantic node.
  • The compact tree of the kit gallery is at least 5x smaller in bytes than --tree.
  • Query and diff tests on 5 scenes return the expected node sets.
  • Compact ids are the same across two rebuilds of an unchanged scene.
  • Each mark's box matches its node's rect within 1 px.
How to check

T1 tests over the kit gallery and four other scenes compare byte counts, query results and mark positions. The generated flag reference check keeps the docs current.

Depends on
Part of
  • Theme: T04
  • Tracked in R0521
  • Phase 3 · priority P2 · size M
R0526Verification: nothing measures whether tests pin behaviour down, and rune-taffy's unsafe never runs under MiriP3Phase 3MT04
tooling-nightly-strength · infra
What happens

Rune has many tests, and the same authors who write the code write most of them. Nothing measures whether those tests would fail if the code were wrong. Line coverage does not answer that. Mutation testing does: it changes the code and checks that a test fails.

PLAN.md lists Miri on every PR as an exact CI gate. Miri, cargo-mutants, loom and shuttle appear nowhere in the repo or its workflows. The only workflows deploy the site.

rune-taffy has unsafe code that Miri would check. It uses transmute to pack and unpack style lengths, and get_unchecked to index slots and children.

Where
Why it matters

A test suite that passes on a mutated spring, layout or editor gives false trust. Rune's goal depends on springs, layout and text editing being exactly right. Undefined behaviour in layout is the kind of bug that shows up only on one platform or optimisation level. Target: "Mutation score per crate in rune-motion, rune-taffy and the editor tracked nightly with a floor that only goes up; an incomplete run fails. Miri green nightly on rune-taffy."

What would help

Add a scheduled nightly workflow with pinned tool versions.

  • Miri on rune-taffy's tests. rune-motion has no unsafe of its own, so a Miri run there is optional. Do not run Miri on crates with heavy FFI.
  • cargo-mutants on a committed scope: rune-motion, rune-taffy, the editor (crates/rune/src/edit) and commit apply (crates/rune/src/runtime/commit/apply.rs). List exclusions with reasons, and record known equivalent mutants.
  • Report the score per crate as caught over viable mutants. Each crate has a floor in a committed file that only goes up.
  • The run fails, and files an issue, when a score drops below its floor, a run times out or crashes, or fewer mutants run than the scope lists.
  • Keep it advisory for the first month while floors settle, then make a drop fail.
  • Don't add loom or shuttle until a real cross-thread handoff exists.
Done when
  • The nightly runs and posts a mutation score for each crate in scope.
  • A score below its floor, or an incomplete run, files an issue.
  • Miri is green on rune-taffy.
  • Tool versions and the mutation scope are committed.
How to check

The scheduled workflow from this issue, on the CI base from R0030. R0270 lists the scores and the Miri status next to each matrix row.

Depends on
Part of
  • Theme: T04
  • Tracked in R0519
  • Phase 3 · priority P3 · size M
R0527Tooling: apps have no single check command that runs the layout lint, motion gate, app-audit and golden diffs and prints one resultP3Phase 3MT04
tooling-rune-check · feature
What happens

To check a change, an agent runs several tools by hand: --snap and --tree for each scene, the motion audit gate on a trace, and scripts/app-audit over the source. Each prints its own format. app-audit reads source patterns only, and its header says "Heuristics only". None of them knows which line of the app a finding comes from. Nothing combines their results, so an agent can skip one, or read a pass from one as a pass from all.

Where
Why it matters

After each edit, an agent needs one answer: is this change clean? One command with one structured result makes that cheap and hard to get wrong. Targets: the inner loop is fast, with "one local verify command", and "100% of documented headless commands in the crate README and examples/README have a fixture that runs in T1". Findings trace to source, with "100% of keyed nodes and handlers" carrying file:line.

What would help

This issue only orchestrates. The runtime layout lint itself (overflow, clipping, covered or small controls, overlaps) comes from R0334.

Add --check to every app binary, and scripts/verify app <crate> as a wrapper. It:

1. renders every scene in canonical mode in light and dark, at two window sizes; 2. runs the layout lint from R0334 on each laid-out tree; 3. runs the motion gate on each scene's script, through the Rust tests from R0166; 4. runs app-audit on the app's source; 5. diffs trees and rects against the stored goldens from R0274; 6. prints one JSON result: a status, a count per check, and each finding with its check, scene, theme, size and src from R0291.

Exit non-zero on any finding. Each sub-check keeps its own command, and --check adds no rules of its own. Ship only checks with a 0-finding baseline on the kit gallery, so agents don't learn to ignore the output.

Done when
  • --check on kit-gallery prints a JSON result with 0 findings, and the result validates against a committed schema.
  • A seeded overflow in a fixture app gives a layout-lint finding that names the node's file:line.
  • A seeded motion finding and a seeded golden diff each appear in the result and fail the run.
  • T1 runs --check on every example.
  • The crate README documents --check, and a T1 fixture runs that example.
How to check

T1 runs --check on every example and on seeded-failure fixtures, one per sub-check.

Depends on
Part of
  • Theme: T04
  • Tracked in R0521
  • Phase 3 · priority P3 · size M
R0528Tree: an agent cannot ask why a node is invisible, unclickable or clippedP3Phase 3MT04
tooling-tree-explain · feature
What happens

The questions agents ask most are about causes: why a node is invisible, why a press doesn't reach it, what clips it, and which constraint set its width. Today the tree reports results only. It gives a node's rect, its own opacity, inert and focus flags. It does not give the ancestor whose opacity is 0, the clipping ancestor, the node that covers it at the hit point, or the constraint behind its size. The trace's why field lists only which animation sources keep a frame running.

So an agent answers each question by reading the view code and guessing. Often it then makes an edit that doesn't address the cause.

Where
Why it matters

An explain answer turns a guessing loop into one query and one edit. Target: a versioned session supports "hello, load, input (every ScriptEvent), step, pause, snap, tree, query, explain and trace, each with request ids, typed errors and a behavioural test", and every node traces to source.

What would help

Add a session query explain from R0524, with four kinds, each answered from runtime state:

  • visibility: the effective opacity chain from the node to the root, with the first ancestor that sets it to 0. Also off-screen, clip-empty, exiting or hidden reasons.
  • hit: at the node's centre or a given point, the node that receives the press and why. Reasons include a covering node, an inert ancestor, a missing handler, or a point outside the hit rect.
  • clip: the ancestor whose clip removes part of the node, and how much it removes in points.
  • size: the constraint the node received, the ancestor that set it, and the node's own sizing rule.

Each answer also gives the last commit that rebuilt the node, where the runtime records one. Answers name nodes by compact id and by src from R0291. When runtime state cannot establish a cause, the answer is unknown and lists what is missing. It never guesses.

Record only what is cheap. The size chain may need a debug-only record in layout, which release builds leave out.

Done when
  • Each explain kind has tests on purpose-built scenes with exact expected answers. The scenes include a zero-opacity ancestor, a covering overlay, an inert parent, a clipping scroll and a fixed-width parent.
  • A scene where the cause is not recorded returns unknown with the missing fact.
  • Answers name nodes by compact id and src.
  • Release builds carry no extra layout records.
How to check

T1 tests over the purpose-built scenes, run through the session protocol.

Depends on
Part of
  • Theme: T04
  • Tracked in R0521
  • Phase 3 · priority P3 · size M
R0529Failure model: Rune has no shared outcome or report path for panics, surface and device loss, and rendering errorsP1Phase 3XLT05
arch-failure-model · tracking
What happens

Each crash that was seen got a local fix, so Rune has no shared answer to the question of what happens when something fails. Some paths already return typed errors: image decode, and an overlay surface that refuses its configure. Elsewhere:

  • How a panic ends a shipped app depends on the platform and on which callback was running. 19 catch_unwind sites in non-test code each choose their own outcome, and an extern "C" callback without one aborts.
  • A refused window configure is not checked, and the next acquire panics.
  • A lost GPU device is handled nowhere. Native Metal's device-lost, uncaptured-error and error-scope hooks are no-ops.
  • Diagnostics are about 94 eprintln! calls that a Finder launch, a Windows GUI build and a wasm page never show. log is only a dev-dependency.

This tracker covers the written policy, the report path, and each failure class's boundary and injection test. It takes many issues because each class has its own boundary in each host.

Where
Why it matters

The target is one failure model. Each class has a defined outcome, one report path, bounded recovery or a finite terminal outcome, and an injection test, the same on macOS, Windows, Linux, web and LayerHost:

  • app panics tear down the surface and are never resumed mid-commit;
  • a failed Latest job wakes and reports failed();
  • a failed allocation skips the resource and reports it;
  • a refused or Lost surface recovers within 500 ms, or ends in one terminal report after 5 attempts;
  • device loss redraws every surface within 2 s where the platform can replace the device, and otherwise ends in a terminal report within 10 s;
  • a web panic shows the error overlay and stops all callbacks.

The related targets add a correct frame within 500 ms native and 1,000 ms web after a device loss, no surface call or GPU wait blocking main for more than one refresh, and no rendering path that degrades silently.

What would help

Write the policy on the failure-model docs page, one outcome per class, and land one boundary per class with an injection test. Resuming mid-commit is ruled out: commit moves nodes out and restores them through explicit paths, so a caught panic tears the surface down instead. The cheap floor comes first: R0081, R0087, R0088, R0091 and R0082. R0530 tracks device-loss recovery.

Done when
  • Every class above has its documented outcome, one report path and a passing injection test, run in a child process, on macOS, Windows, Linux, web and LayerHost.
  • 0 unguarded boundary inventory entries, 0 allocation expect in native Metal, and 0 production eprintln! outside diag! and the tooling writer.
  • panic = "abort" builds are documented as uncatchable and print a launch diagnostic.
  • Device loss recovers on all 9 configurations, including the iOS LayerHost and Safari WebGPU ones.
How to check

R0298 runs every class on every platform lane. Count checks in scripts/ keep the eprintln!, inventory and expect ceilings at 0.

Issues
Part of
  • Theme: T05
  • Phase 3 · priority P1 · size XL
R0530Render: nothing recovers from a lost GPU device on any backendP1Phase 3XLT05
render-device-loss · tracking
What happens

No code path handles a lost GPU device. wgpu devices register no device-lost callback or uncaptured-error handler. Rune's Metal backend implements both hooks as no-ops. The window's acquire folds Lost into Outdated, and the web shell destroys its device only at teardown. What a real loss does has not been tested on any backend. The likely results are a window frozen on its last frame, since wgpu keeps device loss out of the uncaptured-error sink, or a panic in wgpu's default uncaptured-error handler.

Apps that stay open all day meet Windows TDRs, GPU switches, eGPU unplugs, driver updates and iOS backgrounding. Recovery needs detection on each backend, one recreate step in each host, compositors that rebuild their own resources, and lanes that can inject a loss. That is why it takes several issues.

Where
Why it matters

The target: a lost GPU device or a GPU switch never ends the app or leaves it unresponsive. That means 0 panics and 0 unresponsive windows on 9 of 9 configurations; a correct frame, within 2/255 per channel of the pre-loss golden, within 500 ms native and 1,000 ms web; teardown of at most 100 ms on the UI thread; state, scroll offsets and focus unchanged, and on_gpu_reset fired once; 3 losses in a row recover; logical GPU bytes within 5% of before. After 5 failed recoveries in 10 s, the host reports a typed GPU-unavailable diagnostic, stops retrying, keeps handling input, and tries again on the next display, visibility or size change. The frame-loop target adds no main-thread wait over one refresh. On Windows, recovery takes under 1 s with no restart on real hardware.

What would help

Land R0087 first so each step is testable. Then the children: handlers, the shared recover step that uploads atlases again and rebuilds compositors, Metal command-buffer status, compositor device keys, web device loss and LayerHost activation. Recovery lives in the shared host frame core once it exists. Until then each host calls one function.

The 9 configurations are native and wgpu Metal on macOS, the same two on iOS through LayerHost, DX12, Vulkan, WebGPU in Chromium and in Safari, and WebGL2. The six without iOS or Safari come first. The two iOS LayerHost configurations and Safari WebGPU follow once their lanes run.

Done when
  • With RUNE_GPU_FAULT=lost, a window, an overlay and a LayerHost each redraw within 2/255 of the pre-loss golden, within 500 ms native and 1,000 ms web, on all 9 configurations.
  • State, scroll offsets and focus are unchanged, and on_gpu_reset fires once per loss.
  • 3 losses in a row recover with 0 panics.
  • After 5 failed recoveries in 10 s, the host reports a typed GPU-unavailable diagnostic, stops retrying, keeps handling input, and tries again on the next display, visibility or size change.
How to check

Fault-injection tests in each backend's CI lane, plus a lavapipe test in the unit suite that drives recovery with Device::destroy.

Issues
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 3 · priority P1 · size XL
R0531iOS: LayerHost cannot be told the app is inactive, so it may submit GPU work in the background and miss the redraw on returnP2Phase 3ST05
render-ios-layerhost-gpu · bug
What happens

LayerHost is how iOS apps embed Rune today. The app owns the CAMetalLayer, drives frames from its own CADisplayLink, and calls frame(). The host knows only one reason to stop: a zero-sized viewport passed to resize sets suspended. It has no way to be told that the app went inactive. Whether it submits GPU work in the background therefore depends on the embedding app to stop calling frame() in time.

iOS refuses command buffers from a background app, and the refusal shows up as a GPU error and a lost or stale drawable. On return nothing asks for a redraw, so the view can show its last frame until something else changes.

Two related faults are fixed in R0091: the shared GPU is cached in a OnceLock for the life of the process, and a Lost surface reconfigures on every tick while it reports animating: true. This issue adds activation and proves those fixes on iOS.

Where
Why it matters

The device-loss target counts native and wgpu Metal on iOS through LayerHost among its 9 configurations: 0 panics, 0 unresponsive windows, a correct frame within 500 ms, and state, scroll and focus unchanged. The surface target: a recreated surface draws within 2 frames of a restoration event (resize, occlusion end, display change, visibility), and no acquire result ends the app. An iOS user who switches away and back expects the view to be current at once, with no stale frame.

What would help

Add LayerHost::set_active(bool), for the app to call from its scene-phase or UIApplication notifications. While inactive, frame() acquires nothing, submits nothing and reports animating: false. On set_active(true) the host marks the frame dirty and reconfigures the surface if it was lost, and the next frame() draws. Document the call on LayerHost next to resize, with a short Swift example.

Done when
  • A simulator test backgrounds and foregrounds 10 times and draws correctly after each, with no GPU error logged and no submission while inactive.
  • The view draws within 2 frames of set_active(true).
  • A forced first GPU init failure draws on the second host, using the retry from R0091.
  • One physical-device run is recorded in the PR.
How to check

Tests in the iOS simulator lane from R0244. A test hook counts submissions while the host is inactive.

Depends on
Part of
  • Theme: T05
  • Tracked in R0530
  • Phase 3 · priority P2 · size S
R0532Metal: in debug builds the native backend validates nothing that wgpu would reportP2Phase 3MT05
render-metal-validation · feature
What happens

Rune's own Metal backend is the macOS default, and it validates nothing. push_error_scope returns 0, and pop_error_scope always resolves to None. So window::configure's error capture, and any misuse a compositor makes, report no error. A bind group that doesn't match its pipeline layout, a buffer slice out of range, or a texture used without the usage it needs would be a validation error in wgpu. On this backend it becomes Metal-level misbehaviour: wrong pixels, a GPU fault, or a panic deeper in the backend. A compositor author who develops on a Mac sees bugs that only get a clear message after switching to RUNE_GPU_BACKEND=wgpu.

Unsupported features panic by name through unsupported!, and allocation failures use expect. Returning errors for those in every build is R0293. This issue adds debug-build validation on top.

Where
Why it matters

The rendering target: in debug builds the native backend returns an error of the same class as wgpu for each listed validation class, and no rendering path degrades silently. Compositor authors on the default backend need the messages wgpu gives, or every custom shader pass is debugged blind.

What would help

Add compact checks behind cfg(debug_assertions):

  • bind group entries against the pipeline's bind group layout: count, binding type and visibility;
  • buffer bindings and vertex and index slices against the buffer's size;
  • texture and view usage against the operation (render attachment, sampled, storage, copy), and format compatibility;
  • colour attachment count and formats against the pipeline.

Make error scopes real in debug builds: keep a stack of filters on the device, push each error to the innermost matching scope, and send unmatched errors to the uncaptured-error handler. Map each check to wgpu's Validation class. Keep the checks in one module, so they can count as debug-only code against research/34's line budget, and leave release builds unchanged.

Done when
  • Misuse tests (wrong bind group layout, out-of-range buffer slice, missing texture usage, unsupported format, wrong attachment count) get an error from pop_error_scope of wgpu's class, in debug builds.
  • An unmatched error reaches the uncaptured-error handler in debug builds.
  • Release instruction counts in metal_dispatch are unchanged.
  • crates/rune/src/gpu/metal/ stays under 3,500 non-test lines, with the debug module counted as the docs state.
How to check

Native backend tests in the macOS lane from R0161, which runs both Metal backends. The metal_dispatch example, in the perf profile, compares instruction counts against the base revision.

Depends on
Part of
  • Theme: T05
  • Tracked in R0529
  • Phase 3 · priority P2 · size M
R0533Runtime: one 255-field struct holds every subsystem's state and is generic over the app's state typeP1Phase 3XLT06
arch-runtime-core-split · tracking
What happens

Runtime<S> has 251 fields: 28 pub, 40 pub(crate) and the rest private. runtime.rs pulls in its modules with 110 #[path] lines. 93 non-test files implement impl<S> Runtime<S>, though only 15 of them read a field whose type mentions S.

Hover, press, capture, focus, IME, clipboard, drag-out, motion side tables, paint scratch and host requests are flat field families. Any module can write any other family's state. frame_step is one function of about 265 lines whose statement order carries correctness. runtime.rs is a frequent edit-collision point. Every app state type also gets its own copy of the generic code, which costs compile time.

The goal is Runtime<S> as { pub state, app: AppHooks<S>, core: Core }. Core is non-generic and made of owned subsystems (Pointer, Focus/TextInput, drag-out and clipboard, Motion, Paint/Reports, Tree) with private fields. It takes several issues because each field family is its own PR, behind accessors, ratchet ceilings, the compile-cost baseline and the merge gate, so the moves don't collide with ongoing work or reorder frame phases.

Where
Why it matters

The target: the runtime core is non-generic and split into subsystems whose state is private to their modules. Runtime<S> has at most 8 fields, pub state: S and the rest private, and at most 15 non-test files hold impl<S> Runtime<S>. An app pays for the runtime once, not once per state type: a second state type adds at most 5% to rune-owned LLVM lines, and an incremental rebuild after a view edit takes at most 1.2 s, the target research/04-language-gpu-renderer.md:39 sets. Subsystem-owned dense index lists also let per-frame bookkeeping scale with feature nodes, not the whole tree.

What would help

Move one field family per PR in the order the children give. Add accessors before deprecating any pub field. Don't reorder frame phases while moving fields. Finish with the non-generic pass and the privacy pass. Keep public methods as forwards.

Done when
  • All children are closed.
  • Runtime<S> has at most 8 fields, 0 pub(crate) fields and 1 pub field, and at most 15 non-test files hold impl<S> Runtime<S>; the ratchet holds these ceilings.
  • A second state type adds at most 5% to rune-owned LLVM lines.
  • The incremental rebuild meets 1.2 s, or R0705 is opened with the measured numbers.
  • The API snapshot shows only deprecations announced in the changelog.
How to check

The arch ratchet and the compile-cost script in the merge gate. The rebuild trend on the macOS lane.

Issues
Depends on
Part of
  • Theme: T06
  • Phase 3 · priority P1 · size XL
R0534Runtime: 93 files are generic over the app's state type, though 66 of them never touch itP2Phase 3LT06
arch-app-part-nongeneric · refactor
What happens

93 non-test files in crates/rune hold impl<S> Runtime<S>. Only 15 read a field whose type mentions S: state, view, poll, on_key, on_focus, app_ime or playground. 12 more reach S only through the states! macro, which hands handlers the state as &mut dyn Any. The other 66 files never touch S, but carry the type parameter anyway.

Rust compiles a generic impl once per type it is used with. An app with several state types, such as a main window, a settings window and an overlay, compiles and links those 66 files' code once per type. Every incremental rebuild after a view edit pays for that too. Nothing measures the cost today; R0094 adds the measurement.

Where
Why it matters

The target: an app pays for Rune's runtime once, not once per state type, and an incremental rebuild after a view edit stays interactive. A second state type adds at most 5% to rune-owned LLVM lines, and the rebuild takes at most 1.2 s. The structure target: at most 15 non-test files hold impl<S> Runtime<S>. App developers and hot-patching both feel rebuild time on every edit.

What would help

After the field families move into Core, put the S-typed parts behind an object-safe AppHooks<S>: view, poll, the app's key, focus and IME hooks, and the playground. Core calls them through a trait object.

  • Runtime.state stays a public field, and no public method signature changes.
  • Core never holds &mut S while it calls a hook. A hook that needs the core gets &mut Core as an argument, so it cannot re-enter Runtime.
  • Handler dispatch keeps passing &mut dyn Any, which Core can do without knowing S.
  • Then a mechanical pass turns every block that does not touch S into impl Core. Runtime<S> keeps its public methods as forwards.

The trait object adds one dynamic call per view, poll and hook, a few per frame. Measure that it is noise.

Done when
  • At most 15 non-test files contain impl<S> Runtime<S>, held by the arch ratchet.
  • The compile-cost script shows a second state type adds at most 5% to rune-owned LLVM lines.
  • Runtime.state is still public, and the API snapshot shows no public signature change.
  • A test shows a hook that calls back into the core sees consistent state.
  • A --profile perf run shows no measurable frame-time change from the dynamic calls.
How to check

The ratchet's generic-file ceiling and the compile-cost script in the merge gate, plus the API snapshot. Results go on #124.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 3 · priority P2 · size L
R0535Runtime: nothing removes the deprecated pub fields after their window, or checks outside consumers firstP2Phase 3ST06
arch-runtime-pub-field-removal · refactor
What happens

Runtime<S> has 28 pub fields. Code outside crates/rune reads several of them: at this commit, kit, themes, examples and the other workspace crates read rt.instances 30 times, rt.text 19 times, rt.stats 16 times and rt.copy_request 8 times. Apps outside the workspace read them too, and pin dev revs.

R0177 adds an accessor for each field and deprecates the field. The field families then move into subsystems behind those accessors. No issue removes the deprecated fields afterwards, and nothing checks that outside consumers have moved to accessors before the fields go. Without a removal step, the deprecated fields stay, keep the old layout reachable, and block the privacy and field-count targets.

Where
  • crates/rune/src/runtime.rs:366-801: the 28 pub fields, among the struct's 251.
  • Outside reads at this commit: rt.instances 30, rt.text 19, rt.stats 16, rt.copy_request 8, across crates/rune-kit, themes/, examples/ and other workspace crates.
  • AGENTS.md: apps pin dev revs, so a removal breaks their builds on the next pin bump.
Why it matters

The structure target: Runtime<S> has at most 8 fields, with pub state: S the only public one. The API target: a public break can't reach dev unannounced, and apps get time to migrate. A renamed or removed stable item keeps a #[deprecated] alias for at least one fold and 30 days, every major change ships a **Breaking:** fragment naming the replacement, and a flagship fixture app and a frozen legacy app build in the merge gate and the platform lanes.

What would help

Remove the deprecated fields in one PR, once:

1. The accessors from R0177 have shipped for at least one changelog fold and 30 days. 2. No in-repo code reads a deprecated field. 3. The consumer canary from R0043 and the frozen legacy app build on accessors alone.

Then make each field private or move it into its subsystem. Add a **Breaking:** changelog fragment that maps each removed field to its accessor. Lower the ratchet's pub field ceiling to 1.

This issue waits on the motion, focus/IME, drag-out/clipboard and paint family moves, so each field is removed from its final home.

Done when
  • Runtime<S> has pub state and no other pub field, and the ratchet reads 1.
  • The consumer canary and the frozen legacy app build at the removal commit.
  • The **Breaking:** fragment lists every removed field and its accessor.
  • The removal lands at least one fold and 30 days after the accessors.
How to check

The arch ratchet and API semver check in the merge gate, and the canary and legacy-app builds in the merge gate and platform lanes.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 3 · priority P2 · size S
R0536Runtime: 40 pub(crate) fields let any module write any subsystem's stateP2Phase 3MT06
arch-subsystem-privacy · refactor
What happens

Besides its 28 pub fields, Runtime<S> has 40 pub(crate) fields. Any module in the crate can write them, so a feature can change another feature's state without going through the code that keeps its invariants.

Moving fields into subsystem structs does not fix this on its own. The subsystem structs in runtime/ today mostly expose their fields as pub(super) or pub(crate), so moved state stays writable from outside its owner. TimerWake is one of the few with private fields and methods.

Where
Why it matters

The target: the runtime core is split into subsystems whose state is private to their modules. 0 non-private fields on state-owning subsystem structs, with immutable transfer records listed in ARCHITECTURE.md, and each subsystem has a passing compile_fail doctest. Runtime<S> has at most 8 fields, with only state public. Contributors notice the gain as fewer edit collisions and fewer bugs where one feature quietly resets another's state.

What would help
  • As each family moves (Tree, Pointer, Focus/IME, drag-out/clipboard, Motion, Paint/Reports), make its subsystem's fields private to the subsystem module and give other modules methods.
  • Where a pass needs disjoint borrows of several subsystems, follow the Measurement and Measured pattern: a borrow-split struct built by the owner, not open fields.
  • Immutable transfer records such as Measured may keep visible fields. List each in ARCHITECTURE.md with the reason.
  • Add one compile_fail doctest per subsystem showing another module cannot write its fields.
  • A final pass removes the remaining pub(crate) fields from Runtime. This pass runs after R0535, so the last public fields are gone first.
Done when
  • 0 pub(crate) fields on Runtime<S>.
  • 0 pub, pub(crate), pub(super) or pub(in ...) fields on state-owning subsystem structs.
  • Every transfer record with visible fields is listed in ARCHITECTURE.md.
  • A compile_fail doctest per subsystem passes.
  • The ceilings are in the arch ratchet's list.
How to check

The arch ratchet and the doctests in the merge gate.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 3 · priority P2 · size M
R0537Memory: Rune ignores the system's memory-pressure signals, so caches and GPU pools stay full under pressureP2Phase 3LT06
perf-memory-pressure · feature
What happens

Rune's caches shrink only by their own budgets and by frame age:

  • Text layouts drop what the last two commits did not use, once that passes 3 MiB.
  • Retained layer textures drop the oldest only when a new one needs room in the cache budget.
  • The backdrop-blur pyramid grows to the largest backdrop it has blurred and stays that size.
  • Kit's highlight and Markdown caches keep up to their own budgets.

Nothing in crates/ listens for macOS memory pressure, iOS memory warnings, Windows low-memory notifications or Linux pressure stall information. On iOS, an app over its limit is killed. On a desktop under pressure, the system compresses or swaps the app's memory and frames stall when it is touched again.

Rune already has release paths that a pressure response can call: overlays can release their GPU surface when hidden, and an app can release its device when its window closes.

Where
Why it matters

The target: memory is bounded, attributed, stable, and given back at rest and under pressure. Mac hello at or below 30 MiB footprint, iPhone at or below 40 MiB. After a pressure warning, reclaimable bytes are at baseline within 1 s, with no frame over 8.3 ms then or on next use. iOS users see a killed app as a crash.

What would help
  • One process-wide pressure source per platform: the dispatch memory-pressure source on macOS, the UIApplication memory warning through the iOS embedder, CreateMemoryResourceNotification on Windows, and PSI on Linux where the kernel provides it.
  • On a warning: drop stale text layouts, trim component stores from R0174, free transient GPU pools (blur pyramids, unused layer targets) and unshown atlas pages.
  • On critical: also release hidden surfaces' renderers through the existing release path.
  • Trim off the frame path, in steps small enough that no frame passes 8.3 ms.
  • Give apps a builder-method hook to drop their own caches. AppSpec is built as a literal, so no new pub field.
  • Report each trim and the bytes freed in dev_stats, using the gauges from R0284.
Done when
  • A real or simulated pressure notification on macOS, Windows, Linux and iOS reaches the trim while the app is idle (integration test per platform).
  • Reclaimable bytes reach baseline within 1 s of the warning.
  • No frame passes 8.3 ms during the trim or on the next draw.
  • A LayerHost app survives a simulated memory warning on the iOS lane.
  • dev_stats reports each trim.
How to check

Unit tests for the trim, plus a pressure test on each platform lane using the OS's own simulation tools where they exist. Frame times from --profile perf during the trim.

Depends on
Part of
  • Theme: T06
  • Phase 3 · priority P2 · size L
R0538Runtime: 61 thread_local blocks in non-test files hold implicit context, and some of it is per-surface state shared by every windowP3Phase 3MT06
arch-core-thread-local-audit · research
What happens

crates/rune/src has 71 thread_local! blocks, 61 of them in non-test files. A few of those 61 sit inside #[cfg(test)] modules. Nobody has classified the rest. They fall into kinds that need different rules:

  • Scopes set around one call and restored after: the memo cache scope, the snapshot scope, the sRGB blend scope, the scroll-bar view scope, the input-time scope and the scene clock. Most restore through a guard's Drop, so a panic unwinds cleanly. with_scene_clock does not: it sets the clock, runs the closure and restores after, so a panic inside leaves the old scope's clock in place.
  • Thread-wide state that acts per surface: COMMITS counts commits across every window on the thread, and kit caches evict by it, so one window's commits age another window's entries.
  • Process or thread caches: the TextSystem behind measure(), the font families.
  • Platform bridges: menus, cursors, drag-out and similar OS callbacks.

Without a table, a new block can land in any of these kinds and nothing checks it.

Where
Why it matters

The target: 0 per-surface mutable thread_locals in rune and rune-kit, and every remaining one in a table as a scope restored on unwind through a guard, a process-wide cache or an immutable constant. Users notice per-surface leaks as one window's caches emptying when another redraws, and scopes left set after a panic as wrong clocks or colours in the next view.

What would help
  • Classify each production block as scope, process-wide cache, immutable constant or per-surface state, with its cfg conditions, in the ARCHITECTURE.md map from R0014.
  • Give every scope a guard type that restores on drop, starting with with_scene_clock. Add an unwind test per scope.
  • Move per-surface state onto the runtime or into the component store from R0174. COMMITS becomes a per-runtime generation that stores read.
  • Make the arch ratchet fail on a block not in the table.
Done when
  • ARCHITECTURE.md lists every production thread_local with its class.
  • Every scope restores through a guard, and an unwind test covers each.
  • 0 per-surface thread_locals remain.
  • The arch ratchet fails on an unlisted block.
How to check

The arch ratchet in the merge gate, plus a docs check that the table matches the blocks in the source.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 3 · priority P3 · size M
R0539Runtime: the playground sits in every handler call and in the commit and frame paths of every appP3Phase 3MT06
arch-playground-adapter · refactor
What happens

The playground is a Runtime field: playground: Option<Box<playground::Live<S>>>. The states! macro builds every handler's states through playground_host::handler_states, which checks the playground on each call. Commit, frame and input code also branch on it. At this commit, the word playground appears in runtime/frame.rs 5 times, runtime/commit/measure.rs 8, runtime/commit.rs 2, runtime/commit/remount.rs 2, runtime/commit/relayout.rs 1, runtime/commit/why.rs 1, runtime/input/keys.rs 12, runtime/input/app_ime.rs 3, runtime/input/action.rs 2 and runtime/input/pointer.rs 2.

The playground is shown by default only in debug builds, and RUNE_PLAYGROUND=0 or --playground change that. But its code, about 3,500 lines across playground.rs, playground/ and runtime/playground.rs, is compiled into every build, release included, and the runtime's hot paths carry its branches.

Where
Why it matters

The target: what ships is what is tested, and release builds carry no dev path. 0 playground references in runtime/frame.rs, runtime/commit* and runtime/input/*; with dev-tools off, those modules are not compiled, checked in the merge gate. The structure target: Runtime<S> is a thin typed shell of at most 8 fields over a non-generic core. App developers see the gain as smaller shipping binaries and a core whose commit path does not change shape when a dev tool is attached.

What would help
  • After R0534, make the playground an AppHooks wrapper. It wraps the app's view and handler states from outside the core through one hook, and the core sees one app part, playground or not.
  • Add a dev-tools Cargo feature, on by default, that gates the playground, hot reload, the interaction exporter and the dev CLI parser. Document how a shipping build turns it off: default-features = false plus the app's own feature list.
  • With the feature on, release behaviour follows R0085.
  • The playground's frame-exact replays depend on where it hooks into commit. Keep its tests as the gate for each step.
Done when
  • 0 playground mentions in runtime/frame.rs, runtime/commit* and runtime/input/*, held by the arch ratchet.
  • The merge gate builds hello with dev-tools off, and a cfg check shows the playground, hot and interaction modules are not compiled.
  • The playground tests pass unchanged with dev-tools on.
How to check

The arch ratchet and a dev-tools-off build of hello in the merge gate, plus the playground test suite.

Depends on
Part of
  • Theme: T06
  • Tracked in R0533
  • Phase 3 · priority P3 · size M
R0540Layout: grid templates, flex gaps, baselines, sticky edges, custom layout and portals are missing, and nothing compares results with a browserP2Phase 3XLT07
commit-and-layout-feature-matrix · tracking
What happens

Rune lays out with Taffy, which implements CSS flexbox and grid. Apps reach only part of it. The only grid builder is equal_columns(n), with grid_cell placement on the first row. There are no builders for flex basis, align-content, auto margins or content-based sizes. A row can't align children on text baselines. Sticky has top, bottom and left, but no right. A list can only virtualize vertically. A view can't run its own layout algorithm inside the layout pass, and there is no declarative way to mount an element above the window from where it is built. Native windows report a zero safe area.

Nothing compares Rune's flex and grid results with a browser's, so a gap between Rune and CSS shows up only when someone ports a design and it looks wrong. The static HTML first frame also drops grid tracks, so it differs from the live layout.

This takes several issues: a parity harness and lane first, export fixes, then one issue per feature, each shipped with a builder, docs and an example.

Where
Why it matters

Designers and agents port SwiftUI and CSS layouts. The targets are that apps can express "a fixed matrix of layout features that SwiftUI and CSS UIs commonly use", 14 of 14 "with no prototype-only rows", and that "flex and grid results match a browser's for every layout builder Rune exposes": within 0.01 pt on a generated corpus of at least 500 trees, or in one of at most 10 documented deviation classes, with export equal to live. Scroll containers should have "sticky on all edges, anchoring on every axis" and "virtualization on both axes".

Done when
  • The parity harness and lane gate every merge against Chromium.
  • Every matrix feature ships with builders, docs and an example. Right to left is tracked in R0542.
  • The static export equals the live layout on the parity corpus.
How to check

The Chromium parity lane, the export-equals-live check and each child's tests.

Issues
Part of
  • Theme: T07
  • Phase 3 · priority P2 · size XL
R0541Layout: a small change still pays passes over every node, and deep trees can overflow the stackP2Phase 3XLT07
commit-and-layout-proportional-layout · tracking
What happens

Memo reuse and the retained Taffy store made the view and the solve cheap for small changes. The passes around them still cost O(nodes). On layout_text_cost, stack (about 5,300 nodes) commits in 3.25 ms p50 after one switch flips, and only 1.35 ms of that is the view (research/38). Taffy's own solve is 0.058 ms (research/31). The rest goes to:

  • placement, the node index and text layout over every node;
  • per-pass lookups that find lists, anchors and scroll rows by scanning;
  • Taffy features whose results Rune drops;
  • style setters that re-box on every call;
  • compaction that clears every cache;
  • dirty propagation that clears caches up to the root.

Separately, layout recurses on the main thread's stack, and each node stores its full path. Nothing tests how deep a tree can go, and a deep tree holds memory quadratic in its depth.

This takes several issues. Each removes one pass or scan with a counter that proves it, and a research gate decides whether relayout boundaries are worth building.

Where
Why it matters

The targets are that "a localized change costs layout work proportional to what it affects, and deep trees are safe": each count at most the dependency closure plus moved-span roots; the layout phase at most 0.5 ms p95 on the reference Mac; depth 1,024 exact on a 1 MiB stack in release and depth 8,192 without a crash; identity storage at most 32 B per node plus key bytes. Layout must not panic or overflow the stack in release from app-supplied structure. Worst-case frames stay at p95 at most 4 ms on the reference Mac.

Done when
  • Every child is closed.
  • The count budgets on stack and tree meet the dependency-closure bound.
  • The depth probe passes at 1,024 and 8,192 in release.
How to check

Count budgets in T1, the incremental fuzz, the reserved-hardware timing job and the depth probe.

Issues
Part of
  • Theme: T07
  • Phase 3 · priority P2 · size XL
R0542Layout: apps can't lay out right to leftP2Phase 3XLT07
layout-rtl · tracking
What happens

Bidirectional text works inside a paragraph, through Parley. Layout has no direction. CompactStyle reports Direction::Ltr unless a cold style sets it, and nothing sets it. Every edge is physical: pl and pr, ml and mr, absolute(left, top) and pin(left, top, right, bottom). Anchors use Side::Left and Side::Right. Sticky has only top, bottom and left. Horizontal scroll starts at the left.

Arabic, Hebrew, Persian and Urdu UIs need the whole layout mirrored, as SwiftUI's layoutDirection, Flutter's Directionality and CSS direction do. Today an app in those locales shows its rows, back buttons, sidebars and menus on the wrong side.

This takes several issues. Direction has to reach rows first. Logical edges then replace physical ones in builders. Scroll, sticky and anchors mirror next. A gate checks that the right-to-left layout is the mirror of the left-to-right one. Kit components that draw directional icons or handle arrow keys mirror in their own issue, in the components theme.

Where
Why it matters

The target is that "apps lay out right to left: rows, logical edges, scroll, sticky, anchors, directional icons and arrow-key navigation follow the direction, and nested regions can override it". 100% of matched elements sit within 0.5 pt of the mirror, with 0 unmatched nodes apart from declared physical elements and nested-direction regions. Nested-direction cases match Chromium within 0.01 pt. Right to left is one of the 14 layout features apps should be able to express with shipped builders.

Done when
  • Every child is closed, and kit mirroring is closed in the components theme.
  • The mirror gate passes on every gallery scene.
How to check

The mirror gate in T1, with nested-direction cases in the Chromium parity lane.

Issues
Part of
  • Theme: T07
  • Phase 3 · priority P2 · size XL
R0543Layout: a row can't align its children on their text baselinesP2Phase 3MT07
layout-baseline-alignment · feature
What happens

El has items_start, items_center, items_end and items_stretch, and the matching self_* builders. It has no baseline alignment. The text measure callback returns only a width and height, through compute_leaf_layout, so text leaves report no first baseline. Taffy's AlignItems::BASELINE would then fall back to box edges. The retained store already passes BASELINE through to Taffy, so the missing pieces are the baselines and the builders.

Forms with a label beside a field, toolbars that mix font sizes, and badges next to text need baseline alignment. Without it, apps nudge children with hand-tuned offsets that break when the font or text scale changes. SwiftUI has .firstTextBaseline and .lastTextBaseline. CSS has align-items: baseline and last baseline.

Where
Why it matters

Ported designs should line up without offsets. Baseline alignment is one of the matrix features that apps should be able to express "with shipped and documented builders", 14 of 14. Flex results should "match a browser's for every layout builder Rune exposes", within 0.01 pt on the generated corpus.

What would help
  • Report each text's first and last baselines from the measure callback in Taffy's layout output, and let containers propagate them as Taffy does.
  • Add items_baseline(), self_baseline(), items_last_baseline() and self_last_baseline().
  • If Taffy's flexbox lacks last-baseline alignment, apply it inside rune-taffy's flexbox dispatch, so the container's size and its siblings' positions include the shift. Don't shift after layout, or the container's height will be wrong.
Done when
  • Parity cases against Chromium are within 0.01 pt with bundled fonts for: rows of 11, 13 and 20 pt text; multiline text with first and with last baseline; mixed fonts; a nested container with padding; and a text input beside a label.
  • A container whose children shift for last-baseline alignment has the same height as Chromium's.
  • The differential test against the baseline store passes.
  • A kit form scene uses baseline alignment.
How to check

The parity cases run in the Chromium lane from R0331. T1 tests cover the builders and the differential against the baseline store.

Depends on
Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 3 · priority P2 · size M
R0544Layout: a view can't place its children with its own algorithm inside the layout passP2Phase 3MT07
layout-custom-layout-spike · research
What happens

A SwiftUI container can propose sizes to its children, read what they need and place them, all in one layout pass, through the Layout protocol (sizeThatFits, placeSubviews) and ViewThatFits. Rune has no such hook. An app that wants its own placement has two routes today:

  • Read rects with Cx::layout_with or Cx::layout_size and build the view again from them. One commit allows up to 2 extra measurement passes (PASSES), and layout feedback alone may cause up to 4 commits in a row (ECHOES).
  • Measure text outside layout with text::measure. That keeps a second TextSystem per thread, apart from the one layout uses, so fonts and shaping work are held twice.

Flow layouts, tag clouds, masonry, diagram nodes and "use the first child that fits" fallbacks all need this. Each one now costs extra view runs or duplicate text work.

Where
Why it matters

App authors notice extra frames of layout feedback and views that run several times per commit. The commit target is at most 3 view runs in any commit, enforced in code, at most 1 view run in at least 99% of commits in each scene, and 0 layout reads that reach PASSES or ECHOES in the gallery and examples. Custom layout is also one row of the 14-feature layout matrix that SwiftUI and CSS apps commonly use, which should ship 14 of 14 with documented builders.

What would help

Spike a custom display case in compute_child_layout_inner. It calls a registered function, roughly fn(&mut LayoutCx, LayoutInput) -> Size, which measures and positions children through Taffy's compute_child_layout, so each child's result lands in its own Taffy cache. The note should answer:

  • What invalidates a custom container's cache: its style, its children, and a version of the function's parameters.
  • How RunMode::ComputeSize and RunMode::PerformLayout calls map to measure and place, and that place stays deterministic across them.
  • How child proposals map to known_dimensions and available_space.
  • Where the function lives (a side table keyed by slot, so CompactStyle stays 64 B).
  • Allocations per call, and Taffy computes compared with a flex container of the same size.

Build two prototypes: a flow layout (wrapping with per-line alignment) and fits_first (as ViewThatFits). If the answer is no-go, the note names a fallback design, such as a measure-only hook on leaves.

Done when
  • A note in research/ covers cost, cache semantics and API, and ends with go or no-go.
  • The prototype flow layout and the prototype fits_first each lay out in 1 view run per commit, with 0 layout reads.
  • R0100, with the prototype added to its generator, finds 0 mismatches against a fresh layout.
  • The note gives Taffy compute counts for an unchanged custom container next to a flex container of the same size.
How to check

Review the note. Run the prototype's fuzz test and the view-run counters in T1. Take the note's timing numbers from layout_text_cost under --profile perf, as paired medians.

Depends on
Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 3 · priority P2 · size M
R0545Layout: apps have no supported API to place children with their own algorithm in one layout passP2Phase 3LT07
layout-custom-layout-api · feature
What happens

Apps can't write their own layout algorithm and have it run inside Taffy's pass. Custom placement either reads rects with Cx::layout_with and runs the view again (up to 2 extra measurement passes per commit, and up to 4 feedback commits in a row), or measures text outside layout with text::measure, which keeps a second TextSystem per thread. R0544 studies a hook, but a spike ships no API. Until one ships, a flow layout or a "first child that fits" fallback costs extra view runs on every change.

Where
Why it matters

Authors porting SwiftUI code expect Layout and ViewThatFits. The layout matrix target is 14 of 14 features with shipped, documented builders and no prototype-only rows. The commit target is at most 1 view run in at least 99% of commits per scene, at most 3 in any commit, and 0 layout reads that reach PASSES or ECHOES in the gallery and examples. A rect-reading flow layout breaks both.

What would help

Ship the design the spike picks. The expected shape:

  • A public builder El::layout(impl CustomLayout). CustomLayout has measure (a proposal and children to a size) and place (child origins). It runs inside rune-taffy's compute_child_layout_inner, under Taffy's cache.
  • The layout object lives in a side table keyed by slot, so CompactStyle stays 64 B. It is a builder method, so no literal-built type gains a field.
  • flow and fits_first in rune-kit as the first users.
  • The trait is hard to change once public, so it starts behind an unstable feature flag.

If the spike's note says no-go for a dispatch inside rune-taffy, ship the note's fallback design and keep the same acceptance below.

Done when
  • A public CustomLayout API is documented, with an example.
  • rune-kit's flow and fits_first lay out in 1 view run per commit with 0 layout reads, by the commit counters.
  • With a custom layout added to the generator, R0100 finds 0 rect mismatches against a fresh layout.
  • An unchanged custom container gets the same number of Taffy cache hits as a flex container of the same size.
  • No existing gallery scene or example changes its rects.
How to check

The fuzz test and the view-run and layout-read count budgets in T1. API docs review. A changelog fragment, since the API is new public surface.

Depends on
Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 3 · priority P2 · size L
R0546Layout: flex basis, align-content, auto margins and content-based sizes have no buildersP2Phase 3MT07
layout-flex-api-gaps · feature
What happens

Taffy 0.15 supports flex-basis, align-content, auto margins and content-based sizes, but Rune's builders don't reach them:

  • .grow(g) is always flex: g 1 0. It sets flex-basis 0, and no builder sets a basis in points, as a fraction, or auto.
  • align-content is stored in CompactStyle and the HTML export writes it, but no El builder sets it. Wrapped rows (flex_wrap) always pack with the default.
  • ml, mr, mx, mt, mb and my take f32, so there are no auto margins. Pushing one item to the end of a row needs a grown spacer.
  • Widths take points or a fraction (w_frac). There is no height fraction and no min-content, max-content or fit-content size.

Apps porting CSS work around these with spacers and fixed widths, which break when text or a locale changes.

Where
Why it matters

Authors and agents write these CSS terms first. The layout matrix target is 14 of 14 features with shipped, documented builders. The parity target is that flex and grid results match a browser's for every builder: on a corpus of at least 500 trees, every element within 0.01 pt or covered by one of at most 10 documented deviation classes.

What would help

Add builder methods only:

  • basis(pt), basis_frac(f), basis_auto(), and grow_from_content(g) for flex: g 1 auto.
  • content_start, content_center, content_end, content_between, content_around, content_evenly, content_stretch for align-content.
  • ml_auto, mr_auto, mx_auto, mt_auto, mb_auto, my_auto.
  • w_fit, w_min_content, w_max_content and the height forms; h_frac(f).

Use _frac names to match w_frac, rather than _pct. Margins are already cold, so auto margins cost no hot space. Min-content and fit-content go cold on the nodes that use them; that is acceptable for rare keywords. Export each in --html (with R0103 for the size keywords) and add each to R0331.

Done when
  • Each builder has a Chromium parity case, including vertical auto margins and a fraction basis.
  • --html exports each, and the export's rects equal the live layout on those cases.
  • The README layout section lists them.
  • No literal-built type gains a field, and CompactStyle stays 64 B.
How to check

The parity lane, and T1 tests for the builders and size budgets.

Depends on
Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 3 · priority P2 · size M
R0547Layout: the only grid an app can build is n equal columns, with explicit placement only on the first rowP2Phase 3LT07
layout-grid-templates · feature
What happens

El exposes two grid builders. equal_columns(n) sets display: grid with n columns of 1fr, and children fill implicit rows in order. grid_cell(column) pins a child to a column of the first row. El.style is pub(crate), so apps can't set anything else. Taffy 0.15's CSS grid is compiled in: templates with lengths, fr, auto, minmax and repeat, spans, explicit rows and auto-flow. Apps can't reach it. Settings forms with a label column, dashboards with spanning tiles and table headers are built by hand from rows of fixed widths, which drift when a label or locale changes.

Where
Why it matters

Grid is the layout agents and web authors reach for first. The layout matrix target is 14 of 14 features with shipped, documented builders and no prototype-only rows. The parity target is that grid results match a browser's: on a corpus of at least 500 trees, every element within 0.01 pt or in one of at most 10 documented deviation classes, with 0 unmatched nodes and the export equal to the live layout.

What would help

Add typed builders that store into the cold style:

  • grid_columns([Track]), grid_rows([Track]).
  • Track::pt, Track::fr, Track::auto, Track::min_max, Track::repeat, Track::fit_content. Make Track opaque with constructors, so it can grow without breaking apps.
  • grid_auto_rows, grid_auto_flow (row, column, dense).
  • col_span, row_span, grid_at(col, row).

Keep .gap and .gaps as the grid gaps, and add parity cases for them on grid. Leave out calc, named lines and template areas for now. Export every builder in --html. Keep equal_columns and grid_cell as they are.

Done when
  • Each builder has a Chromium parity case in R0331.
  • --html exports every builder, and the export gives the same rects as the live layout on the parity corpus.
  • examples/kit-gallery has a grid scene with a form, a spanning dashboard and a table header.
  • CompactStyle stays 64 B, and El and Node size budgets don't change.
  • No literal-built type gains a field.
How to check

The parity lane, and the size tests in T1. The gallery scene's goldens hold the result.

Depends on
Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 3 · priority P2 · size L
R0548Layout: each node stores its full path, so a deep tree holds memory quadratic in its depthP2Phase 3MT07
layout-path-depth-quadratic · perf
What happens

Each Node keeps its full path as a String: the parent's path plus /key or /#i. Flatten hashes that whole string into path_ids for every node on every commit, and path_ids keeps its own copy of each string as the key. resolve_path_and_id reuses old strings across commits, so the cost is mostly retained memory and hashing rather than fresh allocations each commit.

In a chain of depth d, the stored paths hold about d²/2 segments. By estimate, depth 2,000 with 4-byte segments holds about 8 MB in Node.path, and as much again in path_ids keys. Each commit hashes O(n × depth) bytes. Nobody has measured either number.

Where
Why it matters

Deep trees come from diagrams, nested outlines and generated content. The target is that a localized change costs work proportional to what it affects, and deep trees are safe: depth 1,024 exact on a 1 MiB stack in release, depth 8,192 without a crash, and identity storage at most 32 B per node plus key bytes.

What would help

1. Measure first. Run layout_text_cost --mode heap at depths 256, 1,024 and 4,096, and record retained heap and commit time under --profile perf. 2. Derive identity from (parent id, segment), as R0321 defines a segment. path_ids becomes a map from (parent NodeId, segment) to NodeId. Each node stores its parent id and its own key bytes, not its ancestors'. 3. Build path strings only on demand, for --tree, diagnostics and APIs that take a path. Code that matches by path, such as in_scope and the anchor and sticky lookups, moves to ids or to a lazily built string.

This fits the typed identity work in R0318, and needs R0332 so the deep-tree tests can run at all.

Done when
  • The PR reports retained heap and commit time at depths 256, 1,024 and 4,096, before and after.
  • At depth 4,096, identity storage is at most 32 B per node plus each node's own key bytes.
  • Hashing per commit is O(n) segments, not O(n × depth), by a counter.
  • path_ids lookups give the same ids as before on the existing tests.
  • --tree still prints the same paths.
How to check

A count budget on a deep-tree scene in T1 that records identity bytes and hashed bytes per commit. layout_text_cost --mode heap for the before and after numbers.

Depends on
Part of
  • Theme: T07
  • Tracked in R0541
  • Phase 3 · priority P2 · size M
R0549Layout: there is no layout direction, and rows always run left to rightP2Phase 3MT07
layout-rtl-direction · feature
What happens

Rune has no layout direction. Neither Env nor Cx carries one, and no builder sets one, so every row, justify_start and grid column runs left to right. Taffy 0.15 supports Direction::Rtl in flexbox and grid, but Rune never sets it: CompactStyle reports Ltr unless the node has a cold boxed Style.

Two constraints shape the fix. Env has two public fields and apps build it as a literal, so it can't gain a field. And setting Taffy's direction through the cold style would box a full taffy::Style on every node of an RTL window, because any direction other than Ltr forces the cold path.

Where
Why it matters

Arabic, Hebrew and Persian users get mirrored-wrong apps, and apps can't ship in those locales. The target is that apps lay out right to left, with nested regions able to override it: 100% of matched elements within 0.5 pt of the mirror, 0 unmatched nodes, and nested-direction cases within 0.01 pt of Chromium.

What would help
  • Keep the window's direction in the runtime. Set it from the OS locale by default. Change it with a RunOptions builder method and Runtime::set_layout_direction. Read it with Cx::layout_direction().
  • Add El::layout_direction(dir) for a subtree.
  • Flatten resolves each node's direction from its parent and stores it in one packed bit, so no node goes cold. A bit has to be freed: for example, pack Display (5 values) and Position (3 values) into 4 bits instead of 5. CompactStyle::direction() then reads that bit.
  • Row order, justify and align start and end, and grid columns then mirror through Taffy. A direction change at runtime marks the affected subtree dirty and relayouts, with no view change needed.
  • Export dir in --html so the parity harness can compare.
Done when
  • An RTL row of three fixed boxes matches Chromium's dir=rtl result exactly.
  • A nested LTR subtree in an RTL window, and the reverse, match Chromium's nested dir results within 0.01 pt.
  • Changing the window direction at runtime gives the same rects as starting in that direction.
  • CompactStyle stays 64 B, and a test shows no node goes cold because of direction.
  • Env and RunOptions gain no pub fields.
How to check

Cases in R0331, and T1 tests for the runtime switch and the size budget. R0551 keeps it proven across the gallery.

Depends on
Part of
  • Theme: T07
  • Tracked in R0542
  • Phase 3 · priority P2 · size M
R0550Layout: padding, margins, insets and anchors only have physical left and right edgesP2Phase 3MT07
layout-rtl-logical-edges · feature
What happens

Every horizontal edge builder is physical. pl, pr, px, ml, mr and mx name left and right. absolute(left, top) and pin(left, top, right, bottom) measure from the parent's left edge. Anchored overlays take Side::Left or Side::Right. Once R0549 lands, a row will mirror but its padding, margins, pinned badges and side menus won't. A search field with its icon padding on the left keeps it on the left in Arabic.

Where
Why it matters

SwiftUI apps use leading and trailing, and CSS apps use padding-inline-start. Authors expect a layout written once to mirror. The target is that rows, logical edges, scroll, sticky, anchors, directional icons and arrow-key navigation follow the direction, with 100% of matched elements within 0.5 pt of the mirror, except declared physical elements and nested-direction regions.

What would help
  • Add start and end builders: ps and pe, ms and me, pin_start and pin_end (or a pin_logical(start, top, end, bottom)), absolute_start(start, top), and Side::Start and Side::End for anchors.
  • Flatten resolves logical edges to physical ones using the node's resolved direction, so Taffy still sees left and right.
  • Physical builders stay physical. An app uses them for things that must not mirror, such as a media scrubber.
  • When a logical and a physical setter set the same resolved edge, the one called last wins, as in CSS's cascade order within one rule. That needs the builder to record which edge was set last, so the resolve step can apply them in call order.
  • Adding Side::Start and Side::End changes a public enum that apps may match on exhaustively; add a changelog fragment.
Done when
  • A mirror test passes for each logical builder.
  • A test shows each physical builder keeps its edge in RTL.
  • A precedence test covers ps then pl, and pl then ps, in both directions and inside a nested direction change.
  • Side::Start and Side::End overlays open on the trailing and leading sides in both directions.
  • The docs list logical and physical variants side by side.
  • No literal-built type gains a field.
How to check

The mirror gate (R0551) in T1, plus the precedence and physical-edge unit tests.

Depends on
Part of
  • Theme: T07
  • Tracked in R0542
  • Phase 3 · priority P2 · size M
R0551Layout: nothing checks that a right-to-left layout is the mirror of the left-to-right oneP2Phase 3MT07
layout-rtl-mirror-gate · infra
What happens

Rune has no right-to-left layout yet, so there is nothing to check. Once R0549 lands, any builder, kit component or runtime path that uses a physical edge will break RTL without a test failing. Physical edges are everywhere today: padding, margins, absolute, pin, anchors, sticky and horizontal scroll all name left and right.

A mirror is a cheap oracle. For most elements, the RTL rect must equal the LTR rect reflected across its window's vertical center line. That needs no browser and covers every scene at once.

Where
Why it matters

Users in RTL locales see the regressions; authors working in LTR don't. The target is that apps lay out right to left and nested regions can override it: 100% of matched elements within 0.5 pt of the mirror, 0 unmatched nodes, except declared physical elements and nested-direction regions, and all icon goldens and keyboard tests pass.

What would help

Add a T1 test that:

1. Runs every gallery scene and eligible example headless, once in LTR and once in RTL, at the same size. 2. Matches nodes by path. A node present in one run and missing in the other fails. 3. Asserts each RTL rect equals the mirrored LTR rect within 0.5 pt. 4. For elements marked physical, and under nested-direction regions, asserts the RTL rect equals the LTR rect instead. 5. Reports each failure with the scene, the path, both rects, and the nearest builder that set a physical edge.

Pick up new scenes automatically from the scene list. Add RTL pixel goldens for 10 scenes that cover text, icons, overlays and scroll, so mirrored drawing (directional icons, text alignment) is held too.

Done when
  • The test runs in T1 over every scene, and a new scene is included with no edit to the test.
  • A node missing from one run fails the test.
  • There are 0 unexplained failures; each exception is a declared physical element or a nested-direction region.
  • RTL goldens exist for 10 scenes.
  • A seeded regression (a kit component switched from a logical to a physical edge) fails the gate.
How to check

The gate itself in T1, and the 10 RTL goldens in the golden lane. The seeded-regression test proves the gate catches what it should.

Depends on
Part of
  • Theme: T07
  • Tracked in R0542
  • Phase 3 · priority P2 · size M
R0552Layout: native windows report a zero safe area, and apps have no keyboard-inset reader or safe-area builderP2Phase 3MT07
layout-safe-area-desktop-web · feature
What happens

Cx::safe_area returns the browser's insets on wasm and [0.0; 4] on every other target. On macOS, a fullscreen window on a notched display may have a top region under the camera housing (NSScreen.safeAreaInsets). Rune never reads it, so if the content view extends there, a toolbar can draw under the notch.

On the web, the canvas already follows visualViewport's size and offset, so it shrinks when the soft keyboard opens. But apps get no keyboard inset as a value, so they can't tell a keyboard from a window resize, or move a bottom bar themselves. No builder lays content out inside the safe area, as SwiftUI does by default and with ignoresSafeArea and safeAreaInset. Each app pads its root by hand from safe_area().

Where
Why it matters

Phone web users see a focused field or bottom bar covered, and notched-Mac users may see controls under the notch. The target is that a scene lays out the same on every platform at equal scale, with platform insets feeding layout: insets reported on iOS, the web and notched macOS fullscreen where the content view overlaps.

What would help

1. Measure first. On a notched Mac in fullscreen, check whether Rune's content view extends under the notch. On iOS Safari, check whether a focused bottom field is covered now that the canvas follows visualViewport. 2. On macOS, report the top inset from NSScreen.safeAreaInsets only if the content view overlaps it. 3. Add Cx::keyboard_inset(). On the web, derive it from visualViewport against the large viewport. Count it once: if the canvas already shrank, the inset an app applies must not cover the same height again. 4. Add El::safe_area_padding() and El::ignores_safe_area(), builder methods only. 5. Inset changes commit with motion, so a bottom bar moves with the keyboard. 6. Show the values in --tree.

Done when
  • The PR records both measurement results.
  • If the macOS content view overlaps the notch, a fullscreen run on notched hardware reports the top inset.
  • On iOS Safari, a focused bottom field stays visible, and its inset is not applied twice.
  • safe_area_padding lays content inside injected insets in a headless test.
  • --tree shows safe-area and keyboard insets.
  • No literal-built type gains a field.
How to check

Headless tests with injected insets in T1, the web lane on iOS Safari, and a manual check on notched Mac hardware.

Depends on
Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 3 · priority P2 · size M
R0553Scroll: there is no sticky_right, and scroll anchoring holds only the vertical positionP2Phase 3MT07
layout-sticky-all-edges · feature
What happens

StickyEdge has Top, Bottom and Left, and an element sticks on one edge only (Sticky.edge is one Option). So an app can't build a table with a frozen trailing actions column, or a header cell that sticks on both axes in the corner of a two-way scroller.

Scroll anchoring is vertical only. anchor_keeps picks viewports that scroll on y, and anchor_row chooses a row by its vertical band. Tx::keep_on_screen also looks only for vertical viewports. Content inserted before the visible item of a scroll_x viewport shifts what the reader sees. Nothing defines which row becomes the anchor when the anchored row itself is removed.

Where
Why it matters

Data tables, spreadsheets and timelines need frozen columns on both sides and a corner cell, and a horizontal feed that jumps on insert loses the reader's place. The target is that scroll containers match CSS and UIKit: sticky on all edges, anchoring on every axis and across estimate corrections, 100% of scenarios passing, and anchoring error and drift at most 0.5 pt on every frame.

What would help
  • Add sticky_right(inset), the mirror of sticky_left.
  • Let one element hold one vertical and one horizontal edge at once, for a table's corner cell. Store two edges in Sticky (it is pub(crate), so no app breaks) and apply both shifts in paint.
  • Add horizontal overflow anchoring for scroll_x viewports, and two-axis anchoring for scroll_xy, picking the first visible item on each axis.
  • When the anchored row is removed, anchor to the next row in order that is still visible, as Chromium's overflow-anchor does.
  • Extend keep_on_screen to horizontal viewports the same way.
  • Update the sticky_left docs.
Done when
  • Tests cover sticky top, bottom, left and right, each inside a nested scroll viewport, plus a two-axis corner cell.
  • Sticky elements hit-test where they draw.
  • Anchoring keeps the first visible item within 0.5 pt across an insert and a removal before it, in vertical, horizontal, two-axis and nested viewports.
  • Removing the anchored row keeps the next visible row within 0.5 pt.
How to check

Runtime scroll tests in T1. Add a two-axis sticky table scenario to scripts/motion-audit, since sticky shifts apply in paint every frame.

Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 3 · priority P2 · size M
R0554Scroll: horizontal scroll views, sticky columns and anchored overlays don't mirror in a right-to-left layoutP2Phase 3MT07
layout-rtl-scroll-sticky-anchor · feature
What happens

Horizontal scrolling assumes left to right. A scroll_x viewport starts at offset 0 on the left, and offsets count rightward. Sticky has one horizontal edge, sticky_left, and its docs say there is no sticky_right because horizontal scrolling starts at the left. Anchored overlays choose and flip by physical side. In an RTL page, a tab strip would start scrolled to its end, a frozen first column would stick on the wrong side, and a trailing menu would open toward the content.

Where
Why it matters

RTL users scroll tab strips, carousels and tables every day, and a strip that starts at the wrong end hides its first items. The targets are that scroll, sticky and anchors follow the direction, with 100% of matched elements within 0.5 pt of the mirror, and that scroll containers match CSS and UIKit, with anchoring error and drift at most 0.5 pt on every frame.

What would help
  • In RTL, a horizontal viewport starts at its inline-start edge, the right. Tx::scroll_to_x, scroll_into_view and on_scroll_offset take and report logical offsets (0 at the start), and the runtime converts to physical at paint.
  • Add sticky_start and sticky_end, built on sticky_left and the sticky_right from R0553, and resolved by the node's direction.
  • Anchored overlays with Side::Start and Side::End choose and flip sides by direction.
  • Wheel and trackpad deltas stay physical: a swipe to the left still moves content left, as in Safari and AppKit.
  • The horizontal scrollbar's thumb starts at the right.
Done when
  • An RTL tab strip starts at the right and scrolls left.
  • scroll_into_view and the Tx scroll APIs reveal the right element in RTL.
  • A sticky_start column sticks on the right in RTL.
  • An anchored menu with Side::End opens on the left in RTL.
  • Wheel deltas move content the same physical way in both directions.
  • An LTR code block inside an RTL page scrolls as LTR.
  • Each has a test.
How to check

Runtime scroll tests in T1, and R0551 over the gallery. A motion change here also runs scripts/motion-audit with an RTL scroll scenario added.

Depends on
Part of
  • Theme: T07
  • Tracked in R0542
  • Phase 3 · priority P2 · size M
R0555Tools: no overlay draws element boxes, padding, gaps and baselines over a window or snapshotP3Phase 3MT07
layout-debug-overlay · feature
What happens

Rune's --snap gives pixels and --tree gives rects, separately. To find why a gap is 12 pt instead of 8, a person or an agent reads JSON and matches paths to pixels by hand. Chrome DevTools draws the box model and flex and grid overlays; Xcode's view debugger and Flutter's debugPaintSizeEnabled do much the same. Rune's CLI has no layout overlay flag. --chrome draws window chrome, not layout.

Where
Why it matters

Agents already read snaps. A snap with the boxes drawn on it answers "why is this here" in one look. The target is that layout explains itself to agents and people: resolved style, box model, source and misuse visible and correct for 100% of nodes in every gallery scene, box values within 0.01 pt of Chromium, and overlay fixtures that pass for padding, margins, gaps, grid tracks, baselines and overflow, including scrolled and transformed content.

What would help
  • Add --layout-overlay for --snap and --strip, and a debug key or RUNE_LAYOUT_OVERLAY=1 for live windows.
  • Draw content, padding and margin boxes in distinct tints, gap bands, flex lines and grid tracks, and text baselines. Show overflow in red. Label each lint finding at its element.
  • Read the same values --tree reports, so the overlay and the tree can't disagree.
  • Draw it as extra instances after the scene, in its own layer, following scroll offsets and transforms.
  • Build it in debug builds only, behind cfg(debug_assertions), so release binaries carry none of it.
  • Let --layout-overlay take an element key or path to draw one subtree.
Done when
  • Fixture scenes check overlay geometry against --tree values for padding, margins, gaps, grid tracks, baselines and overflow.
  • The fixtures include a scrolled viewport and a transformed subtree.
  • A golden snap of a gallery scene shows the overlay.
  • A release build contains none of its code, by a symbol check.
  • It is documented next to --snap and --tree.
How to check

Fixture tests in T1, the golden snap in T2, and a symbol check on a release build.

Depends on
Part of
  • Theme: T07
  • Phase 3 · priority P3 · size M
R0556Layout: a leaf edit inside a scroll view or fixed-size box clears layout caches up to the rootP3Phase 3LT07
layout-relayout-boundaries · feature
What happens

When any leaf changes, flatten ORs the child's dirty flag into its parent's, and sync_node clears each dirty node's Taffy cache. So a one-character edit deep inside a fixed-size panel or a scroll viewport clears every ancestor's cache up to the root, and the next solve recomputes that whole spine and its siblings' placement.

Flutter stops this at relayout boundaries: boxes whose size can't depend on their children. Stopping the dirty flag is not enough on its own. Taffy returns a clean node's cached output without descending, so a boundary whose inside changed would never be solved. Each dirty boundary needs its own re-solve and write-back.

Where
Why it matters

Large editors, tables and dashboards pay for the whole spine on each keystroke. The targets are that a localized change costs layout work proportional to what it affects (each count at most the dependency closure plus moved-span roots, layout phase at most 0.5 ms p95 on the reference Mac), and that per-frame work scales with what changed, with p95 at most 4 ms and 0 frames over 8.3 ms on the reference Mac.

What would help

Build this only if R0345 says go.

A node is a boundary only when its border-box size can't depend on its descendants:

  • definite width and height, with min and max equal to them or absent;
  • no automatic minimum size (min-width and min-height set, or overflow not visible);
  • no baseline alignment in its parent;
  • no out-of-flow descendant whose containing block lies outside it.

Scroll viewports qualify when their own size is definite. sync_node stops propagating dirtiness at a boundary and records it. After the root solve, re-solve each dirty boundary with its last inputs and write the results back. This keeps Taffy's solvers and changes only invalidation inside rune-taffy.

Done when
  • A leaf edit inside a scroller in a 5,000-node tree costs at most its subtree size + 1 Taffy computes.
  • Tests show each excluded case (automatic minimum, baseline parent, out-of-flow escape, intrinsic size) is not treated as a boundary.
  • Rects equal a full solve over the R0100 corpus, with boundaries added to the generator.
  • The research note's second-trigger measurement improves as the note predicted.
How to check

The fuzz test and Taffy-compute count budgets in T1. layout_text_cost under --profile perf, paired medians, for the trigger number.

Depends on
Part of
  • Theme: T07
  • Tracked in R0541
  • Phase 3 · priority P3 · size L
R0557Virtual rows: a horizontal list can't virtualize, so wide tables, timelines and carousels build every columnP3Phase 3MT07
layout-virtual-columns · feature
What happens

virtual_rows and virtualize window vertical lists only. VirtualList keeps row heights, running sums, a vertical offset and top and bottom padding, and measure writes the off-screen extent into pad_top and pad_bottom. A table with hundreds of columns, a timeline, or a carousel inside .scroll_x() builds, flattens and lays out every column on every commit, however few are on screen.

Where
Why it matters

Wide data grids and timelines stutter or take seconds to open once columns reach the thousands. The targets are that scroll containers virtualize on both axes, with a 100,000-column list meeting the same count budgets as a vertical one, and the 1M-row budgets: CPU p95 at most 1 ms fixed and 2 ms variable, first viewport at most 100 ms, and at most 200 realized rows in the window.

What would help
  • Give VirtualList an axis. Rename heights to extents, and top and bottom padding to leading and trailing padding, and read the x scroll offset for a horizontal list. The height index from R0336 serves both axes.
  • Add virtual_columns, mirroring virtual_rows: keyed items, estimates, the build-by-index closure, anchoring, and scroll_into_view on x.
  • Write the window as left and right padding for a horizontal list.
  • Keep it one axis per list. A two-axis grid is a vertical list whose rows are horizontal lists, sharing one column window.
  • Update the README and scroll_x docs.
Done when
  • A 100,000-column horizontal list meets the vertical list's count budgets: realized columns, key calls and allocations per commit.
  • scroll_into_view on x reaches a column that was never built.
  • Horizontal anchoring keeps the first visible column within 0.5 pt when estimates are corrected.
  • virtual_rows behaviour and its count budgets don't change.
How to check

Count budgets and runtime tests in T1, plus a 100,000-column case in the 1M-row bench under --profile perf.

Depends on
Part of
  • Theme: T07
  • Tracked in R0540
  • Phase 3 · priority P3 · size M
R0558Fonts: text in a script or emoji the system can draw comes out blank, boxed or in the wrong locale's glyphsP1Phase 3XLT08
text-fonts-tracking · tracking
What happens

Rune builds each font collection with system_fonts: false. It finds fallbacks by file name: five routed script groups (Hebrew, Arabic, Devanagari, Bengali, Thai), plus fixed lists of symbol, emoji and CJK files. The font directories are walked once per process. But each window, overlay and measuring thread builds its own TextSystem, and each registers and maps its own faces before the first frame.

What a user sees:

  • a script outside the five groups draws blank, though the system has a font for it (#209);
  • Japanese on macOS falls back to PingFang HK instead of Hiragino Sans (#67);
  • default-presentation emoji draw as outlines where DejaVu covers them (#102);
  • COLRv1 emoji fonts draw nothing (#103);
  • an installed family cannot be named on Linux (#114);
  • the web draws boxes for emoji and CJK unless the app bundles fonts.

Fixing this takes several pieces: a shared store, real OS fallback per platform, a visible missing glyph, web fallback, synthetic bold, and a lane that proves coverage. So it is tracked here.

Where
Why it matters

An app's users write in their own language and use emoji. A blank word, or Chinese glyph forms in Japanese text, reads as broken, and native apps never do it. The target: "Any cluster the operating system's own text stack draws, Rune draws, in the right locale's glyphs, and emoji draw in colour. A cluster no font covers draws a visible box." Its thresholds are "0 missing clusters where the OS has coverage. 100% family agreement for the four Han locales", and every emoji in colour except where VS15 asks for text. For startup and memory the target is "0 discovery operations on main before the first frame. 1 collection per process, and each font file mapped once. A cold fallback face costs at most 2 ms on main."

Done when
  • Every child issue and #67, #102, #103, #114 and #209 are closed.
  • The coverage lane reports 0 missing clusters where the OS has coverage, on macOS, Windows, Linux, the web and iOS.
  • One font collection per process, with 0 discovery operations on main before the first frame.
How to check

R0361 on each platform lane, plus a bundled-font subset in cargo test -p rune that runs everywhere.

Issues
Part of
  • Theme: T08
  • Phase 3 · priority P1 · size XL
R0559Text rendering: no platform's text parity is gated, and only macOS has a current measurementP1Phase 3XLT08
text-parity-tracking · tracking
What happens

On macOS, Rune's glyph masks match CoreGraphics within a few levels in unit tests. CHANGELOG.md records a mean error of 0.06 levels at 2x and 0.10 at 1x for a report paragraph. But the end-to-end CoreText test accepts ink ratios from 0.75 to 1.25, and it skips without a GPU.

Windows now rasterizes through DirectWrite as Chromium does. The changelog fragment says Inter and IBM Plex Mono land within about 2% of Chrome's ink at 100% and 150%. That number lives only in the fragment, and no test checks it.

Linux, the web and iOS draw with smoothing off. They use a coverage exponent fitted to Skia's grayscale text gamma, and nothing has measured them against their own platform's text. Flying text also draws its source glyphs with a different exponent than text at rest (R0107).

PLAN.md's second risk is matching a Chromium-drawn app's look. Its open question 5 asks whether Windows and Linux text should be grayscale or subpixel. Answering both needs a measured reference per platform and a gate that keeps it. That spans five platforms, their CI lanes and several rasterizer changes, so it is tracked here.

Where
Why it matters

Text weight and placement are what users read all day. A shade lighter or a half point higher than the platform's own text makes an app feel foreign. The target: "Glyphs match the platform reference on every platform at common scales and in both themes: Core Text on macOS and iOS, Chrome on Windows and Linux, the browser's own text on the web." Its thresholds are "Ink ratio 0.97-1.03 and MAE at most 0.5 levels per platform, scale and theme", and "Flight and rest use the same coverage exponent and mask path".

Done when
  • Every child issue and #107 are closed.
  • Each platform lane gates ink ratio 0.97-1.03 and MAE at most 0.5 levels at every scale and theme in the corpus.
  • Flights and resting text use the same coverage exponent.
How to check

The parity goldens from R0561, run on the macOS, Windows, Linux, web and iOS lanes on every push to dev.

Issues
Part of
  • Theme: T08
  • Phase 3 · priority P1 · size XL
R0560Text: glyph atlases are built per window, shaping and rasterizing run inside the frame, and some text caches never shrinkP2Phase 3XLT08
text-engine-glyphs-tracking · tracking
What happens

Each window and overlay owns a full TextSystem. Each has its own font collection, its own glyph atlas, and its own caches. An atlas page is 2,048 by 2,048 texels, a 4 MiB CPU copy plus its GPU texture. research/31 counts the CPU copy, about 4.2 MB, in every runtime. A glyph shown in two windows is rasterized twice. An overlay that draws no text still builds a text system when the app declares it.

Shaping and rasterizing run on the main thread, inside commit and paint. research/33 measured 9 ms of first-time glyph rasterization in one app's first paint, and 12 ms of text for 102 texts in another. Some caches have no bound. Empty-glyph entries, trak tables and per-weight maps grow under animation. The shaping scratch keeps the size of the largest text it ever shaped. The ink index wraps past 65,535 spans, and layout cache hits are never checked.

The fix spans text system ownership, the atlas, threading and every cache, so it is tracked here.

Where
Why it matters

Apps with a menu bar item, a HUD and a main window pay for text two or three times over, in memory and in first-use stalls. Opening a view should never hitch. The targets are "0 discovery operations on main before the first frame", "At most 4 ms of text work on main in any first-mount frame. At most 1 MiB per extra overlay. Every cache stays within its entry and byte bounds. 0 aliased spans or layouts, in release." They also include "A text-free overlay holds <= 1 MiB beyond its drawables" for GPU memory and "Zero Rune-caused tasks over 8.3 ms after the first frame".

Done when
  • Every child issue is closed.
  • A glyph shown in two windows rasterizes once, and a text-free overlay allocates no atlas page.
  • No first-mount frame spends over 4 ms of text work on main in the flagship examples.
  • R0376 passes with every text cache bounded.
How to check

R0376 in cargo test -p rune for bounds and aliasing. Per-frame text time on main comes from --profile perf runs. Overlay memory comes from procwatch and the GPU allocator's counts.

Issues
Part of
  • Theme: T08
  • Phase 3 · priority P2 · size XL
R0561Text rendering: no lane gates text parity per platform, and Windows and Linux text have no committed referenceP1Phase 3LT08
text-parity-goldens · infra
What happens

Rune measures its text against each platform by hand, and the measurements are not gated.

  • macOS. CHANGELOG.md and research/23 record numbers against Core Text. The CoreText pixel test runs only on macOS, with wide bounds. The Inter sheets are committed, but the SF and SF Mono sheets are drawn on the Mac and never committed, because Apple's fonts cannot be redistributed. So no CI run can see an SF regression.
  • Windows. The DirectWrite changelog fragment says Inter and IBM Plex Mono are within about 2% of Chrome's ink at 100% and 150%. There is no committed reference and no test.
  • Linux, the web and iOS. There are no reference captures at all.
  • Scripts. kit-diff.py compares the kit gallery with Storybook stories in headless Chromium. text-quality.py and text-goldens.py score and refresh stills. Each is run by hand, and none fails a build.

A change that thins Linux text or blurs web text by a few percent lands unnoticed.

Where
Why it matters

PLAN.md's quality bar: "If Rune text doesn't match native on a Retina Mac, nothing else matters" (PLAN.md:208-209). Its second risk is matching a Chromium-drawn app on Windows and Linux (PLAN.md:528-531). The target is "Ink ratio 0.97-1.03 and MAE at most 0.5 levels per platform, scale and theme", against "Core Text on macOS and iOS, Chrome on Windows and Linux, the browser's own text on the web". The tooling targets are "All 5 platforms and 8 variants run on 100% of dev pushes with 0 skips", and every hard subsystem gets "an obviously correct reference".

What would help

1. Corpus. Inter, IBM Plex Mono and the system UI font, at caption, body and title sizes, light and dark, at 100%, 125%, 150% and 200%. 2. Reference generators per platform, in the style of coretext-reference.sh:

  • Core Text on macOS and iOS;
    • Chrome with DirectWrite on Windows;
    • Chrome with FreeType on Linux (GNOME);
    • the browser's own text on the web.

Each run writes a manifest beside its references. It pins the OS, browser and font versions with font hashes, the scale and the smoothing mode. Running the generator twice on the same image must give the same bytes. 3. Comparison. Crop each line to its ink box plus 2 px. Align by an integer offset search within 1 px. Compute ink ratio and MAE on 8-bit coverage. 4. Commit the generators, the references where font licences allow, and the numbers. SF and other system fonts are drawn at test time on the macOS and iOS lanes from the pinned manifest. 5. Gate. Each lane fails outside ink 0.97-1.03 or above MAE 0.5. A re-bless is a reviewed commit with the new numbers and manifest.

The rasterizer changes that close a gap belong to R0566 and R0107. This issue supplies the reference and the gate.

Done when
  • Committed numbers exist for macOS, iOS, Windows, Linux and the web at each scale and theme, each with its pinned manifest.
  • Each lane fails when ink ratio leaves 0.97-1.03 or MAE exceeds 0.5 levels.
  • Running a generator twice on the same image gives identical references.
  • A re-bless needs a reviewed commit with the new numbers.
  • Windows is measured at 100%, 125% and 150%, and Linux at every corpus scale.
How to check

The parity tests on the macOS (R0161), Windows (R0162), Linux (R0168), web (R0062) and iOS (R0244) lanes, on every push to dev. The committed numbers are the baseline a regression is measured from.

Depends on
Part of
  • Theme: T08
  • Tracked in R0559
  • Phase 3 · priority P1 · size L
R0562Text fields: no issue takes keystroke p95 below 2 ms at 50 KB, though the target is 1 ms there and 2 ms at 200 KBP2Phase 3MT08
perf-typing-1ms · perf
What happens

A keystroke in one text_input holding a long note costs 12.0 ms median (12.2 ms p95) at 50 KB and 45.7 ms (46.6 ms) at 200 KB on an M4 Pro Mac mini, because every edit lays out the whole field again (research/27). The work under R0706 removes that cost. R0185 reshapes one paragraph, R0186 stops copying the note into history, and R0188 removes the other whole-text copies and scans. Its exit at 50 KB is 2 ms p95.

That 2 ms is an interim number. The typing target is 1 ms p95 at 50 KB and 2 ms at 200 KB, with AccessKit on. No issue owns the step from 2 ms to 1 ms, and nobody knows where the time goes once the whole-field reshape is gone. The paragraph-layout spike shaped one paragraph of a 50 KB note in 0.10 ms median and 0.14 ms p95, so shaping is not what stands in the way. The rest is view, commit, the accessibility update, paint, and per-commit work that still reads the whole text. research/27 put that last part at about 0.3 ms at 200 KB.

Where
Why it matters

People who keep long notes, logs or chat drafts in one field type into it all day. At 120 Hz a frame is 8.3 ms, and a keystroke shares it with layout, paint, GPU submit and the app's own work. A 2 ms keystroke fits in a quiet window, but not beside a stream or an animation. The target: "Typing stays inside one frame in large documents", with "p95 <= 1 ms at 50 KB, <= 2 ms at 200 KB, <= 4 ms at 1 MB, including the single-paragraph fixture", and with a screen reader active, at most 0.3 ms extra per keystroke at 200 KB.

What would help

1. After the composite layout, delta undo and copy removal land, run long_note type_mid at 50 and 200 KB, plain and rich, with AccessKit on, at --profile perf on the reserved Mac. 2. Split each keystroke into handler, view, commit and diff, shaping and line breaking, the AccessKit update, and paint. Use the phase CPU the frame log already writes, and add any phase it doesn't split yet, such as the accessibility update. 3. Record the split in research/27 and cut the largest costs first. Costs to check: whole-text hashing for cache keys, the accessibility text value rebuilt for the whole field, and caret and selection geometry that walks every line. 4. Add a count budget for each cost removed, so a later change can't bring it back.

Done when
  • Keystroke p95 is at or below 1 ms at 50 KB and 2 ms at 200 KB, plain and rich, with AccessKit on, as the median of 5 paired, alternating runs on the reserved Mac.
  • Preedit updates meet the same numbers.
  • The phase split before and after is recorded in research/27.
  • Count budgets cover every whole-text copy and scan left in a keystroke.
How to check

long_note on the macOS lane from R0125 fails when keystroke p95 goes above these numbers. The count budgets run in cargo test on every change. R0363 reports the same keystrokes as event-to-present time.

Depends on
Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 3 · priority P2 · size M
R0563Text: every window and overlay keeps its own glyph atlas, 4 MiB CPU plus 4 MiB GPU per page, allocated even with no textP2Phase 3LT08
text-glyph-core · perf
What happens

Every TextSystem owns an Atlas, and Atlas::new allocates page 0 as a 2048x2048 byte buffer, 4 MiB. Every Renderer::new creates a matching 2048x2048 R8Unorm texture for page 0, another 4 MiB. Rune's Metal backend zero-fills each new texture, so that memory is resident at once. Each further page adds 4 MiB on each side, up to 2 steady pages and 8 in all.

A main window, each overlay and the key-caps overlay each build their own text system and renderer. A window with two overlays holds 12 MiB of glyph textures, plus their CPU buffers, before it draws one glyph. A HUD overlay with no text pays the same as a window full of text. A glyph shown in two windows on one GPU is rasterized and stored twice. The per-thread text system that measure() uses also builds an Atlas, though it never draws.

The CPU buffer lives as long as its page. Upload reads it for dirty rows, and resends the whole page when the staging belt lost its writes. #163 reports the same pattern for image pages.

Where
Why it matters

Apps with a HUD, a menu-bar panel or a floating overlay pay 8 MiB or more for each one. People see it in Activity Monitor next to native apps. Targets: "A text-free overlay holds <= 1 MiB beyond its drawables, and a hello window <= 8 MiB" of GPU memory; "A text-free overlay adds <= 2 MiB" of footprint, with a Mac hello at or below 30 MiB; and "Fonts and glyph pages are shared across windows", with "At most 1 MiB per extra overlay".

What would help

Two steps, each in its own PR.

1. Lazy page 0. Leave Atlas::data empty until the first glyph is placed, and create the glyph texture on first upload. Bind the 1x1 stand-in until then. Give the measuring text system no atlas. One proposal starts page 0 at 512x512 and grows it; growth needs a repack, so measure after the lazy step before doing that. 2. A `GlyphCore` per GPU device. It owns the glyph pages, their shelves and the glyph map, and rasterizes each key once. Each runtime keeps its own placement and use table, so a page's age counts use from every window that draws from it. Keys already carry the smoothing mode, phase and scale, so windows in different modes share pages without mixing masks. Free a page's CPU rows once the texture write is done. On a lost device or lost staging, rasterize the page's live glyphs again instead of resending a copy.

Care points: renderer drop order, a window that moves to another device, and per-runtime text system lifetimes. R0072 counts the shared pages once per device.

Done when
  • A text-free window or overlay holds 0 glyph bytes, CPU and GPU.
  • An extra overlay with text adds at most 1 MiB of text memory.
  • A glyph shown in two windows on one device rasterizes once (count test).
  • The measuring text system allocates no atlas.
  • Glyph goldens are unchanged.
  • Tests cover growth, eviction, smoothing and scale variants, renderer drop order and lost staging.
How to check

Count and byte-gauge tests on lavapipe in cargo test. On the macOS lane, the overlay_hud_cost example (an overlay with an empty view) reports glyph bytes, and the procwatch footprint gauge records the cost of each extra overlay.

Depends on
Part of
  • Theme: T08
  • Tracked in R0560
  • Phase 3 · priority P2 · size L
R0564Text: nothing opens PLAN's 100 MB text file, so its 250 ms first-viewport target is unmeasuredP2Phase 3MT08
text-large-file-spike · research
What happens

PLAN §8 sets a target for a 100 MB text file on a Mac: first usable viewport at p95 of 250 ms or less, with peak extra memory at most 2.5x the file size. Nothing in the tree opens a file that size. long_note takes any size, but it defaults to 5, 50 and 200 KB, and no recorded run goes past 200 KB. No example shows a large file read-only.

What is known points away from one String laid out whole. A whole-note layout holds about 90 bytes of heap per byte of text (research/27), so laying out 100 MB at once needs about 9 GB against a 250 MB limit. Shaping costs about 0.22 ms per KB, about 22 s for 100 MB. Undo history is bounded at 1 MB. So the target needs a viewer that shapes only what is on screen. Nobody has measured whether virtual_rows over millions of lines gets there, or where a String-backed text_input stops keeping up on the way to 10 MB.

Where
Why it matters

Log viewers, diff tools, data files and editors open files far larger than a note. If the first open takes seconds, or the process grows tenfold, the app looks broken. The targets: "First usable viewport p95 at or below 250 ms. Peak extra memory at most 2.5x the file size. Typing p95 at or below 4 ms at 10 MB."

What would help

Build crates/rune/examples/big_file.rs beside long_note:

  • A read-only viewer: a line index built from the file, virtual_rows over lines, selection across rows, find, and copy.
  • An editor mode: a text_input holding a 10 MB file, to find where editing breaks.
  • Generated, deterministic content: Markdown as long_note makes it, log-style lines, and single lines up to 1 MB.

Measure open (to the first usable viewport), scroll frame CPU, select-all, copy, a keystroke, and peak extra memory, at 10 MB and 100 MB, at --profile perf on the reference Mac. Write a research note with p50 and p95 and the memory ratio.

Then decide go or no-go on R0707 by its trigger: typing p95 above 4 ms at 10 MB after R0185 and R0188 land. File a child under R0706 for each missed target. R0708 owns the viewport and memory targets.

Done when
  • big_file is in the tree, with its command line in its header.
  • A research note gives p50 and p95 for open, scroll, select-all, copy and a keystroke, and the peak memory ratio, at 10 MB and 100 MB.
  • The note records whether the Document trigger fired.
  • Each missed target has a filed issue.
  • PLAN §8 links the note.
How to check

Re-run big_file at --profile perf before and after each editing-scale change, as paired, alternating runs compared by median of 5, and update the note. R0708 turns the viewport and memory numbers into a lane.

Depends on
Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 3 · priority P2 · size M
R0565Text fields: a keystroke in one long paragraph with no line breaks still reshapes the whole paragraphP2Phase 3MT08
text-long-paragraph · perf
What happens

The planned paragraph split (R0185) cuts a field's text at \n. A field that holds one long paragraph stays one unit, so every keystroke in it still runs font selection, text analysis, HarfRust shaping and line breaking over all of it. Common cases: pasted minified JSON, a long log line, a base64 blob, and prose written with soft wraps only.

Nobody has measured this case. Shaping costs about 0.22 ms per KB (research/27), so a keystroke in a 200 KB paragraph should cost about 44 ms, as much as a whole 200 KB note does today. A 1 MB paragraph would cost about 220 ms. Zed and browsers reshape below the paragraph level.

Where
Why it matters

One paste of a JSON response into a request body or a notes field makes typing drop frames for as long as it is there. Targets: typing, deleting, pasting and preedit stay "inside one 120 Hz frame at any field size up to 1 MB ... a single long paragraph included", with "At or below 4 ms in each 200 KB single-paragraph case" and "Bytes shaped per keystroke at most the reshaped paragraph or window plus 1 KB"; and keystroke p95 "<= 4 ms at 1 MB, including the single-paragraph fixture".

What would help

Measure first. R0109 adds one 200 KB paragraph of prose, one of minified JSON with no spaces, and one of mixed Arabic and Latin.

Two ways to reshape less were proposed:

  • A window around the edit (recommended). Shaping already runs per bidi and script run, so a run boundary is always a safe cut. Inside a run, cut at the nearest glyph without HarfRust's unsafe-to-break flag, at least 1 KB before and after the edit. Reshape that window, splice its glyphs into the cached runs, and re-break the lines from the cached runs, as a width change already does. Bytes shaped stay near 2 KB whatever the paragraph's length.
  • Fixed chunks of about 4 KB at break opportunities, each shaped under its own key, with whole-paragraph shaping as the fallback when a bidi run or a cluster crosses a chunk edge. It is simpler to cache, but the fallback brings the full cost back in mixed-script text.

Keep the whole-paragraph path for paragraphs under 4 KB. First check how Parley exposes HarfRust's unsafe-to-break flag through its layout, since that decides how far the window has to reach into Parley.

Done when
  • A keystroke in each of the three 200 KB single-paragraph cases has p95 at or below 4 ms (--profile perf, reserved Mac).
  • A keystroke in a 1 MB single paragraph has p95 at or below 4 ms.
  • Bytes shaped per keystroke are at most the reshaped window plus 1 KB in every case.
  • Glyph positions, line boxes and caret rects match a full reshape in R0184, with Latin, CJK, Arabic, emoji and mixed bidi.
How to check

A count budget on bytes shaped per keystroke runs in cargo test. The composite differential runs its seeded cases on every merge with the windowed path on. long_note numbers for the three cases go in research/27.

Depends on
Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 3 · priority P2 · size M
R0566Text: Linux, the web and iOS draw with a gamma fitted to Chromium on Windows, and hint only at integer ppem from 7 to 18P2Phase 3LT08
text-platform-profiles · feature
What happens

Off macOS and Windows, FontSmoothing defaults to Off. That draws CoreGraphics' pipeline without dilation, and raises coverage to an exponent from TEXT_GAMMA [1.12, 0.45], a curve fitted to Skia's grayscale text gamma as Chromium draws it. Linux, the web and iOS all get this curve. Their references differ: Chrome under the user's fontconfig settings on Linux, the browser's own text on the web, and Core Text without smoothing on iOS.

Vertical fitting is narrow too. The autohinter runs only at integer ppem from 7 to 18. At 125%, of 11, 12, 13 and 14 px text only 12 px (15 ppem) is fitted. At 150%, only 12 px (18 ppem) is. fontconfig is asked only for the monospace family. Its hintstyle, antialias, rgba and lcdfilter settings are not read.

Windows now matches Chromium through DirectWrite, within about 2% of Chrome's ink. Each other platform needs the same kind of fit.

Where
Why it matters

People compare an app's text with every other app on their screen. Text that is a little light, soft at 125%, or half a point off reads as not native, even when nobody can say why. The target: glyphs match "Core Text on macOS and iOS, Chrome on Windows and Linux, the browser's own text on the web", with "Ink ratio 0.97-1.03 and MAE at most 0.5 levels per platform, scale and theme", and flight and rest using "the same coverage exponent and mask path".

What would help

An internal TextProfile, chosen at startup per platform, that holds:

  • the raster pipeline;
  • the gamma or contrast table;
  • pen steps;
  • a vertical fitter that works at fractional ppem;
  • line-box placement, which can answer #107 per profile.

Per platform:

  • Linux reads fontconfig's hintstyle, antialias and rgba, and fits Chrome on GNOME.
  • iOS fits Core Text without smoothing.
  • The web fits the host browser on each host OS.

Profiles are data, tuned against R0561, not new rasterizers. FontSmoothing stays the public switch. Flights use the profile's coverage path, which R0107 makes the same as rest.

Done when
  • Linux, the web and iOS each meet ink ratio 0.97-1.03 and MAE at most 0.5 levels on their parity lanes, at every scale and theme.
  • Text at 125% and 150% is fitted at 11 to 14 px (unit test on fitter eligibility).
  • Changing fontconfig's hintstyle moves Rune's output in the same direction as Chrome's.
  • macOS and Windows goldens are unchanged.
How to check

The per-platform parity lanes from R0561 fail outside the thresholds. Unit tests in cargo test cover profile selection and fitter eligibility.

Depends on
Part of
  • Theme: T08
  • Tracked in R0559
  • Phase 3 · priority P2 · size L
R0567Web: emoji and CJK text draw as boxes unless the app bundles the fontsP2Phase 3MT08
text-web-font-fallback · feature
What happens

The web build has no system font discovery. It embeds Inter and IBM Plex Mono. Fonts given with App::font_url are fetched once, during GPU setup, before the first frame, and after that the font collection is fixed. Text in a script those fonts lack draws missing-glyph boxes. WEB.md says so: missing emoji and CJK glyphs "do not trigger font downloads".

To show what people type, an app has to bundle Noto Color Emoji (about 10 MB) and CJK fonts into the wasm or the page. That is several times the whole cold-load budget. Native builds fall back to system fonts for most scripts, with gaps like #209, so the same app shows text natively that it can't show on the web.

Where
Why it matters

A chat, notes or agent app on the web shows whatever people type or paste, emoji and CJK included. Boxes in place of text look broken. Targets: "Any cluster the operating system's own text stack draws, Rune draws, in the right locale's glyphs, and emoji draw in colour", with "0 missing clusters where the OS has coverage"; and the web is "a first-class target in every browser engine", with each .wasm at most 1.5 MB brotli and the cold load at most 2.2 MB brotli.

What would help

On-demand fallback:

1. When shaping finds clusters no loaded font covers, find their script and fetch a unicode-range subset for it from a base URL the app sets with a builder method on App. AppSpec is built as a literal, so it gets no new pub field. 2. Register the font in the shared R0358 and reshape the affected texts once, in a later frame, with no layout loop. 3. Use the Local Font Access API where the user has granted it. 4. Bound the downloaded fonts in bytes. On a failed or offline fetch, keep drawing boxes, and retry at most once per script per session. 5. Record each fetch in traces.

The proposals differ on the default source: (a) the app's own assets, or (b) a public Noto host. Recommend (a). It makes no third-party request unless the app opts in, and it works offline and under strict content policies. Ship subset files, including a small emoji option, that an app copies into its assets, and let apps preload the scripts they expect.

Done when
  • CJK, Arabic, Devanagari, Thai and emoji draw on the web after one fetch per script, mixed-script lines included.
  • No fetch happens for text the loaded fonts cover.
  • Text reflows once when a font lands.
  • An offline fetch leaves visible boxes, not blank text, and retries at most once.
  • Fetched bytes stay under a documented bound for a CJK sample page.
  • WEB.md documents the builder method.
How to check

R0361 runs on the browser lanes from R0062 and reports 0 boxes for covered samples once fetches settle. A browser smoke with mixed-script strings and an offline case checks the retry rule.

Depends on
Part of
  • Theme: T08
  • Tracked in R0558
  • Phase 3 · priority P2 · size M
R0568Text: nobody has measured whether DirectWrite's grayscale text still trails ClearType and LCD textP3Phase 3MT08
text-lcd-spike · research
What happens

Chrome on Windows, and on Linux setups with subpixel rendering on, draws LCD subpixel text on opaque backgrounds. Rune draws grayscale everywhere. #63 measured the gap on a 1080p Windows display at 100%: Rune's text had 0.40 sharpness (the share of inked pixels above 75% coverage) against 0.48 for GDI+ ClearType. That was before the DirectWrite path, and #63 is closed.

The DirectWrite path now lands within about 2% of Chrome's ink at 100% and 150%, but it still draws grayscale. Nobody has measured how much sharpness is left between it and Chrome's LCD text, or whether people can see the difference. PLAN's open question 5 is still open.

Where
Why it matters

On a 1080p display at 100%, people put Rune apps next to Discord, VS Code and Zed, and soft text is the first thing they name. An LCD tier is costly: dual-source blending, RGB atlas pages, and rules for translucency and motion. The choice should rest on numbers. The target: glyphs match "Chrome on Windows and Linux", with "Ink ratio 0.97-1.03 and MAE at most 0.5 levels per platform, scale and theme".

What would help

Repeat #63's method on the current DirectWrite path:

  • a 1080p Windows display at 100% with ClearType on, and a GNOME display with rgba set;
  • compare against Chrome's LCD text on the parity corpus from R0561;
  • measure sharpness, and run a blind A/B with at least 10 viewers.

Decision rule: build an LCD tier only if at least 70% of viewers prefer LCD, or Rune's sharpness trails Chrome's by more than 0.05. Any LCD tier stays off over translucency and during motion, and doesn't become a default without committed parity numbers.

Done when
  • A research note gives sharpness and A/B results for both displays, next to #63's table.
  • The note records the decision on open question 5, made by the rule above.
  • PLAN §12 links the note.
How to check

The note records the build, display, scale, ClearType or fontconfig settings and corpus, so anyone can repeat the measurement. If the decision is to build a tier, it gets its own issue with parity lanes.

Depends on
Part of
  • Theme: T08
  • Tracked in R0559
  • Phase 3 · priority P3 · size M
R0569Text: a weight the font family lacks never gets synthetic bold, so a heavy weight draws at the nearest lighter faceP3Phase 3ST08
text-synthetic-bold · bug
What happens

When a family has no face near the requested weight, fontique can ask for synthetic bold. Its FontInfo::synthesis sets embolden when the face has no wght axis and the requested weight is more than 200 above the face's. Rune never reads that flag. It reads the synthetic oblique and draws it, but not emboldening. So a family that ships only Regular, asked for Bold (700), draws Regular, where browsers draw a synthesized bold.

Colour glyphs ignore emboldening by design. Plain glyphs ignore it too, and the atlas key has no place for it.

Where
Why it matters

Headings and labels in a custom or bundled font lose their weight, so a hierarchy the design shows in the browser goes flat in the app. Targets: Rune draws any cluster "the operating system's own text stack draws", and glyphs match the platform reference with "Ink ratio 0.97-1.03 and MAE at most 0.5 levels per platform, scale and theme".

What would help

When a run's synthesis asks for emboldening, apply it as browsers do: an outline outset that scales with the text size, as Skia's fake bold does.

  • Apply it in both raster pipelines: the outline pipeline behind On and Off, and on Windows either DirectWrite's bold simulation or the same outset, whichever lands closer to Chrome.
  • Add an embolden bit to GlyphKey, so emboldened and plain masks of one glyph never share an entry.
  • Leave colour glyphs as they are.
  • Check whether Chrome changes advances for synthetic bold, and match it.
Done when
  • A Regular-only family at weight 700 draws heavier than at 400 (ink ratio test).
  • Ink at weight 700 is within 5% of Chrome's synthetic bold on the parity corpus, at each scale and theme.
  • A face with a wght axis, or within 200 of the requested weight, draws as before (golden).
How to check

A unit test in cargo test covers the ink ratio and the atlas key. The parity lanes from R0561 include a synthetic bold sample on each platform.

Depends on
Part of
  • Theme: T08
  • Tracked in R0558
  • Phase 3 · priority P3 · size S
R0570Text input: input methods ride winit's four-event stream, so overlays and system text services get no document contextP0Phase 3XLT09
text-ime-tracking · tracking
What happens

On the desktops, input methods reach Rune as four winit events: Preedit, Commit, Enabled and Disabled. An input method cannot ask for the text around the caret, replace a range, read clause attributes or get a rect for a range. Windows uses winit's IMM32 path. Linux uses XIM on X11 and winit's text-input-v3 client on Wayland. Fields in overlays get no IME at all. The web bridge already applies replacement edits with stale-snapshot checks, but under its own rules, and its hidden field sits at the page's top-left.

This tracker covers the change to one Rune-owned TextInputClient over TextEdit. Thin adapters for macOS, TSF, Wayland, X11, the web textarea, EditContext, overlays and app-drawn editors implement it. Replay fixtures, fuzzing and real-IME lanes prove it. It takes many issues because each platform has its own protocol, its own failure paths and its own lane. Each adapter also changes key routing, so it ships behind a switch and earns its default separately.

Where
Why it matters

Everyone who types through an input method notices: CJK, Korean, Vietnamese, dead keys, press-and-hold, the emoji picker, dictation. The targets: "no sequence of input-method events, app edits, focus changes and window events loses, duplicates or misplaces text". "0 invariant violations in 100,000 seeded sequences per T1 run." The anchor rect is "within 1 pt of the caret rect at 100%, 125%, 150% and 200%", with "at most 4,096 units per query" and "under 1 ms per query". Undo groups IME commits as the native field does, with "100% of recorded grouping sequences" matching. Fields are complete for assistive technology.

What would help

Land the protocol and replay fixtures first, then the adapters on top. Each adapter ships opt-in and soaks before it becomes the default. iOS UITextInput is tracked with the iOS shell, and caret bounds for accessibility APIs with the accessibility theme.

Done when
  • Every child issue is closed.
  • 100% of headless scenarios pass on each adapter they apply to, and 100,000 seeded fuzz sequences per T1 run show 0 invariant violations.
  • Every real-IME lane scenario passes on the pinned OS and IME versions at each release cut.
  • The docs carry a per-platform IME matrix built from executed results (R0383).
How to check

Replay and fuzz tests in the T1 gate. The browser lane and the real-IME lanes in T2. The generated matrix in the docs.

Issues
Part of
  • Theme: T09
  • Phase 3 · priority P0 · size XL
R0571Text fields: spell check, autofill, Writing Tools and other system text services are missing on every platformP2Phase 3XLT09
text-services-tracking · tracking
What happens

A native text field offers spell check, autocorrect and the user's text replacements, dictation, Writing Tools, Look Up, password and one-time-code autofill, input purpose, text drag and drop, and a Cut, Copy, Paste and Select All menu. A Rune field offers secure entry. On macOS, even that claim is made only for windows: overlays never claim secure input.

What the platform inserts by itself reaches the field: the web's input events, and dictation through winit's commit. Services that need to read or mark up the document do not. No spell-check code exists in Rune. The web password sink sets autocomplete="off". #109 measured that autofilling a 13-character password into a field with 8 typed characters leaves 21. Rune Kit has a context_menu component, but no field opens one.

This tracker covers the desktop and web cells of the services matrix. It takes several issues because each service has its own platform API, and some services need R0113 first.

Where
Why it matters

Users notice a field with no red squiggle, no autofill and no right-click menu at once. To them it does not feel native. The target: "Rune fields offer each service in a fixed matrix that the platform's native field offers", with "100% of cells filled", and limits only where named: "the web has no spelling, Look Up or Writing Tools API for custom-drawn text, and Linux has no Writing Tools or Look Up". For assistive technology, "autofill leaves exactly the filled value".

What would help

Keep the matrix fixed now and close it cell by cell. Dictation, the emoji picker and Look Up come through R0193 and the other adapters. Input purpose comes through R0116, and secure input in overlays through R0115. The iOS AutoFill and Writing Tools cells live with the iOS text input. If Apple offers no API for custom views, the cell becomes a proposed named limit, not a closed issue.

Done when
  • Every child issue is closed.
  • Every desktop and web cell of the matrix is filled by a passing test or lane step, or by a named limit.
  • macOS password and one-time-code AutoFill pass a native comparison fixture.
  • The matrix appears in the docs (R0383).
How to check

The services matrix is generated from executed results. T2 smoke steps cover each service on each platform.

Issues
Depends on
Part of
  • Theme: T09
  • Phase 3 · priority P2 · size XL
R0572Text input: no lane types into a Rune field with a real input method on Windows or LinuxP1Phase 3LT09
text-ime-lanes-desktop · infra
What happens

On Windows and Linux, IME behaviour depends on winit, the OS and the input method daemon, and no test runs a real input method. Windows input goes through winit's IMM32 path. Linux input goes through XIM on X11 and through winit's text-input-v3 client on Wayland. Rune maps winit's four events one to one and sends one caret rect. A regression in composition, candidate placement or commit handling reaches apps unseen. The repo's CI runs only the site workflows, so no Windows or Linux window path runs automatically (R0063, R0071).

On Linux the daemon can also restart under a live composition. IBus and Fcitx5 behave differently there, and only a real daemon shows what happens.

Where
Why it matters

Windows and Linux users of Japanese, Chinese and Korean input methods are the first to see a broken composition or a candidate window at the wrong place. The target: "100% of real-IME lane scenarios pass on the lane at each release cut. A failure becomes a replay fixture, and the release waits until it passes." The candidate window should be "within 2 pt where the OS places it at the anchor", at 100%, 125%, 150% and 200%.

What would help

Reuse the harness from R0189: its scenario format, reading results through --tree, measuring the candidate window from a screenshot, and writing failures as fixtures. Add post-merge T2 lanes on reserved machines with pinned OS and IME versions.

  • Windows: MS-IME Japanese, Microsoft Pinyin and Microsoft Korean, in a window and in an overlay.
  • Linux: Fcitx5 and IBus on GNOME Wayland, KDE Wayland and Xvfb (X11). One scenario restarts the daemon in the middle of a composition.
  • Each lane runs at 100, 125, 150 and 200%. It records the candidate window's offset from the caret rect for each scenario.
  • The lanes run on push to dev and on dispatch, never on pull_request, since the machines are self-hosted and the repo is public.
  • A failure writes its replay fixture, opens an issue with the fixture attached, and blocks the next release cut.
Done when
  • Every language scenario passes on Windows and on each Linux desktop at all four scales, at each release cut.
  • The candidate window's offset is recorded per scenario and stays within 2 pt.
  • A daemon restart mid-composition loses and duplicates no committed text.
  • A failing scenario opens an issue with its fixture, and the release is not cut until it passes.
  • The lane results feed the docs matrix (R0383).
How to check

The lanes run as part of the T2 platform matrix. Each committed fixture runs headless in T1 from then on.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 3 · priority P1 · size L
R0573Windows: IME goes through winit's IMM32 path, so reconversion, touch-keyboard prediction, Win+H dictation and emoji replacement have no documentP1Phase 3LT09
text-ime-windows-tsf · feature
What happens

On Windows, winit 0.30.13 drives the input method through IMM32 (ImmGetCompositionStringW, ImmSetCompositionWindow and the WM_IME_* messages). It does not read the clause attributes (GCS_COMPATTR) that IMM32 gives. Rune receives four event kinds from it, Preedit, Commit, Enabled and Disabled, and gives back only a cursor area and an on/off switch.

Windows 11's input stack expects a TSF text store with document access. Without one:

  • reconversion of committed text does not work;
  • the touch keyboard cannot predict from the text around the caret;
  • Win+H dictation cannot correct or replace what it already inserted;
  • the Win+. emoji panel cannot replace a selection;
  • a multi-clause Japanese conversion draws as one undifferentiated preedit.

Overlays get no IME at all: the overlay host has no Ime arm, so a WS_EX_NOACTIVATE palette takes no CJK input.

Where
Why it matters

Japanese, Chinese and Korean users on Windows notice first: no clause underlines, no reconversion, candidate windows that drift. Touch-keyboard and dictation users notice next. The targets are: "every supported input method talks to a Rune-owned document protocol, in windows, overlays, palettes and app-drawn editors", with "the candidate window within 2 pt" of the caret at 100%, 125%, 150% and 200%. Text input must use "each platform's own protocol in windows, overlays, panels", with at most 4,096 units and under 1 ms per query. Windows apps should "behave like native Windows 11 apps on every DPI, GPU and input device". The emoji panel and dictation are cells in the services matrix.

What would help

Add a TSF adapter under platform/win32/tsf/, backed by R0113:

  • An ITfThreadMgr and ITfDocumentMgr on winit's HWND and on each WS_EX_NOACTIVATE overlay, with an ITextStoreACP2 over the protocol.
  • TSF lock requests map to protocol edit sessions. OnTextChange, OnSelectionChange and OnLayoutChange come from protocol notifications.
  • Display attributes become clauses for R0192. Input scopes come from R0116. GetTextExt answers from first_rect.
  • While TSF owns a field, winit's IME is off (set_ime_allowed(false)), so no keystroke or commit arrives twice.
  • Start with ACP read and write, and add TSF features as tests ask for them. Do not fork winit.

Ship it opt-in (a feature plus RUNE_TEXT_INPUT=tsf), with IMM32 as the default. Make TSF the default after one release of green Windows lanes, and keep IMM32 selectable after that.

Done when
  • An MS-IME Japanese multi-clause conversion draws its clause underlines in a window and in a WS_EX_NOACTIVATE overlay.
  • Japanese and Chinese reconversion of committed text works.
  • Win+. replaces a selection. Win+H dictation inserts and replaces text. The touch keyboard's suggestions insert correctly.
  • The candidate window sits within 2 pt of the caret at 100%, 125%, 150% and 200%.
  • Every text-store query reads at most 4,096 UTF-16 units and answers in under 1 ms.
  • No keystroke or commit is delivered twice while TSF is on (test).
  • Lock and edit-session ordering and focus teardown pass as TSF replay scenarios.
  • The IMM32 path stays selectable.
How to check

Headless TSF replay scenarios from R0114 in T1 drive the text store through ITfContext as an IME does. The Windows real-IME lane on R0063 runs MS-IME Japanese, Microsoft Pinyin and Korean at four scales in T2, plus a per-release manual CJK checklist.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 3 · priority P1 · size L
R0574macOS: password and one-time-code AutoFill never offer to fill a Rune fieldP2Phase 3MT09
text-autofill-macos · feature
What happens

On macOS, an NSTextField or NSSecureTextField with a content type of username, password, new password or one-time code gets AutoFill. The system offers saved passwords from the keychain, suggests a strong new password, and fills a code that arrived in Messages or Mail. A Rune login form offers none of these.

There are two reasons. First, a Rune field cannot say what it holds: there is no purpose or content type, only secure(). Second, on macOS the first responder is winit's view. It answers NSTextInputClient and has no content type. While a secure field has focus, Rune turns the input method off and claims secure input, so nothing reaches the field except keystrokes.

Where
Why it matters

Users type long passwords by hand, or copy them from a password manager, in every Rune sign-in form. Codes from Messages do not fill. Native apps fill both in one click. The services target says Rune fields offer "password and one-time-code autofill" wherever the platform's native field does, with "100% of cells filled" and "no limit used beyond those named". The assistive-technology target says each field carries its "purpose for autofill", and "autofill leaves exactly the filled value".

What would help

1. Map R0116's Username, CurrentPassword, NewPassword and OneTimeCode to the NSTextContentType values AppKit reads, on the view from R0193. Adopt NSTextContent on that view and set contentType from the focused field. 2. Treat a fill as one whole-field replace through the protocol. For a secure field, the filled value never goes into an NSString that outlives the call, and the old value is zeroed, as Ime drop does today. 3. Keep the secure-input claim balanced across a fill.

First build a spike: a plain custom NSView with NSTextInputClient and NSTextContent, next to an NSSecureTextField fixture. If AppKit offers custom views no AutoFill path, record that and propose a named limit for the services matrix. Do not close this issue as delivered in that case.

Done when
  • A Rune login form (username, password) gets the same AutoFill suggestions as an NSTextField and NSSecureTextField fixture with the same content types.
  • A new-password field gets the strong-password suggestion.
  • A one-time-code field fills a code from Messages.
  • A fill leaves exactly the filled values: no leftover typed characters, no duplicates (test).
  • The secure-input claim is balanced after 100 fills.
  • The services matrix cell is filled from this test, or a proposed named limit is filed.
How to check

A native comparison fixture on the macOS lane: the same form built from AppKit fields and from Rune fields, with a test keychain entry, checked step by step. A headless test drives a whole-field replace through the protocol and checks the value and the secure-input count.

Depends on
Part of
  • Theme: T09
  • Tracked in R0571
  • Phase 3 · priority P2 · size M
R0575Wayland: winit's text-input-v3 client sends no surrounding text or content type, and layer-shell overlays get no IMEP2Phase 3LT09
text-ime-wayland · feature
What happens

On Wayland, Rune uses winit's zwp_text_input_v3 client and passes it only a cursor area. winit 0.30.13 never calls set_surrounding_text or set_content_type. So:

  • Fcitx5 and IBus cannot predict from context or reconvert.
  • delete_surrounding_text, which Hangul and some Pinyin engines send, has no path to the field.
  • A password field cannot tell the input method to stay out of the way.

Layer-shell overlays get no IME at all. They run on a private event queue with their own seat and bind pointer, touch and keyboard, but no text-input object. A launcher on sway or KDE takes no CJK input.

Where
Why it matters

CJK and Korean users on GNOME, KDE and sway get weaker suggestions than in GTK or Chromium, and Hangul editing can misplace text. Launcher-style overlays cannot take CJK input at all. The targets: "every supported input method talks to a Rune-owned document protocol, in windows, overlays, palettes", "no sequence of input-method events ... loses, duplicates or misplaces text", and text input uses "each platform's own protocol in windows, overlays, panels", at most 4,096 units and under 1 ms per query. Linux must work "on each declared desktop", or carry a documented protocol limit.

What would help

Add a Rune-owned zwp_text_input_v3 client on winit's wl_display, in a private queue, as layer_shell.rs already does for its own protocols:

  • Turn winit's client off on surfaces Rune drives. Keep one client per seat, shared by windows and layer surfaces.
  • Send surrounding text from R0113's window around the caret, cut to the protocol's 4,000-byte limit on a UTF-8 boundary, with byte offsets.
  • Send the content type from R0116, and the cursor rectangle from first_rect.
  • Buffer preedit_string, commit_string and delete_surrounding_text until done, apply them as one protocol edit session, and drop events whose serial is stale.
  • When the compositor has no zwp_text_input_manager_v3, fall back to winit's path.
Done when
  • Fcitx5 and IBus on GNOME, KDE Plasma and sway pass the preedit, commit and delete_surrounding_text replay scenarios.
  • The lane log shows set_surrounding_text after each caret move, with correct byte offsets for multibyte text.
  • Events before done apply atomically, and a stale serial changes nothing (replay test).
  • A layer-shell overlay field composes Japanese.
  • Password and email purposes reach the input method as content types.
  • Only one text-input client exists per seat (test).
  • The candidate window sits within 2 pt of the caret at 100%, 125%, 150% and 200%.
How to check

Headless replay tests from R0114 in T1, with a fake text-input-v3 input method. The Linux real-IME lanes on R0071 run Fcitx5 and IBus on GNOME, KDE and sway in T2, and the per-release device checklist covers real input methods.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 3 · priority P2 · size L
R0576Text input: Voice Control and Voice Access cannot select or correct words in a Rune fieldP2Phase 3MT09
a11y-native-text-input · feature
What happens

Rune takes text from the input method through winit's four IME events: Preedit, Commit, Enabled and Disabled. Plain dictation can still insert text, because it ends in a commit. Voice editing cannot work this way. macOS Voice Control ("select <word>", "correct that") and Windows Voice Access ("correct <word>") need the app to answer for document context: the selected and marked ranges, the text around them, a rect for a range, and an insert that replaces a given range. Dictation that replaces a range and IME reconversion need the same answers.

The AccessKit tree already has part of this. An editable field takes SetTextSelection and ReplaceSelectedText, and exposes its lines as text runs. But a field longer than 64 KB gets no per-character runs. Also, the input-method side gives the system no ranges, so a dictation correction cannot say which word it replaces.

Where
Why it matters

People who cannot type use voice to write and fix text. If "correct word" fails in a Rune field, they must retype or switch apps. The targets: "IME, dictation, voice editing and secure entry use each platform's native text protocol", and "Voice Control, Voice Access and Switch Control can reach and operate every control", with each human check less than 6 months old. The input-method target asks for "insert and set-marked with a replacement range" and "reconversion" on every adapter.

What would help

This issue adds accessibility acceptance on top of the desktop adapters. It does not build a new protocol:

  • macOS, through R0193: insertText:replacementRange: and setMarkedText:selectedRange:replacementRange: land in the field. AXSelectedTextRange from AccessKit equals the editor's selection after every edit, including edits the input method makes.
  • Windows, through R0573: TSF reconversion of a committed word, and Voice Access correction through the text store.
  • Linux, through R0575: surrounding text reaches the input method. Linux has no Voice Control or Voice Access, so this is the only Linux row.
  • Secure fields use each platform's secure entry and take no voice editing.

The macOS view swap can break key routing, menus and shortcuts, so it stays opt-in until its soak passes.

Done when
  • On macOS, insertText:replacementRange: lands in the field, and AXSelectedTextRange equals the editor's selection after every edit (test).
  • On Windows, TSF reconversion of a committed word works in a GUI test.
  • On Linux, surrounding text reaches the input method in a text-input-v3 test.
  • Voice Control "select <word>" and "correct <word>" work on macOS, and Voice Access "select <word>" and "correct <word>" work on Windows 11, scripted or as human checks less than 6 months old.
  • Each result fills its cell in the WCAG matrix, with the date of the check.
How to check

The macOS AX lane from R0238 checks the selected range after each scripted edit. The Windows and Linux GUI lanes run the reconversion and surrounding-text tests. Voice Control and Voice Access runs are dated human checks in the WCAG matrix and are repeated before they are 6 months old.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 3 · priority P2 · size M
R0577Web: Chromium's EditContext is not used, so clause formats and character bounds never reach the browserP2Phase 3MT09
text-ime-web-editcontext · feature
What happens

The web build takes text through a hidden sliding-window textarea and listens to compositionstart, compositionupdate and compositionend. These events give the composed string but not its clauses. So a Japanese conversion with several clauses draws as one preedit, and Rune cannot show which clause the arrow keys convert. The browser also places the candidate window from the textarea's position, not from per-character bounds that Rune supplies.

Chromium ships EditContext, which gives textupdate, textformatupdate (clause underline style and thickness) and characterboundsupdate, with no hidden DOM text. PLAN and WEB.md both plan it where the browser has it. The bridge has no EditContext code yet.

Where
Why it matters

CJK users in Chrome and Edge see a composition that looks unlike the browser's own fields: no clause underlines, and candidate windows that can sit away from the caret. The targets: the protocol has "clause attributes" and "a rect for any range", 100% of scenarios pass headless on "web textarea and EditContext", and "the anchor rect Rune reports is within 1 pt of the caret rect". The web build must be "a first-class target in every browser engine, desktop and mobile", so the textarea path must keep working where EditContext is missing.

What would help

On top of R0190:

  • Feature-detect EditContext ('EditContext' in window). Keep the textarea on Safari and Firefox, and allow a switch to force the textarea on Chromium.
  • Map textupdate to protocol inserts with a replacement range, textformatupdate to clauses for R0192, and characterboundsupdate to updateCharacterBounds from first_rect.
  • Keep the 4,096-unit window: updateText sends only the window around the selection.

Where to attach it:

  • (a) The canvas, as PLAN describes. The focused element is then the canvas, so the field's accessible name and states must move with it.
  • (b) The focused sink element that carries the field's name and states.

Recommended: (b), unless the snapshot shows the browser drops character bounds for a non-visible element. It keeps the screen-reader state on one element on every engine. Record the choice in WEB.md.

Done when
  • On Chromium, clause styles from textformatupdate draw (snapshot).
  • With EditContext on, the candidate window opens within 1 CSS px of the caret's character bounds.
  • Playwright runs the same replay scenarios with EditContext on and off on Chromium, and both pass.
  • The textarea path still passes on WebKit and Firefox.
  • The focused element's accessible name and role match the textarea path (accessibility snapshot).
How to check

The web lane runs the replay scenarios on both Chromium paths and the textarea path on WebKit, on every push to dev. A clause-style snapshot and an accessibility snapshot sit beside the existing scripts/web-input-smoke.mjs checks.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 3 · priority P2 · size M
R0578Text fields: no spell checking on macOS, and no spell-check service for other platforms to plug intoP2Phase 3MT09
text-spellcheck-core · feature
What happens

No code in Rune checks spelling. A misspelled word in a Rune field gets no underline, and a right-click offers no suggestions. On the web, the bridge only turns spell check off for the password sink. Native macOS fields underline misspelled words as you type and offer suggestions, Learn Spelling and Ignore Spelling in their context menu.

The text decoration layer draws solid rects only: span backgrounds, underlines, strikethroughs and highlights. It has no dotted kind.

Where
Why it matters

Anyone writing prose in a Rune app (mail, notes, chat, comments) misses typos that every native field shows. The services target says Rune fields offer "spell check" wherever the platform's native field does, with "100% of cells filled" and "no limit used beyond those named". The web's limit is named: it has "no spelling ... API for custom-drawn text".

What would help
  • A spell-check service trait in Rune, with a fake checker for tests. Platforms plug a backend in. R0582 adds Windows and Linux.
  • Checks run off the main thread, one per edited paragraph, keyed by paragraph version. A result for an older version is dropped.
  • A dotted underline decoration in the theme's error color. Add it as an internal decoration kind (beside PaintedDeco), not as a new pub field on Deco, which apps build as a literal.
  • Suggestions, Learn and Ignore in the field menu from R0378. A chosen suggestion replaces the word through R0113 as one undo step.
  • macOS: NSSpellChecker with the user's languages and a per-field document tag, so Ignore applies to that field only.
  • Off by default for the Code and Password purposes from R0116, and for secure fields, with a field option to turn it off.
Done when
  • A misspelled word on macOS is underlined within 500 ms of typing.
  • Choosing a suggestion replaces the word as one undo step (headless test with the fake checker).
  • Learn and Ignore remove the underline, and Ignore applies to that field only.
  • A Code-purpose field and a secure field show no underlines.
  • The main thread makes 0 checker calls (count test).
  • A result for an edited paragraph's older version is dropped (test).
  • The macOS spell-check cell in the services matrix is filled from the lane step.
How to check

Headless tests with the fake checker in T1 cover the undo step, stale results, purposes and thread count. A macOS lane step in T2 types a misspelled word, checks the underline time and picks a suggestion from the menu.

Depends on
Part of
  • Theme: T09
  • Tracked in R0571
  • Phase 3 · priority P2 · size M
R0579Text fields: autocorrect, smart quotes and the user's text replacements never applyP3Phase 3MT09
text-autocorrect · feature
What happens

In a native macOS field, typing " gives a curly quote, -- gives a dash, "omw" can expand to a user's text replacement from System Settings, and a common typo can be corrected after a space. Each follows the user's settings. Windows applies autocorrect for touch and hardware keyboards through TSF.

A Rune field inserts typed text as it arrives, after removing control characters. Nothing looks at the word just finished. So text typed in a Rune app differs from the same text typed in TextEdit or Mail.

Where
Why it matters

Users who rely on smart quotes or text replacements see straight quotes and unexpanded shortcuts, and must fix them by hand. Writers and support staff who type the same phrases often notice first. The services target says Rune fields offer "autocorrect and text replacements" wherever the native field does, with "100% of cells filled" and "no limit used beyond those named".

What would help

macOS, through the service from R0578:

  • After a word boundary (space, punctuation, Return), run NSSpellChecker's checkString:range:types:... on the edited paragraph. Use the types the user turned on: quote, dash, text replacement and spelling correction. Read them from isAutomaticQuoteSubstitutionEnabled, isAutomaticDashSubstitutionEnabled, isAutomaticTextReplacementEnabled and isAutomaticSpellingCorrectionEnabled.
  • Apply a result through the protocol as its own undo step, after the typing group. Cmd+Z reverts the correction first, then the typing, as NSTextView does.
  • Never change text inside an active composition.

Windows: take autocorrect and text prediction from TSF once R0573 lands. Do not build a Rune-side corrector.

The Code and Password purposes, secure fields and a per-field option turn all of this off.

Done when
  • With smart quotes on, typing a straight quote inserts a curly one, and Cmd+Z restores the straight quote.
  • A user text replacement expands after a space.
  • A common misspelling is corrected after a space when correction is on.
  • With each setting off, nothing changes (test with the fake checker).
  • Code, Password and secure fields are never changed (test).
  • On Windows with TSF on, touch-keyboard autocorrect applies in a Rune field.
  • The macOS and Windows autocorrect cells in the services matrix are filled from these tests.
How to check

Fake-checker tests in T1 cover the undo order, the settings and the purposes. macOS and Windows lane steps type into a field with each setting on and off and check the text and the undo order.

Depends on
Part of
  • Theme: T09
  • Tracked in R0571
  • Phase 3 · priority P3 · size M
R0580Text fields: selected text cannot be dragged out of a field, and text dropped from another app is ignoredP3Phase 3LT09
text-field-text-drag · feature
What happens

Rune windows take only file drops from other apps. A field cannot take text dropped from a browser or an editor. A press and drag inside a field's selection starts a new selection instead of moving the selected text. Native fields on macOS, Windows, GTK and the web do all three: move a selection within the field, copy it with Option or Ctrl, and drag it out to another app.

Rune has a drag source, drag_out, and its DragItem can carry plain text. But only macOS starts the session, and the window's own drop handling ends any drag over the app as cancelled. winit reports only dropped files, so a text drop needs the platform's own drag protocol.

Where
Why it matters

People rearrange sentences by dragging, and drag snippets between a browser and an editor. In a Rune field the drag selects text instead, and a drop does nothing. The services target lists "text drag and drop" among the services a Rune field offers wherever the native field does, with "100% of cells filled".

What would help

In the runtime:

  • A press inside the selection that moves past DRAG_THRESHOLD starts a text drag. A press and release with no move places the caret, as today.
  • Within the field, the drag shows a drop caret and moves the text as one undo step. Option on macOS, or Ctrl elsewhere, copies.

Drops from other apps:

  • macOS: NSDraggingDestination for strings on the view from R0193.
  • Windows: IDropTarget for CF_UNICODETEXT.
  • Web: dragover and drop on the canvas.
  • Wayland and X11: text drops through the system drag-and-drop work in #171.
  • Insert at the drop caret through the protocol, and sanitize as typing does (crates/rune/src/edit/input.rs:93-95).

Dragging out uses each platform's drag source for plain text and HTML, through DragItem. A secure field neither starts nor accepts a text drag.

Done when
  • Dragging a selection within a field moves it, and one Cmd+Z restores it (headless test).
  • Option-drag or Ctrl-drag copies instead of moving (headless test).
  • A press and release inside a selection still places the caret (headless test).
  • Text dropped from another app is inserted at the drop caret on macOS, Windows and the web.
  • Text dragged out of a field lands as plain text in another app on macOS and Windows.
  • A secure field neither starts nor accepts a text drag (test).
  • The Linux cells are filled once #171 lands, or name #171 as the open dependency.
How to check

Headless tests in T1 cover moves, copies, undo and secure fields. Lane steps in T2 drag text between a Rune field and a native app on macOS, Windows and the web.

Depends on
Part of
  • Theme: T09
  • Tracked in R0571
  • Phase 3 · priority P3 · size L
R0581X11: input methods reach Rune through XIM, with no surrounding text or reconversionP3Phase 3LT09
text-ime-x11 · feature
What happens

On X11, winit talks to the input method through XIM. XIM carries preedit and commit but no surrounding text, content type or reconversion. So IBus and Fcitx5 cannot predict from context or reconvert committed text, and a password field cannot tell them to stay out of the way. GTK's input modules talk to the same daemons over D-Bus and get all of these.

There are reports elsewhere of poor candidate placement and commit order with XIM. None has been reproduced with Rune yet, so this issue starts by recording what actually happens.

Where
Why it matters

CJK users on X11 sessions (still common on older distributions, some NVIDIA setups and remote desktops) get weaker suggestions and no reconversion. The targets: every input method "talks to a Rune-owned document protocol", with 100% of scenarios passing headless on "X11", and text input uses "each platform's own protocol" with at most 4,096 units and under 1 ms per query. Linux must work "on each declared desktop", or carry a documented protocol limit.

What would help

1. Record Japanese and Pinyin sessions with IBus and Fcitx5 on X11 through XIM. Commit them as replay fixtures, and list what fails: surrounding text, placement and commit order. 2. If the recordings show failures, add an optional D-Bus frontend behind the dbus feature: IBus (org.freedesktop.IBus.InputContext) and Fcitx5 (org.fcitx.Fcitx.InputContext1). It sends surrounding text from R0113's window, content type, cursor location and reconversion, and applies preedit and commit as protocol edit sessions. 3. Fall back to XIM when neither daemon runs, or when the daemon restarts mid-composition. Turn winit's IME off on windows the frontend drives, so nothing arrives twice.

If the recordings show XIM is good enough, close with the fixtures and a documented protocol limit for the missing surrounding text.

Done when
  • Recorded XIM sessions are committed as replay fixtures, with their failures listed.
  • If the frontend is built, the Japanese and Pinyin replay scenarios with surrounding text and replacement pass with IBus and Fcitx5 on X11.
  • The candidate window sits within 2 pt of the caret at 100%, 125%, 150% and 200%.
  • With no daemon, or with a daemon restarted mid-composition, input still works and no text is lost or doubled (test).
  • The docs say whether the frontend is on by default.
How to check

Headless replay tests from R0114 in T1, with fake IBus and Fcitx5 services on a session bus. The Linux lane on R0071 runs Xvfb with each real daemon in T2.

Depends on
Part of
  • Theme: T09
  • Tracked in R0570
  • Phase 3 · priority P3 · size L
R0582Text fields: no spell checking on Windows or LinuxP3Phase 3MT09
text-spellcheck-windows-linux · feature
What happens

Once R0578 adds a spell-check service with a macOS backend, Windows and Linux fields still get no underlines and no suggestions. Native Windows 11 fields check spelling through the system spell checker, in the user's languages. GTK and Chromium on Linux check through Enchant or Hunspell, but neither library ships in every distribution.

On the web, the hidden textarea could run the browser's own spell checker, but its results are never drawn on Rune's canvas. The web's limit is named in the services target, so it needs a matrix entry, not a backend.

Where
Why it matters

Windows and Linux users miss typos that every native field shows them. The services target says Rune fields offer "spell check" wherever the native field does, with "100% of cells filled", and only the web is named as having "no spelling ... API for custom-drawn text". Windows apps should "behave like native Windows 11 apps", and Linux must work "on each declared desktop", or carry a documented limit.

What would help
  • Windows: an ISpellCheckerFactory backend. Create one ISpellChecker per user language from the system's language list, run ComprehensiveCheck on the worker the core service owns, and map ISpellingError to ranges. Learn and Ignore map to Add and Ignore.
  • Linux: an Enchant 2 backend behind a feature that is off by default. Hunspell dictionaries are found through Enchant. With the feature off, the build has no Enchant dependency and the Linux cell names the feature.
  • Web: set the textarea's spellcheck attribute from the field's purpose so the browser does no hidden work, and record the named limit in the services matrix.
  • Both backends follow the core's rules: off-main-thread checks, results keyed by paragraph version, and off for Code and Password purposes.
Done when
  • A misspelled word is underlined within 500 ms on Windows 11.
  • With the feature on, a misspelled word is underlined within 500 ms on Ubuntu.
  • Suggestions, Learn and Ignore work from the field menu on both.
  • With the Linux feature off, nothing links Enchant (build check).
  • The services matrix records the Windows and Linux results and the web's named limit.
How to check

Lane steps in T2 on the Windows and Linux GUI lanes type a misspelled word, time the underline and pick a suggestion. A T1 build check runs cargo tree with the feature off and fails if Enchant appears.

Depends on
Part of
  • Theme: T09
  • Tracked in R0571
  • Phase 3 · priority P3 · size M
R0583macOS: Apple Writing Tools cannot read or rewrite a Rune fieldP3Phase 3MT09
text-writing-tools · feature
What happens

On macOS 15 and later, Writing Tools proofreads, rewrites and summarizes text in fields that give it document context. It reads the text around the selection, shows its changes in place, and lets the user undo them as one step. A Rune field gives the system no document: the focused view is winit's, and the input method sees only Preedit and Commit. So Writing Tools is either not offered or works only on a copied selection, and its results come back as a paste.

Undo is a second problem. Each undo step stores two full copies of the field's text, so a rewrite of a long document is costly to keep, and long fields lose undo steps.

Where
Why it matters

Mac users who rely on Writing Tools in Mail, Notes and Pages find it missing or degraded in Rune apps. The services target lists "Writing Tools (macOS and iOS)" among the services a Rune field offers wherever the native field does, with "100% of cells filled". Only the web and Linux are named as having no Writing Tools API.

What would help

On the view from R0193:

  • Adopt NSWritingToolsCoordinator and implement its delegate over the protocol: context ranges from text_in, replacements through insert with a replacement range, and highlight rects from first_rect.
  • Apply a whole Proofread or Rewrite pass as one undo group, so one Cmd+Z restores the original. Use R0186 so a long rewrite stores edits, not two copies of the text.
  • Opt out secure fields and the Code purpose, and let a field opt out.
  • Draw the coordinator's in-progress highlights through Rune's decoration layer if the coordinator does not draw over a custom view.

The iOS cell ships with the iOS text input view in a separate theme, not here.

Done when
  • Writing Tools appears in the Edit menu and the field's context menu for a multi-line Rune field.
  • Proofread and Rewrite apply in place in a multi-line field.
  • One Cmd+Z restores the original text and selection.
  • Secure fields and Code-purpose fields do not offer Writing Tools (test).
  • A rewrite of a 200 KB field keeps the undo history it had before.
  • The macOS Writing Tools cell in the services matrix is filled from the lane step.
How to check

macOS lane steps in T2 on a machine with Apple Intelligence on run Proofread and Rewrite on a fixture field and check the text and the undo result. A headless test drives the delegate's replacement calls through the protocol with a fake coordinator and checks that the pass is one undo group.

Depends on
Part of
  • Theme: T09
  • Tracked in R0571
  • Phase 3 · priority P3 · size M
R0584Scrolling: desktop wheels and trackpads stop at a wall, and feel the same on every platformP1Phase 3XLT10
motion-desktop-scroll-physics · tracking
What happens

Desktop scrolling behaves the same on every platform. Wheel and trackpad deltas apply 1:1 and clamp at the ends (crates/rune/src/runtime/input/pointer.rs:408-426, crates/rune/src/runtime/scroll/x.rs:198-201). That is right for a macOS trackpad mid-list, where the OS supplies momentum. Four things are missing:

  • A macOS trackpad hits a wall at the ends, where NSScrollView rubber-bands.
  • A mouse-wheel line delta moves 40 pt per line in one frame (x.rs:64-67), where native views glide.
  • Linux touchpads stop dead when the fingers lift. libinput sends no momentum, and Rune adds none.
  • Nobody has checked what a Windows precision touchpad sends to a winit window.

PLAN.md says scroll physics are per platform (PLAN.md:270-272). The research table describes the intended behaviour for each one (research/06-reactivity-animation.md:704-710). Every fix depends on knowing what each OS really sends. So the work starts with a survey and then splits by platform, with each part checked against its own native toolkit.

Where
Why it matters

Scrolling is the input people use most on desktop, and they notice a wall or a jump at once. The target is that scrolling matches the native toolkit for each kind of input on each platform:

  • macOS: elastic overscroll during the gesture and momentum, back within 0.5 s of momentum end, with 0 jump findings.
  • Whole notches: no frame moves over 35% of the notch at 120 Hz, landing within 150 ms ± 1 frame.
  • Precise deltas are never glided.
  • Windows precision touchpads and Linux trackpads coast within 10% of Chromium's and GTK4's distance.

On Linux, each declared desktop (GNOME and KDE Wayland, X11) must pass, or record a documented protocol limit in the capability registry.

What would help

Each child that changes feel ships behind its own builder switch for one release. The switch is an El method, because apps build ScrollSpec as a literal and a new field would break them. Each such child also ships a changelog fragment and a before-and-after gate trace. Add a headless helper that applies a wheel event at once, for tests that rely on today's 1:1 behaviour.

Done when
  • All children are closed.
  • The desktop thresholds above hold in replay tests and on the macOS, Windows and Linux lanes.
  • Every child that changed feel shipped a changelog fragment and a before-and-after trace pair.
How to check

The required check runs replay tests on the survey's fixtures. The nightly platform lanes compare against NSScrollView, Chromium and GTK4.

Issues
Part of
  • Theme: T10
  • Phase 3 · priority P1 · size XL
R0585Motion: scroll, growth, slides and flights run as separate motion systems with their own stepping, tracing and continuity rulesP2Phase 3XLT10
motion-unify-sources · tracking
What happens

PLAN.md says animated properties change only through tracks, so a one-frame jump can't be written (PLAN.md:375). That holds for scene properties. Five other sources also move what people see, each on its own:

Some of these are closed-form and some are stepped. Each has its own settle thresholds, determinism and trace coverage. The retarget audit sees only store springs (crates/rune-motion/README.md:207-210). Closing the gap takes several issues. First trace every source and make slides exact. Then a spike decides whether scroll offsets become scene tracks. After that, scroll, growth, flights and text flights each move onto the chosen path.

Why it matters

The motion targets ask that:

  • every source of presented motion is traced and keeps its velocity continuous at every retarget, with 0 finite-difference velocity estimates;
  • the same motion follows the same trajectory at any refresh rate, with jitter, a rate switch or a late frame: within 1/64 device px for scene tracks and 0.5 pt for scroll, growth and flights;
  • physics traces are bit-identical across platforms in the canonical mode.

Today's separate steppers can't be checked against these targets as one set.

What would help

R0592 decides the path:

  • Go. Offsets, momentum, glides, flights and growth move onto store tracks.
  • No-go. Keep the external steppers, but make each one closed-form or split exactly at events. Give each the same trace, audit and rest reporting, and compute flight compensation from analytic scroll state.

The scroll move is the risky part. Stick-to-bottom, slack and keep policies (crates/rune/src/runtime/scroll/bottom.rs) must be re-expressed as target changes.

Done when
  • All children are closed, on whichever path the spike chose.
  • Every source in the inventory meets the continuity limits, with 0 finite-difference velocity estimates.
  • One scenario at 60 and 120 Hz, with jitter, a rate switch and a 100 ms gap, lands within 1/64 device px for tracks and 0.5 pt for scroll, growth and flights, with no allow rows.
How to check

The required check runs the velocity-snap rule and the inventory-coverage test from R0390, along with the rate-variant gate runs.

Issues
Part of
  • Theme: T10
  • Phase 3 · priority P2 · size XL
R0586macOS: a trackpad scroll stops dead at the end of a list instead of rubber-banding as AppKit doesP1Phase 3MT10
motion-macos-elastic-overscroll · feature
What happens

Runtime::wheel clamps the offset to [0, max] and zeroes velocity on every delta (crates/rune/src/runtime/input/pointer.rs:408-426). wheel_x does the same on the horizontal axis (crates/rune/src/runtime/scroll/x.rs:198-201). So a trackpad swipe, or the OS momentum after it, stops in one frame at either end of a list. NSScrollView, SwiftUI's ScrollView on macOS and Safari all stretch past the end while the gesture or momentum pushes, then spring back when momentum ends (research/06-reactivity-animation.md:707).

Rune already gets the inputs it needs. The window passes winit's phase and marks pixel deltas as precise (crates/rune/src/window/events.rs:429-441), and the wheel lock tracks gesture and momentum phases (x.rs:24-47). But wheel_event hands only the deltas on to scrolling (crates/rune/src/runtime/input/gesture.rs:23-35), so the scroll code can't tell a phased trackpad from a mouse.

Touch scrolling already rubber-bands, and it returns on an exact critically damped spring (crates/rune/src/runtime/scroll/touch.rs:15-22, touch.rs:76-78). It uses a fixed 300 pt dimension, not the viewport's. R0389 moves it to rune_motion::rubber_band (crates/rune-motion/src/gesture.rs:21-25), and this issue reuses that function. A Mac user feels the wall on the first scroll to the end of any list.

Where
Why it matters

The gesture target is that a macOS trackpad push past an edge rubber-bands and returns within 2 pt per frame of NSScrollView. The scrolling target asks for elastic overscroll during the gesture and momentum, back within 0.5 s of momentum end, with 0 jump findings.

What would help

For precise, phased wheel input on macOS:

1. Carry precise and the phase from wheel_event into the scroll step. 2. Past an edge, keep the raw overscroll, and present rune_motion::rubber_band(overshoot, viewport), as touch will. 3. While past the edge, damp momentum deltas as AppKit does. R0409 measures how much. 4. When the gesture ends with no momentum, or the momentum ends, return on the touch rebound from the current offset and velocity. Mark the return as a declared rebound in the trace, so reversal does not fire. A new gesture during the return catches it. 5. If the phase stream stops with no end event, return after 100 ms. 6. Mouse wheels and devices without phases keep the clamp.

Stick-to-bottom: pointer.rs:422 sets pinned from the clamped offset. Keep a list pinned while it is pulled past its bottom.

For app readers (on_scroll_offset, anchors, keeps), there are two options. They can get the clamped offset, or the raw offset including overscroll, as NSScrollView reports it. We recommend the clamped offset, since no app code handles values out of range today.

Ship it behind an El builder switch for one release, not a ScrollSpec field, because apps build ScrollSpec as a literal. Add a changelog fragment.

Done when
  • Replayed macOS fixtures past each edge, on both axes, go past the edge, peak, and are back within 0.5 s of momentum end, with 0 jump and 0 reversal findings.
  • Offsets stay within 2 pt per frame of the NSScrollView trace for the same input.
  • A gesture released past the edge with no momentum returns the same way.
  • A new gesture during the return catches it with a jump of at most 0.5 pt.
  • A phase stream with no end event returns 100 ms after its last delta.
  • Stick-to-bottom lists stay pinned after an elastic pull at the bottom, and mouse-wheel streams still clamp.
How to check

Replay tests with the survey's macOS fixtures, and a new scroll-elastic scenario in scripts/motion-audit, in the required check. The existing stick-to-bottom, anchor, keep and on_scroll_offset tests keep passing.

Depends on
Part of
  • Theme: T10
  • Tracked in R0584
  • Phase 3 · priority P1 · size M
R0587Motion: an app can't run code when an animation it started has landedP2Phase 3MT10
motion-completion-callback · feature
What happens

SwiftUI's withAnimation(_:completionCriteria:_:completion:) runs a closure once a change's animations are logically complete, or fully settled. That is how a sheet is removed after it slides out, or a list scrolls once a row lands. Rune has no way to do this from Tx.

rune-motion has the low-level part. Anim::completion(token) makes the store emit MotionEvent::Completed { token, finished } (crates/rune-motion/src/store.rs:43-49). The event fires with finished: true when the track settles, and with finished: false when a newer animation replaces it (store.rs:915-926). The store also keeps each track's logical end time (store.rs:984-993). The README maps withAnimation(_:completion:) to this (crates/rune-motion/README.md:117). But nothing in Tx sets a token, and the runtime reads only Settled events, for group fades (crates/rune/src/runtime/motion/props.rs:110-116).

So an app's only option is Tx::wake_after (crates/rune/src/el/tx.rs:198): it guesses a duration and checks its state when it wakes. The guess is wrong when a spring is retargeted, when reduced motion shortens it, when a delay or time scale applies, or when an exit is still fading. The runtime already knows when tracks settle and exits leave: Scene::frame returns animating and exited (crates/rune/src/runtime/frame.rs:681-690).

Where
Why it matters

Apps that chain motion (dismiss, then remove; land, then scroll) either cut early, which looks like a pop, or wait too long, which feels sluggish. The parity target is that Rune's motion API covers a fixed set of SwiftUI animation capabilities. Each needs an example and a gate scenario, with 100% of the fixed rows and none marked out of scope. Completion is one of those rows.

What would help

Add Tx::on_landed(f) and Tx::on_landed_with(Landed::Logical | Landed::Settled, f).

  • Settled waits until every track this change started or retargeted has settled, and every exit it started is gone.
  • Logical waits until each track has passed its logical end time.
  • A later retarget of the same tracks moves the callback to the new landing. A change cancelled by a later commit still calls the callback once.
  • A change that starts no motion calls f on the next frame.
  • Delayed tracks count from their start.
  • Looping tracks are ignored, and a change with only loops calls f at once.
  • The callback runs as a normal handler with its own Tx, queued as an event. It never runs inside the motion step.

Build it on the store's tokens: tag each track the commit touches with one token, count the outstanding tracks, and follow a finished: false replacement to the newer token.

Done when
  • A change on a 0.3 s spring calls on_landed once, on the frame its tracks settle. Logical fires earlier.
  • A retarget mid-flight delays the callback to the new landing, and a cancelled change still calls it once.
  • An empty change, a delayed track, several properties, an exit, a 2x time scale, reduced motion and a loop-only change each call it once, at the defined time.
  • A test asserts the callback never runs inside the motion step.
  • An El example and a gate scenario chain a dismiss with it.
How to check

Headless tests in the required check, plus a motion-audit scenario that slides a sheet out and removes it in on_landed, with 0 pop-out and 0 cut-exit findings.

Part of
  • Theme: T10
  • Phase 3 · priority P2 · size M
R0588Growth: chat rows grow on a 240 Hz integrator with caps that no trace or audit seesP2Phase 3LT10
motion-growth-in-store · refactor
What happens

A growing row (a chat message that streams in, a fold that opens) is stepped by GrowTrack::step. Each call advances one fixed 1/240 s substep. It samples the row's spring, then clamps the step by speed caps ported from the Desktop timeline: a start cap that ramps by exp(28.2 × age), a 690 pt/s or 960 pt/s ceiling, a 450 pt/s cap while the row carries the tail, a near-target slowdown, a 1,800 pt/s² braking limit and an approach ceiling. Streaming rows use a separate paced climb. The runtime runs at most 240 substeps a frame.

This fixed the frame-rate-dependent caps that research 18 found in the DOM timeline, where per-frame pixel caps made growth depend on the refresh rate. But the result is still a stepped integrator, not a curve that can be sampled at any time:

  • It sits outside the motion store, so growth is missing from motion traces, from Scene::rest and from the retarget audit. A velocity jump where a cap engages or releases is not checked.
  • Its velocity is a finite difference (d / dt) of the clamped step.
  • It calls platform f32::exp, so its output can differ between platforms.
  • A frame that is not a whole number of substeps carries a remainder (grow_acc), so the presented height depends on where frames fall.
Where
Why it matters

Chat timelines are where users watch growth most closely. A cap that switches badly shows as a stutter or a lurch while text streams in, and no tool would catch it today. The target is that every source of presented motion is traced, and keeps its velocity continuous at every retarget unless the change is a declared cut: 100% of inventory pairs traced and audited, 0.5 pt/s at most for a stepped source, and 0 finite-difference velocity estimates. Growth must also follow the same path at any refresh rate, cadence jitter, rate switch or late frame, within 0.5 pt. Normalized physics traces must be bit-identical across platforms.

What would help

Two options.

1. Recommended: piecewise analytic segments. Treat a capped spring as a chain of segments: constant velocity while a cap holds, a spring segment otherwise. Solve the times where it switches. Add them to the store as a new layer kind, so growth samples at any time and gets trace, audit and rest for free. 2. Fallback, if the solve costs too much in paired --profile perf runs: keep the integrator, but register each growth row as a store-visible track for trace, audit and rest, and use a deterministic exp in place of platform libm.

Keep the constants as they are. Compare old and new frame by frame against the research 18 tuning on the growth-reorder scenarios before switching. This builds on R0315, which moves growth state out of Runtime side tables.

Done when
  • Growth rows appear in motion traces, the retarget audit and Scene::rest.
  • Growth stays within 0.5 pt of its reference in every cadence variant from R0260, including jitter, the rate switch and the 100 ms gap.
  • Velocity is continuous within 0.5 pt/s where a cap engages or releases.
  • Growth uses no platform libm call, and its normalized physics trace is bit-identical across platforms.
  • All growth tests and the growth-reorder* scenarios pass, with no new allow rows.
  • The PR states which option shipped, with the paired --profile perf numbers that decided it.
How to check

cargo test -p rune growth tests, and the motion gate with the growth-reorder, growth-reorder-flight, growth-reorder-gap, growth-reorder-grow and growth-reorder-virtual scenarios in scripts/motion-audit/scenarios/, run in every cadence variant. The retarget audit from R0390 covers growth from then on.

Depends on
Part of
  • Theme: T10
  • Tracked in R0585
  • Phase 3 · priority P2 · size L
R0589Linux: touchpad scrolling stops dead when the fingers lift, because libinput adds no momentum and Rune adds none eitherP2Phase 3MT10
motion-linux-trackpad-kinetic · feature
What happens

Runtime::wheel applies each wheel or trackpad delta 1:1. Its doc comment says why: "the platform supplies its own momentum phases". That holds on macOS, where AppKit sends momentum events. It does not hold on Linux. libinput, which Wayland compositors and X11 use, sends no momentum. GTK4 and Qt add kinetic scrolling themselves when the finger gesture ends.

Rune already has a fling decay (Runtime::fling, on the iOS decay constant), but only scripts and tests call it. So on GNOME, KDE or sway, a two-finger flick stops the list the moment the fingers lift. In a GTK4 app next to it, the same flick coasts.

The pieces are partly there. winit 0.30.13 maps a Wayland axis_stop to TouchPhase::Ended and reports touchpad deltas as PixelDelta. On X11, winit reports XInput2 smooth scrolling as fractional LineDelta with phase Moved only, so there is no end event and no way to tell a touchpad from a wheel by type alone. Layer-shell overlays read their own Wayland queue and drop axis events entirely.

Where
Why it matters

Every Linux laptop user notices this on the first flick. It makes a Rune app feel broken next to GTK4 and Qt apps. The target is that scrolling matches the native toolkit for each kind of input on each platform: Linux trackpads coast within 10% of GTK4's distance, and offsets stay within max(2 pt, 5%) of the native trace per frame. Linux must also work on each declared desktop, or carry a documented protocol limit.

What would help

1. When a finger-source gesture ends, estimate the release velocity from its timestamped deltas over the last 100 ms with the shared estimator from R0407. Then fling on the existing decay.

  • Wayland: PixelDelta followed by GesturePhase::Ended (from axis_stop).
    • X11: use an XI2 gesture end where the survey shows one; otherwise end the gesture after an idle gap, as WHEEL_IDLE already does for axis locking.

2. Stop the coast on the next wheel Began, a touch, a press or a key. 3. Leave whole wheel notches 1:1 (or to R0595). Never coast a mouse wheel. 4. Give layer-shell overlays the same path by reading wl_pointer axis, axis_source and axis_stop events on their own queue. 5. Use the event times from R0405, not handling time.

If the survey from R0409 shows that a desktop sends its own momentum, skip it there and record that.

Done when
  • Replayed GNOME and KDE Wayland fixtures coast after lift on both axes, within 10% of GTK4's distance for the same stream.
  • X11 coasts where a gesture end or idle gap is detected, and the survey note documents where it cannot.
  • A finger landing during the coast stops it within one frame.
  • A mouse wheel and a slow two-finger drag that stops before lift do not coast.
  • Layer-shell overlays scroll and coast the same way.
  • macOS and Windows behaviour is unchanged.
How to check

A headless replay test feeds phased, timestamped deltas and asserts the decay curve and the stop. The recorded Linux fixtures run in the required check. A Linux platform-lane run on GNOME and KDE Wayland confirms it with real devices.

Depends on
Part of
  • Theme: T10
  • Tracked in R0584
  • Phase 3 · priority P2 · size M
R0590Motion: scroll-linked effects run app callbacks every frame and need a second scene passP2Phase 3MT10
motion-scroll-linked-bindings · feature
What happens

An effect tied to a scroll offset (a header that shrinks as the page scrolls, a shadow that fades in past the top, parallax) is written today with El::on_scroll_offset. Its own doc example does this: the callback sets a Live from the offset.

To make that value show in the same frame, step_motion steps growth and scroll, then calls tell_scroll_offsets. That walks every runtime node looking for a handler, calls the app's closures, and, if any ran, re-reads the store and calls scene.present() a second time without stepping time. So on every scrolled frame:

  • app code runs, once per watching viewport;
  • the scene is presented twice;
  • the work scales with the whole node list, not with what moved.

Because the effect lives in an app closure, no presenter off the main thread could ever run it. Research 06 planned for this with a Bound(live, expr) segment kind, a render-thread binding. The rune-motion README lists live Bound expressions as not implemented.

Where
Why it matters

Scroll is the most common motion in any app, and collapsing headers are a standard iOS pattern. App code in the scroll path means one slow handler can drop a scrolled frame. The targets are: app code and other surfaces rarely stall running motion (main-busy drops at most 0.5% of motion frames); motion costs only what moves (visits at most 2 × changed + feature-list nodes + 64, and at most 1 full paint build per frame); and the motion API covers SwiftUI's capabilities, which include scrollTransition and visualEffect driven by scroll position.

What would help

Add a declarative binding as a builder method:

El::scroll_linked(scope, ScrollLink::new(prop, input_range, output_range).clamp())
  • scope names the viewport. prop is opacity, offset, scale or blur.
  • The scene evaluates the mapping in the same pass that applies the scroll offset, so no callback runs and the scene is presented once.
  • Keep the bindings on the list from R0386, so a frame visits only the viewports that moved and their bound nodes.
  • Keep on_scroll_offset for effects that need app logic.

Add a collapsing-header example and a gate scenario. Then move an in-tree user onto it: Kit's scroll bar if its thumb mapping fits the binding, or a Kit or example header if not.

Done when
  • A collapsing-header example runs with 0 app callbacks per scrolled frame, counted by a test.
  • Bound values equal the mapping at the frame's offset, exactly, in a test.
  • The scene is presented once per frame when only scroll-linked values change.
  • Per-frame visits for the bindings stay within the dirty-list budget, within 5% between the 10,000- and 100,000-node trees.
  • The binding is listed on the site's Motion page with its example and gate scenario.
How to check

Headless tests for the mapping and the callback count, in cargo test -p rune. A motion gate scenario scrolls the header example and checks for scroll-commit findings and the present count.

Depends on
Part of
  • Theme: T10
  • Phase 3 · priority P2 · size M
R0591Scrolling: there is no way to snap a scroll view to items or pagesP2Phase 3MT10
motion-scroll-snap-paging · feature
What happens

The scroll builders on El offer stick-to-bottom, anchors, margins and edge fades. None of them snaps. A fling in a carousel, an onboarding pager or a tab strip stops wherever the decay leaves it, often halfway between two pages. An app that wants paging has to watch the offset and drive its own glide, and it cannot see the release velocity, so the glide starts from rest and the hand-off shows as a jolt.

SwiftUI has scrollTargetBehavior(.paging) and .viewAligned. Research 06 describes the model for Rune: project the fling's end, snap it to a page, and spring there with the inherited velocity.

Where
Why it matters

Pagers and carousels are in most mobile apps, and users feel a bad snap at once: a page that drifts, a jolt at release, or an overshoot past the page. The targets are: direct manipulation hands its velocity on, so a release spring starts within max(2%, 10 pt/s) of the hand velocity, and paging lands on a page with inherited velocity and 0 overshoot findings at bounce 0. The motion API must also cover a fixed set of SwiftUI animation capabilities, which includes paging and view-aligned snapping, each with an example and a gate scenario.

What would help

Add El::scroll_snap(Snap::Paging | Snap::Children) as a builder method. Do not add a ScrollSpec field, since apps build ScrollSpec as a literal.

1. On a touch release, a trackpad momentum start or a gesture end, project the end with the decay, choose the snap point, and glide there starting at the release velocity from R0407. 2. Snap::Paging snaps to viewport-sized pages. Snap::Children snaps to child edges. With virtual rows, take snap points from the row offsets the list already keeps, so unmounted rows count. 3. If the snap points move during the glide (a resize, a row change), retarget to the moved point with no jump. 4. A new touch catches the glide. 5. On macOS, once the snap is chosen, the glide takes over and ignores the remaining momentum deltas. 6. Page Up and Page Down land on the same points. 7. At an edge, use the hand-off from R0389.

Done when
  • A touch fling in a paged strip lands on a page. The glide's initial velocity equals the release velocity within max(2%, 10 pt/s). There are 0 overshoot findings at bounce 0.
  • A replayed macOS momentum stream in a paged strip lands on a page and ignores the remaining momentum deltas.
  • Snap::Children in a virtual list of 10,000 rows lands on a row edge when the target row is unmounted.
  • A resize during the glide retargets with no jump finding.
  • Page Up and Page Down land on snap points, on both axes.
  • The site's Motion page lists paging and view-aligned snapping with an example and the gate scenario.
How to check

Headless tests in cargo test -p rune, and a new scroll-paging motion gate scenario in scripts/motion-audit/scenarios/ in the required check.

Depends on
Part of
  • Theme: T10
  • Phase 3 · priority P2 · size M
R0592Motion: no measurement says whether scroll offsets should become scene tracks or stay externalP2Phase 3MT10
motion-scroll-tracks-spike · research
What happens

Scroll offsets are f64 on purpose, so a deep list keeps sub-point precision far down. They live in ScrollState, outside the motion scene. The store's lanes are f32. Because the two are separate, flights and matched geometry have to compensate for scroll offsets they cannot see, and scroll is missing from the trace, Scene::rest and the retarget audit.

Moving offsets into the store would make flights exact and put scroll under the audit. But scroll carries many policies: stick-to-bottom, slack under a shrinking stack, keeps, anchors and sticky headers. Each one edits the offset in place today. Nobody has measured what either direction costs in CPU, in test failures or in rework.

Where
Why it matters

R0593 is a large, risky refactor of the most visible motion in Rune. Picking the wrong design would cost weeks and could regress chat timelines. The goal it serves is that every source of presented motion is traced and keeps its velocity continuous, with 100% of inventory pairs traced and audited and 0 finite-difference velocity estimates, and that scroll follows the same path at any refresh rate within 0.5 pt.

What would help

Prototype both options on one vertical viewport:

  • A, SCROLL tracks. The offset is a store track: an f64 base plus an f32 displacement, rebased when the target moves. Momentum is a decay layer, and the edge is a clamped decay.
  • B, closed-form external segments. The offset stays in ScrollState, but momentum, glides and rebound become closed-form segments with an analytic offset_at(t) that flights and Scene::rest can query.

Run the scroll and growth tests and the gate scenarios against both. Measure per-frame CPU on the long-list scenario with paired, alternating --profile perf runs, compared by median. List each policy (stick-to-bottom, slack, keeps, anchors, sticky) that needs rework under each option.

Write a research note in research/ with the results and the decision. Nothing from the prototype ships.

Done when
  • A research note records, for each option: test pass counts, gate findings, per-frame CPU on the long-list scenario from paired --profile perf runs, and the policies that need rework.
  • A test at an offset of 1e8 pt shows whether each option keeps sub-1/64 pt precision through a rebase.
  • The note records a decision (A, B or neither) with reasons, and R0593 is updated to match.
How to check

The prototype branch's test and gate results, quoted in the note. The 1e8 pt precision test moves into the tree with whichever option ships.

Depends on
Part of
  • Theme: T10
  • Tracked in R0585
  • Phase 3 · priority P2 · size M
R0593Scrolling: offsets, momentum and glides step outside the scene, so its rest, trace and audit leave out scrolled contentP2Phase 3LT10
motion-scroll-offsets-as-tracks · refactor
What happens

Scroll offsets live in ScrollState, a runtime side table outside the motion scene. Each frame, step_scroll walks every node and steps each viewport in place: momentum on an exponential decay, glides on a spring, the touch edge return on a hand-written critically damped integrator, and stick-to-bottom slack. Each of these has its own code, its own landing rule and its own continuity behaviour.

Because none of it is in the store:

  • Scene::rest cannot say where scrolled content will land.
  • Motion traces and the retarget audit leave scroll out, so a velocity jump in a glide or at an edge goes unchecked.
  • Flights and matched geometry compensate for offsets they cannot see.
  • The decay constant is defined twice: SCROLL_DECAY in rune and Decay::IOS_NORMAL in rune-motion.
Where
Why it matters

Scrolling is most of the motion a user sees. Anything that leaves it out of the trace leaves the most common jank unchecked. The target is that every source of presented motion is traced and keeps its velocity continuous unless the change is a declared cut: 100% of inventory pairs traced and audited, and 0 finite-difference velocity estimates. Scroll must also follow the same path at any refresh rate, cadence jitter, rate switch or late frame, within 0.5 pt, and normalized physics traces must be bit-identical across platforms.

What would help

Implement the option R0592 chose:

  • A: the offset is a SCROLL track in the store, an f64 base plus an f32 displacement, rebased when the target moves. Momentum is a decay layer and the edge is a clamped decay.
  • B: the offset stays in ScrollState, but momentum, glides and rebound become closed-form segments with an analytic offset_at(t) that flights and Scene::rest can query.

Either way:

1. Express stick-to-bottom, slack and keeps as target changes, not as in-place edits. 2. Define the decay constant once, in rune-motion. 3. Migrate one behaviour per PR (momentum, glides, touch rebound, stick-to-bottom, slack) behind a switch, with the old stepper as the fallback for one release. 4. Move the state as R0315 lays out, not as new Runtime fields.

Done when
  • All scroll and growth tests pass on the new path, on both axes.
  • Scene::rest, or offset_at under option B, reports scrolled content at its landing offset.
  • Scroll appears in the retarget audit, and passes the velocity-snap and rate-drift (0.5 pt) checks in every cadence variant from R0260.
  • A deep-list test at an offset of 1e8 pt keeps sub-1/64 pt precision.
  • Anchor, keep and slack scenarios give identical presented geometry; reduced-motion glides land as before.
  • The decay constant is defined in one place.
  • The old stepper and its switch are removed after one release.
How to check

Scroll tests in cargo test -p rune, and motion gate scenarios (scroll-anchor, scroll-keys, keep-stuck, the gallery-scroll-bar* and growth-reorder* scenarios) in the required check, run in every cadence variant. Soak the switch with the gate before the old path is removed.

Depends on
Part of
  • Theme: T10
  • Tracked in R0585
  • Phase 3 · priority P2 · size L
R0594Motion: launched and matched flights estimate scroll drift by finite differencesP2Phase 3MT10
motion-flights-exact-paths · refactor
What happens

Scroll offsets are applied outside the scene, so a flight inside a scrolled list has to correct for them itself. Launches keeps six fields per flight: shift, last, seen, drift, folded and folded_at (crates/rune/src/runtime/motion/flights.rs:14-26). Each frame, offset_fix blends the launch-time offsets toward the current ones by the flight's travel progress. It also estimates scroll drift as (offset - last) / dt, but only between two frames with no commit between them (flights.rs:75-93). blend and restart then use that drift to give a re-aimed path its velocity (flights.rs:38-52, flights.rs:104-116). Matched flights take their start offset from the frame's inherited-offset scratch (flights.rs:175-185).

A velocity from finite differences is one frame old and depends on frame timing. A commit between frames hides it altogether, so the estimate keeps its last value. This is the most intricate code in the motion area, and no test shows whether a re-aim during a scroll keeps its speed.

Where
Why it matters

A message that flies into a chat while the list is still gliding should land without a kick. The motion target asks for 0 finite-difference velocity estimates, and velocity continuous within 0.001 pt/s at every undeclared retarget. The frame-rate target asks flights to follow the same path at any refresh rate, jitter or late frame, within 0.5 pt. A one-frame-old estimate fails both, by an amount that depends on how fast the list scrolls.

What would help

1. First, add a test. Launch a flight inside a list scrolling at 2,000 pt/s, re-aim it mid-flight, and measure presented velocity on both axes just before and after the re-aim. Commit it with today's error recorded, so the fix has a baseline. 2. After R0593, compute flight paths in root space from analytic scroll state. That means SCROLL tracks if R0592 chose tracks, or offset_at(t) with its exact derivative if scroll stays outside the scene. 3. Delete shift, last, seen, drift, folded and folded_at, and the blend in offset_fix. 4. Record each re-aim in the audit from R0390.

Done when
  • Launches has no drift or finite-difference state.
  • The re-aim test keeps velocity within 0.001 pt/s on both axes. This holds with a moving destination and under a scaled ancestor.
  • The same flight at 60 and 120 Hz lands within 0.5 pt at common times.
  • The growth-reorder-flight and tab-strip motion-audit scenarios stay clean.
How to check

The re-aim test and the gate tests in the required check, with velocity-snap covering flight re-aims.

Depends on
Part of
  • Theme: T10
  • Tracked in R0585
  • Phase 3 · priority P2 · size M
R0595Scrolling: a mouse-wheel notch jumps the content 40 pt in one frame instead of glidingP2Phase 3MT10
motion-wheel-notch-glide · feature
What happens

wheel_delta turns a line delta into 40 pt per line, and Runtime::wheel applies it in the same frame. winit reports one Windows notch as a LineDelta of 1.0 (the raw value over WHEEL_DELTA), and one Linux or web line notch the same way. So a mouse notch moves the content 40 pt in one frame. At 120 Hz that reads as a step, not a scroll. Chromium on Windows and Linux, and Safari on macOS, glide a notch over about 100-150 ms.

Three more problems sit in the same path:

  • The unit is lost before scrolling. WheelEvent carries a precise flag, but wheel_scroll_for passes only dx and dy to wheel, with no unit, source or event time. Scrolling cannot tell a notch from precise input.
  • Touchpads also arrive as line deltas. On Windows a precision touchpad sends fractional WM_MOUSEWHEEL values, and on X11 winit reports XI2 smooth scrolling as fractional LineDelta. Treating every LineDelta as a notch would glide touchpads.
  • Lines per notch ignore the OS setting. winit does not read SPI_GETWHEELSCROLLLINES, and Rune uses 40 pt flat.
Where
Why it matters

Most desktop users scroll with a mouse wheel. A stepped scroll at 120 Hz is the first thing that makes an app feel unlike its neighbours, and a different distance per notch feels wrong too. The targets: no frame moves over 35% of a whole notch at 120 Hz; the glide lands within 150 ms ± 1 frame; repeated notches make one monotonic glide; precise deltas are never glided. A Windows notch matches Chromium's distance per frame within 10% (GTK4 on Linux) and honours the system lines-per-notch once. Under reduced motion, steps are instant where the platform's are.

What would help

1. Carry the raw delta unit, the source where the platform reports it, and the event time past wheel_delta, down to the scroll path. 2. Glide only input that R0409 shows to be a whole notch: whole WHEEL_DELTA multiples on Windows, discrete steps on Wayland and macOS, and deltaMode LINE or PAGE on web. Apply everything else 1:1. 3. Add each notch's distance to the glide target and keep the glide's velocity, so repeated notches extend one glide. PAGE mode glides one viewport less one line. 4. Read lines per notch from SPI_GETWHEELSCROLLLINES once on Windows; use 3 elsewhere. Size a line to match the native trace. 5. Under reduced motion, land a notch in one frame. 6. Keep web pixel-mode notches 1:1 unless the survey shows they can be told apart safely.

Tests that expect a wheel event to land at once should use the instant helper.

Done when
  • A replayed notch at 120 Hz moves at most 35% of the notch distance in any frame and lands within 150 ms ± 1 frame.
  • Five notches 30 ms apart give one monotonic glide, with 0 stop-start or jerk findings.
  • Replayed precision-touchpad, X11 smooth-scroll and high-resolution-wheel fixtures are applied 1:1, never glided.
  • Per frame, a Windows notch is within 10% of Chromium's trace, and a Linux notch within 10% of GTK4's.
  • Windows reads SPI_GETWHEELSCROLLLINES and applies it once, covered by a test.
  • Web LINE and PAGE deltas glide. The pixel-mode decision and its reason are in the survey note and covered by a test.
  • Under reduced motion a notch lands in one frame.
How to check

Headless replay tests in cargo test -p rune, and a new scroll-wheel-notches motion gate scenario in the required check. Windows and Linux platform lanes replay the survey fixtures against the Chromium and GTK4 traces.

Depends on
Part of
  • Theme: T10
  • Tracked in R0584
  • Phase 3 · priority P2 · size M
R0596Windows: nobody has checked whether precision-touchpad scrolling coasts and stays smooth in RuneP2Phase 3MT10
motion-windows-touchpad-inertia · feature
What happens

On Windows, winit turns every WM_MOUSEWHEEL into a LineDelta of the raw value over WHEEL_DELTA (120), with phase Moved. Rune then multiplies it by 40 pt and applies it in one frame. A precision touchpad sends small fractional values, so each message moves the content a few points.

When an app does not use DirectManipulation, Windows sends the touchpad's inertia as more WM_MOUSEWHEEL messages after the fingers lift. Chromium does use DirectManipulation, which supplies pan, inertia and overscroll with phases. Nobody has measured:

  • whether Rune's touchpad scroll coasts at all after lift, and how far;
  • whether those messages arrive often and evenly enough to look smooth at 120 Hz or 144 Hz;
  • whether 40 pt per unit gives the same distance as Chromium for the same gesture.

With no phases, Rune's wheel lock also cannot tell a touchpad gesture's end from a pause, so it uses the 0.1 s idle gap.

Where
Why it matters

Most Windows laptops have a precision touchpad. If Rune's scroll stops dead, coasts a different distance, or moves in visible steps, users notice next to Edge and other apps. The targets: Windows precision touchpads coast within 10% of Chromium's distance; offsets stay within max(2 pt, 5%) of the native trace per frame; and 60 and 120 Hz runs land within 1 pt.

What would help

Measure first, then change only what the numbers need.

1. Using the Windows fixtures from R0409, replay the same gestures into Rune and Chromium and compare offsets per frame. 2. If the OS's inertial wheel messages already coast within 10% with no visible steps, record the measurement and close. 3. Otherwise, try these in order:

  • (a) Recommended first: keep consuming the inertial messages, but treat fractional (non-WHEEL_DELTA-multiple) deltas as precise pixels with their own scale, so they are never glided as notches by R0595.
    • (b) Add a DirectManipulation viewport hook in the win32 layer that reports pan, inertia and phases. This adds COM plumbing, so only take it if (a) cannot meet the bar.

Keep mouse-wheel notches on the notch glide.

Done when
  • The survey note records the measured gap, or the absence of one, with numbers per fixture.
  • If a change ships, replayed touchpad fixtures coast within 10% of Chromium's distance.
  • If a change ships, no frame of touchpad input steps more than 2 frame periods' worth of motion.
  • Mouse-wheel notches still use the notch glide, and fractional touchpad deltas are never glided.
How to check

Replay tests with the Windows fixtures in cargo test -p rune, in the required check. A Windows platform-lane run with a real precision touchpad confirms it.

Depends on
Part of
  • Theme: T10
  • Tracked in R0584
  • Phase 3 · priority P2 · size M
R0597Input: drags follow the last event received, and nobody has measured the uneven steps this givesP3Phase 3MT10
motion-input-resampling · feature
What happens

A drag, a pan or a slider follows the last event that arrived. touch_move stores the finger position and moves the pointer or the scroll viewport to it at once. The mouse path does the same. Nothing records where the hand was at the time the frame will be shown.

When the input rate and the display rate differ, this should give uneven steps. A 90 Hz digitizer on a 120 Hz display delivers zero events in some frames and one in others. A 125 Hz mouse on a 144 Hz display does the same. The element then moves, stops, and moves double. Nobody has measured how large the effect is in Rune.

Research 15 recommends Android's resampling: sample at the frame time minus 5 ms, interpolate between two events, extrapolate only when events are 2-20 ms apart, and cap the extrapolation at min(delta/2, 8 ms). PLAN.md lists late-latched input with these constants. There is no resampling anywhere in crates/rune/src/runtime/input.

Where
Why it matters

Uneven steps make a drag look rough even when every frame is on time, and users notice it most on high-refresh displays. The targets: follow lag at most 1 refresh at constant speed, at most 1 pt overshoot on stops and reversals, and 0 latency and lags-hand findings in gate scenarios. The same motion should follow the same path at any refresh rate or cadence jitter.

What would help

Measure first.

1. Add a motion gate scenario that replays constant-speed drags at 90, 125 and 240 Hz input against 60, 120 and 144 Hz frames. Report step spread (how far each frame's step is from the ideal step) and follow lag. Use the OS event times from R0405 and the presentation times from R0396. 2. If spread is within 10% of the ideal step at every pair, record that and close. 3. Otherwise, add a resampler:

  • keep a short ring of timestamped samples per gesture;
    • compute the hand position at frame_target - 5 ms;
    • interpolate between samples, or extrapolate at most min(delta/2, 8 ms) when the last two samples are 2-20 ms apart; never extrapolate from samples older than 20 ms;
    • apply it to drags and pans only, with a per-element opt-out;
    • resampled positions feed presentation only. Handlers still see the real events, and release velocity still comes from real samples.

Research 15 says prediction should not move scroll content under a finger unless measured as better, so check pans against the recorded corpus from R0406 before turning extrapolation on for them.

Done when
  • The measurement scenario is committed, and its numbers for every rate pair are in the PR.
  • If resampling ships, constant-speed input gives step spread within 10% of the ideal step at every rate pair.
  • If resampling ships, it adds at most 5 ms of latency.
  • Acceleration, a reversal and a sudden stop overshoot the true path by at most 1 pt.
  • Samples older than 20 ms are never extrapolated.
  • A gate follow expectation passes with the resampler on.
How to check

The measurement scenario runs in the motion gate. Headless tests in cargo test -p rune cover the interpolation, extrapolation cap and staleness rule. Replays from the gesture corpus check pans.

Depends on
Part of
  • Theme: T10
  • Phase 3 · priority P3 · size M
R0598Motion: text flights animate on their own progress value, outside the trace, rest and retarget auditP3Phase 3MT10
motion-text-flight-on-track · refactor
What happens

Tx::fly_text copies a source's glyph instances and flies them to a destination element. Each TextFlight holds one Animated<f32> progress value, animated from 0 to 1 on the GROWTH spring. Every frame, measure reads the destination's live rect and places the glyphs by a linear blend from source to destination at that progress. The source and target crossfade on a fixed schedule over the same progress.

The progress is closed-form, so it is smooth in time. But it is not a store track, and the flight is not a scene node:

  • it is missing from motion traces, from Scene::rest and from the retarget audit;
  • when the destination moves mid-flight, the presented rect jumps by (new - old) × progress and nothing checks the velocity;
  • it has its own reduced-motion rule: a 0.15 s linear fade, where the shared rule (REDUCED_FADE) is 0.18 s ease-in-out.
Where
Why it matters

Text flights carry a message from a composer into a chat timeline, which users watch closely. A jump when the timeline moves under the flight goes unseen today. The target is that every source of presented motion is traced, and keeps its velocity continuous at every retarget unless the change is a declared cut: 100% of inventory pairs traced and audited, undeclared spatial velocity changes at most 0.001 pt/s for analytic sources, and every intended discontinuity, reduced motion included, carries a cut reason in the trace.

What would help

Give each text flight a scene node with a TRAVEL track, the same as matched geometry. Then it shares retargeting, the trace, Scene::rest and the reduced-motion rule with every other flight. A moving destination becomes a retarget that keeps velocity.

If a full scene node costs too much for a glyph copy, lighter instrumentation is acceptable, as long as it gives the same coverage: trace rows, rest, the audit and the shared reduced-motion rule.

Done when
  • Text flights appear in motion traces, Scene::rest and the retarget audit.
  • A test moves the live destination mid-flight; geometry stays continuous and the velocity-snap check from R0390 passes.
  • Under reduced motion the flight follows the shared rule, and the trace records it as a cut.
  • The text-glide scenario keeps its crossfade alphas within 1/255 of today's.
How to check

The flight tests in crates/rune/src/flight.rs and a new moving-destination test in cargo test -p rune. The text-glide motion gate scenario in scripts/motion-audit/scenarios/ runs in the required check.

Depends on
Part of
  • Theme: T10
  • Tracked in R0585
  • Phase 3 · priority P3 · size M
R0599rune-motion: PhaseAnimator, Keyframes, Choreography and the gesture helpers are unreachable from ElP3Phase 3MT10
motion-unused-api-decision · refactor
What happens

rune-motion exports several tools that nothing in crates/rune or crates/rune-kit calls outside tests:

  • PhaseAnimator, documented as SwiftUI's PhaseAnimator;
  • Keyframes, documented as SwiftUI's KeyframeTrack;
  • Choreography and its cues;
  • AnimationStore::release and Release;
  • the gesture helpers VelocityTracker, project and rubber_band.

They have tests in the crate, and an example uses the store directly. The rune-motion README maps keyframeAnimator and phaseAnimator to these types, but an app cannot reach them through El. The closest El API is El::sequence, a finite opacity and scale sequence on the shared clock, and El::looping. Nobody has checked whether those cover what SwiftUI's two animators do, such as keyframes on offset or rotation, separate tracks per property, or content that changes per phase.

The gesture helpers duplicate logic the runtime has its own copies of: touch scroll uses its own two-sample velocity, its own edge return and its own decay constant.

Where
Why it matters

App authors coming from SwiftUI look for phase and keyframe animation and find types they cannot use. Unused public items also drift from the runtime's real behaviour. The target is that Rune's motion API covers a fixed set of SwiftUI animation capabilities, each with an example and a gate scenario that checks the behaviour, for 100% of the fixed rows, with a Motion page on the docs site that links each row.

What would help

1. Write the PhaseAnimator and KeyframeAnimator rows of the parity table on the Motion page from R0120: the SwiftUI behaviour, and a Rune example with El::sequence where it is enough. 2. Where El::sequence cannot express a row (per-property keyframe tracks, offset or rotation keyframes, phase-driven content), add an El builder over PhaseAnimator or Keyframes, with an example and a gate scenario. 3. Let the touch issues wire the gesture helpers: R0407 for velocity, and R0389 for the rubber band and edge. Then delete the runtime's copies. 4. For Choreography and Release, either wire them in, document them in the README as crate-level tools with an example, or deprecate them. 5. Define each physics constant once, in rune-motion.

Done when
  • The phase and keyframe parity rows each have a working El example and a gate scenario that checks the behaviour.
  • Each listed item is used by rune or rune-kit, documented as standalone with an example, or deprecated.
  • No physics constant is defined in both rune and rune-motion.
How to check

The new gate scenarios run in the motion gate. cargo check --workspace --all-targets and the crate tests run in the required check. A test or script that fails when a parity row's example or scenario is missing keeps the rows honest.

Depends on
Part of
  • Theme: T10
  • Phase 3 · priority P3 · size M
R0600Main thread: first uses of fonts, pipelines, images and platform surfaces stall single framesP1Phase 3XLT11
perf-stalls · tracking
What happens

Every stage of a frame runs on one thread. Any synchronous first-use cost therefore shows as a single hitched frame: the first text in a new window, the first layer effect, the first large image, the first layer-shell overlay, a preference save, the start of a drag-out. Each one costs once, so a frame-time median never shows it, and today these are found by hand.

The known sources at HEAD:

Why it matters

Users see a stutter on the first scroll past an image, the first open of a menu or the first toggle of a setting, and it never comes back, so it is hard to report. The target: zero Rune-caused main-thread tasks over 8.3 ms after the first frame on the reference Mac, Windows and Linux machines; a hitch-time ratio <= 1 ms/s in flagship scripts; 0 pipelines built and 0 fonts registered on the main thread after the first frame (background builds allowed); image upload bytes per frame under the committed cap.

What would help

Open one child issue for each stall source that the first-use suite and the stall markers name. R0403 names the work behind each slow frame. R0404 runs each first use in a fresh process. The image and recorder children already exist. File children for fonts, layer pipelines, the Wayland roundtrip, preference saves and the drag-out readback as the suite confirms each one.

Done when
  • All children are closed.
  • Stall markers name the first-use work behind every frame over one refresh.
  • The first-use suite shows zero Rune-caused main-thread tasks over 8.3 ms after the first frame on macOS, Windows and Linux.
  • Count gates show 0 pipelines built and 0 fonts registered on the main thread after the first frame.
How to check

The first-use suite runs on the macOS, Windows and Linux lanes. The pipeline, font and upload-byte counts run as count gates in the required check.

Issues
Depends on
Part of
  • Theme: T11
  • Phase 3 · priority P1 · size XL
R0601Paint: every animating frame walks the whole tree and rebuilds every uncached instance, and nothing a worker can own describes the frameP2Phase 3XLT11
perf-paintlist · tracking
What happens

build() works in immediate mode over the whole node list on every animating frame. It clears node-sized scratch, reads Node, Scene, the atlases, images, scroll and growth together, and writes every instance with absolute window rects. El::cache reuses some subtrees, and uploads write only the instance spans that changed. But the CPU walk still visits every node, and a scroll changes every instance inside the viewport.

The walk also reads Rc text layouts and borrows the runtime, so nothing that describes a frame can leave the main thread. A compositor gets &mut Runtime.

The numbers come from a headless profile at an older rev (506f5421, headless, GPU and presentation excluded). The paint walk was 25-62% of a scroll frame. Board long-card scroll had p50 2.34 ms, p95 15.2 ms and 82 frames over 8.3 ms, which made it the one interaction still missing the frame budget.

This takes several issues: the walk has to be split, a harness has to prove a second path identical, and coverage has to widen over fades, clips, sticky headers, hover, flights, El::cache and exit masks before a retained path can become the default.

Where
Why it matters

The targets: on the reference Mac, p95 <= 4 ms and 0 frames over 8.3 ms per run; at most 1 full paint build per frame; visits that scale with what changed, not with tree size. Renderers and compositors should read an owned Send frame packet, not the runtime. In the pinned scroll workloads, entries visited per animating frame should be at most 2 times the entries changed, with fallbacks under 1% of frames.

What would help

Record a HEAD baseline for the flagship scroll scenes first: entries visited, plus frame-time medians on the reference Mac. The two source plans disagreed on when to start. One gated the whole effort on board p95 still being over 4 ms after R0312. The other started from the baseline. Recommended: the low-risk children (the split, the harness, the keeps fix, the slot index, subtree skips) go ahead regardless. Retained patching and transform groups start only if the baseline after R0312 still misses 4 ms. Ship the retained path as the default with RUNE_PAINT=legacy as a revert for one release. The public 128-byte Instance stays.

Done when
  • A HEAD baseline is recorded before the retained work starts.
  • The differential harness shows identical resolved geometry, marks, hits, resource updates and scope balance on all suites.
  • Fallbacks to the full walk are under 1% of frames across the canonical scenes.
  • In the pinned scroll workloads, entries visited are <= 2x entries changed.
  • Board long-card scroll p95 is < 8.3 ms on the reference Mac. This is an interim step: a later issue closes the 4 ms p95 with 0 frames over 8.3 ms.
  • PaintList: Send and FramePacket: Send + 'static are asserted at compile time.
How to check

The differential harness runs in the required check. Entries-visited and fallback counts sit in the count budgets. The macOS lane runs board and agent-client scroll with --profile perf in paired, alternating runs.

Issues
Depends on
Part of
  • Theme: T11
  • Phase 3 · priority P2 · size XL
R0602Paint: what to draw holds Rc text layouts and runtime borrows, so it cannot be SendP2Phase 3LT11
arch-paintlist-send · refactor
What happens

The inputs of the paint walk are Nodes and the runtime's scratch. Node holds Rc<Layout<Ink>> for its text, Rc<RunLayout> and an Rc hover pair. Its cold parts sit in Cold<T> (Option<Rc<T>>) and SharedBox<T> (Rc<T>). build() reads these together with Scene, the atlases and scroll state, and writes rt.instances from scratch on every animating frame.

No type represents "what to draw this frame" apart from the runtime. The present worker already moves finish, submit and present off the main thread, but nothing before encode can follow, because everything it would read is !Send or borrowed from the runtime.

Where
Why it matters

This is the base of the retained-paint work. A paint list compiled at commit lets an animating frame patch only what moved instead of walking every node. Being Send, it lets a frame be described off the main thread. The targets: PaintList: Send asserted at compile time; the harness shows identical resolved geometry, marks, hits, resource updates and scope balance between the retained and legacy paths; on the reference Mac, p95 <= 4 ms and 0 frames over 8.3 ms per run.

What would help

Define PaintList as a struct of arrays, one entry per drawn element, holding:

  • instance templates (the 128-byte Instance with the parts that motion does not change);
  • glyph-run handles (Arc to shaped glyph quads, made once when text is shaped, never copied per frame);
  • clip-chain ids and transform-group ids;
  • dependency masks: which Scene properties an entry reads, so a later patch knows what to touch;
  • structural signatures, so apply can tell when a subtree must be compiled again.

Compile it at apply, for each dirty subtree. Move the paint scratch and has_* flags into the struct from R0316, so the list does not borrow loose runtime fields. Then let build() emit instances from the PaintList and check it frame by frame against the legacy walk with the harness from R0399. R0603 wraps the list with uploads and surfaces.

The main risk is text. If glyph-run handles copy shaped text each frame, the change costs more than it saves. Measure with the counting allocator.

Done when
  • PaintList: Send is asserted at compile time.
  • build() emits from PaintList, and the differential harness passes on all suites.
  • The counting allocator shows no per-frame copy of shaped text.
  • Frame CPU p50 and p95 on the board and agent-client scroll scenes do not regress against the legacy walk, in paired, alternating --profile perf runs compared by median.
How to check

The static assert and the differential harness run in the required check. The allocation check runs in the count budgets. The macOS lane runs the scroll scenes against the legacy path.

Depends on
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 3 · priority P2 · size L
R0603Frames: what a frame draws has no owned type, so nothing can hand a whole frame to a worker or another crateP2Phase 3MT11
arch-frame-packet · refactor
What happens

A frame needs more than instances. It needs the glyph and image atlas deltas, native surface draws, effect marks, the clear colour, size, scale and time, and the device its resources belong to. Today each of these is reached through the runtime or the renderer at draw time:

  • Renderer::prepare takes &mut Atlas and &[Instance] straight from the runtime.
  • upload_images takes &mut rt.images.
  • prepare_surfaces takes &rt.surfaces.
  • A compositor gets Frame { rt: &mut Runtime<S>, ui: &mut Renderer, .. }.

The present worker can take only finished command buffers, after the main thread has done everything else.

Rune already has DeviceKey, a process-unique key for each device, and every Renderer carries one. But nothing stamps a frame's resources with it. A frame built against a device that has since been lost is not detected.

So no type exists that a present worker, a presenter thread or a separate render crate could own.

Where
Why it matters

Without an owned frame, presentation cannot leave the main thread. A busy main thread then costs a frame of running animation, and renderer changes stay coupled to every runtime field. The target: renderers and compositors read an owned, Send frame packet, not the runtime. FramePacket: Send + 'static is asserted at compile time, with resources referenced by handle and device generation.

What would help

Define FramePacket as an owned value holding:

  • the PaintList from R0602;
  • the upload list: glyph and image atlas deltas, with the generation they belong to;
  • native surface draws and effect marks;
  • clear colour, size, scale and t;
  • the DeviceKey it was built against.

GPU resources are referenced by handle plus generation, never by borrow. Assert FramePacket: Send + 'static. Add a Renderer::prepare form that takes only &FramePacket. Keep the slice form deprecated for the same window that R0412 uses, since rune-fx and app compositors call it, then remove it. A packet whose DeviceKey no longer matches the renderer's is dropped and reported through Rune's diagnostics. R0203 supplies the device-loss path to test against.

Upload lists must not copy atlas pages for each frame. Measure bytes per frame with the counting allocator.

Done when
  • FramePacket: Send + 'static is asserted at compile time.
  • Renderer::prepare takes &FramePacket and no runtime reference, and the old form is deprecated with a changelog entry.
  • A test drops and reports a packet built before an injected device loss.
  • The differential harness passes on all suites.
  • The counting allocator shows no atlas page copied per frame.
How to check

The static assert, the renderer tests and the differential harness run in the required check. The device-loss test injects a loss with the recreate path from R0203.

Depends on
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 3 · priority P2 · size M
R0604Input: a pen arrives as a touch, with no pressure, tilt, barrel button or eraserP2Phase 3MT11
frame-core-pen-input · feature
What happens

A pen reaches Rune only as a winit touch (where the system reports it as one) or as a mouse event. window::touch keeps the touch's id, phase and location and drops everything else, including winit's force value. Runtime::touch takes only an id, a phase, x, y and a time. Drag, which handlers see, has no pressure, tilt or tool fields. Pressure, tilt, rotation, the barrel button and the eraser end never reach an app.

A drawing app cannot vary a stroke with pressure. examples/sketch draws every stroke at a fixed 2.5 pt. It cannot tell a pen from a finger to ignore a palm either, or switch to erasing when the pen is flipped.

The platforms all send this data. Windows sends WM_POINTER messages, and GetPointerPenInfo gives pressure, tilt, rotation and the barrel and eraser flags. Rune already subclasses its windows for the custom frame. macOS sends pressure, tilt, rotation and the pointing device type on NSEvent. Wayland sends it through the tablet-v2 protocol.

Where
Why it matters

Users with a Surface Pen, a Wacom tablet or a tablet in a Linux session expect pressure and the eraser to work as they do in native apps. The target: Windows apps behave like native Windows 11 apps on every DPI, GPU and input device. A pen with no pressure fails that.

What would help

This is split from R0405, which delivers pointer and touch samples with OS timestamps through Rune's own shell event type. Add pen fields to those pointer samples:

  • tool: mouse, touch, pen or eraser;
  • pressure from 0 to 1, or none;
  • tilt x and y in degrees, and rotation;
  • barrel button.

Fill them on each platform:

  • Windows: GetPointerPenInfo, and GetPointerPenInfoHistory for coalesced samples, read in the window procedure Rune already hooks.
  • macOS: NSEvent pressure, tilt, rotation, button mask and the tablet proximity device type.
  • Wayland: tablet-v2 on surfaces Rune drives.

On windows Rune drives, turn off winit's touch path for pen pointers, so input is not delivered twice.

Expose the data to handlers as a #[non_exhaustive] Pen value on Drag. Drag already has a crate-private field, so apps cannot build it as a literal and a new field breaks no app. Leave Runtime::touch unchanged, and add a separate method for pen samples. Add a changelog entry.

Done when
  • On Windows, injected pen samples arrive with pressure, tilt, rotation, barrel and eraser equal to the injected values, and with OS timestamps within 1 ms of the injected times.
  • Each injected pen sample is delivered once, not twice.
  • Recorded macOS tablet events and Wayland tablet-v2 events produce the same fields in headless tests.
  • Mouse and touch input behave as before in the existing tests.
  • examples/sketch varies stroke width with pressure.
How to check

The Windows GUI lane injects pen input with InjectSyntheticPointerInput. Headless tests with recorded samples cover macOS and Wayland in the required check.

Depends on
Part of
  • Theme: T11
  • Phase 3 · priority P2 · size M
R0605Paint: a frame that changes only frames, opacity or colours re-emits every instanceP2Phase 3LT11
perf-paint-retained-patch · perf
What happens

Every animating frame runs Runtime::build, the paint walk, over the whole tree. It clears the instance list, marks, hits, surfaces and every per-node scratch array, then visits each node and emits all of its instances again. It does this when one hover fade or one spring moved the opacity or frame of a single node.

Scene already knows what moved. Scene::frame returns changed, the nodes whose presented values changed this frame, parents before children. The paint walk does not read it.

The upload is already incremental: write_instances compares the new list with what the GPU buffer holds, 64 instances at a time, and writes only the spans that differ. So upload bytes follow what changed. The CPU work does not: the walk and the compare both cost O(tree).

research/37 measured the paint walk at 25-62% of a scroll frame. The Board long-card scroll ran at 15.2 ms p95 with 82 frames over 8.3 ms (headless CPU, at 506f5421).

Where
Why it matters

A hover fade or one spring should cost almost nothing. The target is that motion costs only what moves: visits <= 2 x changed + feature-list nodes + 64, differing by <= 5% between the 10,000-node and 100,000-node trees, with <= 1 full paint build per frame. Retained paint must do work in proportion to what changed: in the pinned scroll workloads, entries visited per animating frame are at most 2 times the entries changed, and fallbacks are under 1% of frames. Today a frame on a 100,000-node tree pays for all 100,000 nodes.

What would help

1. Compile the paint list at apply time. Per node, keep an op range with resolved templates, glyph-run handles and a mask of the presented props each op reads (frame, opacity, colour). Give each subtree a slot range with headroom, so a patch does not shift its neighbours. 2. On a frame where only frame, opacity or colour tracks moved, re-instantiate only the ops of the nodes in changed, plus descendants whose geometry follows a moved frame. 3. Fall back to build() when a structural signature flips: insert, remove or reorder; clip, layer or effect changes; text relayout; sticky, raise or flight paint order (tree_order, build.rs:95); a presence exit. 4. Count fallbacks, entries visited and bytes patched per frame, and put them in the frame record. 5. Keep the 128-byte Instance unchanged, and keep RUNE_PAINT=legacy as a revert switch.

Transform groups for scroll are R0606.

Done when
  • On the 10,000-node and 100,000-node scenarios with 10 nodes moving, entries visited and instance bytes written per animating frame are <= 2 x the instances of changed nodes + 64, and differ by <= 5% between the two trees.
  • A one-spring frame on a 5,000-node tree writes no more than that node's ops.
  • Fallbacks are under 1% of frames in the motion scenarios and in the pinned workloads: the Board long-card scroll, a 6,000-row virtual list scroll and a streaming chat transcript.
  • The paint differential harness passes on all suites in both modes: identical resolved geometry, marks, hits, resource updates and scope balance, including clips, effects, text and hit testing.
  • RUNE_PAINT=legacy restores the full walk.
How to check

Count budgets for visits, bytes and fallbacks run headless in the required check. The differential harness runs the retained and legacy paths in independent runtimes on every suite. scripts/motion-audit runs the motion scenarios. The pinned workloads run on the reference Mac with --profile perf.

Depends on
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 3 · priority P2 · size L
R0606Paint: a scroll rewrites every instance below the scroll point because instances hold absolute rectsP2Phase 3LT11
perf-paint-transform-groups · perf
What happens

Instance holds its rect and clip in absolute device pixels. A 1 px scroll therefore changes every instance inside the viewport. The paint walk re-emits all of them, and write_instances finds that every block differs and uploads one span that covers them all. Its own comment says so: "a scroll writes one span". At 128 bytes per instance, a viewport that holds 5,000 instances uploads about 640 KB per scroll frame, to move them all by the same offset.

Sticky headers are worked out again every frame in the same walk (sticky_frame). Hit rects are absolute too, so they are rebuilt with the instances.

Even with patching (R0605), a scroll changes every scrolled node. So a scroll frame stays O(visible content), not O(1).

Where
Why it matters

Scroll is the most common motion in a Rune app. The targets: worst-case frames at p95 <= 4 ms with 0 frames over 8.3 ms on the reference Mac; very large lists at scroll CPU p95 <= 1 ms (fixed rows) and <= 2 ms (variable rows); and motion costs only what moves. The retained-paint target counts geometry after group transforms, so groups are part of how that target is checked.

What would help
  • Give scroll viewports, sticky headers and translating subtrees a transform-group id.
  • Carry the id in a side per-instance vertex stream (one u32 per instance) and keep a small group buffer of transforms that the shader reads. The public 128-byte Instance stays as it is, so compositors and rune-fx keep working.
  • A scroll frame then writes one group transform, plus the instances of rows that enter.
  • Clips and hit rects must follow the group. Either keep them in group space and transform at use, or keep them absolute and fix them up per group. Hit testing must match the drawn frame.
  • The differential harness compares geometry after group transforms.
Done when
  • A scroll frame on the 100,000-row table uploads <= 1 KB of instance data plus the rows that enter.
  • Instance stays 128 bytes (the size assert holds).
  • Pixel tests pass for clipped, sticky and nested scroll viewports, and hit tests land on the drawn rows.
  • The Board long-card scroll p95 is under 8.3 ms on the reference Mac (paired, alternating runs, median of 7). This is an interim step; R0711 owns 4 ms.
  • Scroll CPU p95 on the 1M-row fixed and variable lists is recorded against PLAN §8's 1 ms and 2 ms.
How to check

Count budgets on upload bytes per scroll frame run headless in the required check. Pixel tests cover clips, sticky headers and hit rects. The differential harness runs on all suites. Frame-time medians come from the macOS lane (R0125) with --profile perf.

Depends on
Part of
  • Theme: T11
  • Tracked in R0601
  • Phase 3 · priority P2 · size L
R0607Windows and Linux: windows acquire, submit and present on the event-loop thread, so one blocked present stalls every windowP2Phase 3LT11
perf-present-worker · feature
What happens

On Windows and Linux the window host acquires the drawable, submits and presents on the event-loop thread. Every desktop window is configured AutoVsync with a frame latency of 2, which wgpu turns into FIFO, so pacing comes from blocking in acquire or present. wgpu 30.0.1 waits up to 1,000 ms for a drawable inside get_current_texture. While main waits, input, timers and every other window wait too.

The only present worker is compiled on macOS only. Only overlays on wgpu use it; native Metal overlays and all windows skip it. It covers finish, submit and present. Acquire stays on the owner, and wait blocks the owner. Linux overlays present inline.

#169 shows the cost. A layer-shell overlay that the compositor stops painting blocks inside vkQueuePresentKHR with no timeout, and the whole event loop stops.

Nobody has measured how long main waits per frame on these platforms.

Where
Why it matters

One window or overlay that the compositor stops painting freezes the whole app. The targets: "a blocked surface costs other windows <= 1 refresh"; "no surface call blocks the UI thread for more than 1 refresh period"; and continuous motion at >= 99% one-period on Windows DX12 and Linux Vulkan (X11 and Wayland).

What would help

The two source records disagree. One measures first and builds a worker only past a threshold. The other builds it behind a switch after the presenter decision. Recommended: measure first, in phase 3, without waiting on the presenter decision, since #169 needs isolation either way.

1. From the frame record, measure every event-loop wait per frame on the Windows and Linux lanes: acquire, submit, present, reconfigure, device polls and worker joins. Include a compositor-stall scenario: a covered window, an output turned off, a hidden nested compositor. 2. Pace layer-shell presents on wl_surface.frame callbacks, so the host never presents to a surface that the compositor does not paint (#169). 3. If acquire plus present exceeds 1 ms p95, add a worker present strategy to SurfaceHost (R0202). Each surface gets one frame in flight, acquire comes before build, and admission on main does not block. When a surface's previous frame is still in its worker, skip that surface's frame. Do not wait on the shared loop. 4. Ship it behind a builder switch, and make it the default only after paired --profile perf runs.

Done when
  • A note records the measured waits per platform and backend (Windows DX12, Linux Vulkan on X11 and Wayland).
  • The event-loop thread spends <= 0.2 ms p95 per frame in acquire, present and worker waits, including in the compositor stall, or the note shows that the worker is not needed.
  • A surface whose present blocks for 500 ms costs a second animating window <= 1 refresh.
  • Input-to-present p95 does not regress in paired runs.
  • Drop-order tests pass for close, hide and resize with a frame in flight.
How to check

Platform-lane tests on R0402 and R0418. The blocked-surface test runs as a headless fake surface in the required check and on the lanes. Paired, alternating perf runs compare medians.

Depends on
Part of
  • Theme: T11
  • Phase 3 · priority P2 · size L
R0608Windows: nobody has measured how much input latency the two-frame present queue addsP2Phase 3MT11
perf-windows-waitable-swapchain · research
What happens

Every desktop window is configured AutoVsync with desired_maximum_frame_latency = 2. On DX12, wgpu 30.0.1 creates the swapchain with a frame-latency waitable object. By default (Dx12UseFrameLatencyWaitableObject::Wait) it waits on that object inside get_current_texture, with a 1,000 ms timeout. Rune does not set this option. Windows present through DirectComposition (DxgiFromVisual).

With latency 2, DXGI lets two frames queue. A frame that latched input may then wait up to two refreshes before it shows: up to 33 ms at 60 Hz, where the target p50 is 16.7 ms. Nobody has measured this. Native DirectX apps and Chromium run at latency 1 and wait on the waitable object before they latch input, so each frame starts just in time.

Where
Why it matters

Typing and dragging on Windows feel late when frames queue. The targets: input-to-present on 60 Hz Windows references at p50 <= 16.7 ms and p95 <= 25 ms, within one refresh of a Win32 control measured by the same probe; continuous motion at >= 99% at display rate on Windows DX12; and Windows apps that behave like native Windows 11 apps.

What would help

1. On the Windows lane, measure input-to-present and cadence at frame latency 2 and at latency 1. Use OS input timestamps (R0405), real present times (R0401) and PresentMon. 2. Prototype latency 1 with Dx12UseFrameLatencyWaitableObject::DontWait. Rune then waits on the swapchain's waitable handle itself, through wgpu's hal access, with a timeout of one period, before it steps the runtime and latches input. On a timeout, the frame skips to the next tick and does not block. 3. Adopt it only if p50 drops by at least 0.5 refresh with >= 99% one-period cadence.

The wait must run on whichever thread owns acquire. If R0607 lands first, it moves with that strategy.

Done when
  • A research note gives paired latency (p50, p95) and cadence numbers for latency 2, latency 1 with wgpu's wait, and latency 1 with Rune's own wait.
  • The note records adopt or reject against the 0.5-refresh and 99% rule.
  • If adopted: Windows hello input-to-present p50 <= 16.7 ms and p95 <= 25 ms at 60 Hz, with >= 99% one-period frames, and the wait never blocks main for more than one period.
  • If adopted: the steady-present hold still changes the refresh rate once per interaction.
How to check

The Windows lane (R0402) with PresentMon reproduces the note's numbers. If adopted, the lane keeps the latency and cadence rows as a regression check.

Depends on
Part of
  • Theme: T11
  • Phase 3 · priority P2 · size M
R0609macOS: nobody has measured how many window-size drawables a window keeps after motion stopsP3Phase 3ST11
perf-drawables-at-rest · research
What happens

A new window starts capped at two drawables (frame latency 1). After it first rests on screen, or after its first second, LaunchDrawables reconfigures it to the steady latency of 2. The native Metal surface sets maximumDrawableCount to latency + 1, so a steady window may hold 3.

The comment on LaunchDrawables explains why this matters. CAMetalLayer makes another window-size drawable whenever a frame acquires while the others are still held, and it keeps that drawable. Launch frames overlapped that way left a settled window one drawable heavier, about 12 MB at 980x760.

The same can happen after any motion. A window that animated with three drawables in flight may keep all three at rest. Each extra drawable costs W x H x 4 bytes: about 25.6 MB for a 1600x1000 pt window at 2x. Nobody has measured whether this happens.

#161 covers hidden windows. This issue covers a visible window at rest.

Where
Why it matters

An app that stays open all day keeps whatever its windows held after their last animation. The memory target: Mac hello <= 30 MiB footprint; drift <= 2 MiB; pools at baseline within 5 s of the last blur. One spare drawable on a large window costs more than that whole budget.

What would help

1. On the macOS lane, count IOSurface-backed drawables per window after sustained motion and after 5 s of rest. Do this for the native Metal backend and for RUNE_GPU_BACKEND=wgpu. Use the memory gauges from R0284 and the process footprint. 2. If a resting window keeps more than two, lower maximumDrawableCount at rest (as the launch cap does) and raise it again on sustained presenting. 3. Confirm that the footprint actually drops. A lower cap may not release drawables the layer already made.

Risk: fewer drawables can bring back 60 Hz presentation. Measure after R0127 has landed, so that cadence is stable first.

Done when
  • A note records the drawables allocated at rest after motion, per backend, with rev, device and window size.
  • If changed: an idle window after motion holds <= 2 drawables, and its footprint drops by the matching bytes.
  • If changed: spring and scroll scenes keep their one-period share on the reference Mac.
  • If changed: the first frame after rest takes no more than 8.3 ms.
How to check

The macOS lane (R0125) records footprint and drawable counts after a scripted motion-then-rest scenario, next to cadence for the same run. If changed, the footprint row stays in the lane as a regression check.

Depends on
Part of
  • Theme: T11
  • Phase 3 · priority P3 · size S
R0610Render: the GPU instance constants are defined in three crates, and rune-fx reads rune's clip shader from its source treeP2Phase 3MT12
arch-rune-abi · refactor
What happens

rune defines the packed GPU instance: the 128-byte Instance with fade: [u32; 4] holding f16 pairs, the KIND_* numbers, pack_fade, pack_clip_radii and NO_CLIP. Other crates copy parts of it:

  • rune-ref decodes into its own Primitive, with fade: [f32; 4] and its own NO_CLIP, and it matches kinds by bare number (kind == 12).
  • rune-fx has another NO_CLIP. It reads rune's clip.wgsl with include_str!("../../rune/src/clip.wgsl").
  • rune's Metal shader tests read rune-fx and rune-light shader sources by relative path, in the other direction.

rune-ref's decoded form is meant to differ: it is the reference oracle, with no GPU or platform dependency. But the constants and encodings are copies. So a change in rune compiles cleanly while rune-ref or rune-fx drift. The include_str! is a source edge with no version. It breaks as soon as either crate is built outside this workspace layout, for example from crates.io (#108).

Where
Why it matters

Someone who adds a kind or changes the fade encoding gets no error from the crates that copied it. The oracle then silently disagrees with the GPU. The target: the instance ABI is defined once, in a rune-abi leaf crate (deps: bytemuck and half) that rune, rune-fx, rune-light and rune-ref use. There are 0 cross-crate include_str!, and a conformance test checks the layout, the f16 fade and clip-radii encodings and the WGSL offsets. A new KIND_* constant with no oracle arm fails a test, with no bypass. The crate chain is rune-abi <- rune-render <- rune <- kit.

What would help
  • Add crates/rune-abi with Instance, KIND_*, NO_CLIP, CLIP_WGSL, pack_fade and unpack_fade, pack_clip_radii and the effect-mark encoding. rune, rune-fx, rune-light and rune-ref depend on it. rune re-exports everything at today's paths.
  • rune-ref keeps Primitive and its own reference semantics, and decodes through rune-abi's layout.
  • For the shader tests, either move the rune-fx and rune-light cases into those crates, or have the crates export their WGSL as constants. Recommended: move them, so no crate reads another's source tree.
  • Precompiled shaders are keyed by WGSL hash. Land this after #182, keep clip.wgsl byte-identical, and regenerate with scripts/precompile-metal-shaders.sh if a hash moves.
  • Do it after R0154, so the ABI moves out of a smaller file.
Done when
  • The workspace has one definition of Instance, the kinds, NO_CLIP and CLIP_WGSL.
  • There are 0 cross-crate include_str!, and a script in the required check enforces it.
  • The conformance test checks size, field offsets, alignment, the f16 fade and clip-radii encodings and the WGSL struct offsets. It round-trips every kind through rune-ref's decoded form.
  • A new KIND_* with no rune-ref arm fails a test.
  • rune's public paths are unchanged (API snapshot) and precompiled_misses stays 0 on macOS and Windows.
How to check

The conformance test and the include_str! check, in the required check from R0030.

Depends on
Part of
  • Theme: T12
  • Phase 3 · priority P2 · size M
R0611Crates: the renderer, GPU layer and Metal backend sit inside the core crate, though they need little of itP2Phase 3LT12
arch-rune-render · refactor
What happens

render/, gpu/ and render.rs hold about 9,000 non-test lines, including the native Metal backend. They compile as part of the core rune crate. So every runtime edit rebuilds them, and nothing stops runtime types from leaking in.

They use the runtime through a short list of items: the text and image atlases, DeviceKey, unpad, pixels, native surfaces and a few platform services. The renderer takes &rt.instances and the runtime's text atlas directly. Compositors get a Frame built from host internals. Before the cut, someone needs to list these items.

Where
Why it matters

Contributors wait for the renderer to rebuild after edits that never touch it. The renderer also can't be tested or benchmarked alone. The target: crate shape and dependency direction are enforced by the gate, with the chain rune-abi <- rune-render <- rune <- kit and no edge from a leaf crate back to rune. The incremental rebuild is at or below 1.2 s. Renderers and compositors read an owned, Send frame packet, not the runtime.

What would help

1. List every rune item that render/ and gpu/ use. Put the list in the PR and in the new crate's README. 2. After R0603, R0412 and R0195, extract crates/rune-render. It holds render/, gpu/, native Metal and the GPU side of the atlases, and depends on R0610, rune-staging and wgpu. 3. Move DeviceKey and unpad into it. Put the platform services it needs behind traits that rune implements. 4. Forward the metal-backend feature from rune, and re-export at today's paths, so app Cargo.toml lines and rune::render::* keep working. 5. Items that were pub(crate) and must cross the crate line become #[doc(hidden)] pub. An allowlist keeps them out of the API snapshot. Don't split further in this change.

Add a changelog fragment for the new crate and the feature forwarding.

Done when
  • The dependency inventory is in the PR and in the crate's README.
  • cargo test -p rune-render builds and passes with no rune in its dependency graph.
  • App Cargo.toml lines and rune::render::* paths keep working. The API snapshot changes only by allowlisted items.
  • The crate-deps check shows no edge from rune-render to rune.
  • In paired runs, the median incremental rebuild after a runtime edit is lower, and the clean build is at most 5% slower.
How to check

The crate-deps check from R0221 in the required gate, renderer tests in every GPU lane, and a paired rebuild-time measurement on the macOS lane.

Depends on
Part of
  • Theme: T12
  • Phase 3 · priority P2 · size L
R0612Render: an isolated layer redraws its contents every frame though nothing inside it changedP2Phase 3MT12
render-auto-retained-layers · perf
What happens

Every isolated layer redraws its contents on every presented frame. Only El::cache layers skip their pass. The claim loop sets needs_render = false for a resident cache whose signature matches, and encode skips only those layers. Every other layer clears its target and draws its whole subtree again, even when nothing inside it changed.

Two common cases:

  • An opacity-only fade of a large subtree, such as a card or a sheet, draws the subtree into an offscreen Rgba16Float target on every frame of the fade. For an 800x600 px card, that is about 4 MB of target written per frame, plus the draws.
  • Since #208, each disabled kit control whose paint overlaps is a layer. Scrolling a form redraws every visible disabled control on every frame.
Where
Why it matters

On a laptop GPU, fades and form scrolling spend the frame budget on pixels that didn't change. The user sees dropped frames, and the battery drains for nothing. The target: a static isolated layer redraws its content 0 times while unchanged. GPU p99 is <= 4 ms for 1,000 spring quads and the effects scene on the reference Mac, and <= 12 ms at 1440p for kit gallery scrolling on the UHD 620-class laptop. Per-frame work scales with what changed.

What would help

Keep a content signature for each materialized scope. It combines:

  • the hash of the scope's instance span from the upload diff, taken relative to the layer's origin so that a layer that only moves stays clean, plus the fractional part of the origin, since subpixel offset changes rasterization;
  • generation counters for every texture it samples: image pages, glyph pages and native surfaces;
  • a flag for live GPU springs and time-varying effects;
  • the signatures of nested layers, and its backdrop dependencies.

Skip the layer's pass when the signature is unchanged and the target is still resident. This treats the layer as an implicit cache inside the transient budget, evicted before explicit caches. It depends on R0427, so targets follow the layer's identity, not its plan index. Add a documented debug mode that redraws anyway and compares, because a missed invalidation shows stale pixels.

Done when
  • A fade of a 500-instance card redraws its layer content on 1 frame, not on every frame, by the pass counter.
  • Scrolling a form with 20 disabled controls redraws no layer contents after each control's first frame.
  • Invalidation tests: an image or video frame update, a glyph page change, a live GPU spring, a time-varying effect, a changed nested layer and a changed backdrop under the layer each cause a redraw.
  • Pixels are unchanged, and the count budgets drop for the fade and form scenes.
  • The debug compare mode reports 0 mismatches across the kit gallery scenes.
How to check

The count budgets from R0263 and the invalidation tests in the required check, and the debug compare mode in a GPU lane.

Depends on
Part of
  • Theme: T12
  • Tracked in R0637
  • Phase 3 · priority P2 · size M
R0613Render: core, rune-fx and rune-light run three blur pyramids that differ in calibration and edge handlingP2Phase 3LT12
render-blur-unify · refactor
What happens

Rune has three separate blur pyramids, and the same nominal blur looks different in each.

  • Core backdrop blur (El::backdrop_blur) clamps every tap to its region. It picks the up chain's start level from a table of measured sigmas and mixes two levels by variance, so a CSS blur() value lands where it should.
  • rune-fx's FxRenderer::blur_backdrop uses the same 13-tap down and tent up filters, but its taps don't clamp. Each pass is scissored to the region plus 2 texels and loads what the target held before, so a down level reads about 4 texels of stale data outside the area the last pass wrote. Its level is log2(blur_px / 2) with a linear crossfade, not a fitted sigma. By estimate, its frost comes out about 33% wider than asked.
  • rune-light's glass builds a third pyramid: up to 7 down-only levels over the whole target, cleared and unscissored, sampled with a b-spline at a per-pixel level.

A window that uses all three holds three pyramids.

Where
Why it matters

Users see a rune-fx frost that is softer than a core backdrop blur beside it, and colour from unrelated content bleeding in at its edges. The effects target is that rune-fx and rune-light "draw within 2/255 of their goldens on every native and WebGPU target". The memory target is that "GPU memory is bounded, aged and reported for every pool", with every pool counted. One pyramid per renderer is easier to bound and count than three.

What would help
  • Expose core backdrop blur as a renderer service, for example Renderer::blur_region(encoder, source, rect, sigma) returning a view, built on BackdropBlur with its tap clamp and sigma table.
  • Port rune-fx's frost to it and delete rune-fx's pyramid.
  • rune-light's glass samples a different level per pixel, so one blurred output may not be enough. Options: (a) a second entry point that returns the clamped down levels for a region, which glass samples as it does now; (b) blur once at the largest radius a glass asks for and mix with the sharp backdrop. Recommended: (a). It keeps glass's look and still removes the third pyramid.
  • The change is visible. Re-bless the rune-fx and rune-light goldens in one PR with before and after stills.
Done when
  • rune-fx's frost sigma, fitted from a step edge, is within 5% of nominal at sigmas of 2, 8, 32 and 64 px.
  • A test that fills outside the blur region with a poison colour finds none of it in the core, rune-fx or rune-light result.
  • A renderer that draws all three holds one pyramid allocation, by its GPU byte count.
  • rune-fx and rune-light keep no pyramid code of their own.
  • The rune-fx and rune-light goldens are re-blessed, with stills in the PR.
How to check

The goldens from R0422 and the blur oracle from R0522, on lavapipe in the Linux lane. The sigma fit and the poison-colour test run as headless tests beside them, so a later change to any blur path fails there.

Depends on
Part of
  • Theme: T12
  • Tracked in R0685
  • Phase 3 · priority P2 · size L
R0614Render: gradients, shadows and blurred backdrops band because the uber and blur shaders don't ditherP2Phase 3MT12
render-dithering · feature
What happens

Rune's uber, blur and composite shaders write their 8-bit output with no dither. A wide dark gradient, a large soft shadow or a blurred backdrop shows visible steps where the value changes by one level. Chromium dithers gradients, so the same CSS draws smoother in the browser. rune-fx and rune-light already dither their own output; core Rune does not.

PLAN §4.3 lists "Oklab gradients with dithering" for the uber quad and "dithering on every gradient and shadow". The rendering research adopts it: dither once at the final write, with a seed that is a pure function of pixel position, so goldens stay stable.

Where
Why it matters

Banding is one of the first things a designer sees in a dark theme, a large sheet shadow or a frosted sidebar. The paint-parity target asks that "Gradient banding is no worse than Chromium's +10%", with every kit story at similarity >= 99.5 against Chromium.

What would help
  • Add one shared dither function at the final write for shadow, inset shadow, gradient and radial kinds, and for backdrop and layer composites. Skip flat fills and glyphs.
  • Key it by pixel position only, never by frame, so a still window stays still and goldens stay deterministic.
  • Noise options: interleaved gradient noise (no texture, cheap), or a small tiled blue-noise texture. Amplitude options: +/-0.5 LSB uniform, or about +/-1 LSB triangular as the research suggests. Recommended: interleaved gradient noise, starting at +/-0.5 LSB, raised only if the banding metric needs it.
  • For content in a scrolling layer, key the noise to layer-local coordinates so it doesn't swim with the content.
  • Mirror it in rune-ref so the oracle stays exact, and regenerate the precompiled shader blobs.
  • Dither noise changes many goldens. Do it in one PR with before and after stills.
Done when
  • On a 1,600 px dark gradient and a shadow with a 200 px sigma, the longest run of one 8-bit value is within Chromium's +10%.
  • The rune-ref differential passes with the dither on, in both blend modes.
  • Flat-fill and text goldens are unchanged.
  • Two runs of the same scene are byte-identical.
How to check

A golden plus the banding metric as a headless test, the rune-ref differential from R0264, and scripts/kit-diff.py against Chromium in the Linux lane.

Depends on
Part of
  • Theme: T12
  • Tracked in R0630
  • Phase 3 · priority P2 · size M
R0615Render: hidden windows keep their transient GPU memory on Windows, X11 and Wayland, and no test checks the per-surface baselineP2Phase 3MT12
render-hidden-window-release · perf
What happens

When an app hides a window without release_gpu_when_closed, Rune keeps the window's device and renderer, with all its transient pools: layer targets, backdrop copies, the blur pyramid, image pages and glyph pages. On Wayland the window and its surface are destroyed on hide, but self.gpu and the renderer stay. A hidden window draws no frames, so nothing ages these pools out until it shows again.

#161 and #162 cover macOS windows, and #142 covers Wayland overlays. Ordinary windows on Windows, X11 and Wayland have no issue and no shared release path. Overlays have release_gpu_when_hidden; windows don't.

No test states how much GPU memory a hello window or a text-free overlay holds beyond its drawables. Every renderer makes a 2048x2048 R8 glyph page at creation, 4 MiB on the GPU, even with no text, so the baseline can grow without anyone seeing it.

Where
Why it matters

Menu-bar and tray apps keep windows hidden most of the day, and pay for their GPU memory the whole time. The memory target says "A hidden window frees at least 90% of its transient bytes within 2 s on macOS, Windows, X11 and Wayland", and "A text-free overlay holds <= 1 MiB beyond its drawables, and a hello window <= 8 MiB". The footprint target asks that "A hidden window holds no full-size drawables", and the platform target that footprint is "within 5% of the warmed baseline 1 s after a hide".

What would help
  • Add one host path, shared by every desktop host, that runs when a surface has been hidden or occluded for 2 s. It drops the transient pools, layer targets, backdrops and image pages, using the idle wake from R0426, and keeps the device and pipelines so showing again is fast.
  • Rebuild on show. Chunk the uploads so the first frame stays inside the per-frame upload cap, and draw it with no flash.
  • Count the bytes with the totals from R0072.
  • Let R0563 remove the per-renderer glyph page so the overlay baseline can reach 1 MiB.
  • Add baseline tests for a hello window and a text-free overlay.
Done when
  • A hidden window frees at least 90% of its transient GPU bytes within 2 s on macOS, Windows, X11 and Wayland.
  • A hello window holds <= 8 MiB beyond its drawables, and a text-free overlay <= 1 MiB.
  • Showing the window again draws a correct first frame, matching a golden, with no blank or stale frame.
  • 50 hide and show cycles end within 5% of cycle 1's bytes.
How to check

Baseline tests that read the GPU byte totals headless, and hide and show tests in the macOS, Windows and Linux lanes, run on every verified revision.

Depends on
Part of
  • Theme: T12
  • Tracked in R0642
  • Phase 3 · priority P2 · size M
R0616iOS: the native Metal backend is opt-in, so iOS draws through wgpu's Metal path at higher CPU per frameP2Phase 3MT12
render-ios-native-default · perf
What happens

Rune's native Metal backend is the default only on macOS. An iOS app draws through wgpu's Metal path unless it calls rune::prewarm_gpu_on(GpuBackend::Metal) or sets RUNE_GPU_BACKEND=metal.

The native path is measured faster on iOS. On the iOS simulator a scrolling list rendered the same pixels as wgpu with about 36% fewer instructions and CPU per frame. With every built-in pipeline loaded precompiled from the iOS metallibs, a cold first frame on the simulator took 243 ms instead of 430 ms. The GPU plan's phase 2 made native the default on both macOS and iOS.

The simulator numbers are not device numbers, and iOS has no CI lane, so nothing yet proves the native backend safe as a default there.

Where
Why it matters

On an iPhone, CPU per frame decides whether a scroll holds 120 Hz on a warm phone and how much battery it costs. The frame-cost target asks for "GPU p99 <= 4 ms for 1,000 spring quads and the effects scene on the reference Mac and iPhone". The iOS target asks that "Every simulator case passes on each push to dev" and "at least 99% one-period frames at 120 Hz in the scroll scene on the iPhone Pro". The lanes target asks that every backend runs the renderer tests continuously.

What would help
  • Make native Metal the iOS default once these land: the iOS lane (R0244), command-buffer status and a bounded nextDrawable (R0170), the inactive signal for LayerHost (R0531), and the sRGB tag on LayerHost (R0130).
  • Keep wgpu as the opt-out with GpuBackend::Wgpu and RUNE_GPU_BACKEND=wgpu, as on macOS.
  • Record paired device runs on a ProMotion iPhone with --profile perf, by median.
  • Say which backend is in use in describe().
  • The native backend validates less than wgpu. Run the iOS lane on both backends so a native-only bug shows as a diff.
  • Add a changelog fragment, since the default changes an app's output path.
Done when
  • The iOS lane passes on both backends.
  • Paired device runs on a ProMotion iPhone show at least 20% less CPU per frame on the scrolling list.
  • Native and wgpu frames of the scrolling list are within 2/255.
  • describe() names the backend and how it was chosen.
  • The device numbers are committed in the PR or a research note.
How to check

The iOS lane runs both backends on every push. The device numbers come from embed_cost on the reference iPhone, recorded with the change.

Depends on
Part of
  • Theme: T12
  • Tracked in R0637
  • Phase 3 · priority P2 · size M
R0617Video: HDR and BT.2020 clips fail once playback starts, and P3 video draws as BT.709 with no errorP2Phase 3MT12
render-video-primaries · bug
What happens

The built-in player asks AVFoundation for 420v buffers without colour properties, so each buffer keeps its source's colour attachments. PixelBuffer::info then accepts only a BT.601 or BT.709 matrix and an sRGB or BT.709 transfer. It rejects anything else, on purpose, so HDR isn't drawn as SDR. For a PQ, HLG or BT.2020 clip, the first pulled frame fails and the clip ends.

The poster takes a different path. AVAssetImageGenerator draws it into an sRGB CGImage, so the poster shows. The user sees a still frame, presses play, and gets an error.

info never reads the colour primaries. A clip with an accepted matrix and transfer but Display P3 or BT.2020 primaries is drawn with BT.709 primaries: desaturated, with no error.

Where
Why it matters

iPhones record HDR (HLG) video by default, so an app that plays a user's own clips fails on most of them. The colour target asks that "HDR clips play with 0 errors and tone-map on SDR within 3/255 of the reference". The media target asks that HDR clips play "within 3/255 of the reference for tone-mapped HDR and within 2/255 for P3", and that every platform plays "every manifest fixture with 0 errors".

What would help

The two fixes overlap, so do both, in this order.

1. For the player: ask AVFoundation for SDR BT.709 output with sRGB-compatible transfer through AVVideoColorPropertiesKey. HDR and wide-gamut sources then arrive tone-mapped and converted, as AVPlayer shows them on an SDR display. This removes the failure for PQ, HLG and BT.2020 clips until HDR output exists. 2. For buffers apps push to NativeSurface: read kCVImageBufferColorPrimariesKey. Accept BT.709 and sRGB primaries, convert P3 and BT.2020 to the surface's space with a 3x3 matrix in video.wgsl, and reject unknown primaries with a message, as the code does for matrix and transfer.

Add small committed PQ, HLG, BT.2020 and P3 fixtures. Make reference frames with AVAssetImageGenerator under the same colour properties. AVFoundation's tone map can vary by OS version, so check the oldest supported macOS.

Done when
  • PQ, HLG and BT.2020 fixtures play to the end with no failed clip.
  • A pulled frame from each matches its reference within 3/255 per channel.
  • A P3-primaries fixture's pulled frame matches its reference within 2/255.
  • A pushed buffer with unknown primaries fails with a message that names them.
How to check

Playback tests with pixel checks on a pulled frame, in the macOS GUI lane (R0061), on every verified revision.

Depends on
Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 3 · priority P2 · size M
R0618Video: P010, half-float and HLG or PQ buffers are refused, and the video shader clamps colour to 0-1P2Phase 3MT12
render-hdr-video-input · feature
What happens

NativeSurface takes only three CoreVideo formats: BGRA, 420v and 420f. It rejects any transfer function other than sRGB or BT.709, with "HDR is not supported". So a 10-bit P010 buffer, a 64RGBAHalf buffer from an app's own decoder, or a PQ or HLG frame is refused. The video shader then clamps RGB to 0-1 before it linearises, so even a float input that got through would lose every value above SDR white.

#135 shows the gap from an app's side: a kCVPixelFormatType_64RGBAHalf buffer fails with "unsupported CVPixelBuffer format". It also confirms float textures keep values such as 4.0 through wgpu sampling, so the limit is Rune's code, not the GPU.

Where
Why it matters

Apps that decode their own HDR video, or play HDR clips, can't show them at all today. The colour target asks that "HDR clips play with 0 errors and tone-map on SDR within 3/255 of the reference". The media target asks that every platform plays "every manifest fixture with 0 errors" with 0 CPU copies where the platform offers GPU import.

What would help
  • Accept 10-bit biplanar buffers (x420, xf20) and 64RGBAHalf. Import them zero-copy as today's formats are.
  • Carry the transfer (PQ, HLG, BT.709, sRGB) and the primaries from R0617 into the surface uniforms.
  • Remove the 0-1 clamp for float input, and decode PQ and HLG to linear in the shader.
  • For an SDR target, tone-map in the shader: the BT.2390 EETF for PQ and the BT.2100 OOTF for HLG. Commit a CPU reference of the same tone map for tests.
  • For an HDR target (R0620), pass extended values through.
  • For the built-in player, two options: (a) keep asking AVFoundation for SDR output on SDR windows, as R0617 sets up, and ask for HDR buffers only for HDR windows; (b) always take HDR buffers and tone-map in Rune. Recommended: (a). It matches AVPlayer on SDR displays and keeps Rune's tone map for app-pushed buffers.
  • Compare the tone map by eye with AVPlayer on hardware once, and record it in the PR.
Done when
  • HLG, PQ and P010 fixture clips play to the end with 0 errors.
  • On an SDR target, a playing frame matches the committed CPU tone-map reference, applied to the same decoded frame, within 3/255.
  • A 64RGBAHalf buffer holding 4.0 reads back as 4.0 (+/-0.01) from an Rgba16Float offscreen target.
  • An unsupported format or transfer fails with a message that names it.
How to check

Fixture tests in the macOS lane, and a float readback test on lavapipe for the shader path, so the clamp can't come back on any backend.

Depends on
Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 3 · priority P2 · size M
R0619Render: research drawing in Display P3 or extended linear sRGB on wide-gamut displaysP2Phase 3MT12
render-wide-gamut-research · research
What happens

PLAN §4.3 promises Display P3, but Rune draws into an 8-bit sRGB surface. Content outside sRGB, such as P3 photos and P3 brand colours, is clipped. Several surface formats could carry wider colour, and the native Metal surface already lists Rgba16Float and Rgb10a2Unorm, but only with sRGB colour spaces. No measurement says which option keeps CSS-matching blend weights at an acceptable GPU and memory cost. Wide-gamut output and HDR output on Apple both wait on that choice.

Where
Why it matters

The choice sets drawable memory and bandwidth for every window that opts in: a float surface doubles drawable memory. The colour target asks that "P3 values outside sRGB [are] kept within 1/255", that SDR output stays "<= 1/255 per channel against the pinned Chromium", and that HDR costs "at most +25% over SDR on the 1,000-quad scene". A wrong choice costs a rewrite of R0622 and R0620.

What would help

Measure 4 options on 2 Macs with P3 displays and one Windows wide-colour display:

1. Today's BGRA8 with an sRGB tag. 2. Rgba16Float with extended linear sRGB. 3. BGR10_XR with extended sRGB. 4. Rgb10a2Unorm with Display P3.

For each, record:

  • GPU time on the 1,000-quad and effects scenes, from R0129, as paired --profile perf runs by median.
  • Drawable memory at 5K.
  • Blend-weight parity with Chromium for translucent fills.
  • What Chromium does on the same machine.
  • Whether the same choice serves HDR output, so the two features share one path.

Write a research note, record the decision in PLAN §4.3, and fill in the design of R0622 from it.

Done when
  • A new note in research/ holds the measurements (paired runs, medians) and a decision.
  • PLAN §4.3 states the chosen working space.
  • R0622 names the chosen format and API.
  • The note says whether the choice also serves R0620.
How to check

The note is reviewed. The numbers come from scripts in the note, so they can be run again on new hardware.

Depends on
Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 3 · priority P2 · size M
R0620macOS and iOS: no window can present EDR, because the Metal surface accepts only sRGBP2Phase 3LT12
render-hdr-apple-output · feature
What happens

No Rune window on a Mac or iPhone can show brighter-than-white output. The native Metal surface lists Rgba16Float among its formats, but every format advertises only sRGB colour spaces, and configure asserts that the colour space is Auto or Srgb. Window setup always picks the sRGB 8-bit format or its non-sRGB twin. So HDR video, HDR photos and HDR UI all draw clipped to SDR white on EDR displays, which every recent MacBook Pro and iPhone Pro has.

Where
Why it matters

A video or photo app built on Rune looks dull next to the same clip in QuickTime or Photos. The colour target says that on macOS, iOS and Windows "a readback holds >= 2.0 where content asks for it and a hardware capture shows it", that "SDR in an HDR window is within 2/255 of an SDR window", and that "GPU cost is at most +25% over SDR on the 1,000-quad scene". It also asks that P3 values outside sRGB are "kept within 1/255".

What would help
  • Add an opt-in builder, such as WindowOptions::hdr() or App::hdr(). Don't add a pub field to a type apps build as a literal.
  • On opt-in, configure Rgba16Float with an extended linear colour space and set wantsExtendedDynamicRangeContent, on native Metal and on wgpu Metal.
  • Keep blending in sRGB-encoded space so blend weights still match CSS. Add a final step that decodes the blended result to extended linear values for the drawable. Values from HDR sources (R0618) and an extended colour constructor pass through above 1.0.
  • Expose the display's EDR headroom to the app, and read it again on a display change.
  • Reapply the tag after every configure path, as R0130 does for sRGB.
  • Take the working space and format from R0619, so HDR and wide gamut use one path.
  • The decode step must leave SDR output unchanged. The SDR-in-HDR check below guards it.
  • Float drawables double drawable memory and bandwidth, so they stay opt-in.
Done when
  • The layer reports the extended colour space and wantsExtendedDynamicRangeContent after every configure path, on both Apple backends.
  • A readback of an HDR window's drawable holds a value >= 2.0, in units of SDR white, where content asks for it.
  • A Display P3 swatch outside sRGB keeps its P3 value within 1/255 in the readback.
  • SDR content in an HDR window is within 2/255 of the same content in an SDR window.
  • GPU time on the 1,000-quad scene is at most +25% over an SDR window, by paired runs on the reference Mac.
  • A capture on an EDR MacBook Pro and on an HDR iPhone shows brighter-than-white output, recorded in the PR.
How to check

Readback tests in the macOS lane, a configuration test in the iOS simulator lane, and a device check recorded in the PR. The SDR-in-HDR comparison stays as a test so later changes to the final step can't move SDR output.

Depends on
Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 3 · priority P2 · size L
R0621Render: no test moves a window to a display with a different scale, colour space, refresh rate or HDR headroomP2Phase 3MT12
render-display-change-tests · infra
What happens

A window moved to another display can get a new scale factor, colour space, refresh rate and HDR headroom in one step. Rune reacts to some of this. On macOS, Moved, Resized, ScaleFactorChanged and Occluded call pacing.update_display, which points the display link at the window's current screen and re-reads its low-power cap. ScaleFactorChanged also re-applies placement. The CAMetalLayer's sRGB tag is set by pin_contents_top_left.

No test covers any of it end to end. Nothing checks that the next frame draws at the new scale with glyphs rasterised again, that the sRGB tag is still on the layer, that pacing follows the new refresh, or that an HDR window reads the new headroom. The public display list is a startup snapshot with no change event (#146), so an app can't react either. A regression here shows only on a desk with two displays, which no lane has.

Where
Why it matters

Laptop users plug into external monitors all day. A wrong scale draws blurry or half-size text, a lost tag oversaturates every colour on a wide-gamut screen, and stale pacing runs a 120 Hz display at 60 Hz. The surface target says: "After a display move: the next frame draws at the new scale with the colour tag kept, pacing follows the new refresh within 2 frames, and HDR headroom is read again within 1 frame." The colour target asks for kCGColorSpaceSRGB "after 6 of 6 configure paths"; a display change is one of them.

What would help
  • Add a test hook that delivers a simulated display change (scale, colour space, refresh rate, headroom) to a window through the same event path a real one takes, not a side door.
  • Assert, on the next frames: the drawable and glyphs are at the new scale, the layer's colour space is still sRGB on both Apple backends, the pacing period matches the new refresh, and the headroom an HDR window reads (R0620) is the new value.
  • Add a real move between two displays of different scale and refresh to the macOS and Windows hardware lanes (R0517). A simulated event can differ from a real one, so keep both.
Done when
  • A 1x to 2x change draws the next frame at 2x, and glyph goldens match the 2x set.
  • A 120 Hz to 60 Hz change moves the pacing period within 2 frames, by surface stats.
  • The sRGB tag survives the change on native Metal and wgpu Metal.
  • An HDR window reads the new display's headroom within 1 frame.
  • A real two-display move passes the same checks in the macOS and Windows hardware lanes.
How to check

Headless tests drive the hook and run in every lane. The real move runs in the hardware lanes on each verified revision, and a failure there blocks it.

Depends on
Part of
  • Theme: T12
  • Phase 3 · priority P2 · size M
R0622Render: colours outside sRGB are clipped on wide-gamut displaysP2Phase 3LT12
render-wide-gamut-output · feature
What happens

Rune draws into an 8-bit sRGB surface, and the native Metal surface offers only sRGB colour spaces. Every colour is converted to sRGB before it draws, and a value outside sRGB is clipped. So Display P3 photos, P3 video and P3 brand colours lose their most saturated values on every wide-gamut Mac, iPhone and many Windows displays. Chromium keeps them: color(display-p3 1 0 0) is a deeper red in Safari and Chrome than Rune can draw.

Rune also has no way to state a P3 colour. Color constructors are sRGB hex and Oklch, and Oklch values outside sRGB are clipped too.

Where
Why it matters

Photo, design and video apps are where users compare against the browser and Photos side by side, and a clipped red or green is easy to see. The colour target asks that "P3 values outside sRGB [are] kept within 1/255", and that SDR output stays "<= 1/255 per channel against the pinned Chromium, and native equals web within 1/255".

What would help
  • Build the working space and format that R0619 picks, behind an opt-in window builder. Make it the default only if the research note says so.
  • Add a Color::display_p3(r, g, b) constructor, and keep Oklch values outside sRGB instead of clipping them.
  • Let ICC-tagged images (R0424) and P3 video keep their values outside sRGB when they convert.
  • Keep blend weights in sRGB-encoded space so translucent fills still match CSS. The sRGB-content check below guards this.
  • Keep the colour tag across every configure path, as R0130 does for sRGB.
  • Add builder methods only; no new pub fields on types apps build as literals.
Done when
  • A display-p3(1 0 0) swatch reads back within 1/255 of its P3 value on macOS and iOS, on both Apple backends.
  • A P3 photo keeps its out-of-sRGB pixels within 1/255 of a pinned Chromium's display-p3 render on the same Mac.
  • sRGB content is unchanged within 1/255 in a wide-gamut window.
  • GPU time and drawable memory stay within the costs the research note accepted.
How to check

Readback tests in the macOS and iOS lanes, with the Chromium comparison in the parity gate. A hardware screenshot on a P3 display is recorded in the PR.

Depends on
Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 3 · priority P2 · size L
R0623Render: a backdrop blur reruns its pyramid every frame even when nothing under it changedP3Phase 3MT12
render-backdrop-pyramid-cache · perf
What happens

Each frame that draws a backdrop blur splits the pass, copies the region under it plus the blur's reach, and runs the full down and up pyramid, up to 7 levels. It does this even when only content above the blur changed, such as a label animating on a glass sidebar. A frame can run up to 4 blurs (MAX_BACKDROP_BLURS), and each one repeats the copy and passes. The rendering research suggested caching the pyramid when the scene under it is unchanged, so glass over static content costs one composite.

Where
Why it matters

Glass sidebars and toolbars sit over static content most of the time. Re-blurring them every frame spends GPU time and power on pixels that didn't change, and it is part of why Rune's GPU time per frame is higher than GPUI's in #204. The frame-cost target asks for "GPU p99 <= 4 ms for 1,000 spring quads and the effects scene on the reference Mac and iPhone; <= 6 ms for worst-case glass". The scaling target asks that "per-frame work scales with what changed".

What would help
  • Hash what is painted before the blur record and inside its region plus support: the instance span, the image and layer versions it reads, and the region itself.
  • When the hash and region are unchanged since the last frame, reuse the last pyramid output and skip both the copy and the passes. Keep the pyramid for this, so it ties in with the release rules in R0431.
  • Invalidate on anything the hash can't see: native surfaces and video under the blur, effect slots with their own animation, and a resize.
  • Count reruns and reuses, so the count budgets from R0263 can gate them.
Done when
  • A glass sidebar over static content, with an animating label above it, runs the pyramid on 1 frame of 100, by pass counter.
  • Its pixels match the uncached path exactly.
  • A video or animating effect under the blur reruns it every frame.
  • The cache adds no allocations in a steady frame.
How to check

Count budgets on the canonical glass scene in the headless tests, with a golden comparing cached and uncached output, in every lane.

Depends on
Part of
  • Theme: T12
  • Tracked in R0637
  • Phase 3 · priority P3 · size M
R0624rune-fx: each backdrop effect slot copies the whole target, where core backdrop blur copies only its regionP3Phase 3ST12
render-fx-backdrop-region · perf
What happens

An effect slot with El::effect_backdrop(true) gets a copy of what was drawn before it. split_for_backdrop asks for that copy with no region, so split copies the whole target, every frame, for every such slot. Core backdrop blur passes its region (the rect plus the blur's reach) and copies only that.

At 4 Mpx, a full copy is 16 MB of bandwidth in an 8-bit target and 32 MB in an Rgba16Float layer, per slot per frame. A small frosted chip pays for the whole window.

Where
Why it matters

Effect-heavy screens such as the showreel stack several backdrop slots, so the copy bandwidth grows with slot count times window size, not with what the effects cover. The frame-cost target asks for "GPU p99 <= 4 ms for 1,000 spring quads and the effects scene on the reference Mac and iPhone". The memory target asks that "GPU memory is bounded, aged and reported for every pool".

What would help
  • Let an effect slot declare its reach: its clip plus the effect's own support, in device pixels. A default of the slot's clip plus the largest support its compositor reports keeps old compositors working.
  • Pass that region to split, as backdrop blur does.
  • Keep the copy at the same window coordinates, so compositors sample it as they do now.
  • An effect that samples outside its declared reach would read stale texels, so the reach must include its support. Add a test with a poison colour outside the reach.
Done when
  • A 200x200 backdrop slot copies at most (200 + 2 x support) squared texels, by counter.
  • The rune-fx blend tests pass unchanged.
  • A poison colour outside the reach doesn't reach the slot's output.
How to check

A headless test on lavapipe counts copied texels per slot, beside the rune-fx blend tests, in every lane.

Part of
  • Theme: T12
  • Tracked in R0642
  • Phase 3 · priority P3 · size S
R0625rune-fx: effect shapes take one circular radius, so glows and outlines miss per-corner and continuous cornersP3Phase 3ST12
render-fx-shape-radii · feature
What happens

rune_fx::Shape holds a rect and one radius. Rune's own instances carry four radii, with a negative radius meaning a continuous (superellipse) corner. Every compositor that turns an effect slot into a Shape folds the four radii into the largest one and drops the continuous flag. So a glow or outline around a tab with mixed corners, or a card with continuous corners, follows a different curve from the element it decorates.

Where
Why it matters

A glow that cuts across a corner by a pixel or two reads as a mistake, most of all at 2x and 3x scale and on continuous corners, which kit uses for glass. The effects target says "Effect outlines follow their element's radii within 0.5 px."

What would help
  • Carry four radii and the continuous flag in Shape, in the same encoding as Instance.radii: top-left, top-right, bottom-right, bottom-left, negative for continuous.
  • Add constructors for the new data, for example Shape::corners(rect, radii), and keep rounded, capsule and circle working as now.
  • Shape's fields are public, so any new field breaks code that builds it as a literal. In this repo only rune-fx's own constructors do. Options: (a) make the fields private with accessors and #[non_exhaustive], so this is the last such break; (b) add the field and note the break in the changelog. Recommended: (a), with a changelog fragment.
  • Evaluate the shape with the shared sd_rounded, not a separate circular SDF.
  • Let compositors pass the slot's radii straight through instead of folding them.
Done when
  • A glow around an element with radii [4, 12, 4, 12] and continuous corners follows its edge within 0.5 px, by golden.
  • Existing effect goldens are unchanged for uniform circular radii.
  • The showreel and rune-fx tests pass the slot's radii through.
  • A changelog fragment covers the Shape change.
How to check

The rune-fx goldens from R0422, in the Linux lane, with the new mixed-corner golden added to them.

Depends on
Part of
  • Theme: T12
  • Tracked in R0685
  • Phase 3 · priority P3 · size S
R0626Effects: effect clocks are f32, so noise and glow animations step visibly after about a day of uptimeP3Phase 3ST12
render-fx-time · bug
What happens

rune-fx keeps effect time in f32. FxLayer::time is f32 and goes straight into the packed instance's t.x. The runtime clock rt.t is f64, but compositors cast it down before they hand it over. The showreel does f.rt.t as f32. The CPU-side helpers also run in f32. Phase::at multiplies an f32 time by its speed. Heat stores the time it was switched as f32. OneShot::t0 is an absolute f32 start time, and so are the ping and shockwave params' t0. rune-light's Settings::time is f32 too.

An f32 holds 24 significant bits. At 86,400 s (one day) the gap between neighbouring values is 7.8 ms, nearly a whole 120 Hz frame (8.3 ms). At one week the gap is 62.5 ms, and at 30 days it is 250 ms. So after a day, frame-to-frame effect time moves in uneven steps, and heat haze, aurora, glow breathing and other noise-driven effects stutter instead of flowing. Scene and loop time stay f64, so only effects lose precision.

Where
Why it matters

Menu-bar, tray and dashboard apps stay open for days. Their users see glows and noise effects start to judder after the first day, and it gets worse each day. The rendering target is that effect time stays within 0.1 ms of true deltas at 10^6 s of uptime. The motion target is an effect-clock increment error of at most 0.1 ms and a loop phase error of at most 1e-4 at 30 days.

What would help
  • Keep every effect clock in f64 on the CPU: Phase, Heat, OneShots, the params' t0 and rune-light's time.
  • Pack only a small time relative to a local origin. Periodic effects wrap time to their own period. Effects that don't repeat rebase the origin when they start, or once an hour, at a point where the shader input is continuous.
  • Hand compositors the time through an EffectSite accessor next to the flag from R0433, so they stop casting rt.t.
  • Keep the 128 B instance layout. Changing FxLayer::time or the helpers' signatures to f64 moves app code, so add a changelog entry.
Done when
  • Tests that start the clock at 1, 7 and 30 days show each packed time increment between 120 Hz frames within 0.1 ms of 1/120 s, for every clock type.
  • A test at 10^6 s shows frame-to-frame effect time within 0.1 ms of the true delta.
  • Runtime loop phase error is at most 1e-4 after 30 days, in a clock-offset test.
  • Output across a wrap or rebase matches an unwrapped f64 reference within 1/255 per channel.
  • Phase::set_speed keeps phase continuity in f64.
  • The showreel, lab and cursed-settings no longer cast the clock to f32.
How to check

Unit tests in rune-fx and rune that offset the clock, run with cargo test -p rune -p rune-fx. A rendered comparison across a wrap catches a seam where a shader's period doesn't match the wrap.

Depends on
Part of
  • Theme: T12
  • Tracked in R0685
  • Phase 3 · priority P3 · size S
R0627Windows: no window can present HDR (scRGB or HDR10)P3Phase 3LT12
render-hdr-windows-output · feature
What happens

On Windows, Rune draws with DX12 and presents through DirectComposition (Dx12SwapchainKind::DxgiFromVisual). surface_config takes wgpu's default config, picks the first sRGB format the surface lists, which is an 8-bit format, and leaves color_space at its default. So every window is an 8-bit sRGB swapchain. Values above 1.0 clamp, and an HDR monitor shows Rune content as SDR only. HDR video and photos lose their highlights, and a window can't match other HDR apps on the same screen.

The wgpu Rune pins (30.0.1) already has what this needs. SurfaceConfiguration::color_space offers ExtendedSrgbLinear (scRGB, DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709) on Rgba16Float and Bt2100Pq on Rgb10a2Unorm for DX12. Surface::display_hdr_info reports each display's SDR white level in nits. Nothing in Rune sets a colour space or reads that info.

Where
Why it matters

Users with HDR monitors see Rune video and photo apps as dim and flat next to native apps. The colour target says that on macOS, iOS and Windows, a readback holds at least 2.0 where content asks for it and a hardware capture shows it. HDR clips play with 0 errors, SDR in an HDR window is within 2/255 of an SDR window, and GPU cost is at most +25% over SDR on the 1,000-quad scene. The Windows target is that apps behave like native Windows 11 apps on every DPI, GPU and input device.

What would help

Use the same opt-in builder as R0620. There are two options.

1. scRGB (recommended). Configure Rgba16Float with ExtendedSrgbLinear. It is linear, it fits the Rgba16Float layer targets Rune already uses, and it matches Apple's EDR model. Keep the sRGB-space blending and decode to linear in the final pass. Scale SDR content by sdr_white_nits / 80. 2. HDR10. Configure Rgb10a2Unorm with Bt2100Pq. This needs a PQ encode and a BT.2020 conversion in the final pass, and 10 bits leave less room for extended values.

Read display_hdr_info on configure, on a monitor change and on a display-settings change. Fall back to the SDR config when the surface doesn't list the colour space, for example when HDR is off. First check that wgpu applies the colour space to DirectComposition swapchains.

Done when
  • On an HDR monitor, a captured frame of an extended swatch holds values of at least 2.0 times the SDR white level in scRGB.
  • SDR content in an HDR window is within 2/255 of an SDR window after Windows' SDR white mapping.
  • GPU time on the 1,000-quad scene is at most +25% over SDR.
  • With HDR off, output equals an SDR window within 2/255.
  • Windows that don't opt in draw exactly as today.
How to check

A Windows test for configuration and readback, which runs once R0162 lands. Add a hardware HDR-monitor check, recorded in the PR.

Depends on
Part of
  • Theme: T12
  • Tracked in R0628
  • Phase 3 · priority P3 · size L
R0628Render: colour is not managed end to end, from the surface tag and image profiles to video primaries, wide gamut and HDRP1Phase 3XLT12
render-colour · tracking
What happens

Windows blend in sRGB by default, to match CSS and Core Animation. Several stages of the colour path never followed, and none of them reports an error:

  • The Metal surface clears the layer's colour space on configure, so the window loses its sRGB tag.
  • Native image decode converts to RGBA8 without reading the ICC profile. Display P3 photos draw desaturated and differ from the web build.
  • Video rejects unknown YCbCr matrices and transfers, but never reads colour primaries. HDR transfers fail.
  • rune-light expects linear input, and tok alphas were tuned for linear blending.
  • WebGL2 encodes fills twice (#117).

No window can draw colours outside sRGB or present EDR or HDR. PLAN §4.3 still promises linear-light blending and Display P3, with no plan for either. #135 holds the HDR history.

The work takes several issues. Each stage has its own platform API and fixtures, and wide gamut and HDR need a research decision before implementation.

Where
Why it matters

Users see photos that look duller than in Preview or the browser, UI colours that shift between the native and web builds, and HDR video that fails to play. The target: SDR output matches Chromium within 1/255 per channel, native equals web within 1/255, and backends agree within 2/255. Goldens pass in both blend modes with no double encode, and P3 values outside sRGB are kept within 1/255. On macOS, iOS and Windows, a readback holds >= 2.0 where content asks for it. HDR clips play with 0 errors and tone-map on SDR within 3/255 of the reference. SDR content in an HDR window is within 2/255 of an SDR window, and the GPU cost is at most +25% on the 1,000-quad scene.

What would help
  • Phase 2 restores SDR correctness: R0130, R0424, R0617, R0435, R0436 and #117.
  • R0619 chooses between Display P3 and extended linear sRGB, and R0622 implements the choice.
  • HDR: R0618, R0620 and R0627. Web and Linux HDR stay research under #135.
  • One colour fixture set serves every child: sRGB, Display P3 and Adobe RGB images; BT.709, P3, PQ, HLG and BT.2020 clips; and UI swatches, including a display-p3 swatch.
  • Update PLAN §4.3 to match what ships.
Done when
  • All children and #117 are closed.
  • kCGColorSpaceSRGB holds after 6 of 6 configure paths on both Apple backends and on iOS LayerHost.
  • The fixture set renders within 1/255 of the pinned Chromium on an sRGB target, in both blend modes, on macOS, Windows, Linux and the web.
  • A display-p3 swatch keeps its P3 value within 1/255 on a wide-gamut display.
  • PQ, HLG and BT.2020 clips play with 0 errors, within 3/255 of their references.
  • EDR or HDR windows read back values of at least 2.0 on macOS, iOS and Windows, within the SDR and GPU-cost limits above.
How to check

Colour golden fixtures in the cross-backend lane, with the Chromium version pinned in the lane's manifest, and HDR readback tests in the Apple and Windows lanes.

Issues
Depends on
Part of
  • Theme: T12
  • Phase 3 · priority P1 · size XL
R0629Images: mip levels switch abruptly while an image zooms, because there is no blend between levelsP3Phase 3MT12
render-image-mip-blend · feature
What happens

ImageAtlas::place picks the smallest prefiltered level whose size still covers both drawn device-pixel axes. It copies only that level into the atlas, keyed by image id and level. The image kind then samples bilinearly within that one atlas rectangle. When an image's drawn size crosses a level boundary, for example in a zoom, a pinch or a matched-geometry hero transition, the level changes from one frame to the next. The image turns sharper or softer at that instant, and the first crossing also uploads the new level in that frame. Chromium's image filtering doesn't pop like this, so the same zoom looks smoother in a browser.

Where
Why it matters

Users see photos and thumbnails flicker in sharpness while they zoom or while a card expands into a detail view. That breaks the feel of a smooth transition. The paint-parity target says images match Chromium on every platform: similarity of at least 99.5, at most 0.5% of pixels off, and no tile with a mean difference above 2/255 on every story, on 4 of 4 platforms.

What would help
  • While an image's drawn size is changing, keep the two neighbouring levels resident and blend them by the fractional level inside the image kind.
  • Once the size is still, use a single level as today, so still images don't change.
  • Count the second resident level under the image byte budget.
  • Mirror the blend in rune-ref so the differential covers it.
Done when
  • A zoom from 1.0 to 0.25 over 60 frames shows no jump in sharpness: a high-frequency test pattern's contrast changes monotonically from frame to frame.
  • rune-ref's image differential passes with the blend.
  • Still images draw byte-identically to today.
  • The second level counts under the image byte budget.
How to check

A golden sequence of the zoom under cargo test -p rune, which asserts monotonic contrast. Also rune-ref's image differential, once R0272 gives images an oracle.

Depends on
Part of
  • Theme: T12
  • Tracked in R0630
  • Phase 3 · priority P3 · size M
R0630Render: kit stories that miss the Chromium paint-parity target have no fix assignedP2Phase 3XLT12
render-chromium-parity-fixes · tracking
What happens

scripts/kit-diff.py renders each kit story in headless Chromium, and the gallery scene with the same id in Rune. For each story it reports similarity and the share of pixels whose largest channel is off by more than 24/255. Today someone runs it by hand. R0421 turns it into a gate. The gate stops regressions and reports which stories miss the target: similarity >= 99.5, off <= 0.5% at 8/255, and no 32 px tile with a mean difference above 2/255.

Stories below the target need someone to find the paint difference (shadow, border, gradient, image filtering, blur or icon) and fix it on each platform. PLAN §9 lists matching the look of the Chromium-rendered OpenCode Desktop as risk 2. The work takes several issues, because each paint class has its own cause and its own fix.

Where
Why it matters

Kit apps are compared directly with the web kit they copy. A shadow that is a shade too dark or a gradient that bands reads as cheap. The target: similarity >= 99.5, off <= 0.5% and no tile with a mean difference above 2/255 on every story, on 4 of 4 platforms. Gradient banding is no worse than Chromium's +10%.

What would help

When the gate first runs on all 4 platforms, group the failing stories by paint class. Open one child per class, with its stories, worst tiles and before and after stills. Known so far: R0614 and R0629, and the colour fixes R0436 and R0424. If a difference comes from a choice Chromium makes and Rune keeps its own on purpose, record it in the baseline with its reason. Don't leave the story red.

Done when
  • Every pinned story reaches similarity >= 99.5, off <= 0.5% at 8/255, and no 32 px tile with a mean difference above 2/255, in light and dark, on 4 of 4 platforms.
  • Gradient banding is within Chromium's +10%.
  • Each accepted difference is in the baseline with its reason.
How to check

The parity gate in the GPU lanes. It keeps the result proven: in one change, no story may drop more than 0.2 similarity and no tile's mean may rise by more than 1/255.

Issues
Depends on
Part of
  • Theme: T12
  • Phase 3 · priority P2 · size XL
R0631Render: the instance buffer only grows, and the native backend keeps two spares of the same sizeP3Phase 3ST12
render-instance-buffer-shrink · perf
What happens

When a frame has more instances than the buffer holds, the renderer reallocates it at the next power of two. It never makes it smaller again. Each instance is 128 B. One frame of 100,000 instances, such as a huge list or a stress view, grows the buffer to 131,072 instances, which is 16 MiB. On the native Metal backend, a write to a buffer the GPU is still reading swaps in a spare. The store keeps up to 2 spares of the same size. So that one frame can leave up to 48 MiB of shared memory in place for the rest of the session, while the app goes back to 2,000 instances a frame.

Where
Why it matters

Users see a high memory footprint in Activity Monitor or Task Manager long after a big view has closed. The memory target says every GPU pool is bounded, aged and reported, and transient pools free within 2 s of last use by wall clock, even when no frame is drawn. The footprint target says memory is bounded, stable and given back at rest, with drift of at most 2 MiB.

What would help
  • Track the high-water instance count over the last 10 s of wall-clock time.
  • When the next power of two above it is 4 or more times smaller than the capacity, reallocate at that size and drop the native spares with it.
  • When no frame is drawn, run the check from the idle wake that R0426 adds.
  • Report instance and spare bytes through the count from R0072.
  • Steady frames must still make no buffer allocations, so the shrink only runs on the 10 s boundary, never inside a frame's upload.
Done when
  • After one frame of 100,000 instances and then 10 s of 2,000-instance frames, instance bytes drop to the 2,048-instance capacity (256 KiB), and the native spares drop with them.
  • An idle window shrinks within 12 s with no frame drawn.
  • Steady frames still allocate no buffers, in the existing allocation test.
How to check

A renderer test under cargo test -p rune that drives the 100,000-then-2,000 sequence and reads the GPU byte count. Add a native Metal backend test, run on a Mac, that checks the spares are released.

Depends on
Part of
  • Theme: T12
  • Tracked in R0642
  • Phase 3 · priority P3 · size S
R0632Render: drawing nested layer scopes rescans the whole layer plan on every recursive callP3Phase 3ST12
render-layer-draw-quadratic · perf
What happens

draw_layer_range walks the whole layer plan on every call and skips the entries outside its range. encode_layers_timed calls it once for each layer that has its own target. It also calls itself for each flattened scope, an opacity-1 scope that draws in its parent's pass. At the end of each call, it scans the plan once more to decide include_end. draw_plain loops over every native surface on every call. So with L plan entries, a frame visits on the order of L squared entries, and native surfaces add calls times surfaces. A list of 500 rows that each open a scope makes about 250,000 plan visits per frame where about 1,000 would do.

Where
Why it matters

Layer-heavy UIs, such as lists whose rows fade, clip or scale, pay CPU time per frame that grows with the square of the scope count. Users see dropped frames while they scroll a long faded list. The frame-cost target says GPU p99 is at most 4 ms on the 1,000-quad and effects scenes on the reference Mac. The worst-case frame target says per-frame work scales with what changed, with p95 of at most 4 ms and 0 frames over 8.3 ms on the reference Mac.

What would help
  • Once per prepare, store each plan entry's direct child ranges and the native surface indices that fall inside it.
  • Have draw_layer_range walk those children directly instead of the whole plan.
  • Have draw_plain start from the first surface in its range.
  • Decide include_end from the stored ranges.
  • Keep the output the same: this changes how ranges are found, not what is drawn.
Done when
  • A counter of plan entries visited per frame is at most 2 times the plan entries plus surfaces, at 100, 250 and 500 scopes.
  • Encoding 200 nested layers takes time linear in the layer count in a bench.
  • Layer goldens are unchanged.
How to check

A counter test under cargo test -p rune at 100, 250 and 500 scopes, kept as a regression guard. Also the existing layer goldens, and a render bench under --profile perf with paired runs.

Part of
  • Theme: T12
  • Tracked in R0637
  • Phase 3 · priority P3 · size S
R0633rune-light: a tile with more than 256 primitives drops some, and which ones depends on GPU thread orderP3Phase 3MT12
render-light-field-overflow · bug
What happens

The field pass builds the scene distance field per 16x16 tile. Each tile first gathers the occluding, emitting and hinting primitives within CLAMP (256 px) of it into workgroup memory, up to MAX_LOCAL (256) entries. Each thread appends with atomicAdd. A primitive whose slot index is 256 or more is dropped silently. Which primitives land in the first 256 slots depends on GPU thread order. The shader takes care to keep the per-texel minimum order-free, but the gather in front of it is not. On a dense layout, like a large grid of lit cards, the same frame can light differently from run to run and from GPU to GPU. Nothing reports that primitives were dropped.

This breaks the guarantee in rune-light's README that output is a pure function of the inputs, time and seed. It also makes goldens of dense scenes flaky.

Where
Why it matters

App developers who light a dense grid get shadows and light pools that change between runs or machines, and a golden test that fails at random. The effects target says rune-light draws within 2/255 of its goldens on every native and WebGPU target. The determinism target says 20 of 20 runs are byte-identical on every lane, rune-light dense scenes included.

What would help

Make overflow both deterministic and complete. There are two options.

1. Keep the nearest and add a pass (recommended). Keep the nearest 256 primitives by a stable key (distance, then index), and process the rest in a second pass over the tile. Output then doesn't depend on the cap. 2. Split the tile. Split overfull tiles into smaller ones. This is simpler to reason about, but it adds dispatch logic.

Either way, count the overflows, expose the count, and emit one diagnostic the first time a tile overflows. Measure the GPU cost of the sort in workgroup memory.

Done when
  • A scene with 400 primitives in one tile renders byte-identically across 20 runs on each adapter, and within 2/255 across adapters.
  • Its output is within 2/255 of the same scene rendered with the cap raised to 512.
  • The overflow counter reports 144, and one diagnostic is emitted.
  • GPU time for the field pass on the existing benches is recorded before and after.
How to check

A rune-light test that renders the 400-primitive scene 20 times and compares bytes, added to the goldens from R0422. Run it on Linux and on the hardware adapters.

Depends on
Part of
  • Theme: T12
  • Tracked in R0685
  • Phase 3 · priority P3 · size M
R0634rune-light: lit text needs text in its own target, which the layer contract forbids, so the lab falls back to flattened opacityP3Phase 3MT12
render-light-glyph-partition · feature
What happens

rune-light lights text separately from the surfaces beneath it, so a compositor has to draw glyphs into their own target. Today the lab and cursed-settings do this by walking the instance list and moving each glyph (is_glyph) into a separate text list. The renderer's compositor contract forbids exactly that. It says to keep each balanced scope together, because splitting glyphs out of a scope breaks isolation. So the lab can't use isolated layers. It keeps the old flattened-opacity semantics instead, and multiplies each primitive's fill and border by its scope's opacity. A faded card in a lit scene therefore shows overlaps through itself, while the same card anywhere else in Rune fades as one layer.

Where
Why it matters

App developers who add lighting lose correct group opacity: fades, sheets and transitions in a lit scene look different from the rest of their app. The effects target says rune-light draws within 2/255 of its goldens on every native and WebGPU target. Lit UI should also follow the same layer model as everything else.

What would help
  • Let a compositor ask the renderer for a text-coverage mask per scope. The renderer draws it inside the scope's own isolation, so the compositor never filters glyphs itself.
  • Move rune-light's text input and the lab onto that mask, and delete the flattened-opacity path.
  • Build on the sRGB-blend mode from R0435, so the mask and the base share one encoding.
  • Count the mask target in the GPU byte count, since it adds one window-sized target per lit frame.
Done when
  • The lab runs with isolated layers and has no flattened-opacity code.
  • cursed-settings no longer splits glyphs by kind.
  • A golden of a faded, lit card matches the expected output within 2/255.
  • The README's compositor section describes the mask and drops the lab exception.
How to check

Goldens of the faded lit card in rune-light, alongside the goldens from R0422, run on Linux and on the hardware adapters.

Depends on
Part of
  • Theme: T12
  • Tracked in R0685
  • Phase 3 · priority P3 · size M
R0635rune-light: targets are fixed at construction (about 90 MB at 2560x1600), so a resize rebuilds every pipelineP3Phase 3MT12
render-light-targets-resize · perf
What happens

LightRenderer::new builds every pipeline (G-buffer, field, shadow, GI scene, cascades, fluence, composite) and allocates every target for one size. There is no way to resize. The live example and cursed-settings make a new renderer when the size changes, so each resize step recompiles every rune-light pipeline on the thread that draws the frame.

At 2560x1600 the targets hold about 90 MB:

  • the Rgba16Float G-buffer at full size: 32.8 MB;
  • the R32Uint id buffer: 16.4 MB;
  • the half-size field: 8.2 MB;
  • the two-layer vis and air arrays at half size: 16.4 MB each.

The air array is allocated even when no light casts shafts.

Where
Why it matters

Users who drag a lit window's edge see it stall as every pipeline recompiles. Lit apps also hold about 16 MB they never use. The memory target says every pool is bounded and counted, and a hello window holds at most 8 MiB beyond its drawables. The stall target says 0 UI-thread pipeline creations after the first frame, and no scenario adds more than 2 ms of render work to the UI thread.

What would help
  • Split targets from pipelines. Add LightRenderer::resize(device, width, height), which rebuilds only Targets and their bind groups, and drops the GI targets so they come back lazily at the new size.
  • Allocate air the first frame a light casts shafts, and bind a 1x1 placeholder until then.
  • Report rune-light's target bytes through the compositor's gauge and the count from R0072.
  • Move the live example and cursed-settings to resize. This is a new public method, so add a changelog entry.
Done when
  • Resizing makes 0 new pipelines, checked by a pipeline count.
  • Without shafts, the air target's bytes are 0.
  • Reported bytes at 2560x1600 match the sum of the allocated targets within 5%.
  • The existing rune-light tests pass, and the goldens from R0422 are unchanged.
How to check

rune-light tests that resize a renderer and count pipelines and target bytes, next to crates/rune-light/tests/targets.rs, run on Linux and the hardware adapters.

Depends on
Part of
  • Theme: T12
  • Tracked in R0642
  • Phase 3 · priority P3 · size M
R0636Metal: more than 8 writes to a buffer between swaps copy the whole buffer on the CPUP3Phase 3ST12
render-metal-store-log · perf
What happens

On the native Metal backend, a CPU write to a buffer that a recorded or running command buffer still uses swaps in a spare storage. The store brings the spare up to date by copying forward the ranges it missed. It remembers those ranges in an 8-entry write log. After more than 8 writes since the spare was current, the log has lost some, so missed returns the whole buffer. Even under the limit, it returns one hull from the lowest to the highest logged range, not the ranges themselves. Two small writes at opposite ends of a buffer copy everything between them.

At 2,000 instances (256 KiB) this is cheap. At 50,000 instances the buffer is 6.4 MB, and a frame with scattered span changes copies all of it on the CPU, which costs milliseconds per frame.

Where
Why it matters

Large scenes on macOS, such as a dense canvas, a big table or many animated rows, pay a CPU copy that grows with buffer size, not with the change. Users see frame drops in exactly the scenes that already work hardest. The frame-cost target says GPU p99 is at most 4 ms on the 1,000-quad and effects scenes on the reference Mac. The worst-case frame target says per-frame work scales with what changed, with 0 frames over 8.3 ms per run on the reference Mac.

What would help
  • Replace the 8-entry log with a small sorted set of dirty ranges for each spare. Merge ranges closer than 4 KiB.
  • Copy only those ranges on a swap, minus what the current write covers.
  • Keep a bound on the set's length. When the set is full, merge the closest pair instead of falling back to the whole buffer.
  • Keep the test-only copied counter and assert on it.
Done when
  • With 50,000 instances and 20 scattered span writes per frame, copy-forward bytes are within 2x of the bytes written.
  • A 10-span scattered write on a 50,000-instance buffer copies at most 2x the written bytes.
  • The store's existing swap tests pass.
How to check

Native backend unit tests in gpu/metal, run on a Mac with cargo test -p rune, using the copied counter.

Part of
  • Theme: T12
  • Tracked in R0637
  • Phase 3 · priority P3 · size S
R0637Render: steady frames redraw unchanged layers and blur pyramids, and per-frame work grows faster than the sceneP2Phase 3XLT12
renderer-frame-cost · tracking
What happens

A steady frame does work that doesn't scale with what changed:

  • Isolated layers redraw on every presented frame. Only El::cache layers skip their pass. Since #208, each disabled kit control whose paint overlaps is its own layer, so scrolling a form redraws every visible one on every frame.
  • A backdrop blur runs its pyramid again on every frame, even when nothing under it changed.
  • draw_layer_range walks the whole layer plan on every recursive call, so nested scopes cost the plan length times the nesting depth.
  • On Metal, more than 8 writes to a buffer between swaps copy the whole buffer on the CPU.
  • iOS draws through wgpu's Metal path, because the native Metal backend is opt-in, and that path costs more CPU per frame.

The work takes several issues, because each item is a separate cache or backend path. The count budgets (R0263) prove the fixes and keep them proven.

Where
Why it matters

On a laptop GPU, the redraws use up the frame budget that scrolling and springs need, and they waste battery when the content is static. The target: a static isolated layer redraws its content 0 times while unchanged. A steady frame makes 0 GPU allocations. GPU p99 is <= 4 ms for 1,000 spring quads and for the effects scene on the reference Mac and iPhone, and <= 12 ms at 1440p for kit gallery scrolling on the UHD 620-class laptop. Per-frame work scales with what changed, and the reference Mac's GPU p95 is <= 4 ms (PLAN §8).

Done when
  • All children are closed.
  • A static isolated layer redraws 0 times while unchanged, and a backdrop over static content runs its pyramid on 1 frame of 100.
  • A steady frame makes 0 GPU allocations.
  • Layer encode visits at most 2x the plan entries plus surfaces.
  • GPU p99 is at most 4 ms on the 1,000-quad and effects scenes on the reference Mac.
How to check

The count budgets in the required check, and GPU timings on the reference Mac taken from --profile perf builds in paired, alternating runs.

Issues
Depends on
Part of
  • Theme: T12
  • Phase 3 · priority P2 · size XL
R0638Metal: every new texture is zero-filled with a blit, including render targets that are always cleared firstP3Phase 3ST12
render-metal-zero-fill · perf
What happens

wgpu promises that a new texture reads as zero until it is written. To keep that promise, the native Metal backend blits zeros into every mip and layer of each new texture from a 256 KiB zero buffer. Many textures never need it. Layer targets, layer-blur scratch and the backdrop-blur pyramid always start with a render pass that has LoadOp::Clear, so the fill is overwritten before anything reads it. One 5K isolated layer (5120x2880 Rgba16Float) costs about 118 MB of blit copies that do nothing. That cost lands on the frame that first fades or blurs something. Frame-level backdrops are not cleared, so they do need the fill.

Where
Why it matters

Users on macOS see the first fade or blur of a large window take longer than it should. The cost repeats each time the transient pool lets a target go and makes it again. The stall target says no scenario adds more than 2 ms of render work to the UI thread. The no-stall target says 0 Rune-caused tasks over 8.3 ms after the first frame. The memory target says GPU memory work is bounded and reported for every pool.

What would help
  • Track 'written since creation' per texture, as wgpu-core does.
  • Defer the zero fill. When the first use is a render pass with LoadOp::Clear over the whole texture (every mip and layer it covers), mark the texture written and skip the fill.
  • Do the fill lazily before any other first use, such as a copy destination, a sampled read, or a partial clear.
  • Keep a debug assertion that compares a skipped texture against a zero-filled one, so a missed path fails in tests instead of reading garbage.
Done when
  • A counter shows 0 zero-fill bytes for a new layer target, blur scratch and pyramid level.
  • Frame backdrops and copy destinations are still zeroed.
  • Native and wgpu pixel-equivalence tests still pass.
  • The first-fade frame on a 5K window makes no zero-fill blit.
How to check

Native backend tests run on a Mac with cargo test -p rune, using a zero-fill byte counter, plus the existing native and wgpu pixel-equivalence tests.

Part of
  • Theme: T12
  • Tracked in R0642
  • Phase 3 · priority P3 · size S
R0639Linux: Vulkan pipelines compile from scratch at every launchP3Phase 3MT12
render-vulkan-pipeline-cache · research
What happens

On macOS, Rune ships a precompiled metallib. On Windows, it ships DXBC for its built-in pipelines. Linux has neither a precompiled form nor a cache. Every launch compiles the uber pipeline and each built-in pipeline through Naga to SPIR-V and then through the driver. Every pipeline descriptor in crates/rune/src passes cache: None. wgpu 30.0.1 offers a PipelineCache behind Features::PIPELINE_CACHE on Vulkan only, with wgpu::util::pipeline_cache_key to name the file per adapter and driver. Rune doesn't request it.

Nobody has measured the cold cost on Mesa RADV, ANV, NVIDIA or lavapipe. Mesa keeps its own on-disk shader cache, so a warm launch may already be cheap there. A fresh install, a driver update or a cleared cache still pays the whole compile, possibly while the first frame waits.

Where
Why it matters

Linux users see a slow first window after an install or a driver update, and a stall the first time a blur or fade appears. The launch target says Windows and Linux hello reach first content at p95 of at most 250 ms. The stall target says 0 UI-thread pipeline creations after the first frame, and no scenario adds more than 2 ms of render work to the UI thread.

What would help

1. Measure the uber pipeline and first_use_ms on RADV, ANV, NVIDIA and lavapipe, cold (driver cache cleared) and warm, in paired alternating runs under --profile perf. Use the per-frame pipeline count from R0073 to see which compiles land after the first frame. 2. If the uber pipeline costs more than 20 ms cold on any of them, add a wgpu PipelineCache per adapter and driver under the app's cache folder. Bound it in bytes, check its header, and ignore a corrupt or mismatched file. 3. If no driver crosses 20 ms, write the note and close with no cache.

Done when
  • A research note in research/ records cold and warm numbers per driver, from paired runs, with driver and wgpu versions.
  • The note gives a go or no-go for shipping the cache.
  • If the cache ships, the second launch's uber pipeline takes at most 5 ms on each measured driver.
  • If the cache ships, a corrupt cache file is ignored with one diagnostic and no panic.
How to check

The note's paired runs. If the cache ships, a Linux test that writes a corrupt cache file and checks that the renderer starts and draws.

Depends on
Part of
  • Theme: T12
  • Tracked in R0640
  • Phase 3 · priority P3 · size M
R0640Render: pipelines still compile, and the UI thread still waits on the GPU, after the first frameP1Phase 3XLT12
renderer-ui-thread-stalls · tracking
What happens

Rune builds most pipelines before the first frame. But several still compile, or wait on the GPU, on the UI thread later. Each one is a visible hitch the first time a feature appears:

  • The first fade, blur or backdrop compiles its core layer and composite pipelines on use.
  • A faded rune-fx effect compiles its pipeline inside the open render pass.
  • On Windows, only the uber shader ships as DXBC, and the precompiled one is never used from a CRLF checkout (#182). Blur, backdrop, video, alpha and effect pipelines compile with FXC on first use.
  • No lane runs the precompiled-metallib freshness test, and a miss compiles at runtime with no log.
  • Linux compiles Vulkan pipelines from scratch at every launch.
  • The UI thread waits on the GPU for a window's first frame, on Windows show, in native Metal pacing, and when it joins an unfinished prewarm. On Windows, the DX12 check before the first device costs about 215 ms (#99).
  • The drag-out snapshot waits for the GPU inside a pointer move.

The work takes several issues. Each backend has its own compile and cache mechanism, and each wait sits in a different host path. One pipeline counter (R0073) and one GPU-wait counter prove them all.

Where
Why it matters

A hitch on first use is what makes an app feel unfinished, even when every later frame is fast. The target: no scenario adds more than 2 ms of render or media work to the UI thread on the reference machines. After the first frame, there are 0 UI-thread pipeline creations and 0 synchronous GPU waits, except pacing waits that end within 1 refresh. Every built-in pipeline is precompiled or cached on macOS, iOS and Windows. On Windows, a cold first show spends <= 5 ms choosing a backend. No Rune-caused task runs over 8.3 ms after the first frame, and the main thread never waits for GPU completion before the first frame shows.

Done when
  • All children are closed.
  • Count tests show 0 UI-thread pipeline creations after the first frame for the first fade, blur, backdrop, plus-lighter blend, video frame and each effect kind, faded and unfaded, on native Metal, wgpu Metal and DX12.
  • Every built-in pipeline ships precompiled (metallib, DXBC). A freshness test runs in the macOS and Windows lanes, and a runtime miss emits one diagnostic.
  • After the first frame, the UI-thread GPU-wait counter is 0, except pacing waits that each end within one refresh.
How to check

The count tests in the required check, and the freshness tests in the macOS and Windows lanes. They run on every change, so a new lazy pipeline or wait fails at once.

Issues
Depends on
Part of
  • Theme: T12
  • Phase 3 · priority P1 · size XL
R0641Images: decoded mips, atlas pages and GPU textures have no shared byte budgetP2Phase 3MT13
render-image-byte-budget · perf
What happens

Each drawn image keeps three copies: its decoded mip chain in Pixels, a CPU copy in an atlas page, and a GPU texture for that page. Large images get a page of their own size. Nothing counts total image bytes. Page limits, end-of-frame reclamation and weak cache entries bound some behaviour, but a gallery of large images grows until pages empty at the end of a drawn frame. A hidden window draws no frames, so it never reclaims and keeps everything.

The repo's own rule says to bound every cache in entries and in bytes, counting decoded pixels. #163 removes the atlas CPU copy; this issue is the budget across what remains.

Where
Why it matters

An image-heavy app, such as a chat with screenshots or a photo grid, grows without limit and stays large at rest and while hidden. The targets ask that GPU memory be "bounded, aged and reported for every pool", that the worst-case scene fits "the default transient budget ... plus the image budgets", that "a hidden window frees at least 90% of its transient bytes within 2 s", and that memory footprint is "bounded, attributed, stable, and given back at rest".

What would help

1. Two budgets, set by builder methods: CPU image bytes (decoded mips and any atlas copies) and GPU image bytes (atlas textures), each 256 MiB by default. 2. Evict least recently used entries by bytes when a budget is exceeded. Pixels frames the app owns count toward the CPU budget but are never evicted, since their buffers belong to the app. 3. An image over budget on its own is admitted alone, at the largest mip that fits, with one diagnostic. 4. An evicted or device-lost entry uploads again from its source (the Pixels frame or the decoded mips), or decodes again from the cache input. 5. Free a hidden window's image pages 2 s after it hides, by wall clock, without waiting for a frame. 6. Report both totals through the renderer's byte count from R0072.

The transient decode budget in R0444 is separate; this covers bytes that stay after decode.

Done when
  • Scrolling a grid of 500 4K images keeps CPU and GPU image bytes each within budget.
  • An image larger than the budget draws at a smaller mip with one diagnostic.
  • Device-loss recovery still restores every visible image.
  • A hidden window's image pages are freed within 2 s.
How to check

Headless tests with a synthetic gallery read the budget counters while they scroll. Soak tests in the platform lanes hide and show a gallery window and check bytes return to baseline. A device-loss test re-draws every visible image after eviction.

Depends on
Part of
  • Theme: T13
  • Tracked in R0642
  • Phase 3 · priority P2 · size M
R0642Memory: GPU pools have no byte budget, several never shrink, and each surface keeps its own device-side copiesP2Phase 3XLT12
render-gpu-memory · tracking
What happens

El::cache layers (64 MiB by default) and staging have bounds. Other GPU memory grows with the largest thing ever drawn, and then stays, on each surface:

  • Isolated-layer targets are pooled by plan index, so a target follows its slot and not its content. A fade, or a disabled control that scrolls, can allocate a texture.
  • Backdrop copies are allocated again on every size change and are never freed after blurs stop. The backdrop blur pyramid only grows.
  • The instance buffer grows to the next power of two and never shrinks.
  • Each renderer allocates a 2048x2048 glyph atlas page (4 MiB) when it is created, with or without text. Every window and overlay keeps its own.

At 5K, a full-window Rgba16Float layer is 118 MB, and 354 MB when blurred, with scratch and the reduced work texture. A BGRA8 backdrop copy is 59 MB, plus 118 MB for an Rgba16Float copy. The blur pyramid is about 86 MB. None of them has a byte budget, and no single count reports them.

On an M2 Max, a hello window idles at 33-34 MB footprint and 92-95 MB RSS after 5 s. PLAN §8's target is 50 MiB RSS.

The work takes several issues. Each pool has its own owner and lifetime, and the accounting, budget and release paths must land before the pools can use them.

Where
Why it matters

An app that blurred one large panel once keeps hundreds of MB on the GPU until it quits. Each overlay or hidden window adds its own copies. The target: every pool is counted, and in a single-renderer test the total is within 5% of the allocator's bytes. A text-free overlay holds <= 1 MiB beyond its drawables, and a hello window <= 8 MiB. Transient pools free within 2 s of last use by wall clock, even when no frame is drawn. A hidden window frees at least 90% of its transient bytes within 2 s on macOS, Windows, X11 and Wayland. The soak ends within 5% of cycle 1. The Mac hello footprint is <= 30 MiB.

What would help

Order: first R0072, R0284 and R0016. Then R0426 in phase 2, with a wall-clock idle wake. Then the pools use it. Keep the default budgets generous. When a scene can't fit, extra layers draw at reduced resolution with a diagnostic, and opacity is never flattened.

Done when
  • All children and dependencies are closed.
  • The hello, overlay, hidden-window and wall-clock release targets above hold on macOS, Windows, X11 and Wayland.
  • The worst-case scene (5K, 4 backdrop blurs, 3 blurred layers, a playing video, 20 disabled kit controls) fits the default transient budget plus the image budgets, with no fallback.
  • A 50-cycle soak (blur on and off, fade on and off, hide and show) ends within 5% of cycle 1's GPU bytes, and repeated macOS overlay shows reuse one device.
How to check

Count budgets on accounted bytes in the required check, and the soak tests (R0247 on macOS) in the GPU lanes.

Issues
Depends on
Part of
  • Theme: T12
  • Phase 3 · priority P2 · size XL
R0643Images: native builds decode only PNG and JPEG raster images, while the web build shows WebP, AVIF and GIFP2Phase 3MT13
render-image-formats · feature
What happens

crates/rune builds the image crate with only the png and jpeg features. Rune handles SVG and PNG-backed ICNS itself. On native targets a WebP, AVIF or GIF file fails to decode with an error.

On the web, cache.url and cache.file hand the URL to the browser, which decodes with createImageBitmap, so WebP, AVIF and GIF all work there. The same app shows images on the web that it can't show on the desktop. These formats are common in pasted content and Markdown, so the gap shows up in ordinary apps. On the web cache.load(bytes) still goes through the Rust decoders, so it has the same PNG and JPEG limit.

Where
Why it matters

A user sees an image on the web build and a broken image in the desktop build of the same app. The targets say "every format Chromium decodes in the fixture set also decodes natively within 1/255 of the web build (AVIF on Linux with the optional decoder feature)", that platform services match without silent gaps, and that the web and native builds draw the same pixels.

What would help

1. Add WebP and GIF through the image crate's pure-Rust decoders, on by default. GIF and animated WebP decode their first frame. 2. Decode AVIF through the OS: ImageIO on macOS and iOS, WIC on Windows. On Linux, add an optional feature that links a system AV1 decoder; without it, return a typed "unsupported format" error. 3. Route load on the web through createImageBitmap for these formats, so web and native agree for bytes too. 4. Record the binary-size and build-time cost in the PR, given #124.

One record proposed playing animated GIF and WebP as frame sequences, advancing only while visible and holding still under reduced motion. That needs a timing and visibility design of its own, so it is left for a follow-up. ICC conversion is R0424; this issue depends on it so the new decoders convert colour the same way.

Done when
  • Every WebP, GIF and AVIF fixture that Chromium decodes also decodes on macOS, Windows, and Linux with the AVIF feature.
  • Each fixture matches the web build within 1/255 per channel.
  • Without the Linux AVIF feature, an AVIF image fails with the typed error.
  • The PR records the change in binary size and release build time.
How to check

Committed small fixtures with decode goldens run in cargo test -p rune. The Linux lane runs with the AVIF feature on and off. The web lane decodes the same fixtures in Chromium, and a cross-target comparison checks the 1/255 bound.

Depends on
Part of
  • Theme: T13
  • Phase 3 · priority P2 · size M
R0644Native surfaces: byte frames, Windows imports and new imported frames allocate GPU textures, buffers and bind groups every frameP2Phase 3MT13
render-surface-allocs · perf
What happens

SurfaceRenderer draws every NativeSurface. The main renderer's steady frames reuse their buffers, but the surface path creates new GPU objects for each new frame:

  • A byte frame (push_bytes, used by posters, headless frames and the portable video-tiles source) goes through upload, which creates one texture per plane per frame: one for BGRA, two for NV12.
  • A Windows shared texture wraps the opened resource with create_texture_from_hal, creates an owned BGRA8 copy target, and records and submits its own command buffer, every frame.
  • Each new imported frame fails the Arc::ptr_eq check against the previous slot, so it gets a new uniform buffer and a new bind group. This includes IOSurface frames on macOS.
  • Each timed submit creates two 16-byte buffers, one to resolve timestamps into and one to read back.

A 60 fps NV12 byte stream therefore creates up to 6 GPU objects a frame, or 360 a second, and re-uploads 3.1 MB a frame at 1080p. On Windows each frame also creates a full-size owned texture (8.3 MB at 1080p BGRA).

Where
Why it matters

Playing video is the most common case where frames keep changing at rest. Allocator churn costs CPU time on every frame and fragments GPU memory. The target is "0 GPU allocations in a steady frame on every path, video included" and "GPU memory is bounded, aged and reported for every pool".

What would help
  • Keep one texture set per surface slot, keyed by size and format, and write byte planes into it with write_texture. Recreate it only when the size or format changes.
  • On Windows, keep the owned copy target and the hal wrapper with the opened resource in the importer's name cache. Build on R0442, which revalidates that cache.
  • Keep a uniform buffer per slot and rewrite it. Cache bind groups by texture identity: the byte-frame slot texture, the owned Windows texture, or the IOSurface ID on macOS. Producers cycle a few buffers (video-tiles uses three per tile), so after warm-up every bind group is a hit.
  • Pair the resolve and readback buffers with each TimingSlot, so they come from the same 8-slot ring as the queries.
  • Count every pool under R0263.
Done when
  • After a 10-frame warm-up, a playing BGRA and NV12 byte-frame surface creates 0 textures, buffers and bind groups per frame.
  • The same holds for an IOSurface surface cycling 3 buffers on macOS and for a shared-texture surface on Windows.
  • A timed submit creates 0 buffers after warm-up.
  • A size change recreates the slot once and frees the old textures.
  • Existing native surface GPU tests still pass.
How to check

An allocation test in native_surface/tests.rs pushes 30 frames per source kind and reads the GPU allocation counter from R0263. The video scene's count budget then holds the result in CI, and the Windows lane runs the shared-texture case.

Depends on
Part of
  • Theme: T13
  • Phase 3 · priority P2 · size M
R0645iOS: Player and IOSurface import are compiled only for macOS, so video fails on iOS although AVFoundation is thereP2Phase 3MT13
render-video-ios · feature
What happens

iOS has AVFoundation, CoreVideo and CVMetalTextureCache, the frameworks the macOS player uses. But the player backend, the IOSurface import and their dependencies are all gated on target_os = "macos". On iOS every clip reports Failed("video playback isn't supported on this platform yet") and video draws a grey placeholder.

Three more things stop a port from just changing the cfg:

  • The main-queue helper the player uses for AVPlayer work is compiled for macOS only.
  • Playback is turned on only by the windowed shell. The embedded LayerHost path that iOS apps use never calls enable_playback, so a hosted app would run its players in headless mode.
  • iOS needs an AVAudioSession category, and Metal refuses GPU work while the app is in the background.
Where
Why it matters

An iOS app built on Rune can't show a clip, a video background or a poster. The target is "5 of 5 platforms play every manifest fixture with 0 errors, A/V drift <= 40 ms and <= 1 dropped frame per minute at the clip rate", with "0 CPU copies per frame where the platform offers GPU import (IOSurface on macOS and iOS)".

What would help
  • Build video::macos, native_surface::macos and platform::main_queue for target_vendor = "apple", and move the AV and CoreVideo dependencies to the Apple target table. Split out any AppKit-only call.
  • Call enable_playback when a LayerHost is created.
  • Set an AVAudioSession category (playback for clips with sound, ambient for muted video) when the first player is made.
  • Pause playback on backgrounding and resume on return. Use the active state from R0531 to gate both drawing and video pulls, so nothing submits GPU work while the app is inactive.
  • Keep CVMetalTextureCache as the import on both Apple targets.
Done when
  • Every fixture clip plays to the end in the iOS simulator lane with 0 errors and 0 CPU copies per frame.
  • Backgrounding pauses playback and encodes 0 command buffers; returning resumes it.
  • A LayerHost app's Player reports Playing, not the headless clock.
  • Existing macOS player tests pass unchanged.
  • One device run on an iPhone is recorded in the PR.
How to check

The iOS simulator lane from R0244 runs the fixture clips and a background-and-return case, and counts command buffers while backgrounded. The media conformance suite (R0648) then keeps iOS in its matrix.

Depends on
Part of
  • Theme: T13
  • Tracked in R0719
  • Phase 3 · priority P2 · size M
R0646Web: Player has no backend, so a web app can't show video even once NativeSurface stops ending the appP2Phase 3MT13
render-video-web · feature
What happens

Browsers decode video natively, but Rune's web build has no Player backend. Every clip reports Failed. Today a drawn el().video() ends the app, because the web frame loop stops on any native surface. When R0441 turns that into a placeholder, video will still show only grey.

Where
Why it matters

A cross-platform app that shows clips has to hide them in the browser. The target is "5 of 5 platforms play every manifest fixture with 0 errors" with "0 CPU copies per frame where the platform offers GPU import (... external textures on WebGPU)", and that "the web build is a first-class target in every browser engine".

What would help

Back Player on the web with an HTMLVideoElement that is not attached to the page. On each requestVideoFrameCallback, bring the frame to the GPU and wake the windows that draw it. Use the callback's mediaTime as the frame time, so the surface presents at the clip's own rate.

There are two ways to bring the frame in:

1. Queue::copy_external_image_to_texture from the video element or a VideoFrame into a pooled texture. wgpu 30 has this on WebGPU and WebGL2. It costs one GPU copy and no CPU copy. 2. importExternalTexture, with no copy. wgpu 30's WebGPU backend leaves create_external_texture unimplemented, so this needs a wgpu change or a raw binding. An external texture also expires at the end of the task, so it must be drawn in the same task.

Start with option 1. Move to option 2 when wgpu supports it.

Videos start muted, so autoplay works. If an unmuted play() is refused, report a typed state (PlayerState is #[non_exhaustive], crates/rune/src/video/mod.rs:170-180), not Failed. Audio clips use the same element with no surface. Add a changelog entry.

Done when
  • Every web fixture clip plays in Chromium, Firefox and WebKit with 0 errors.
  • A 24 fps clip presents 24 +/- 1 frames a second when nothing else moves, and A/V drift stays <= 40 ms.
  • The WebGPU path does 0 getImageData calls and 0 CPU copies per frame.
  • A refused unmuted play() reports a typed state and the app keeps running.
  • Player::audio plays, pauses, seeks and ends on the web.
How to check

The web lane from R0268 and the browser smoke tests from R0062 play the fixtures, count presents per second and check for readbacks. R0648 adds the web column.

Depends on
Part of
  • Theme: T13
  • Tracked in R0719
  • Phase 3 · priority P2 · size M
R0647Windows: Player has no backend, so video and audio fail with a placeholderP2Phase 3LT13
render-video-windows · feature
What happens

Player video and audio use AVFoundation and are compiled for macOS only. On Windows every clip reports Failed("video playback isn't supported on this platform yet") and video draws a grey placeholder. Audio clips fail too.

Windows already imports D3D shared textures into a NativeSurface, but nothing decodes video into them. The import path takes only BGRA8 and copies each frame into a texture Rune owns.

Where
Why it matters

A Windows build of an app with clips, voice notes or sound effects shows grey boxes and plays nothing. The targets are "5 of 5 platforms play every manifest fixture with 0 errors, A/V drift <= 40 ms", "0 CPU copies per frame where the platform offers GPU import (... D3D shared textures on Windows)", and "Windows apps behave like native Windows 11 apps".

What would help

Add a Media Foundation backend behind a feature. Use IMFMediaEngine in frame-server mode with a DXGI device manager on a D3D11 device made on Rune's adapter (adapter_luid).

  • Video: TransferVideoFrame writes each frame into a shared texture that Rune imports. The current import adds its own copy, which would make two GPU copies. To stay at one, let Media Foundation write into a small pool of textures that Rune creates and shares, and sample them under the release fence without the owned copy.
  • Audio runs on the engine's clock. Audio-only clips use the same engine with no surface.
  • Seek, rate, looping, muted and the end map onto the engine's controls. Posters come from a source reader on a worker.
  • A missing codec (HEVC needs a Store extension; N editions lack Media Foundation unless the Media Feature Pack is installed) fails with a message that names what to install. A query an app can call before it plays would help too.
  • The headless clock stays as it is. The Windows Recorder is R0721.
Done when
  • The H.264/AAC and HEVC fixtures play in the Windows lane with 0 errors and A/V drift <= 40 ms.
  • Each frame costs at most 1 GPU copy and 0 CPU copies.
  • examples/video-player plays, pauses, seeks and mutes a clip on Windows, and plays an audio-only file.
  • Without the HEVC extension, the HEVC fixture fails with a readable message and the app keeps running.
  • Headless runs stay deterministic.
How to check

The Windows GUI lane from R0063 plays a short committed clip and checks frame and time counts. The test runs on an LF checkout once R0162 lands. A hardware run is recorded in the PR, and R0648 adds the Windows column.

Depends on
Part of
  • Theme: T13
  • Tracked in R0719
  • Phase 3 · priority P2 · size L
R0648Video: no fixture suite checks codecs, frame rates, colour, A/V drift and dropped frames on each platformP2Phase 3MT13
render-media-conformance · infra
What happens

Today only macOS has a Player backend; every other platform compiles the unsupported backend. The tests in video/tests.rs check state, timing and edits with the virtual clock, and a few run only on macOS. Nothing plays a set of real clips across codecs, frame rates and colour spaces, and nothing measures A/V drift, dropped frames or CPU copies the same way on every platform.

As backends land for iOS, Windows, the web and Linux, each will be tested with one or two clips of its own. Without a shared suite, platforms can diverge without anyone seeing it: one drops frames at 60 fps, another shows P3 clips with the wrong matrix, a third copies every frame on the CPU.

Where
Why it matters

An app ships a video feature that works on the developer's Mac and stutters or shows wrong colours elsewhere. The target is "5 of 5 platforms play every manifest fixture with 0 errors, A/V drift <= 40 ms and <= 1 dropped frame per minute at the clip rate", with "0 CPU copies per frame where the platform offers GPU import", and Player working on every platform with "100% of cells".

What would help

1. Commit small royalty-free fixtures, encoded with the repo's own tooling: about 10 s at 1080p, in H.264, HEVC, VP9 and AV1, at 24, 30 and 60 fps, in BT.709 and Display P3. 2. Commit a pinned capability manifest per platform that lists which fixtures the OS can decode, so a missing codec is an expected skip and not a silent pass. 3. Add a harness that plays each manifest fixture and records errors, A/V drift, dropped frames (presented frame times against presentation timestamps) and CPU pixel copies per frame (not GPU import wrappers). Use a virtual clock where the platform allows it. 4. Run it in each platform lane, and on a physical iPhone before releases, since the simulator doesn't use the device's decoder.

The suite depends on the backends (R0645, R0647, R0646, #30) and on R0440, which makes the clip-rate numbers meaningful.

Done when
  • The suite runs on macOS, iOS (simulator and device), Windows, Linux and the web (Chromium and Safari).
  • Every manifest fixture plays with 0 errors, A/V drift <= 40 ms and <= 1 dropped frame per minute at the clip rate.
  • 0 CPU copies per frame where the platform offers GPU import.
  • A fixture the manifest lists as decodable that fails to play fails the lane.
How to check

Each platform lane runs the harness and fails on any fixture over its thresholds. A release checklist step runs it on a physical iPhone. The manifest is reviewed when a backend adds a codec.

Depends on
Part of
  • Theme: T13
  • Tracked in R0719
  • Phase 3 · priority P2 · size M
R0649Images: animated GIF and WebP show only their first frame on every platformP3Phase 3MT13
media-animated-images · feature
What happens

No build plays an animated image.

  • On the web, createImageBitmap decodes a GIF or animated WebP to its first frame. The docs say so: "GIF's first frame".
  • On native, the image crate is built with PNG and JPEG only. decode keeps one frame. R0643 adds GIF and WebP decoding but still yields a still image.

An app that shows stickers, reaction GIFs or animated logos gets a frozen picture where a browser shows motion.

Where
Why it matters

The target is that images "decode on every platform as the platform's browser shows them", and "every format Chromium decodes in the fixture set also decodes natively within 1/255 of the web build". An animated image also must not cost power at rest: "0 presents per second beyond the caret or media rate" and "Hidden: at most 1% of a core".

What would help
  • Decode animated GIF and WebP into a frame sequence with per-frame delays and a loop count. Natively, use the image crate's animation decoders once R0643 enables them. On the web, use the WebCodecs ImageDecoder where the engine has it, and keep the first frame elsewhere.
  • Show frames through Pixels::set, so the image streams like a video frame.
  • Follow the browser's timing rules: a delay of 10 ms or less plays at 100 ms, and the loop count is honoured.
  • Ask for the next frame with a timed wake only while the image is drawn in a visible window. Off screen or hidden, nothing wakes.
  • Under reduced motion, show the first frame and don't animate.
  • Keep decoded frames up to a per-image cap and decode the rest on a worker as they come due. Count them under R0641.
  • Add a changelog entry, since apps that show GIFs will start to animate.
Done when
  • A committed 3-frame GIF and a 3-frame WebP at 100 ms each show frames 0, 1 and 2 at 0, 100 and 200 ms in a headless --frames run, on native and web.
  • A finite loop count stops on its last frame.
  • With the image scrolled out or the window hidden, it causes 0 wakes and 0 presents a second.
  • Under reduced motion, the first frame shows and nothing animates.
  • Decoded frame bytes stay within the image byte budget for a 200-frame fixture.
How to check

Unit tests drive the virtual clock over the fixtures and compare frame indices. A wake counter test covers the off-screen and hidden cases. The image conformance fixtures compare native frames with the web build within 1/255.

Depends on
Part of
  • Theme: T13
  • Phase 3 · priority P3 · size M
R0650Video: each clip's poster loads on its own thread at full size and stays in CPU memory after uploadP3Phase 3ST13
render-video-posters · perf
What happens

Before a video first plays, it shows a poster. request_poster starts a new thread for each clip. That thread opens the asset (over the network for a URL) and decodes one frame. A grid of 100 clips starts 100 threads and opens 100 assets at once.

Every poster is made at up to 1920 px a side, whatever size it is drawn at. A 1920x1080 BGRA poster is 8.3 MB, and the 1920x1920 limit allows 14.7 MB. A 160x90 pt tile at 2x needs only 320x180, or 0.23 MB.

After upload, the ByteFrame stays in CPU memory twice: as the surface's latest frame and in the surface renderer's import cache. So a 100-tile grid of 1080p clips holds about 830 MB of CPU poster bytes besides their GPU textures.

A clip that is dropped stops its worker before the next decode. A clip that is scrolled out but still alive keeps decoding.

Where
Why it matters

A video grid or feed is the common case for posters. Users see slow first paint when 100 network opens compete, and the app's memory grows with the number of tiles, not with what is on screen. The targets: "GPU memory is bounded, aged and reported for every pool", and "Memory: owned resource counters return exactly to the warmed baseline when release is asked for."

What would help
  • Run posters on one shared pool of 2 workers. Serve visible clips first. Cancel a pending request when its clip is dropped or scrolled out. Audio clips use the same worker to read their facts, so keep that path in the pool.
  • Make each poster at its drawn size times the scale factor, at most 1920 on the long side. Make it again when the drawn size more than doubles.
  • Free the CPU frame once it is uploaded. Ask for it again when the surface renderer is rebuilt, a window or overlay releases its GPU while hidden, or the device is lost.
  • Count poster bytes under the image budget and in R0072.
Done when
  • A 100-clip grid runs at most 2 poster loads at once, counted by threads.
  • Scrolling a tile out or dropping the grid cancels its pending posters.
  • Each poster's pixel size is at most its drawn size times the scale factor, plus 1 px.
  • CPU poster bytes are 0 after upload while the GPU is live.
  • After a renderer rebuild, every visible poster shows again.
How to check

Tests in the macOS GUI lane from R0061 use a 100-clip Player grid. They count poster threads, poster pixel sizes and CPU bytes, then inject a renderer rebuild.

Depends on
Part of
  • Theme: T13
  • Phase 3 · priority P3 · size S
R0651Web: image loads read pixels back through a 2D canvas on the main thread and hold up to four full-size copiesP3Phase 3MT13
render-web-image-readback · perf
What happens

ImageCache::url on the web runs fetchImage. The browser decodes with createImageBitmap, which may run off the main thread. Everything after that runs on the main thread:

1. The bitmap is drawn into a 2D canvas. 2. getImageData reads it back. 3. to_vec copies the bytes into wasm. 4. Mips are built on the CPU, in slices with a task between them.

At the 8192 px limit, the bitmap, the canvas, the ImageData and the wasm Vec can each be 256 MiB, about 1 GiB at peak before mips. The size check runs only after the full decode, so an oversized image is decoded before it is refused. On a phone that can run out of memory. The docs describe the decode as off the main thread but don't mention the readback.

Where
Why it matters

Image-heavy pages stall on each large image, and phones can crash. The targets: "No scenario adds more than 2 ms of render or media work to the UI thread", "<= 4 MB of non-video uploads in any frame", and one 8192 squared image peaks at "at most 1.5 times its RGBA size".

What would help
  • On WebGPU, upload the ImageBitmap with Queue::copy_external_image_to_texture (wgpu 30 supports it on the web) into the image's atlas or texture. Build mips on the GPU. Keep the canvas readback only for the WebGL2 feature build.
  • Read the image's size before the full decode. Parse the header from the blob (PNG, JPEG, GIF, WebP), or use the WebCodecs ImageDecoder where the engine has it. Refuse an image over 8192 px a side before decoding it.
  • Pass resizeWidth and resizeHeight to createImageBitmap when the drawn size is known and smaller.
  • A GPU-only image can't be re-uploaded after a device loss. Keep the ImageBitmap while the image is live, or fetch it again from the HTTP cache.
  • Count the GPU bytes under R0641, which today assumes CPU RGBA.
Done when
  • The WebGPU image path calls getImageData 0 times.
  • Showing a 4K image takes <= 2 ms of main-thread time in a Chromium trace.
  • Peak JS and wasm memory for one 8192 squared image stays under 1.5 times its RGBA size (384 MiB).
  • An image over 8192 px a side is refused before its pixels are decoded.
  • Image smoke tests pass in Chromium, Firefox and WebKit.
How to check

The web lane from R0268 compares the GPU-uploaded image with the CPU path. The browser smoke tests from R0062 load a large fixture and measure peak memory with performance.measureUserAgentSpecificMemory or a counted allocation hook. A perf note records the Chromium trace.

Depends on
Part of
  • Theme: T13
  • Phase 3 · priority P3 · size M
R0652Packaging: only macOS has a bundle script, so Windows and Linux apps have no installer, icon or desktop-file pathP2Phase 3XLT14
platform-packaging-tracking · tracking
What happens

scripts/mac_app_install.py builds a macOS .app with an icon, an optional URL scheme and a code signature, and installs it atomically with scripts/mac_app_bundle.py. It does not notarize, staple or build a .dmg. Windows and Linux have no packaging path at all.

Several services depend on packaging metadata. Windows toast notifications need an AUMID. URL schemes and file types need registration. Taskbar and dock icons need an icon resource or an icon-theme install. The Wayland app_id that tooling::set_app_id sets only finds its icon and name through a matching .desktop file. No CI job builds a package, and nothing checks that install, upgrade and uninstall leave a clean system.

This takes several issues: one packaging path per desktop, each with its own format, signing and CI lane, and one shared app manifest that drives them.

Where
Why it matters

An app built on Rune cannot ship to Windows or Linux users as an installable product without bringing its own tooling. The target is: "Apps can be built, signed, packaged, installed, upgraded and removed on each desktop, at a tracked build cost". All three artifacts must build, install, upgrade and uninstall cleanly in CI on each push to dev, and every production push must sign, verify, and fail without secrets.

What would help

Add one packaging command per desktop, driven by one app manifest: name, id, icon, URL schemes, file types and version. For examples/hello, CI then builds, installs, upgrades to a newer version and uninstalls. It diffs registry keys, XDG paths and LaunchServices registrations before and after. Production pushes sign and verify (codesign and spctl, signtool verify), and a production run without signing secrets fails. Secrets are used only on production pushes, never on PRs. Document the auto-update hook points per platform (Sparkle, MSIX App Installer or a Squirrel-style updater, AppImage zsync or Flatpak). Auto-update itself stays with the app.

Done when
  • All child issues are closed.
  • On each push to dev, CI builds, installs, upgrades and uninstalls a .app and .dmg, an MSIX, and an AppImage and Flatpak of examples/hello, and the before-and-after system diff is empty.
  • Every production push notarizes or signs and verifies its artifacts, and fails without secrets.
  • R0225 is closed, and #108 has a recorded decision.
How to check

The packaging lanes on each push to dev, and the signing step on production pushes. They build on R0036.

Issues
Depends on
Part of
  • Theme: T14
  • Phase 3 · priority P2 · size XL
R0653Desktop: Windows and Linux lack the app services an Electron replacement needsP2Phase 3XLT14
platform-services-tracking · tracking
What happens

PLAN.md leaves open whether Rune replaces OpenCode Desktop's Electron app or ships beside it, and says M3 decides with evidence. Replacing it needs the app services Electron gives on every desktop. Rune has several of them on macOS only, and some nowhere:

  • Notifications live in rune-mac and work only on macOS.
  • App::on_open_url is never called on Windows or Linux. Those platforms hand links to a new process as launch arguments, so there is no single instance and no deep link into the running app.
  • WindowHandle has setters for position, size and visibility, but no getter for the frame or maximized state, so an app cannot save and restore its windows.
  • There is no crash capture, launch at login, badge or progress, or power and session events on any OS.
  • macOS has no tray backend (#141).

Each gap makes an app bring in another crate, with its own event loop and platform quirks. This tracker collects one issue per service, so each lands small, opt-in and testable.

Where
Why it matters

A team that moves an Electron app to Rune finds missing features only after it has built on Rune. The target is: "Desktop app services match Electron on macOS, Windows and Linux, and every platform claim in the docs comes from a checked registry". That means 100% Native, except cells where no OS or desktop API exists, and the registry gives the reason for each of those.

What would help

Build an opt-in crates/rune-app crate with one module per service. Each module has a headless fake, as file dialogs and menus already do. Each declares its cells and run-time probes in R0134. Nothing goes into the core crate unconditionally. Single instance, deep links and opened files, notifications and window state come first, since other services build on them. Auto-update stays with the app, and the docs name the hook points.

Done when
  • All child issues are closed.
  • Every desktop service cell is Native, with a fake test that runs before merge and a GUI-lane smoke that passed in its OS's latest lane. Or it is Unsupported, with a reason that names the missing OS or desktop API.
  • Cells that depend on the session (portal versions, desktop D-Bus services) have a run-time probe, and the smoke checks it.
  • Ten parallel launches of a single-instance app leave one owner and deliver ten argument sets on Windows, X11 and Wayland.
How to check

A GUI-lane smoke per service, and the registry's post-merge results check.

Issues
Depends on
Part of
  • Theme: T14
  • Phase 3 · priority P2 · size XL
R0654Windows and Linux: drag and drop, pop-up menus, title bars, menu bars and Wayland surfaces fall short of native appsP2Phase 3XLT14
platform-shells-desktop-tracking · tracking
What happens

On Windows and Linux, Rune gets its window shell from winit, and winit stops short of what native apps do. Several shell pieces exist only on macOS, or on macOS and Windows:

  • Native pop-up menus answer None at once on Linux.
  • drag_out starts no system drag outside macOS, and Windows file drops carry only paths.
  • App::titlebar keeps the native frame on Linux.
  • The app menu returns Unsupported outside macOS.

Where Rune does own the Linux code, it blocks the UI thread. Each show of a layer-shell overlay waits on a registry roundtrip and a configure. Startup shortcuts register one portal session at a time before the first frame. On Windows, the OS can remove the overlay's low-level pointer hook after a stall, and Rune never notices. On Wayland, portal file dialogs open with no parent window.

This takes several issues. Each piece uses a different OS API (OLE, xdg_popup, xdg-decoration, portals, hooks) and needs its own GUI lane and registry cell. Open issues #130, #171, #20 and #140 belong to the same gap.

Where
Why it matters

An app replacing an Electron app is judged against native apps. A context menu that cannot extend past the window edge, a file that will not drag out to Explorer, or a title bar that looks different on GNOME all show the user that the app is not native. The targets are:

  • Linux: "every cell passes on every declared desktop, or carries a documented protocol limit in the capability registry".
  • Windows: apps "behave like native Windows 11 apps on every DPI, GPU and input device", with hook recovery "in under 1 s with no restart, on real hardware".
  • Services: "100% Native, except cells where no OS or desktop API exists", and the registry gives the reason for each such cell.
What would help

Fix the stalls first, because they cost frames today: R0447, R0449 and R0452. Then add the missing pieces: R0450, R0668, R0660, R0661 and R0672.

Share code where the platforms meet. The Windows drag loop drives idle turns from a timer, as Windows pop-up menus already do. The Linux title bar shares its edge band with the Windows frameless work in #130. Each child adds its capability registry cell, with a fake test and a lane smoke test, or a named protocol limit.

Done when
  • Every child issue is closed.
  • Showing and hiding a Wayland layer overlay 100 times costs 0 UI-thread roundtrips after the first show, keeps a constant thread count, and never hangs on a compositor that does not configure.
  • Five startup shortcuts do not delay the first frame on Wayland.
  • The Windows pointer hook is reinstalled after an injected stall.
  • Windows drag and drop, Linux pop-up menus, Linux title bars and Wayland dialog parents pass on Windows 11, GNOME, KDE, sway and X11 lanes.
  • Every cell that fails has a protocol limit in the registry.
How to check

The Windows 11 lane from R0063 and the GNOME, KDE, sway and X11 lanes from R0071 run each child's GUI test on every push to dev. The capability registry lists each cell with the test that proves it.

Issues
Depends on
Part of
  • Theme: T14
  • Phase 3 · priority P2 · size XL
R0655Desktop: a second launch on Windows starts a second app instead of reaching the running one, and there is no shared single-instance APIP1Phase 3MT14
platform-single-instance · feature
What happens

Rune has no lock, pipe or bus name that keeps an app to one instance. On Windows, opening a link or a file, or launching the app again, starts a new process with the arguments. The running app never hears about it. The new process opens a second window.

The two processes also share one prefs.json. Every set rewrites the whole file, nothing watches it, and the last writer wins. #22 asks for the Linux half through org.freedesktop.Application. No API ties the platforms together, and nothing tests a launch race or a first instance that crashed.

On macOS, LaunchServices already sends a second open to the running app. Rune forwards only the get-URL event and reopen today, and open -n still starts a second process.

Where
Why it matters

Users of chat, mail and editor apps expect one app. A second click on a taskbar icon or a link should focus the open window, not start another one that fights the first over settings. Deep links (R0664) and notification clicks (R0665) both need a running instance to receive them. The target is that "desktop app services match Electron on macOS, Windows and Linux": 100% Native, except where no OS API exists, with each such cell explained in the registry.

What would help

Add SingleInstance in the opt-in rune-app crate. It has one API and a headless fake.

  • Windows: a named mutex and a named pipe. Put the user's session id in both names, so the pipe is per user.
  • Linux: #22's backend on the session bus. Fall back to an abstract Unix socket when D-Bus is off.
  • macOS: forward the Apple events LaunchServices sends, and treat open -n launches the same way.

A second launch forwards argv, URLs, files, the working directory and the activation token, then exits. The running app gets them through on_open_url, on_open_files and on_reopen. Bring the first window forward with xdg-activation on Wayland and AllowSetForegroundWindow on Windows. If the OS denies foreground activation, tell the app instead of failing silently.

Done when
  • A second launch on Windows, X11 and Wayland forwards its arguments and exits with code 0.
  • Ten parallel launches leave exactly one owner, and all ten argument sets arrive.
  • A launch after the first instance crashed takes ownership within 1 s.
  • The first instance's window comes to the front, or the app is told that activation was denied.
  • The fake lets tests simulate a second launch.
How to check

GUI lane tests in R0063 and R0071 launch the example twice, ten times in parallel, and once after killing the first instance. They check the owner count, the delivered argument sets and the takeover time. Unit tests drive the fake.

Depends on
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P1 · size M
R0656iOS: LayerHost never reads Reduce Motion, so every animation plays in full unless the host sets it by handP2Phase 3ST14
motion-reduced-motion-ios · bug
What happens

Native windows and overlays read the system's reduced-motion setting when they are created. LayerHost, the embedded host that iOS apps use, never does. Its constructor builds the runtime and never calls set_system_reduced_motion. Also, preferences::reduced_motion returns false on every target other than macOS, Windows and Linux, so iOS has no source to read.

A host can call runtime_mut().set_system_reduced_motion(true), but no host in the repo does, and the LayerHost docs do not mention it. So an iPhone with Reduce Motion on still gets full spatial springs, slides and zooms.

The same gap applies to a LayerHost on macOS: it does not sample the macOS setting either.

Where
Why it matters

People with vestibular disorders turn on Reduce Motion to avoid travel and zoom. On iOS, Rune ignores the setting, so they see every animation in full. The target: reduced motion applies "<= 1 frame after the OS notification on macOS, Windows, GNOME, KDE, Flatpak (portal), web and iOS, for windows, overlays and LayerHost", with "0 animated spatial travel over 2 pt under reduced motion".

What would help

Add an iOS preference source:

1. Implement preferences::reduced_motion on iOS with UIAccessibilityIsReduceMotionEnabled(). 2. Call it when LayerHost is created, as windows do. Do the same on macOS. 3. Observe UIAccessibilityReduceMotionStatusDidChangeNotification and set the runtime value on the next frame. Running spatial motion then lands as the runtime already does for a toggle. 4. Document the manual setter for hosts that manage the setting themselves.

This needs no RuneView, so it can land before the iOS shell. The later iOS settings work can extend the same source for Dynamic Type and other settings.

Done when
  • With Reduce Motion on, an iOS simulator run replaces spatial springs with fades.
  • A toggle while the app runs applies within one frame.
  • A LayerHost on macOS starts with the macOS setting.
  • The LayerHost docs show the manual setter.
How to check

A unit test drives the notification path with a mocked source and checks the runtime value one frame later. The iOS simulator lane (R0244) launches with Reduce Motion on and off, and checks that no element travels more than 2 pt. scripts/motion-audit gets a reduced-motion LayerHost scenario.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 3 · priority P2 · size S
R0657Android: no shell exists, and M7 has no measured planP2Phase 3MT14
platform-android-spike · research
What happens

PLAN lists Android last in the platform order, as M7, with no further detail. The code has only cfg lines that skip Android when choosing dependencies. Nobody has measured which path fits:

  • winit's android-activity;
  • Rune's own GameActivity shell;
  • a view embedded in a Compose app.

The IME path (InputConnection), the accessibility adapter and frame pacing (Choreographer) are also open. Without numbers, any Android shell issue would be a guess at its size and design.

Where
Why it matters

Android is part of Rune's reach, and #110 asks for accessible apps there. A spike turns that into issues with sizes. The target for Android: "every emulator case passes on each push to dev. aarch64-linux-android checks pass on every merge. On the device, at least 99% one-period frames in the scroll scene and 0 presents while stopped, with numbers committed."

What would help

Build a spike, not a shell:

1. Run examples/hello on an emulator and on one device through GameActivity, with wgpu on Vulkan. 2. Pace frames from Choreographer. Drive them through the shared frame core from R0195, so the spike adds no new host loop. The LayerHost port belongs in that core. 3. Measure frame cadence and input-to-present latency in the scroll scene. 4. Prototype InputConnection against the platform-neutral protocol from R0113. 5. Check the AccessKit Android adapter with TalkBack on the kit gallery. 6. Write research/40 with the numbers, the options above, and a recommended shell. 7. File the follow-up children of R0731, each with a size estimate, so the shell can be planned early. The shell itself still waits until iOS ships, as PLAN orders.

Done when
  • hello runs on an emulator and on a device, with cadence and latency numbers recorded.
  • research/40 recommends a shell design, with its IME and accessibility approach.
  • aarch64-linux-android checks join the CI matrix.
  • The follow-up issues are filed with size estimates.
How to check

The note and its committed numbers, and the spike branch. The aarch64-linux-android check runs on every merge after this issue.

Depends on
Part of
  • Theme: T14
  • Tracked in R0731
  • Phase 3 · priority P2 · size M
R0658Desktop: a panic or native crash in a Rune app leaves no report anywhereP2Phase 3MT14
platform-crash-capture · feature
What happens

No code in crates/ installs a panic hook. catch_unwind appears only around local work: hot-reload calls and image decoding. Nothing catches a native crash, such as a segfault, an abort, or an unhandled exception in a system framework. AppDirs::logs() gives a folder, but Rune writes nothing to it on a crash.

So a crash in the field leaves the user with a window that vanished, and the developer with nothing to read. Each app must write its own panic hook and signal handlers, and most do not.

Where
Why it matters

An Electron app gets crash reporting from the framework, so an app that replaces it loses a tool its developers rely on. Crashes on a user's machine are the hardest bugs to find. The target is that "desktop app services match Electron on macOS, Windows and Linux": 100% Native, except where no OS API exists, with the reason in the registry.

What would help

Add opt-in crash capture to the rune-app crate.

  • Panics: a panic hook writes the message, the backtrace, the Rune revision, the OS and the GPU adapter to dirs.logs(). It then calls the hook that was there before.
  • Windows native crashes: SetUnhandledExceptionFilter writes a minidump with MiniDumpWriteDump, from a helper thread started at launch.
  • macOS and Linux native crashes: handlers for SIGSEGV, SIGBUS, SIGILL and SIGABRT write a short report with async-signal-safe calls only. An optional out-of-process handler can sit behind a feature.
  • Delivery: at the next launch, a hook gets each pending report once, for example to upload it.
  • Privacy: reports replace the user's home path and user name, and include no environment variables, unless the app opts in.

Never catch a panic and resume in the middle of a commit. A panic boundary that keeps the app running belongs to the failure-floor work, not here.

Done when
  • A panic, an abort and a segfault each leave a report on macOS, Windows and Linux.
  • The next launch delivers each report exactly once.
  • By default, no report contains the home path or the user name.
  • The signal handlers call only async-signal-safe functions.
  • The capability registry lists crash capture for each desktop.
How to check

Integration tests start a child process that panics, aborts or writes through a null pointer. They check that a report exists, that it has no home path or user name, and that the next launch delivers it once and then not again. The tests run on the macOS, Windows and Linux lanes.

Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P2 · size M
R0659Desktop: an app cannot ask to start at login on any OSP2Phase 3ST14
platform-launch-at-login · feature
What happens

Tray and menu-bar apps usually offer "Open at login". Rune has a tray on Windows and Linux, but no API to start an app at login on any desktop. Each app writes its own LaunchAgent plist, Run registry key or autostart file.

Hand-written entries often break inside a sandbox. An MSIX package needs a declared StartupTask, and a Flatpak needs the Background portal. On macOS 13 and later, Apple wants apps to use SMAppService, and the user approves the item in System Settings. A plist written by hand does not show that approval state.

Where
Why it matters

A clipboard manager, a chat client or a launcher that does not start at login feels broken to its users, who then have to add it by hand. The target is that "desktop app services match Electron on macOS, Windows and Linux": 100% Native, except cells where no OS or desktop API exists, with the reason in the registry, and "every generated table matches the registry".

What would help

Add LoginItem to the opt-in rune-app crate, with enable, disable, status and a headless fake.

  • macOS 13 and later: SMAppService.mainApp. status reports whether the user must still approve the item.
  • Windows: the per-user Run key for an unpackaged app, and the StartupTask extension for MSIX (from R0663).
  • Linux: an XDG autostart .desktop file on the host. Inside a Flatpak, org.freedesktop.portal.Background RequestBackground.

status reads the system state each time, so it shows a change the user made in system settings. Add a cell for each OS and package type to the registry from R0134.

Done when
  • enable, disable and status work on macOS, on Windows (packaged and unpackaged) and on Linux (host and Flatpak).
  • status shows a change the user made in system settings.
  • On macOS, status shows when the item waits for approval.
  • The capability registry lists each cell.
  • The fake lets tests toggle the item without touching the system.
How to check

GUI lane tests enable the item, read the system state back (the Run key, the autostart file, SMAppService status), then disable it and check that the entry is gone. The Flatpak and MSIX lanes repeat the check inside the package. Unit tests use the fake.

Depends on
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P2 · size S
R0660Linux: Tx::popup_menu answers None at once, so every app draws its own context menusP2Phase 3LT14
platform-linux-popup-menus · feature
What happens

popup_menu_supported() is false on Linux. A Tx::popup_menu request calls back with None straight away. The app must draw its own menu inside the window.

An in-window menu cannot extend past the window edge, so a context menu near the bottom of a small window is cut off or must flip awkwardly. It also does not follow the desktop's placement rules. macOS opens an NSMenu and Windows opens a TrackPopupMenuEx menu from the same API, so the same app works well on two desktops and not on the third.

Where
Why it matters

Right-click menus are in almost every desktop app. On Linux, Rune apps either show a clipped menu or carry two code paths. The targets: Linux works when "every cell passes on every declared desktop, or carries a documented protocol limit in the capability registry", and desktop services are "100% Native, except cells where no OS or desktop API exists".

What would help

Add a Rune-drawn pop-up menu backend for Linux.

  • Wayland: an xdg_popup child surface. Use a positioner with flip and slide constraints, and grab on the serial of the input that opened the menu.
  • X11: an override-redirect window at the pointer.

Both draw the same menu model with styling from the theme. Keyboard navigation, submenus, checks and key-equivalent labels match the macOS and Windows backends. Escape and a click outside close the menu. Then popup_menu_supported() returns true.

Build the menu surface on the shared host from R0194, so it draws through the same frame path as windows and overlays.

The xdg_popup grab needs the input serial that winit used. The options are to pass the serial through from Rune's input handling (recommended), or to use a layer surface on wlroots compositors. If a compositor refuses the grab, record that limit in the capability registry.

Done when
  • Tx::popup_menu opens on GNOME, KDE, sway and X11, extends past the window edge, and returns the picked id.
  • Keyboard navigation, submenus and Escape work, and a click outside dismisses the menu.
  • popup_menu_supported() returns true on Linux.
  • The headless pop-up fakes behave as before.
How to check

The Linux GUI lanes from R0071 open a menu near the window's bottom edge, drive it with synthetic input, and check the picked id and that the menu's surface lies partly outside the window. The existing headless menu-pick and menu-cancel tests keep passing.

Depends on
Part of
  • Theme: T14
  • Tracked in R0654
  • Phase 3 · priority P2 · size L
R0661Linux: App::titlebar keeps the system frame or Adwaita decorations, so apps cannot draw their own title barP2Phase 3MT14
platform-linux-titlebar · feature
What happens

App::titlebar lets an app draw its own title bar. On macOS, Rune keeps the traffic lights over the app's bar. On Windows, Rune removes the native caption and draws the three caption buttons. On Linux, the native frame stays and ChromeInsets is zero. An X11 app gets the window manager's frame, and a Wayland app gets winit's Adwaita client-side decorations.

So an app with a custom title bar shows two bars on Linux: the system's and its own. Borderless windows on Linux also need edge resize and move.

Where
Why it matters

Apps with a custom title bar, such as editors and chat clients, look broken on Linux with a doubled bar. The targets: Linux works when "every cell passes on every declared desktop, or carries a documented protocol limit in the capability registry", and desktop services are "100% Native, except cells where no OS or desktop API exists".

What would help
  • Wayland: request client-side decorations through xdg-decoration. Draw the caption buttons as on Windows. Start moves with xdg_toplevel.move from .window_drag() regions, and resizes with xdg_toplevel.resize from a 6 pt edge band.
  • X11: remove the frame with _MOTIF_WM_HINTS, and move and resize with _NET_WM_MOVERESIZE.
  • Both: share the edge-band code with the Windows frameless work in #130. Read the button layout and side from the GNOME and KDE settings portals. Cx::chrome_insets reports the button area. A double-click maximizes, and a right-click on a drag region opens the window menu.
  • Some compositors force server-side decorations. Report that through the capability registry, keep the system frame, and leave ChromeInsets at zero.
Done when
  • App::titlebar draws the app's title bar on GNOME, KDE, sway and X11, with no second bar.
  • Move, edge resize, double-click maximize and the window menu work.
  • Caption buttons follow the desktop's button layout and side.
  • A compositor that forces server-side decorations is reported in the registry.
How to check

The Linux GUI lanes from R0071 check hit testing on the bar, the edge band and the buttons, and check that move and resize requests reach the compositor. A screenshot on each desktop shows one title bar.

Depends on
Part of
  • Theme: T14
  • Tracked in R0654
  • Phase 3 · priority P2 · size M
R0662Packaging: Linux apps have no .desktop file, icon theme install or AppImage/Flatpak pathP2Phase 3MT14
platform-package-linux · feature
What happens

Rune sets the Wayland app_id and X11 WM_CLASS through set_app_id, so compositors can match a window to a .desktop entry. But nothing writes that entry. scripts/ has a macOS bundle and install path and nothing for Linux.

Without a .desktop file that matches the app id:

  • GNOME shows a generic icon in the dash and the switcher.
  • Portals cannot find the app id, so global shortcuts fail with "An app id is required" (#140).
  • No URL scheme or MIME type can be registered.
  • The app cannot ship as an AppImage or a Flatpak.
Where
Why it matters

Linux users install apps from a package and expect an icon, a menu entry and working links. Flatpak and AppImage are the common ways to ship to many distributions. The targets: apps "can be built, signed, packaged, installed, upgraded and removed on each desktop", with "all three artifacts build, install, upgrade and uninstall cleanly in CI on each push to dev"; and Linux works when "every cell passes on every declared desktop, or carries a documented protocol limit in the capability registry".

What would help

Add a Linux packaging command.

1. Write a .desktop file named after the app id, with MimeType and x-scheme-handler entries. 2. Install icons into the hicolor sizes, using #21's lookup at run time. 3. Build an AppImage. 4. Build a Flatpak manifest with the portal permissions the app declares: shortcuts, notifications, file chooser. 5. Register host (unsandboxed) apps with org.freedesktop.host.portal.Registry where the desktop needs it, so #140's case works.

Flatpak sandboxing blocks some X11 overlay paths. Report those through the capability registry.

Done when
  • CI builds an AppImage and a Flatpak of examples/hello.
  • The installed app shows its icon in GNOME and KDE, and its portals see the app id.
  • xdg-open myapp://x reaches the app.
  • Install, upgrade and uninstall leave an empty before-and-after system diff.
How to check

A Linux packaging lane, on the GNOME lane from R0071, builds both packages on each push to dev. It installs, launches, upgrades and uninstalls each one, checks the icon lookup and a portal call, opens a test link, and compares the system state before and after.

Depends on
Part of
  • Theme: T14
  • Tracked in R0652
  • Phase 3 · priority P2 · size M
R0663Packaging: Windows apps have no installer, AUMID, icon resource or URL-scheme registrationP2Phase 3MT14
platform-package-windows · feature
What happens

A Rune app on Windows ships as a bare .exe. It has:

  • no embedded icon resource, so Explorer and the taskbar show a generic icon;
  • no version resource;
  • no AUMID, which Windows needs for toast notifications and taskbar grouping;
  • no Start-menu entry;
  • no URL-scheme or file-type registration.

The tray builds its icon from RGBA pixels at run time, so even an app with a tray has no icon in the file. scripts/ has bundle and install scripts for macOS only.

Where
Why it matters

Users install Windows apps with an installer or from a package and expect an icon, a Start entry and an uninstall. Notifications (R0665) and deep links (R0664) both need the AUMID and the registration this adds. The target: apps "can be built, signed, packaged, installed, upgraded and removed on each desktop", with "all three artifacts build, install, upgrade and uninstall cleanly in CI on each push to dev. Every production push signs and verifies signatures, and fails without secrets."

What would help

Add a Windows packaging command.

1. Embed the icon and version resources in the .exe. 2. Write an AppxManifest.xml and build an MSIX. CI signs it with a test certificate; production builds sign with the real one. 3. Declare the AUMID, URL protocols and file types in the manifest. 4. Offer a per-user installer for apps that cannot use MSIX. It writes the Start-menu shortcut with the AUMID and the per-user registry keys, and its uninstaller removes them.

MSIX sandboxing can affect global shortcuts and low-level hooks. Run the overlay and hook tests inside the installed package, and record any limit in the capability registry.

Done when
  • CI builds and installs an MSIX of examples/hello on a Windows runner.
  • The installed app shows its icon in the taskbar and Start, and a myapp:// link launches it.
  • A toast posted from the installed app appears.
  • Overlay and pointer-hook tests pass inside the package.
  • Install, upgrade and uninstall leave an empty before-and-after system diff.
How to check

A Windows packaging lane, on the runner from R0063, builds and installs the package on each push to dev. It launches the app, opens a test link, runs the overlay tests, upgrades and uninstalls, and compares registry and file-system state before and after. Production pushes verify the signature and fail without the signing secrets.

Depends on
Part of
  • Theme: T14
  • Tracked in R0652
  • Phase 3 · priority P2 · size M
R0664Desktop: App::on_open_url and opened files never reach a Windows app, and nothing registers a URL scheme or file typeP1Phase 3MT14
platform-deep-links · feature
What happens

App::on_open_url runs only on macOS. There, Rune installs a get-URL Apple event handler before the event loop starts. It keeps the launch link until a window with the hook starts, so that link runs before the first frame.

On Windows and Linux the hook never runs. The OS starts a new process and passes the link as a launch argument. Rune does not parse the arguments, and it does not forward them to a running instance. Opened files have no hook on any OS. #157 asks for the macOS open-documents event, and #22 asks for Linux activation through org.freedesktop.Application.

Only macOS can register a scheme: scripts/mac-app --scheme writes CFBundleURLTypes. Nothing writes CFBundleDocumentTypes, Windows registry keys, an MSIX protocol entry, or a .desktop MimeType. So a Windows or Linux app that wants myapp:// links or file associations writes its own registration and argument parsing.

Where
Why it matters

Sign-in callbacks, share links and "Open with" all depend on this. A Windows user who clicks a myapp:// link today gets a second app window, and the link is lost. The target is that "desktop app services match Electron on macOS, Windows and Linux": 100% Native, except where no OS API exists. Registration must also install and uninstall cleanly: "all three artifacts build, install, upgrade and uninstall cleanly in CI on each push to dev".

What would help

1. Add App::on_open_files beside on_open_url, as a builder method. 2. On Windows, parse URLs and file paths from the launch arguments and deliver them before the first frame, as macOS does. Later links come through R0655. 3. On Linux, deliver through #22's backend. On macOS, deliver documents through #157's Apple event. All of them use the same two hooks. 4. Generate registration from the packaging manifest:

  • Windows: the MSIX manifest from R0663, or per-user HKCU\Software\Classes keys for an unpackaged install.
    • Linux: x-scheme-handler and MimeType entries in the .desktop file from R0662.
    • macOS: CFBundleURLTypes and CFBundleDocumentTypes.

5. Keep the rule in the docs that a hook must validate what it gets. Links and paths come from outside the app.

Done when
  • A myapp:// link reaches the running app's hook on Windows, X11 and Wayland.
  • Double-clicking a registered file type delivers it to on_open_files on all three desktops.
  • On Windows, the launch link arrives before the first frame.
  • Uninstalling removes the scheme and file-type registration.
  • The capability registry lists open-URL and open-files cells for each desktop.
How to check

GUI lane tests open the registered scheme with start myapp://x on Windows, xdg-open on Linux and open on macOS, and open a registered file the same way. The packaging lanes check that uninstall leaves no registration behind. Headless scripts deliver links and files to the hooks for unit tests.

Depends on
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P1 · size M
R0665Desktop: system notifications exist only on macOS, in rune-macP2Phase 3MT14
platform-notifications · feature
What happens

rune_mac::notify posts notifications through UNUserNotificationCenter, removes them by id, and reports clicks. Windows and Linux have nothing. The Windows tray sets only a message, an icon and a tooltip, with no balloon. The dbus feature already links zbus on Linux, but no org.freedesktop.Notifications client exists.

So a cross-platform Rune app cannot tell its user that a message arrived or a build finished, except on macOS.

Where
Why it matters

Chat, mail and build tools depend on notifications. Users miss events when an app cannot post them. The target is that "desktop app services match Electron on macOS, Windows and Linux": 100% Native, except cells where no OS or desktop API exists, with the reason in the registry.

What would help

Add a cross-platform Notifications module to the opt-in rune-app crate, with the same model as rune_mac::notify: an id, title, body, replace, remove, and click and action events.

  • macOS: call rune_mac::notify.
  • Windows: WinRT ToastNotificationManager with the app's AUMID from R0663.
  • Linux: org.freedesktop.Notifications over zbus, behind the dbus feature.
  • Tests: a headless fake that records each notification.

A click runs the app's handler in the running instance, through R0655 when the click launches a new process.

Windows shows toasts only for an app with an AUMID, and usually a Start-menu shortcut or an MSIX package. Document what an unpackaged app gets, and report it in the capability registry.

Done when
  • Post, replace, remove and click work on Windows (packaged with an AUMID), GNOME, KDE, and sway with mako.
  • A click on a notification runs the handler in the running instance.
  • The fake records notifications in tests.
  • The unpackaged Windows case is documented and listed in the registry.
How to check

The Linux lane runs a fake notification daemon on the session bus and checks the calls and a simulated click. The Windows lane installs a packaged test app, posts a toast, and checks that it appears in the notification history. Unit tests use the fake.

Depends on
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P2 · size M
R0666Desktop: apps cannot hear sleep, wake, lock or battery changes, or keep the system awakeP2Phase 3MT14
platform-power-session-events · feature
What happens

Long-lived desktop apps reconnect sockets after wake, pause work on battery, and keep the system awake during a long task. Rune exposes none of this. Inside the runtime, it reads Low Power Mode on macOS only to pace frames. Apps that need power and session events bring their own per-OS crates and threads.

Where
Why it matters

A chat app that does not reconnect after wake shows stale messages. A sync app that runs at full speed on battery drains the laptop. A long export that lets the machine sleep fails. Electron gives apps these events through powerMonitor and powerSaveBlocker. The target is that "desktop app services match Electron on macOS, Windows and Linux": 100% Native, except cells where no OS or desktop API exists, with the reason in the registry.

What would help

Add Power to the opt-in rune-app crate.

  • Events: will sleep, did wake, screen locked and unlocked, on battery and on AC, low-power mode. An App builder hook delivers them on the main thread, in a normal transaction.
  • Keep-awake: a guard type that holds the OS assertion while it lives and releases it on drop.
  • macOS: NSWorkspace notifications and IOPMAssertionCreateWithName.
  • Windows: WM_POWERBROADCAST, WTSRegisterSessionNotification and PowerCreateRequest.
  • Linux: logind PrepareForSleep, Lock and Inhibit, and UPower OnBattery, over the dbus feature.
  • Tests: a headless fake that drives each event.

logind needs the system bus, which containers often lack. Probe it at start, fail gracefully, and report the missing service in the capability registry from R0134.

Done when
  • Sleep and wake, lock and unlock, and battery changes reach the hook on macOS, Windows and Linux.
  • A keep-awake guard prevents idle sleep while held, and releases on drop.
  • Without a system bus, the Linux backend starts, reports the cell as unavailable, and does not panic.
  • The fake drives each event in tests.
  • The capability registry lists each event and the guard per desktop.
How to check

GUI lane tests inject session events where the OS allows it. On Linux they run logind and UPower fakes on a test bus. A test takes the guard and reads the OS assertion list (pmset -g assertions, powercfg /requests, logind ListInhibitors), then drops it and checks the list again.

Depends on
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P2 · size M
R0667Desktop: an app cannot read a window's frame or maximized state back, so it cannot restore its windowsP2Phase 3MT14
platform-window-state · feature
What happens

WindowHandle has set_position, place, resize, resize_instant and center, but no getter for the outer frame, the display, or the maximized and fullscreen state. So an app cannot save where its windows were and put them back at the next launch.

Only macOS has a helper: rune_mac::remember_frame sets an AppKit autosave name. It gives every window the same name, overlay panels included (R0136). Windows and Linux have nothing.

Saving a frame also stalls today. Each Prefs::set rewrites the whole file and calls sync_all on the calling thread, even when the value did not change. Saving on every drag step would stall frames. That durability work belongs to R0448; this issue depends on it.

Where
Why it matters

Users expect an app to reopen where they left it. An app that opens at a default size on every launch feels unfinished. The target is that "desktop app services match Electron on macOS, Windows and Linux": 100% Native, except cells where no OS or desktop API exists (Wayland window positioning is the given example), with the reason in the registry.

What would help

1. Add WindowHandle::frame(). It returns the outer rect, the display id, the scale, and the maximized and fullscreen state. 2. Add a WindowState helper to the opt-in rune-app crate. It saves through Prefs when a move or resize ends, debounced, and restores at launch. 3. Clamp the restored frame to the current displays, so a window saved on a monitor that is gone opens on screen. 4. On Wayland, restore size and maximized state only. The protocol does not let a client set its position. Record that limit in the registry. 5. Give each window its own key, so overlays and secondary windows do not share one entry.

Done when
  • A window reopens at its last frame and maximized state on macOS, Windows and X11.
  • On Wayland, a window reopens at its last size and maximized state, and the registry records the position limit.
  • A frame saved on a display that is gone restores fully on a current display.
  • A drag that saves state causes no Prefs write on the UI thread during the drag.
How to check

GUI lane tests on macOS, Windows and Linux move, resize and maximize a window, close the app, reopen it, and compare WindowHandle::frame() with the saved value. A unit test drives WindowState with fake frames and fake displays to check debounce and clamping.

Depends on
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P2 · size M
R0668Windows: file drops carry only paths, and drag_out starts nothingP2Phase 3MT14
platform-windows-drag-drop · feature
What happens

On Windows, file drops come from winit's HoveredFile and DroppedFile events, which carry only a path. winit drops the drag position, so Rune samples the system pointer each frame instead. Images and virtual files are refused, for example an image dragged from a browser or an attachment from Outlook.

drag_out is ignored on Windows. An element marked drag_out keeps its normal press and on_drag behaviour, so an app cannot drag a file, an image or text out to Explorer or another app.

macOS already does both. Its drop destination takes file promises and bare image data and writes them to a temporary folder. Its drag source runs a real NSDraggingSource session.

Where
Why it matters

Dragging files and images between apps is basic desktop behaviour. File managers, editors and chat apps need both directions. The targets: Windows apps "behave like native Windows 11 apps on every DPI, GPU and input device", and desktop services are "100% Native, except cells where no OS or desktop API exists".

What would help
  • Drops: register an IDropTarget on the window with RegisterDragDrop. Report the position on each DragOver. Accept CF_HDROP, PNG and DIB image data, and CFSTR_FILEDESCRIPTOR with CFSTR_FILECONTENTS virtual files. Write images and virtual files to a temporary folder, as macOS does, so on_drop_files still gets paths.
  • Drag out: implement drag_out with DoDragDrop and an IDataObject that carries file paths, PNG and text, on the shared DragItem and DragImage types. Report the result as DragOutcome.
  • OLE runs its own modal loop during a drag. Drive Rune's idle turns from a timer during that loop, as Windows pop-up menus already do, so frames and animations keep running.
Done when
  • on_drop_files gets a position on each move, and accepts images and virtual files.
  • drag_out drags files, images and text into Explorer and other apps, and reports DragOutcome.
  • Rune keeps drawing frames during a drag out.
  • The headless drop fakes still pass.
How to check

Windows GUI lane tests in R0063 drive IDropTarget with synthetic data objects (paths, PNG, virtual files) and check the delivered paths and positions. Another test runs DoDragDrop onto a test drop target and checks the data and the outcome. The existing drag-out and drop-files examples serve as manual checks on Windows 11.

Depends on
Part of
  • Theme: T14
  • Tracked in R0654
  • Phase 3 · priority P2 · size M
R0669Windows and Linux: the accent colour is always macOS's default blueP3Phase 3ST14
platform-accent-colour · feature
What happens

system_accent reads NSColor.controlAccentColor and keyboardFocusIndicatorColor on macOS and follows NSSystemColorsDidChangeNotification. Every other platform returns SystemAccent::DEFAULT, which is macOS's blue (#007AFF light, #0A84FF dark). So Cx::accent and Cx::focus_color ignore the accent a user picks in Windows 11 Settings, GNOME 47+ or KDE Plasma 6. A Rune app's switches, selections and focus rings stay blue beside native apps that follow the user's colour.

The Linux host already reads the settings portal on a worker thread for color-scheme and follows SettingChanged. It doesn't read accent-color, which is in the same namespace.

Where
Why it matters

A user who picks a green or pink accent sees it in every native control and in Electron apps that read it, but not in a Rune app, so the app looks foreign. The target is that desktop app services match Electron on macOS, Windows and Linux: 100% of cells Native, except cells where no OS or desktop API exists, with the reason in the registry, and every generated support table matching the registry.

What would help
  • Windows. Read UISettings.GetColorValue through the windows crate (add its UI_ViewManagement feature). Use AccentDark1 for the light appearance and AccentLight2 for dark, as WinUI's accent fills do. Follow UISettings.ColorValuesChanged, or reread on WM_SETTINGCHANGE with ImmersiveColorSet, and redraw every window as the macOS watcher does. A read of the DWM AccentColor registry value avoids WinRT, but it gives one colour and no change event. Prefer UISettings.
  • Linux. Extend portal_appearance to read accent-color beside color-scheme, and handle both keys in the one SettingChanged stream. The value is a (ddd) sRGB tuple, and values outside 0 to 1 mean unset. Build SystemAccent::new(c, c) from it. Without the dbus feature, or when the desktop answers unset, keep the default.
  • Keep SystemAccent::DEFAULT for headless runs and the web.
Done when
  • Cx::accent returns the system accent on Windows 11, GNOME 47+ and KDE Plasma 6.
  • Changing the accent while the app runs redraws every open window in the new colour, with no restart and no focus change.
  • An unset portal value, a missing portal or a build without dbus leaves SystemAccent::DEFAULT.
  • The accent cells for Windows and Linux in R0134 say Native and name their tests.
How to check
  • Unit tests for the (ddd) parser: in range, out of range, and the doubly wrapped variant that Read returns before ReadOne.
  • A unit test for the Windows light and dark variant choice.
  • Linux GUI lane: a test portal sets accent-color, then changes it, and the test reads Cx::accent back after each step.
  • Windows GUI lane: the test changes the accent, sends WM_SETTINGCHANGE, and reads the colour back.
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P3 · size S
R0670Desktop: an app cannot show a badge or progress on its Dock or taskbar iconP3Phase 3ST14
platform-badge-progress · feature
What happens

Chat, mail and agent apps show an unread count and the progress of a long task on their app icon. Electron has app.setBadgeCount, app.dock.setBadge and BrowserWindow.setProgressBar for this. Rune has none of it. There's no NSDockTile badge or progress view on macOS, no ITaskbarList3 progress or overlay icon on Windows, and no com.canonical.Unity.LauncherEntry signal on Linux. A search of crates/ for NSDockTile, ITaskbarList and LauncherEntry finds nothing at this commit.

Where
  • No code exists: rg 'NSDockTile|ITaskbarList|LauncherEntry' crates has no matches.
  • crates/rune/Cargo.toml:33-39: the dbus feature already brings zbus for Linux desktop services (theme, tray, global shortcuts).
  • crates/rune/src/tray/sni.rs:1: the tray already exports over D-Bus, so a LauncherEntry signal fits the same feature.
  • R0134: the registry that states which cells work.
Why it matters

Users glance at the Dock or taskbar to see whether new messages arrived or a build finished, without switching to the app. Without a badge, a Rune app has to post a notification for every change or show nothing. The target is that desktop app services match Electron on macOS, Windows and Linux: 100% of cells Native, except cells where no OS or desktop API exists (a Dock badge on GNOME without an extension is the named example), with the reason in the registry.

What would help

Add AppBadge to the opt-in rune-app services crate:

  • set_count(Option<u32>), set_label(Option<&str>) and set_progress(Progress), where Progress is None, Determinate(f32), Indeterminate, Paused or Error.
  • macOS: NSApp.dockTile.badgeLabel for the count. For progress, a dock tile content view that draws the icon and a bar, followed by display.
  • Windows: ITaskbarList3::SetProgressState and SetProgressValue on each top-level window, and SetOverlayIcon with a drawn count and its accessible description. Wait for the TaskbarButtonCreated message before the first call.
  • Linux: emit com.canonical.Unity.LauncherEntry.Update with count, count-visible, progress and progress-visible, keyed by the app's .desktop id. KDE Plasma and Dash to Dock read it.
  • A headless fake that records the last state, so scripts and tests can assert on it.

The registry marks GNOME Shell without a dock extension Unsupported, with that reason. It also states that the Windows count is an overlay icon, and which Progress states each OS can show (Linux has no paused or error state).

Done when
  • One set of calls shows a count and determinate and indeterminate progress on macOS, Windows 11 and KDE Plasma 6.
  • Clearing the count and the progress restores the plain icon on all three.
  • The headless fake records every call.
  • Every badge cell in R0134 is Native with a test, or Unsupported with a reason.
How to check
  • Headless tests drive the fake through every state.
  • macOS GUI lane: read dockTile.badgeLabel back after each call.
  • Linux GUI lane: capture the LauncherEntry signal with dbus-monitor and compare its properties.
  • Windows GUI lane: check that each call returns S_OK after TaskbarButtonCreated, and keep a screenshot of the taskbar button as the lane's artifact.
Depends on
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P3 · size S
R0671Clipboard: on Windows and Linux one write holds one format, and RTF is never read or writtenP3Phase 3MT14
platform-clipboard-parity · feature
What happens

Tx::copy_rich takes a ClipboardContent that can hold text, HTML, RTF, an image and files at once. On macOS one write puts every form on the pasteboard. On Windows and Linux, write_one_form writes a single form through arboard: the files, else the image, else HTML beside the text, else the text. A rich selection that holds an image is offered only as the image, so pasting it into a text field gets nothing. Electron's clipboard.write offers text, HTML, RTF and an image in one write.

RTF works only on macOS. On Windows and Linux, content doesn't read it and write_one_form drops what with_rtf added.

Secret copies already carry each OS's exclude-from-history hint on all three desktops: exclude_from_history on macOS and Linux and exclude_from_monitoring on Windows. This issue keeps that.

Where
Why it matters

Users copy from a Rune editor into Word, Mail, Slack or a terminal, and each target picks the richest form it reads. With one form, a paste into a plain-text field fails when the copy held an image, and apps that read only RTF lose the formatting. The target is that desktop app services match Electron on macOS, Windows and Linux: 100% of cells Native, except where no OS API exists, with the reason in the registry.

What would help
  • Windows: write every form inside one OpenClipboard, EmptyClipboard and CloseClipboard, with one SetClipboardData per form: CF_UNICODETEXT, HTML Format, Rich Text Format, PNG with CF_DIBV5, and CF_HDROP. windows-sys already has System_DataExchange.
  • X11 and Wayland: offer every MIME type in one selection: text/plain;charset=utf-8, text/html, text/rtf, image/png and text/uri-list. Each arboard setter replaces the whole offer. There are two options: add a multi-format setter to arboard upstream, or own a small writer (an X11 selection owner, and a Wayland data-control source). Recommended: propose the upstream setter first, since arboard already handles data-control and X11 ownership, and own the writer only if upstream declines.
  • Keep arboard for reads where it works, and add RTF reads on both platforms. Pass RTF through untouched; don't convert it to HTML off macOS.
  • iOS and Android are covered by their shell issues.
Done when
  • One copy_rich with text, HTML, RTF, PNG and files offers all five forms at once on macOS, Windows, X11 and Wayland.
  • A reader sees every written form from that one write.
  • RTF from another app reads into ClipboardContent::rtf on Windows and Linux.
  • Secret copies still carry their history hint on every desktop.
How to check

GUI-lane tests in R0063 and R0071, plus the macOS lane, drive the rich-clipboard example. Each test writes once, then lists and reads every format with the OS's own interface: EnumClipboardFormats on Windows, xclip -t TARGETS on X11 and wl-paste --list-types on Wayland.

Depends on
Part of
  • Theme: T14
  • Tracked in R0653
  • Phase 3 · priority P3 · size M
R0672Windows and Linux: the app menu returns Unsupported, so apps have no menu bar or Alt-key access to their commandsP3Phase 3MT14
platform-menu-bar-off-macos · feature
What happens

An app declares its menus once with App::menu_item and AppHandle::set_menu: named menus, items, checks and MenuItem::key_equivalent. On macOS this builds the menu bar. On Windows and Linux, set_menu returns MenuError::Unsupported outside headless runs, and startup items queue the same error in take_menu_errors. A cross-platform app therefore has no menu bar there and no Alt-key access to its commands. Its key equivalents don't fire unless it also registers each one as a shortcut. Headless scripts already dispatch the same items on every platform.

Where
Why it matters

Windows and Linux users expect a File, Edit and View bar, Alt to reach it, and Alt+F to open File. Keyboard-only and screen-reader users rely on it to find commands. Without it, every app draws its own bar or hides commands behind buttons. The target is that desktop app services match Electron on macOS, Windows and Linux: 100% of cells Native, except where no OS or desktop API exists, with the reason in the registry. Electron draws its menu bar on both.

What would help
  • Add an opt-in builder method, for example App::window_menu_bar(), that renders the same menu model as a drawn in-window bar on Windows and Linux. It sits in the custom title bar when the app has one, else at the top of the content.
  • Mnemonics come from & in titles. Alt alone focuses the bar, Alt+letter opens a menu, the arrow keys move, Enter runs and Escape closes. Each menu has the menu_bar, menu and menu_item roles in the accessibility tree.
  • Key equivalents dispatch through the existing shortcut path on every desktop from the one declaration, so they fire even when the bar is hidden.
  • Menus open with the pop-up menu path from R0660 on Linux and the Win32 pop-up menu on Windows.
  • Optional: export the model to KDE's global menu over com.canonical.dbusmenu, reusing the tray's interface, and hide the in-window bar when the export registers.
  • The bar follows the theme, not the OS look, as the rest of Rune does. The macOS menu bar is unchanged.
Done when
  • With the builder method, an app's menus appear and work in a window on Windows 11, GNOME and KDE.
  • Alt, Alt+letter, the arrows, Enter and Escape behave as in a native Windows menu bar.
  • One key_equivalent fires on macOS, Windows and Linux.
  • set_menu no longer returns Unsupported on Windows and Linux when the bar is on.
  • macOS menu bar tests pass unchanged.
How to check

Headless tests open, navigate and run items in the drawn bar and check its accessibility roles. The Windows and Linux GUI lanes send real Alt key events, because Alt handling differs between the OS and winit. A dbusmenu test reads the exported layout with dbus-send when the export is on.

Depends on
Part of
  • Theme: T14
  • Tracked in R0654
  • Phase 3 · priority P3 · size M
R0673Packaging: macOS bundling has no notarization, stapling or .dmg step, and no CI laneP3Phase 3MT14
platform-package-macos · feature
What happens

scripts/mac-app builds and installs a bundle for local relaunch loops. It writes an Info.plist with LSMinimumSystemVersion 13.0, an optional icon, one URL scheme and a microphone string. It signs ad hoc, or with the MAC_APP_SIGN identity, and falls back to ad hoc when that identity fails. It has no hardened runtime, no entitlements, no notarization or stapling, no .dmg, no document types and no LSUIElement for menu-bar apps. No CI job builds a bundle: the only workflows are site.yml and www.yml.

An app downloaded outside the Mac App Store must be notarized to open without a Gatekeeper warning. Rune features that need a signed bundle, such as notifications, can't be tested in CI.

Where
Why it matters

Users who download a Rune app see "cannot be opened because the developer cannot be verified" until it's notarized, and many stop there. Apps that handle document types or live in the menu bar have to hand-edit the plist. The target is that apps can be built, signed, packaged, installed, upgraded and removed on each desktop: all three artifacts build, install, upgrade and uninstall cleanly in CI on each push to dev, and every production push signs and verifies signatures, and fails without secrets.

What would help
  • Read bundle fields from a manifest ([package.metadata.rune.bundle] in the app's Cargo.toml): URL schemes, document types and UTImportedTypeDeclarations, LSUIElement, version, minimum OS and usage strings.
  • Sign with --options runtime and an entitlements file built from the manifest.
  • Build a .dmg with hdiutil create and sign it.
  • On each push to dev, build and ad-hoc-sign examples/hello as a .app and a .dmg, install it, upgrade it over the previous build, and uninstall it.
  • On production pushes, sign with a Developer ID, submit with notarytool --wait, staple the .app and .dmg, and run spctl --assess. A run without the secrets fails. Secrets are scoped to the production environment and never reach PR jobs.
  • Document where an updater such as Sparkle plugs in. Shipping one is out of scope.
Done when
  • CI builds an ad-hoc-signed .app and .dmg of examples/hello on each push to dev, then installs, upgrades and uninstalls it with an empty before-and-after diff of the installed files.
  • Every production push produces a notarized, stapled build that passes spctl --assess --type execute, or fails.
  • Info.plist declares the schemes and document types from the manifest.
  • The hardened runtime is on (codesign -dv shows flags=0x10000(runtime)).
How to check

A macOS packaging job beside R0061, with codesign --verify --strict, plutil -lint and a plist field check on each push, and spctl and stapler validate on production. The job is one leaf of R0652.

Depends on
Part of
  • Theme: T14
  • Tracked in R0652
  • Phase 3 · priority P3 · size M
R0674Web: file dialogs are refused and file drops are ignored, though the browser offers bothP3Phase 3MT14
platform-web-files · feature
What happens

On the web, each drawn frame calls refuse_file_dialog, so Tx::open_file, open_files and save_file always answer with an error. El::on_drop_files never fires, because its callback takes &[PathBuf] and a browser gives file contents, not paths. Browsers offer <input type=file> in every engine, the File System Access API (showSaveFilePicker) in Chromium, and DOM drag and drop events on the canvas. A cross-platform app loses file import and export on the web.

Where
Why it matters

Users on the web expect to attach a file with a button or by dropping it on the page, as in any web app. A Rune page that can't do either can't replace the web app it ports. The targets: the web build is a first-class target in every browser engine, desktop and mobile, with every hook given a stated web behaviour; and desktop app services match Electron, with every registry cell Native or Unsupported with a reason.

What would help
  • Add a FileHandle type that holds a name, a size, a MIME type and an async bytes(). Native returns it beside the path, so one handler works on both. Add on_drop_file_handles (or extend the drop callback) without breaking on_drop_files.
  • open_file and open_files: create a transient <input type=file> with accept from the dialog's filters and multiple as asked, and click it inside the user-activation window of the event that asked. Answer with an empty result when the input fires cancel.
  • save_file: use showSaveFilePicker where it exists, else download a Blob with the suggested name.
  • Folder dialogs: use webkitdirectory where it exists. The capability registry marks them Unsupported in engines without it.
  • Drops: handle dragenter, dragover, dragleave and drop on the canvas, run on_drop_hover and the drop handler with the position in points, and apply accepts_extensions to file names.
Done when
  • Open and save from a button handler work in Chromium, Firefox and WebKit.
  • Cancelling the picker answers the request once, with no result.
  • Dropping files on the canvas calls the drop handler with correct positions and runs drop hover.
  • The same handler code compiles and runs on native and web.
  • The capability registry states each dialog cell per engine.
How to check

Playwright cases in the web lane from R0062: page.waitForEvent('filechooser') for open, a download event for save, and a synthetic DataTransfer drop on the canvas, in all three engines.

Depends on
Part of
  • Theme: T14
  • Tracked in R0725
  • Phase 3 · priority P3 · size M
R0675Accessibility: Rune follows only one of the system's accessibility settings, Reduce Motion, and on the desktops reads it only on focusP1Phase 3XLT15
a11y-system-settings · tracking
What happens

Rune follows one of the system's accessibility settings, Reduce Motion, on macOS, Windows, Linux and the web. It ignores four others: system text size, increased contrast and forced colours, Reduce Transparency, and text spacing on the web. The generated web page also blocks pinch zoom with maximum-scale=1,user-scalable=no.

On the desktops, Rune reads settings only when a window or overlay opens and when it gains focus. A change made while the app is in front waits until the next focus change. Only the web listens for changes.

This tracker covers one reader and one Cx accessor per setting on each target, the live watcher, and the sweep that shows large text and narrow windows lose nothing. It needs several issues because each setting needs its own reader on each platform. The responses to these settings (scaled type, contrast variants, opaque materials) belong to the components that draw them. Settings go on Cx accessors and Runtime setters, never as new pub fields on Env, because apps build Env as a literal.

Where
Why it matters

The targets: Rune follows "text size, increased contrast or forced colours, reduce motion, reduce transparency, and on the web text spacing and pinch zoom (WCAG 1.4.4, 1.4.10, 1.4.12)", applies a change live, and "Every cell is green, or n/a with the platform reason". Reduced motion applies "<= 1 frame after the OS notification on macOS, Windows, GNOME, KDE, Flatpak (portal), web and iOS", "including motion already running". Layout shows no clipped text "at any tested width, text scale or locale".

Done when
  • A matrix of settings by target has every cell green, or n/a with the platform reason. The settings are text size, contrast and forced colours, Reduce Motion, Reduce Transparency, web text spacing and zoom. The targets are macOS, Windows, Linux and the web. iOS cells follow with the iOS work.
  • Every setting applies live within one frame of the OS notification, motion already running included.
  • The scene sweep in R0463 passes at 200% text and 320 pt wide.
How to check

Each child has its own tests. GUI lanes also read the real settings on each target, and the nightly scene sweep runs.

Issues
Part of
  • Theme: T15
  • Phase 3 · priority P1 · size XL
R0676Accessibility: screen readers cannot fully read or edit large, secure or web fields, and no reader has been run against a fieldP1Phase 3XLT15
text-a11y-fields-tracking · tracking
What happens

On the desktops, AccessKit already gets a field's value, lines, caret and selection, and a test covers this. The rest falls short:

  • Text over 64 KiB gets no per-character runs, so a reader can't move by character in a long note. Under that cap, every line's run copies the field's whole text to take its own slice, and the runs are rebuilt on every edit.
  • A secure field gets runs too. A masked field sends its mask, so its length reaches the runs, and a revealed field sends its plaintext.
  • A field can't point to its visible label, help text or error, and can't say it is required.
  • On the web, every field shares one hidden element named "Text input" or "Password input", placed at the page's corner.
  • No screen reader has been run against a field on any platform.

This tracks the desktop and web field rows of #111 and #109. The web field's name and rect are handled by Text and IME issues. The iOS field bridge is tracked under #110.

Where
Why it matters

The targets: "Screen readers can read, navigate and edit every Rune field on every platform as they do a native field. Secure fields expose nothing beyond what the platform's native secure field exposes". "100% of headless checks pass for every field kind and size up to 1 MB", including "reading every line of a 1 MB field on the web through the sliding window". Each field carries "its own name, purpose for autofill, required and invalid states with an error relation, and a language". "Texts up to 10 MB are navigable with at most 3 viewports of runs built."

Done when
  • Every child issue is closed.
  • Headless checks pass for every field kind and size up to 1 MB on macOS, Windows, Linux and the web.
  • Reader steps pass on each of those platforms, including reading every line of a 1 MB field.
  • Secure fields expose nothing beyond the recorded native baseline.
  • The field rows of #111 and #109 are marked met, with links to the tests.
How to check

Headless AccessKit checks in the merge gate, from R0689. Reader steps in the speech lanes, run post-merge.

Issues
Part of
  • Theme: T15
  • Phase 3 · priority P1 · size XL
R0677Accessibility: no test checks that the web mirror says what the desktop tree saysP1Phase 3MT15
a11y-cross-target-parity · infra
What happens

Rune builds two accessibility projections from the same nodes. The AccessKit tree, which macOS, Windows and Linux read, carries roles, names, values and states: toggled, selected, disabled, expanded, invalid, modal, live regions, numeric ranges and set positions. The web mirror walks the nodes again on its own. It emits 7 item kinds (group, horizontal scroller, link, image, button, heading, text), skips text fields entirely, and the bridge sets one state, aria-expanded. So a Kit checkbox that VoiceOver on macOS reads as "checkbox, checked" reaches a browser's reader as a plain button or plain text. No test compares the two.

#118 plans to render the AccessKit tree into the DOM. That removes the second walk, but the role and state mapping it adds can still drop a state, a relation or an action, and nothing would fail. The desktop lanes (R0238, R0240, R0237) need the same kind of mapping table, and none exists yet.

Where
Why it matters

A screen reader user on the web gets less than a user on desktop, and the difference is invisible to anyone changing the code. The target is one semantic tree on every target: "100% of scenes match on all 5 targets. The exceptions table holds only representation differences that lose no meaning." The web build is meant to be "a first-class target in every browser engine", and that includes what its readers hear.

What would help

A headless test in the Kit a11y suite, in the merge gate:

1. For each Kit a11y scene, build Runtime::accessibility_json and the mirror model from the same runtime and frame. 2. Map the AccessKit side through a published ARIA table: AccessKit role to ARIA role or native element, and each state, relation, language and action to its ARIA attribute or DOM behaviour. Keep the table as data beside crates/rune/src/a11y/roles.rs. 3. Compare role, name, value, states, relations, language and actions node by node. Report each difference with the node key. 4. An exceptions table may list only differences that lose no meaning, such as two ARIA spellings of one role, each with a reason. It may never list a lost state, relation or action. 5. Publish AX, UIA and AT-SPI tables in the same format. The platform lanes check their dumps against the same goldens through them.

The mirror today is a separate projection, so most scenes will differ until #118 lands. Two options: (a) land the comparer and tables now as a report, and make the test required when #118 lands; (b) land it only as #118's acceptance test. Recommend (a), because the report gives #118 a checklist of what the mirror misses.

Done when
  • Every Kit a11y scene is compared in the merge gate, and the test is a required check on dev.
  • 100% of scenes match outside the exceptions table.
  • The exceptions table holds no lost state, relation or action, and every entry has a reason.
  • Adding a state to an AccessKit node without a mirror mapping fails the test.
  • The AX, UIA and AT-SPI lanes read the same mapping tables.
How to check

cargo test -p rune-kit --features markdown --test a11y in the merge gate, plus a mutation test that sets a new state on one node and expects a failure. The platform lanes compare their dumps through the same tables after every merge to dev.

Depends on
Part of
  • Theme: T15
  • Phase 3 · priority P1 · size M
R0678Accessibility: no test hears what VoiceOver, NVDA, Narrator or Orca sayP1Phase 3LT15
a11y-lane-speech · infra
What happens

The two platform tests read what AccessKit exposes. accessibility_macos.rs asks AppKit for the content view's children and presses one button. accessibility_windows.rs reads UI Automation names, control types and values. Both run only with RUNE_GUI_TESTS=1 in a desktop session, and no workflow runs them: .github/workflows holds only site.yml and www.yml. Nothing records what a screen reader says.

An API dump shows what Rune exposes, not what a user hears. Each reader computes names, times live-region announcements and speaks focus changes in its own way. Voice Control and Voice Access need a control's name and its action to work together. A change that makes VoiceOver, NVDA, Narrator or Orca skip a form error reaches dev, and every app that pins it, with no failing check.

Where
Why it matters

The target: "Real assistive technology drives Rune on each platform in automated lanes", with "each critical scenario passed on each of the last 14 nights for every combination listed as supported, with infrastructure failures counted apart from product failures". "Every red product run opens an issue with its transcript", and "each human check is less than 6 months old". Status and error changes must be "announced without moving focus" (WCAG 4.1.3), and "real reading never stops at a mount boundary".

What would help

Nightly lanes on dev, after the API lanes they build on:

  • macOS: VoiceOver through guidepup's speech capture, and VoiceOver with Safari.
  • Windows: NVDA through guidepup, and NVDA with Chrome and with Firefox. For Narrator there are two options: (a) a virtual audio sink plus speech recognition, or (b) Narrator's developer-mode text output. Recommend (b) where the installed version has it, since recognition adds its own errors. Fall back to (a).
  • Linux: Orca with speech-dispatcher's dummy output module, which logs each utterance as text.

Each lane drives 4 scenarios on examples/accessible-form (added by R0464) and examples/kit-gallery: a form submitted with an error, a long list read past its mounted rows, a dialog opening and closing, and a status message. Assertions match stable fragments of name, role, state and announcement, not whole utterances. Pin reader and OS versions in the lane image.

Voice Control and Voice Access run scripted "click <name>" commands where the tool allows. Otherwise they are dated human checks in the R0141. Switch Control is a human check each release.

A product failure goes through R0249 with its transcript, so one regression files one report. An infrastructure failure is retried once and counted apart. No lane runs on pull_request events: the runners are self-hosted and this repo is public. The deeper scenarios (row 10,000, announcements, web field names) are in R0680.

Done when
  • VoiceOver, NVDA, Narrator and Orca on desktop, and VoiceOver with Safari, NVDA with Chrome and NVDA with Firefox, each pass the 4 scenarios.
  • A product failure files one report with its transcript through the broker. Infrastructure failures are counted separately.
  • Every voice and switch check is scripted, or recorded as a human check less than 6 months old.
  • No speech job triggers on pull_request.
  • Each lane publishes its nightly history, so the support matrix can tell when a combination has had 14 green nights.
How to check

The nightly lanes' history. A workflow lint fails if any speech job lists pull_request as a trigger. The WCAG matrix test reads the human-check dates and fails on a check older than 6 months.

Depends on
Part of
  • Theme: T15
  • Tracked in R0748
  • Phase 3 · priority P1 · size L
R0679Accessibility: text over 64 KiB has no text runs, every keystroke rebuilds a field's runs, and lines past 255 characters lose their word startsP1Phase 3LT15
a11y-long-text-runs · bug
What happens

A text field or selectable text gives AccessKit one TextRun node per laid-out line. Each run holds every character's byte length, position and width, plus the line's word starts. Three limits break this for long text.

1. Above 64 KiB, a11y_lines returns nothing. The node keeps its value but gets no runs and no text selection. A reader can't move by character, word or line, or read at the caret, in a long note, log or transcript. A reader's SetTextSelection request on such a field also fails, because the action looks up the same lines. 2. Below the cap, every tree update that touches the field rebuilds every run. Each run calls a11y_drawn_text, which clones the whole display text, and then slices out one line. A 64 KiB field of 1,000 lines copies about 64 MB per update. Run ids come from the line index, so inserting a line renumbers every run after it. 3. AccessKit indexes word starts by u8. Rune stops recording word starts once a line reaches 256 characters, so a long line, and any single-line field over 255 characters, keeps only its first word starts.

The field also reshapes as a whole on each keystroke: 12 ms at 50 KB and 46 ms at 200 KB (R0185). Per-paragraph runs need per-paragraph layout under them.

Where
Why it matters

Targets: "Texts up to 10 MB are navigable with at most 3 viewports of runs built. No word-start loss on long lines." "A keystroke in a 200 KB field sends at most the edited paragraph's runs plus 3 nodes." "With a reader active: <= 0.3 ms extra per keystroke at 200 KB, and VoiceOver, Narrator and Orca move by character up to 1 MB." Typing must stay at or below 2 ms p95 at 50 KB and 4 ms at 1 MB "with AccessKit on", and a reader must reach "every line of a long transcript".

What would help

Build on the composite layout's paragraphs:

  • Key run nodes by paragraph id and run index, so an edit renames nothing outside its paragraph and positions survive remounts.
  • Split each visual line into runs of at most 255 characters. Cut only at cluster boundaries, so emoji and combining marks are never split and every word start fits a u8.
  • Compute the drawn text once per node and slice it per run.
  • Build runs for the paragraphs in view, one viewport of overscan each side, and the caret's paragraph. When navigation or SetTextSelection reaches past the last built run, build the next paragraph's runs in the same update. Keep at most 3 viewports of runs.
  • Cache runs per paragraph by paragraph version, and resend only changed paragraphs.

The proposals differ on the cap: raise it to 1 MB, or build runs on demand and test to 10 MB. Recommend on-demand windows tested to 10 MB, since the window bounds memory at any size. Keep a byte cap only as a guard far above 10 MB.

Platform adapters may assume one run per line, so the AX and UIA lanes check range queries across split runs.

Done when
  • A 200 KB field and a 200 KB selectable text expose runs at the caret and in view. A 10 MB text never holds more than 3 viewports of runs.
  • Moving by character, word and line from offset 0 to the end and back crosses every run boundary without losing position.
  • A 600-character line exposes every word start, and no grapheme cluster is split.
  • A keystroke in a 200 KB field sends at most the edited paragraph's runs plus 3 nodes, and costs at most 0.3 ms extra with a client attached.
  • The drawn text is copied at most once per node per update.
How to check

Unit and count tests beside crates/rune/src/a11y/text.rs in the merge gate, and the cost scenes from R0256 with a 200 KB field. R0238 and R0240 add range-query steps across split runs. The reader steps in R0689 read a 1 MB field.

Depends on
Part of
  • Theme: T15
  • Tracked in R0676
  • Phase 3 · priority P1 · size L
R0680Accessibility: no lane proves that a real reader's own cursor crosses a virtual list's mount boundary, or that announcements and a web field's name are heardP1Phase 3MT15
a11y-speech-certification · infra
What happens

An index-built virtual list mounts the rows in view plus 2 viewports of overscan each side. The tree reports the list's set size and each row's index, but rows past the mounted window are not in the tree. R0460 adds a semantic buffer and answers ScrollIntoView. It proves reach with a headless walk that calls ScrollIntoView itself, plus 200 rows on two readers.

A real reader's own next-item command decides for itself when to scroll, and each adapter maps it differently. So the headless walk doesn't show that VoiceOver, NVDA, Narrator or Orca gets from row 1 to row 10,000 and back.

Two more features count only once a reader is heard. R0454 sends a message without moving focus. R0377 gives the web's focused hidden field the field's own name instead of "Text input" or "Password input". Neither has a check that a reader speaks the result.

Where
Why it matters

Users who read a long chat, log or file list with a screen reader stop at the edge of the mounted rows when this fails, and no headless test will notice. The targets: "Row 10,000 and the last line are reached and the walk returns to row 1, with set size and index correct at every step. Real reading never stops at a mount boundary." Status changes: "5 of 5 targets speak each case as specified, and focus does not move." Web fields: "The web's focused element carries the field's own name". Each critical scenario must have "passed on each of the last 14 nights".

What would help

Add 3 scenarios to each lane in R0678: VoiceOver, NVDA, Narrator and Orca on desktop, and VoiceOver with Safari, NVDA with Chrome and NVDA with Firefox. iOS runs the same scenarios in R0735.

1. Long list. A 10,000-row virtual_rows list, once with focusable rows and once with plain text rows. Drive the reader's own next-item command from row 1 to row 10,000, then its previous-item command back to row 1. Don't call ScrollIntoView from the test. At each mount boundary and at sampled steps, assert the spoken index and set size, and that the list mounted the next range. 2. Announcement. The app sends a polite and an assertive message. Assert each is heard once and focus stays where it was. 3. Web field name. In each browser pair, Tab into a named field, a required field and a secure field. Assert the field's own name and state are spoken, not "Text input".

Raise the reader's speech rate to keep the 20,000-step walk inside the nightly window. Keep the full walk nightly; don't sample rows away.

Done when
  • Each reader reaches row 10,000 and returns to row 1, with correct set size and position at every asserted step, for focusable and plain rows.
  • Announcements are heard on every reader, and focus does not move.
  • Each browser pair speaks the web field's own name and state.
  • Each scenario passed on each of the last 14 nights.
How to check

The nightly speech lanes' history. The support matrix lists a reader only while its scenarios meet the 14-night rule. Until this passes, the virtual-list reach work counts as built but not proven.

Depends on
Part of
  • Theme: T15
  • Tracked in R0748
  • Phase 3 · priority P1 · size M
R0681Text: Rune ignores the system text size on Windows, Linux and in the browserP1Phase 3LT15
a11y-text-scale · feature
What happens

Rune has no notion of a system text size. Env holds only the dark-mode flag and the display scale. preferences.rs reads Reduce Motion, dark mode and Full Keyboard Access. The shaper takes each TextStyle's size as given. Windows "Text size" (100% to 225%) and GNOME's text-scaling-factor make text larger in native apps but not in Rune. In a browser, a larger default font size or Firefox's text-only zoom changes nothing on the canvas. A low-vision user has to magnify the whole screen instead.

Scaling Kit's Type tokens alone would not be enough. Kit builds 12 styles with TextStyle::new outside its theme file (in list.rs, notes.rs and text_input.rs), and plain Rune text uses whatever style the app passes.

Where
Why it matters

The target: "Rune follows the system's accessibility settings on every target and applies a change live: text size" (WCAG 1.4.4, 1.4.10), with "0 lint findings, with no allowlist, by the end of phase 3: no clipped, overlapping or unreachable content". Layout must show "no clipped or overflowing text at any tested width, text scale or locale". For the audit: "0 Rune or Kit cells are 'fails' or 'partial' by the end of phase 3 for desktop and web".

What would help
  • Add Cx::text_scale() -> f32, and Runtime::set_text_scale in runtime/system_settings.rs for headless runs and tests.
  • Add a reader per host, delivered through R0459:
    • Windows: UISettings.TextScaleFactor and its change event.
    • Linux: GNOME's text-scaling-factor through the settings portal or GSettings, and KDE's font DPI.
    • Web: a probe element's computed root font size against 16 px, re-read on resize.
    • macOS: no system text size for third-party apps, so mark it n/a with that reason, and offer an app hook for Cmd+ and Cmd-.
  • Apply the scale where text is shaped and measured: the font size and line height of every TextStyle. Then Kit tokens, Kit's direct styles and plain text all follow. Hairlines, radii and icons keep their size. An element can opt out for fixed-size text such as a canvas label.
  • Clamp to 0.8 to 3.1. Memo, layout and shaping caches include the scale, so a change lays out every window again in the next frame.
  • An app pins the scale with a builder method, not a new pub field on AppSpec, Env or TextStyle. Parity and golden tests run pinned at 1.0.
  • Add a changelog fragment: apps that pin dev lay out differently on machines with a scaled text size, and the pin builder is the way back.
Done when
  • A fake source at 1.5 and 2.0 scales Kit token text, Kit's direct TextStyle text and plain text, and lays out again in the next frame.
  • Each native reader has a unit test with a fixture value. The Windows and Linux lanes change the real setting and see it applied with no focus change.
  • Playwright with a larger default font size, and with Firefox text-only zoom, scales the canvas text.
  • A scale change invalidates memoized views.
  • R0463 runs at 1.5x and 2.0x with 0 findings outside its allowlist.
  • A changelog fragment describes the new default and the pin builder.
How to check

Unit tests in the merge gate. The web lane with the browser's font settings changed, and the Windows and Linux lanes with the system setting changed. The scene sweep's 1.5x and 2.0x runs keep it proven.

Depends on
Part of
  • Theme: T15
  • Tracked in R0675
  • Phase 3 · priority P1 · size L
R0682Render: nothing checks text contrast against the pixels drawn behind itP2Phase 3LT15
a11y-composited-contrast · infra
What happens

Contrast checks between token colours (R0474) miss text drawn over glass, blur, images, gradients and translucent layers, where the backdrop is not a token. PLAN.md promises that "text contrast is checked against the actual composited pixels behind each glyph (after blur and glass), in every theme", through a "per-scene accessibility pass". No such pass exists. The CPU reference renderer can't produce those backdrops either: it refuses any layer with blur.

So faint text on a frosted bar or a glass card ships if its tokens pass on a flat surface, and no one sees the failure until a user can't read it.

Where
Why it matters

Low-vision users read text by its contrast against what is actually behind it. The target: "Kit's default themes meet contrast minimums against the surfaces each element is actually drawn on, including composited glass and blur (WCAG 1.4.3, 1.4.11)", with "0 failing meaningful pairs in the default themes, with only decorative pairs exempt. 0 composited failures, with no allowlist, by the end of phase 3."

What would help

A contrast pass over each gallery scene in light and dark:

1. Render the scene twice from the same commit: as drawn, and with text hidden (glyph draws skipped, everything else unchanged). The renderer needs a text-hidden mode for this. 2. For each text node, sample the text-hidden frame inside its glyph boxes. Composite the text colour with its layer opacity. Take the worst ratio, ignoring the lightest and darkest 1% of samples as noise. 3. Fail below 4.5:1, or 3:1 for large text (24 pt and up, or 18.66 pt and up at weight 700 or more). Report the node key, its source location and the ratio. 4. Add the ratio to each text node in --tree when the pass ran.

Which renderer to sample has two options. (a) The GPU renderer, on the deterministic lane from R0253, which draws blur and glass as shipped. (b) Add layer blur to rune-ref, so the CPU reference covers these scenes. Recommend (a): the target is the drawn pixels, and a ratio is stable under the small per-adapter differences that keep GPU output from being byte-identical. Add (b) later as a cross-check.

Native materials drawn by the OS are not in the snapshot. Cover them with the Reduce Transparency fallback and a dated human check.

Done when
  • The pass runs on every gallery scene in light and dark, and on examples/frosted-bar, examples/glass-card and examples/glass-panel.
  • The default themes have 0 failures, with no allowlist.
  • A seeded scene with faint text over a blurred image fails, naming its key and source line.
  • --tree reports the per-node ratio.
How to check

The pass runs in the deterministic rendering lane on every merge to dev, and its seeded failing scene keeps the pass itself honest.

Depends on
Part of
  • Theme: T15
  • Phase 3 · priority P2 · size L
R0683Accessibility: Rune ignores Increase Contrast, Windows contrast themes and forced coloursP2Phase 3LT15
a11y-contrast-mode · feature
What happens

Rune reads no contrast setting. With macOS Increase Contrast, a Windows contrast theme, GNOME High Contrast or a browser in forced-colors mode, native controls draw stronger edges or the user's own colours. Rune's controls draw as before. The web build asks one media query, prefers-reduced-motion. It never asks prefers-contrast or forced-colors. In forced-colors mode the browser recolours the DOM but not a canvas, so a Rune page keeps its own palette while the rest of the screen changes. Kit's only contrast control is a per-badge high_contrast flag that an app sets by hand.

Low-vision users who depend on these modes get Kit's low-contrast borders and faint text unchanged.

Where
Why it matters

The target: "Rune follows the system's accessibility settings on every target and applies a change live: text size, increased contrast or forced colours". Every cell must be "green, or n/a with the platform reason". For rendering: "Under Increase Contrast, materials draw their high-contrast fill and kit borders reach at least 3:1 contrast", and "a setting change redraws within 1 frame and 100 ms of the OS notification on 5 of 5 platforms". Kit's themes must have "0 failing meaningful pairs".

What would help

Add readers, delivered live through R0459:

  • macOS: NSWorkspace.accessibilityDisplayShouldIncreaseContrast, next to the existing Reduce Motion read. Forced colours: n/a.
  • Windows: SystemParametersInfoW(SPI_GETHIGHCONTRAST) for a contrast theme, and GetSysColor for its colours.
  • Linux: the settings portal's contrast key, else GNOME's org.gnome.desktop.a11y.interface high-contrast.
  • Web: matchMedia('(prefers-contrast: more)') and matchMedia('(forced-colors: active)'). Read the system colours (Canvas, CanvasText, LinkText, ButtonFace, ButtonText, Highlight, HighlightText, GrayText) from a probe's computed style.

Expose Cx::increased_contrast() -> bool and Cx::forced_colors() -> Option<SystemColors>, with Runtime setters for tests. Don't add pub fields to Env.

Under forced colours, the runtime maps text, edges and focus rings to the system colours and turns off glass, gradients and shadows. Then an app or theme that doesn't opt in still draws only system colours. Kit's contrast variant (strong borders, opaque surfaces, a 2 pt focus ring) responds to increased_contrast and lands on top of R0474. Document how a theme outside Kit reads the flags.

Done when
  • Each reader has a unit test with a fixture value.
  • In each GUI lane, switching the setting on redraws within 1 frame, with no focus change.
  • A snapshot under forced colours contains only the system colours.
  • Kit's contrast variant passes the token contrast test at 7:1 for text and 4.5:1 for edges.
  • The docs say how a theme reads both flags.
How to check

Unit and token tests in the merge gate. The macOS, Windows, Linux and web lanes switch the real setting on and compare against a snapshot.

Depends on
Part of
  • Theme: T15
  • Tracked in R0675
  • Phase 3 · priority P2 · size L
R0684Render: backdrop blurs, materials and effect glass don't respond to Reduce Transparency or Increase ContrastP2Phase 3MT12
render-reduce-transparency · feature
What happens

macOS, iOS, Windows, GNOME and the web each have a setting for less transparency and one for more contrast. Rune's renderer has no way to act on either. Reading the settings is R0469 and R0683; this issue is what the renderer does once they arrive.

Today, under Reduce Transparency:

  • El::backdrop_blur still blurs. It already has a fill-only path for blurs it can't run, but nothing asks for it.
  • System materials draw their fallback fill (or a neutral tint) off macOS. That fill is translucent.
  • rune-fx frost and rune-light glass keep drawing translucent. EffectSite tells a compositor the slot, format and blend mode, but no display setting.

Under Increase Contrast, materials draw no high-contrast fill. SwiftUI materials turn opaque under Reduce Transparency.

Where
Why it matters

People with low vision or vestibular and attention conditions turn these settings on so text over glass stays readable. The effects target says: "Under Reduce Transparency, 0 backdrop-blur passes run and every material, rune-fx frost and rune-light glass draws its opaque fallback. Under Increase Contrast, materials draw their high-contrast fill", and "A setting change redraws within 1 frame and 100 ms of the OS notification on 5 of 5 platforms." The contrast target asks for "0 composited failures" against the surfaces each element is drawn on, glass and blur included. Skipping blur passes also saves their GPU cost.

What would help
  • Take the two flags from the readers and keep them in the renderer's own state, set per frame.
  • Under reduced transparency: skip the backdrop copy and pyramid and draw each backdrop blur's fill as its opaque fallback. Draw fallback materials opaque.
  • Pass both flags to compositors through EffectSite, beside the reduced-motion flag from R0433, by a builder or accessor so no literal breaks. rune-fx frost and rune-light glass draw their opaque fallback when set.
  • Under increased contrast: materials draw a high-contrast fill. Give each material one.
  • A setting change redraws within one frame of the notification.
  • Add a test override for each flag, and a changelog fragment for the new EffectSite data.
Done when
  • With reduced transparency set, a frame with 4 backdrop blurs runs 0 blur passes, by counter.
  • Materials, rune-fx frost and rune-light glass draw opaque under the flag, by golden.
  • Under increased contrast, materials draw their high-contrast fill, by golden.
  • A flag change redraws within 1 frame of the notification.
How to check

Headless tests with the overrides check the pass count and the goldens in every lane. The notification timing runs in each platform lane with the readers.

Depends on
Part of
  • Theme: T12
  • Tracked in R0685
  • Phase 3 · priority P2 · size M
R0685Effects: rune-fx and rune-light have no goldens, keep their own blur, clocks and shapes, and ignore display settingsP2Phase 3XLT12
renderer-effects · tracking
What happens

rune-fx (8 effect families) and rune-light (5 passes) each run as a renderer beside core, and they have drifted from it:

  • No golden or differential test covers their shader passes in CI.
  • There are three blur pyramids: core backdrop blur, rune-fx's own BlurPyramid, and rune-light's glass. They differ in calibration and edge handling.
  • Effect shapes take one circular radius, so glows and outlines miss per-corner and continuous corners.
  • Effect time is f32. After one day of uptime, an f32 second count steps in 7.8 ms increments, almost one 120 Hz frame, so noise and glow animations step visibly.
  • FxLayer has a reduced_motion flag, but EffectSite carries no reduced-motion flag, so the compositor can't pass the setting on. The showreel and rune-light keep animating under Reduce Motion.
  • Backdrop blurs, materials and effect glass don't respond to Reduce Transparency or Increase Contrast.
  • rune-light's lit text needs text in its own target, which the layer contract forbids. A tile with more than 256 primitives drops some, and which ones depends on GPU thread order.

The work takes several issues, because each item touches a different crate area. The goldens must land first, so the later fixes can be proven.

Where
Why it matters

Effects are the most visible part of a showcase app. A glass panel that ignores Reduce Transparency, or a glow that keeps moving under Reduce Motion, fails users who set those for comfort or legibility. The target: rune-fx and rune-light draw within 2/255 of their goldens on every native and WebGPU target. Each of the 8 rune-fx families and 5 rune-light passes has a golden in both blend modes, and 20 of 20 runs are byte-identical. Effect outlines follow their element's radii within 0.5 px. Effect-clock increment error is <= 0.1 ms at 30 days. Under Reduce Transparency, 0 backdrop-blur passes run. Under Increase Contrast, materials draw their high-contrast fill. Under Reduce Motion, every animated effect draws its calm pose and requests no frames. A setting change redraws within 1 frame of the OS notification.

Done when
  • All children are closed.
  • rune-fx and rune-light pass 26 goldens within 2/255 in both blend modes on every native and WebGPU target.
  • Every canonical effect scene, rune-light dense scenes included, is byte-identical over 20 runs on every lane.
  • Within one frame of the OS change, Reduce Transparency runs 0 backdrop-blur passes and draws materials and effect glass opaque, Increase Contrast draws the high-contrast fill, and Reduce Motion freezes every effect on a still frame with 0 frame requests.
  • Effect-clock increment error is at most 0.1 ms at 30 days of uptime.
How to check

The goldens from R0422 and the determinism runs in the GPU lanes. Settings-response tests run on each platform lane.

Issues
Depends on
Part of
  • Theme: T12
  • Phase 3 · priority P2 · size XL
R0686Web: an app page without WebGPU or WebGL2 shows only an error, with no content and no accessibility treeP2Phase 3MT15
a11y-web-no-gpu · bug
What happens

On the web, Rune asks for a WebGPU adapter, then, with the webgl feature, a WebGL2 one. If neither works, it logs the error, puts the message on screen and ends the app. A document page (App::web_document) keeps its static HTML export, so a reader still has its text. An app page has no static content, so the user sees only the error: no text, no form and no accessibility tree.

#116 makes this case more common. With navigator.gpu present but no adapter, WebGPU claims the canvas before it asks for an adapter, and the WebGL2 attempt then fails. The error box is also styled with setAttribute('style'), which a page with a strict style-src CSP refuses.

The GPU isn't needed to keep the app usable. Runtime::new runs without one in every headless test, and the static export already turns a headless runtime's scene into styled HTML.

Where
Why it matters

A user on a blocklisted GPU, a locked-down machine or headless Chromium gets an empty page, and so does their screen reader. The audit target: "0 Rune or Kit cells are 'fails' or 'partial' by the end of phase 3 for desktop and web", and "axe-core reports 0 violations in Chromium, WebKit and Firefox with an empty allowlist". The support matrix must state what a reader below the range gets, and "every enumerated claim matches the code". The web is meant to be "a first-class target in every browser engine".

What would help

When no adapter is found in app mode:

1. Keep the Runtime running without a renderer. Commits, handlers, timers and the mirror keep updating, and nothing draws. 2. Hide the canvas and show the semantic mirror visibly, styled from the static export's CSS instead of transparent text. Once #118 renders the AccessKit tree into the DOM, fields, toggles and lists show too. Before #118 the mirror has no fields, so the fallback lands after it. 3. Mirror buttons, links and fields stay live. A click or an input runs its handler through the existing accessibility action path, and the mirror updates after each commit. 4. Show a one-line notice that the page runs without graphics acceleration. Style it through CSSOM properties, so a strict CSP allows it.

Fix #116's ordering first, so the fallback runs only when no backend works.

Done when
  • With navigator.gpu removed and WebGL disabled, a Playwright test finds the page's headings, text, fields and buttons.
  • Activating a button runs its handler, and the changed state shows.
  • axe-core reports 0 violations on the fallback in Chromium, WebKit and Firefox.
  • The fallback and its notice render under a style-src CSP without 'unsafe-inline'.
How to check

A no-GPU case in R0239, run on every merge to dev, with WebGPU and WebGL removed from the page before load.

Depends on
Part of
  • Theme: T15
  • Phase 3 · priority P2 · size M
R0687Accessibility: no page lists the OS versions, browsers and screen readers Rune supportsP2Phase 3ST15
a11y-support-matrix · docs
What happens

#109, #110 and #111 ask for a published statement of what Rune supports. The README's Accessibility section names the readers each platform API serves: Narrator, NVDA, JAWS and Voice Access on Windows, VoiceOver and Voice Control on macOS, and Orca on Linux. It gives no OS versions, no browsers and no reader versions, and doesn't say which of them were tested. The site's Web card says accessibility and a WebGL fallback are "still to come", although the crate ships a DOM mirror and a webgl feature.

A user can't tell whether their setup works. An app team can't tell what to promise its own users.

Where
Why it matters

The target: "the README, site and PLAN describe current coverage and an enumerated support matrix", where "every support row names a lane that passed within 14 days" and "every enumerated claim matches the code". A combination counts as supported only when "each critical scenario passed on each of the last 14 nights".

What would help
  • Publish a support page on the site, backed by a data file next to the R0141 JSON. Each row gives the OS and version, the browser and version on the web, the reader and version, the lane that covers it, and the date it last passed.
  • A row enters only after 14 green nights in R0678, or in the API lane for combinations no speech lane covers.
  • Extend the matrix test: it fails when a row names a lane that doesn't exist or hasn't passed within 14 days.
  • State what a setup below the range gets. On the web, a browser without WebGPU or WebGL2 gets the visible fallback from R0686. On desktop, an older reader gets the same AccessKit tree with no promise. Test the web fallback.
  • Fix the README's reader list and the site's Web card to match the page. Link both to it.
Done when
  • The page lists exact OS, browser and reader version combinations.
  • Every row names a lane that passed within the last 14 days, and the matrix test enforces it.
  • The stated web fallback has a passing test.
  • The README and the site's Web card match the page.
How to check

The WCAG matrix test in the merge gate reads the support data and the lanes' last-pass dates. A stale row turns it red, so the page can't drift from the lanes.

Depends on
Part of
  • Theme: T15
  • Phase 3 · priority P2 · size S
R0688Web: a reader's text-spacing stylesheet changes nothing on the canvasP2Phase 3MT15
a11y-web-text-spacing · feature
What happens

WCAG 1.4.12 expects content to keep working when a user sets line height to 1.5 times the font size, paragraph spacing to 2 times, letter spacing to 0.12 em and word spacing to 0.16 em, all at once. Users apply these with a user stylesheet or a bookmarklet. A canvas takes no CSS, so on a Rune page the stylesheet changes only the hidden mirror and no drawn pixel. #109 reports that a text-spacing stylesheet changes nothing on screen.

Rune's TextStyle has line height and letter spacing. It has no word spacing (the shaper uses word spacing only to widen tabs in monospace text) and no paragraph spacing. Nothing passes a user's spacing into the runtime.

Where
Why it matters

Users with dyslexia or low vision set wider spacing to read at all, and on a Rune page it has no effect. The target: Rune applies "on the web text spacing and pinch zoom (WCAG 1.4.4, 1.4.10, 1.4.12)" live, with "0 lint findings, with no allowlist, by the end of phase 3: no clipped, overlapping or unreachable content". For the audit: "0 Rune or Kit cells are 'fails' or 'partial' by the end of phase 3 for desktop and web".

What would help

1. Reproduce at this commit with the standard text-spacing bookmarklet on examples/web-hello and the gallery, and record that only the mirror changes. 2. Put a probe element inside the mirror, with no inline spacing. Read its computed line-height, letter-spacing, word-spacing and margin-bottom, relative to its font size. Re-read only on a MutationObserver over the document's styles and on resize, never per frame, since a computed-style read can force a style recalculation. 3. Send the values as one message. The runtime holds them as text-spacing overrides in runtime/system_settings.rs and exposes them on Cx. Don't add pub fields to TextStyle or Env: apps build those as literals. 4. The shaper applies letter and word spacing to all text as minimums. Layout applies the line-height minimum, and paragraph spacing after each hard paragraph break and between Kit's Markdown blocks. Shaping and layout caches key on the overrides. 5. Offer the same overrides as an app setting on native targets, which have no system equivalent.

This builds on the scale plumbing from R0681.

Done when
  • With the bookmarklet applied, canvas text uses all four spacings within one frame.
  • R0463 passes for the gallery with all four overrides on, with 0 findings outside its allowlist.
  • A Playwright snapshot shows no lost or overlapping content or control.
  • A test counts probe reads and finds them only after a style mutation or a resize.
How to check

The web lane applies the four overrides and snapshots the gallery. The scene sweep runs with the overrides on in the merge gate, so a regression in spacing handling fails before it ships.

Depends on
Part of
  • Theme: T15
  • Tracked in R0675
  • Phase 3 · priority P2 · size M
R0689Accessibility: no test checks the accessibility update after each field event, and no screen reader is run against a fieldP2Phase 3MT15
text-a11y-field-checks · infra
What happens

a11y/tests.rs checks a text field once, in one state. It checks the field's role, one run with its character lengths and positions, the selection, and that an assistive SetTextSelection moves the caret. A second test checks that a secure field's JSON holds no plaintext. No test drives a field event (typing, an IME commit, a caret move, a paste, an undo) and checks the accessibility update that follows: value, text selection, runs, name, placeholder, multi-line, read-only and secure state together.

So a change that updates the value but not the selection, or leaves stale runs after a paste, passes every test. --tree leaves runs out, so a script can't see them either. No lane runs a screen reader against a field.

Where
Why it matters

The target: "Screen readers can read, navigate and edit every Rune field on every platform as they do a native field", with "100% of headless checks pass for every field kind and size up to 1 MB" and "100% of reader steps pass on each platform, including reading every line of a 1 MB field on the web through the sliding window". Secure fields "expose nothing beyond the recorded native baseline". IME, dictation and voice editing must "use each platform's native text protocol", and speech checks must pass "on each of the last 14 nights".

What would help

Headless checks, in a new crates/rune/src/a11y/field_tests.rs, so tests.rs stays under 1,000 lines:

  • For each field kind (plain, rich, secure masked, secure revealed, and a 1 MB plain field), drive each event through Runtime::key, Runtime::ime, Runtime::paste and undo. Commit a frame, take the update from a11y_update, and check value, selection, runs, name, placeholder, multi-line, read-only and secure state against the field's own state.
  • After every event, check that a secure field has no runs and no length (once R0139 lands).
  • Add a mutation check: a build that skips the selection update in a11y/text.rs must fail a test.
  • Add a --tree option that includes runs.

Reader steps, at least 8 per platform: type a word, move by character, by word and by line, select a word, delete it, read the line, and read the last line of the 1 MB field. The source proposal put every step on every push. Recommend two layers instead. API-level steps (AX text attributes, UIA TextPattern, AT-SPI Text, the browser tree) run in the per-merge lanes. Spoken steps run in the nightly R0678 lanes, which never run on pull requests.

Done when
  • Headless checks cover each event for each field kind, and run in the merge gate in under 20 s.
  • The mutation check fails as expected.
  • Each desktop and web API lane runs at least 8 field steps on every merge to dev, and all pass.
  • Each speech lane runs at least 8 spoken field steps nightly, and they passed on each of the last 14 nights.
  • No step finds a secure field's text or length.
How to check

cargo test -p rune runs the field checks in the merge gate. The API lanes and the nightly speech lanes run the reader steps, and their history shows the 14-night record.

Depends on
Part of
  • Theme: T15
  • Tracked in R0676
  • Phase 3 · priority P2 · size M
R0690Kit: components bypass theme tokens, hard-code English, collide on fixed keys and drift from their reference lookP1Phase 3XLT16
api-kit-consistency · tracking
What happens

rune-kit says components never name raw colours, sizes or fonts outside the Kit fields. Several still do, and other parts of the kit share the same gap between the promise and the code:

  • The Dialog title uses a 15 pt TextStyle literal, not a Type token.
  • Visible and accessible strings are English literals with no override: "Close", "Copy", "Clear" and "Search".
  • SplitView and Sidebar resolve their own parts by fixed keys ("shell", "sidebar-list"), so two shells in one window match each other's nodes.
  • Select decides which option is checked by comparing labels.
  • Theme crates build Palette, Type, Radius, Motion and Kit as literals, so a new token breaks every theme.
  • Kit::from_palette builds a whole neutral Kit on each call, and the README builds the kit in the view.
  • The only look check, scripts/kit-diff.py, needs an OpenCode checkout and a GPU or lavapipe, so no lane runs it.

Each item is its own change, in its own part of the kit, with its own check. This issue tracks them, with upstream #87 (forced hover fills are lighter than real hover) and #88 (the Dialog description does not wrap).

Where
Why it matters

A theme author who changes a radius or a font sees some components ignore it. An app that ships in another language shows English to screen reader users. The target: "Kit components read only theme tokens, can be translated, show and report every state, match their reference look and stay green", with 0 token-lint findings outside a reviewed allowlist, 0 user-facing strings without an override, a ..base theme that still compiles after a new Palette or Type token, and at most 0.5% of pixels over 8/255 from each committed reference still. Identity must also be checked, not a string convention: "0 kit pickers that identify options by label" and every component that resolves its own parts passes a two-instances-per-window test.

What would help

Land the children in this order: the token lint and string inventory first, as they turn heuristic counts into lists; then shell keys and Select option ids; then schema compatibility and from_palette cost; then the parity lane, which needs the manifest. Only confirmed defects become bugs. Lint counts stay inventories.

Done when
  • Every child issue, #87 and #88 are closed.
  • The token lint reports 0 findings outside a reasoned allowlist in T1.
  • The string inventory has 0 strings without an override.
  • Two SplitViews in one window work on their own, and equal Select labels show one checked option.
  • A fixture that adds a Palette or Type token keeps a ..base theme compiling.
  • The parity lane passes for every manifest component.
How to check

The children's checks run in T1: the token lint, the string inventory test, the two-shell test, the Select id test, the schema fixture and the parity lane.

Issues
Depends on
Part of
  • Theme: T16
  • Phase 3 · priority P1 · size XL
R0691Kit: no list says which standard controls the kit covers, and a slider, stepper, sheet and tabs are missingP1Phase 3XLT16
api-kit-coverage · tracking
What happens

No file says which standard desktop controls rune-kit covers. App authors find the gaps when they need a control. Apps then write their own: this repo has four hand-written sliders (#149). PLAN §7 lists capsule and pill, chips, a search field, menus and a command palette, a sheet and a HUD. The kit exports none of Slider, Stepper, Tabs, Sheet, Chip, Avatar, DatePicker, ColorPicker or CommandPalette. (PaletteSeed and PaletteFocus in palette.rs are theme seeds, not a command palette.) The kit README says the context-menu, tabs and avatar stories have no gallery scene. TreeModel can insert and clear but not remove one node. Core also lacks hooks that open issues ask for: programmatic focus (#173), focus change (#106), a window-close veto (#174) and a caret and selection handler (#129).

The outcome is a manifest where every standard control resolves to a kit component, a documented equivalent or an open issue, and each implemented entry has a scene, goldens and a keyboard test. That is many separate components, so this issue tracks them.

Where
Why it matters

An app author who ports a SwiftUI screen expects the standard controls to exist and to behave the same way everywhere. Each hand-written control has its own keyboard, accessibility and motion gaps. The target is that "Kit and core cover the standard desktop controls and hooks, with defined behaviour": 100% of manifest entries resolved for Button, Toggle, Slider, Stepper, Picker, TextField, SecureField, TextEditor, DatePicker, ColorPicker, ProgressView, Menu, ContextMenu, Popover, Sheet, Alert, TabView, List, Table, OutlineGroup, DisclosureGroup, NavigationSplitView, Toolbar, Label, Link, search field, chips, avatar and command palette, plus core hooks for programmatic focus, focus change, autofocus, field selection change and a window-close veto.

What would help

Land R0476 first, so each entry names its implementation, its equivalent or its issue, and a test fails on a missing entry. Then add the missing scenes and components. Components that open overlays (Sheet, the pickers, the command palette) wait for R0479 and R0480. The core hooks stay manifest rows that point at their own issues.

Done when
  • The manifest test passes with 0 unresolved entries.
  • Slider (#149), Tabs, Sheet, Stepper, Chips, CommandPalette, Avatar, DatePicker and ColorPicker exist, each with a scene, a golden per listed state and a keyboard test.
  • Every existing kit component has a gallery scene.
  • #149, #173, #106, #174 and #129 are closed.
How to check

The manifest test, the gallery scene tests and each component's golden and keyboard tests run in T1.

Issues
Depends on
Part of
  • Theme: T16
  • Phase 3 · priority P1 · size XL
R0692Kit: streaming Markdown, code, diff and Mermaid cost grows with the reply, and pure-data components rebuild on every commitP1Phase 3XLT16
text-kit-content-tracking · tracking
What happens

A streaming reply in rune_kit::Markdown costs work in proportion to the whole reply, not to the new text:

  • A streaming document never takes the El cache, so every block's El tree is rebuilt on each token.
  • The incremental parse reuses earlier blocks, but falls back to a full parse when the source holds ]: anywhere. On its best path it still copies the whole source into a new Rc<str> key each commit.
  • Highlighting an open code fence rescans its whole coloured prefix on each new line.
  • Setting on_link, on_task or images, or writing the word mermaid in prose, also turns the cache off.
  • Mermaid scenes are a 16-entry FIFO with no byte bound. Kit's byte Budget keeps whatever the last two commits used, even past its limit.
  • H5 and H6 report level 4.
  • Opening a 50 KB document shapes 404 texts in 18.3 ms (9.2 ms in HarfRust), and 200 KB takes about 70 ms. Only 32 of 614 texts are on screen.
  • Pure-data components such as code blocks, Badge and Note rebuild unless the app wraps them in memo.

The outcome is a reply that costs work in proportion to the new text, gated by count budgets. That needs changes to the parser, the renderer, three caches, the highlighter and the diff view, so this issue tracks them. #196 (DiffView panics on hostile hunks) lands first.

Where
Why it matters

Chat and agent apps stream long replies. A reply that gets slower as it grows drops frames late in a long answer. The target: "Per commit, at most the new bytes plus the open block's last line plus 1 KB of parse and highlight work. 0 rebuilds of completed blocks unless a new reference definition, theme, find state or handler change invalidates them", and "every cache bounded in entries and bytes, recent entries included". In the feed scene, "a plain-text token appended to a 50 KB Markdown reply with on_link, images and three code fences builds only the last two blocks and parses at most 2 KB". A 50 KB open should take at most 6 ms and 200 KB at most 8 ms.

What would help

Land the children in this order: heading levels and HTML (small), the streaming parse with reference invalidation, completed-block reuse, cache gates, Mermaid and highlight caches, the diff fence cap and split, then virtualization and the end-to-end elision budget that holds the result.

Done when
  • Every child issue and #196 are closed.
  • A streamed token into a 200 KB reply with code, diff and Mermaid blocks costs at most the new bytes, plus the open block's last line, plus 1 KB, and the output matches a full parse and render at every commit.
  • Every kit content cache has a hard bound in entries and bytes, recent entries included, shown by a stress test.
  • The feed-scene count budget gates in T1.
How to check

Count budgets for parse bytes, highlight bytes and blocks built per commit, plus the kit Markdown tests, run in T1.

Issues
Part of
  • Theme: T16
  • Phase 3 · priority P1 · size XL
R0693Kit: no command paletteP2Phase 3MT16
api-kit-command-palette · feature
What happens

rune-kit has no command palette. Desktop apps need a searchable list of commands that a shortcut opens. Today an app builds one from a Dialog, a text field and a PopupList or Combobox. It writes the focus return, the shortcut column and the disabled rows itself. (PaletteSeed in crates/rune-kit/src/palette.rs is a theme seed, not a command palette.)

The pieces an app would combine also cost too much at command-palette scale. Combobox filters with a fuzzy score over every option on each build and builds every row it shows. Both Combobox and PopupList take a layer: &mut Vec<El>, so the palette can't sit inside a helper without the caller forwarding a layer.

Where
Why it matters

People who use desktop tools expect to press a shortcut, type part of a command and press Enter. An app with hundreds or thousands of commands must stay inside a 120 Hz frame on each keystroke. The target is that "Kit and core cover the standard desktop controls and hooks, with defined behaviour", with the command palette one of the listed entries.

What would help

Add CommandPalette: a modal search field over a virtual_rows list of commands.

  • Commands have an id, a label, an optional group, an optional Keybind and a disabled flag.
  • The app chooses the shortcut that opens it. Up and Down move and skip disabled commands. Enter runs the active command and closes. Escape closes. Focus returns to where it was.
  • Filtering reuses the Combobox fuzzy score, runs once per query change and is not repeated in each handler.
  • It builds on the portal from R0479, the shared policy from R0480 and the virtualized list from R0487, so it takes no layer argument.
  • The search field's accessible name and placeholder can be overridden, so the palette has no fixed English strings.
Done when
  • With 10,000 commands, a typed character mounts at most 40 rows and filters once.
  • A keyboard test covers open, Up and Down, skipping disabled commands, Enter runs and closes, Escape closes, and focus returns to the opener.
  • Groups and shortcuts draw from Kit tokens.
  • A kit-gallery scene and an accessibility golden exist.
  • The manifest's command palette entry points at it.
How to check

A count test (rows mounted and filter runs per keystroke at 10,000 commands), the keyboard test and the golden run in T1 with the kit tests.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 3 · priority P2 · size M
R0694Kit: the visual parity check needs an OpenCode checkout, so no lane checks that components match their referenceP2Phase 3MT16
api-kit-parity-lane · infra
What happens

The kit README says components match @opencode/ui, and PLAN says each component is diffed against its web story. The only tool that checks this is scripts/kit-diff.py. It needs an OpenCode checkout with bun install and a Storybook build, Playwright's Chromium from that checkout, and a GPU or lavapipe for Rune. No lane has these, so nothing runs it. It reports two scores per story and has no pass or fail line. Its "off" score counts pixels that differ by more than 24/255.

Core kit components have no pixel goldens either. A change to a radius, a padding or a token mapping shows up only when someone looks.

Where
Why it matters

People who port a screen from the web app expect it to look the same. Theme authors need to know when a kit change moves pixels. The target is that every manifest component, "in each listed state and both appearances at 2x with bundled fonts and the deterministic rasterizer, has at most 0.5% of pixels differing by more than 8/255 from its committed reference still", and that the kit has "0 failing rune-kit tests on any dev commit".

What would help

1. Commit reference stills for each component in R0476, for each listed state and both appearances, at 2x. Record the web source rev beside them. Stills change only in a reviewed commit that names that rev. 2. Add a lane that renders the kit-gallery scenes headless with the bundled fonts from R0157 and the deterministic path. Compare per component: fail when more than 0.5% of pixels differ by more than 8/255 in any channel. 3. Never bless stills automatically.

The README lists known text differences with Chromium. Two options:

  • (a) The stills are the web renders. Then text-heavy components may need a documented mask or a per-entry reason.
  • (b) The stills are Rune renders that a reviewer checked against the web renders with kit-diff.py.

Recommended: (a) where it passes, with (b) as a listed exception per component, so the lane still catches regressions.

Done when
  • Every manifest component has reference stills for each appearance and listed state.
  • The lane runs with no outside checkout and no GPU.
  • A deliberate 1 pt radius change on Button fails the lane.
  • Every exception has a reason in the manifest.
How to check

The parity lane runs on every merge on the canonical deterministic lane, beside the kit tests.

Depends on
Part of
  • Theme: T16
  • Tracked in R0690
  • Phase 3 · priority P2 · size M
R0695Kit: no Sheet or drawer that slides in from a window edgeP2Phase 3MT16
api-kit-sheet · feature
What happens

rune-kit has one modal surface, the centred Dialog. SwiftUI has .sheet, and PLAN §7 lists a sheet. An app that wants a panel that slides in from the bottom or a side edge builds it by hand. It writes the scrim, focus trap, focus return, Escape handling, resize tracking and the entry motion itself.

Dialog already traps focus and restores the opener, through .modal(true, ..) and modal_click_outside. Its builder returns nothing and pushes into a layer: &mut Vec<El> that the caller must pass to rune_kit::root. A sheet built today the same way would carry that cost too.

Where
Why it matters

Inspectors, settings drawers and share sheets are common in desktop and iOS apps. Hand-written versions miss the focus trap or the reduced-motion path. The target is that "Kit and core cover the standard desktop controls and hooks, with defined behaviour", and Sheet is one of the listed entries.

What would help

Add Sheet:

  • An edge: bottom, leading or trailing. Leading and trailing follow the layout direction once that exists.
  • Modal by default, with a scrim and a focus trap that returns focus to the opener. A non-modal form leaves the rest of the window interactive and doesn't trap Tab.
  • Escape and scrim clicks follow the shared Dismiss options from R0480.
  • It mounts through the portal from R0479, so build(self, &Kit) -> El with no layer argument.
  • It stays on its edge when the window resizes.
  • It enters and exits with a k.motion spring, and fades instead when reduced motion is on.
  • The close button's accessible name can be overridden, so the sheet adds no fixed English string.
Done when
  • A modal sheet traps Tab and returns focus on close. A non-modal sheet does not trap Tab.
  • Escape and scrim clicks follow the Dismiss policy.
  • A window resize keeps the sheet on its edge.
  • Reduced motion gives a fade.
  • A motion-audit scenario for open and close passes.
  • A kit-gallery scene and an accessibility golden exist, and the manifest's Sheet entry points at it.
How to check

Kit tests for focus, dismiss and resize, plus scripts/motion-audit with the new scenario, run in T1.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 3 · priority P2 · size M
R0696Kit: components with physical insets, chevrons and arrow keys won't mirror in a right-to-left layoutP2Phase 3MT16
layout-rtl-kit · feature
What happens

Once layout has a direction, plain kit rows and columns will mirror with no change. Components that place parts by physical edge, or give a key a physical meaning, will not:

  • SegmentedControl places its indicator with .absolute(seg * sel, 0.0), a left offset.
  • The shell places the sidebar toggle with .absolute(x, ..) from the left, and pins its unread dot the same way.
  • Chevrons, back arrows and disclosure triangles point one fixed way.
  • Left and Right move a fixed way in tab strips, segmented controls and menus.

Kit code also uses .pl, .pr, .ml, .mr, .pin and .absolute in other places. Some of those mean "start" and "end". Some are truly physical.

Where
Why it matters

People who read Arabic, Hebrew or Persian expect the whole window to mirror. A segmented indicator on the wrong cell, or a back chevron that points forward, makes the app feel broken. Keyboard users expect Right to move toward the end of the line in their reading order. The targets: "Apps lay out right to left: rows, logical edges, scroll, sticky, anchors, directional icons and arrow-key navigation follow the direction", with "100% of matched elements within 0.5 pt, with 0 unmatched nodes, except declared physical elements" and "all icon goldens and keyboard tests pass". Every control must also work "from the keyboard alone, in the platform's way".

What would help

1. Audit rune-kit with the search above, after R0550 adds logical edges. 2. Switch to logical edges where the meaning is start or end: the segmented indicator, the shell's sidebar, toggle and panes, field adornments and close buttons. 3. Mark directional icons (chevrons, back and forward arrows, disclosure triangles) so they mirror, and add RTL icon goldens. 4. Make Left and Right follow the direction in tab strips, segmented controls, sliders and menus. Submenus open toward the end edge. 5. Document what stays physical, such as media transport controls, code blocks and number fields, and declare those elements to the mirror gate.

Done when
  • Every kit-gallery scene passes the mirror gate from R0551, apart from declared physical elements.
  • RTL icon goldens cover every directional icon.
  • Keyboard tests show Left and Right follow the direction in tab strips, segmented controls, sliders and menus.
  • The list of elements that stay physical is in the kit README.
How to check

The mirror gate over kit-gallery, the icon goldens and the keyboard tests run in T1.

Depends on
Part of
  • Theme: T16
  • Phase 3 · priority P2 · size M
R0697Markdown: opening a long document shapes every block before the first frameP2Phase 3LT16
perf-markdown-virtualize · perf
What happens

rune_kit::Markdown lays out and shapes every block when a document opens, including blocks far below the viewport.

  • The md-open benchmark (50 KB) shapes 404 texts in 18.3 ms: 9.2 ms in HarfRust, 1.15 ms in ICU and bidi, 0.82 ms in Fontique and 0.81 ms in Swash. A later run measured 17.5 to 18.6 ms.
  • A 200 KB document takes about 70 ms.
  • Only 32 of the 614 texts in md-open are on screen.

The engine plan says virtualizing top-level blocks avoids about 90% of that shaping, without touching the shaper. It estimates a 50 KB open at about 4.5 to 6 ms, a 200 KB open at about 6 ms, and 200 KB md-resize going from 23.2 ms to under 2 ms. It rates the risk medium, because offscreen heights are estimates until a block is broken, and because selection and find must work across unshaped blocks.

Where
Why it matters

Opening a long reply, a README or a changelog stalls the frame by two to eight refreshes at 120 Hz. People see the window stall before content appears. The targets: "Zero Rune-caused tasks over 8.3 ms after the first frame", and typing that "stays inside one frame in large documents", with p95 at most 1 ms at 50 KB and 2 ms at 200 KB.

What would help

1. Build on R0484, so each top-level block is its own unit with a stable key. 2. Give each block an estimated height from its byte length, line count and kind (code, table, heading). Shape and break a block when it enters the viewport plus a margin of about one screen, and replace the estimate in place. 3. Keep the scroll anchor on the first visible block while estimates turn into exact heights, so content on screen does not jump. 4. Keep selection, copy, find and links working across blocks that have not been shaped yet. Copy and find read from the source text. Revealing a find match shapes its block first. 5. Fix virtualized caret and scroll_into_view as item 10 describes.

Done when
  • A 50 KB md-open takes at most 6 ms and 200 KB at most 8 ms headless, from paired, alternating --profile perf runs compared by median.
  • The first viewport is pixel-identical to the unvirtualized render.
  • No frame is over 8.3 ms while scrolling the 200 KB document top to bottom.
  • The scroll extent converges to the exact height, and selection, copy, find and links work across unshaped blocks.
  • A count budget limits bytes shaped at open to the viewport plus the margin.
How to check

The count budget on bytes shaped at open and the kit Markdown tests run in T1. The md-open benchmark runs with --profile perf. The number leaves out GPU upload and presentation.

Depends on
Part of
  • Theme: T16
  • Tracked in R0692
  • Phase 3 · priority P2 · size L
R0698Text: the runtime shapes and rasterizes synchronously in commit and paint, so a first mount shapes for 27-38 ms in one frameP2Phase 3LT08
text-shaping-off-main · perf
What happens

The runtime shapes text inside Taffy's measure callback, on the main thread, during commit. Paint looks up each glyph in the atlas and rasterizes a miss on the spot. TextSystem caches its layouts as Rc, so it is not Send, and none of this work can move to another thread. measure() keeps a text system per thread, but the runtime doesn't use them. PLAN draws a background pool for big-paragraph shaping; it does not exist.

The cost lands in frames that mount new content. research/33 measured four real apps:

  • a task board's first frame: 27 to 38 ms of shaping text seen for the first time; opening a diagram card took 136 ms;
  • a team chat's first paint: 9 ms rasterizing glyphs;
  • an agent client's first frame: 12 to 15 ms of text for 102 texts.
Where
Why it matters

Opening a card, a conversation or a settings page is when people watch most closely, and a 30 ms frame there is a visible hitch. Targets: "At most 4 ms of text work on main in any first-mount frame", and "Zero Rune-caused tasks over 8.3 ms after the first frame on the reference Mac, Windows and Linux machines".

What would help

Measure first, then build.

1. After R0697 and R0185 land, measure first-mount text work again on the same workloads with RUNE_FRAME_LOG. If no frame spends over 4 ms, record the numbers and close. 2. Rasterize misses on a pool. A mask depends only on its outline and its key. Collect a frame's misses after layout, rasterize them on a scoped pool where each worker has its own scale context, and place them into the atlas on main in key order, so placement stays deterministic. 3. Pre-shape new texts on the pool. After flatten, collect the text nodes whose shape key misses. Shape them from Send inputs, one layout context per worker, over the shared R0358, into Arc layouts. Insert them before Taffy measures. Stay serial below a byte threshold, where the pool costs more than it saves.

Results must be bit-identical to the serial path. The pool stays off on wasm, which runs without threads, and in canonical deterministic runs.

Done when
  • The board and chat first mounts spend at most 4 ms of text work on main in any frame, time waiting on workers included.
  • Opening the board's card has no Rune-caused task over 8.3 ms on the reference Mac.
  • The first frame that shows the content comes no later than on the serial path (frame-count test).
  • Masks and layouts from the pool are bit-identical to the serial path (test).
  • The pool is off on wasm and in deterministic runs, and the wasm first mount is recorded beside the native one.
How to check

Count budgets in cargo test for glyphs rasterized and texts shaped on main in a first-mount frame. A differential test compares pool and serial output. First-mount numbers from scripts/real-frames.py go in research/33.

Depends on
Part of
  • Theme: T08
  • Tracked in R0560
  • Phase 3 · priority P2 · size L
R0699Kit: no Avatar, though @opencode/ui has an avatar storyP3Phase 3ST16
api-kit-avatar · feature
What happens

rune-kit has no Avatar. The kit README lists the @opencode/ui avatar story among the stories with no gallery scene, and there is no component to put in one. Apps that show a person or an account draw an image, clip it to a circle and handle a failed load themselves. They also choose their own sizes and their own accessible name.

Core has what an avatar needs. El::image draws pixels, radius clips, and ControlSize gives the kit's named sizes, measured as AppKit's.

Where
Why it matters

Chat, collaboration and account screens show avatars on many rows. Without a kit component, each app gets the fallback, the size and the accessible name wrong in its own way. A screen reader user hears a nameless image, or the same name twice when the avatar sits beside a name label. The target is that "Kit and core cover the standard desktop controls and hooks, with defined behaviour", and avatar is one of the listed entries.

What would help

Add Avatar:

  • Avatar::new(name).image(pixels) draws the image in a circle, or a rounded square with .shape(..).
  • The size comes from ControlSize, with the points for each size given in the doc comment.
  • While the image loads, or if it fails, it shows initials from the name on a fill from a Kit token. The initials come from the first letters of the first and last words, and work for names that are a single word or use non-Latin scripts.
  • With a name it has the image role and the name as its label. .decorative() hides it from accessibility, for when a visible name sits beside it.
  • All colours, radii and fonts come from Kit tokens.

Add a kit-gallery scene with the same id as the web story, and a manifest entry.

Done when
  • A failed or missing image shows initials.
  • Each ControlSize gives its documented size.
  • The accessibility golden shows a labelled avatar and a hidden decorative one.
  • A kit-gallery scene matches the avatar story id, and the manifest's avatar entry points at it.
How to check

Kit tests for the fallback and the sizes, and the accessibility golden, run in T1.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 3 · priority P3 · size S
R0700Kit: no Chip, Tag or capsule component, though PLAN lists capsule, pill and chipsP3Phase 3MT16
api-kit-chips · feature
What happens

PLAN §7 asks for capsule and pill, and chips. rune-kit has neither as a control:

  • Badge is a static status label. It does not take focus or a press.
  • Core pills (El::pill) style a byte range inside text. On a text field they do nothing; fields style their pills with El::pill_style.

There is no pressable or removable chip for filters, tags or the recipients of a message. Apps build one from a row, a label and an IconButton. They pick their own roles, and often forget the keyboard path to remove a chip.

Where
Why it matters

Filter bars, tag editors and token fields are common in desktop apps. Keyboard users must be able to toggle a filter chip and remove a tag without a pointer. Screen reader users must hear whether a filter is on. The target is that "Kit and core cover the standard desktop controls and hooks, with defined behaviour", and chips are one of the listed entries.

What would help

Add Chip with three variants:

  • Static: a label in a capsule, not focusable, for display.
  • Selectable: a toggle button with a pressed state. Space and Enter toggle it, and on_change receives the new value.
  • Removable: a label plus a remove button whose accessible name is "Remove <label>" and can be overridden. Delete or Backspace while the chip has focus also removes it. After a removal, focus moves to the next chip, or to the previous one if it was the last.

An optional leading icon. Sizes come from ControlSize. All colours, radii and fonts come from Kit tokens, with Radius giving the capsule shape. A disabled chip ignores all input and reports disabled. Add a kit-gallery scene, an accessibility golden and a keyboard test, and a manifest entry.

Done when
  • The golden shows each variant's role, name and pressed state.
  • Space toggles a selectable chip, and Delete removes a removable one.
  • Focus moves to a neighbour after a removal.
  • A static chip is not focusable.
  • A kit-gallery scene exists, and the manifest's chips entry points at it.
How to check

The keyboard test, the accessibility golden and the gallery scene test run in T1 with the kit tests.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 3 · priority P3 · size M
R0701Kit: no colour pickerP3Phase 3MT16
api-kit-color-picker · feature
What happens

SwiftUI has ColorPicker. rune-kit has none. A settings page that lets a person pick an accent or a label colour builds swatches and a hex field by hand, with no keyboard or accessibility model. Each app decides on its own how to clamp out-of-range values and what to announce.

Core has the parts. oklch and oklcha build colours. Color::to_oklab and Color::from_oklab convert. range_value and range_step give a slider its role and value, and on_step gives it keyboard steps.

Where
Why it matters

Theme and label colour settings are common, and hand-built pickers are hard to use from the keyboard and silent to screen readers. The targets: "Kit and core cover the standard desktop controls and hooks, with defined behaviour", with ColorPicker one of the listed entries, and every control "states its name, role, value, state and actions completely and truthfully", with goldens for every declared state.

What would help

Add ColorPicker:

  • A swatch button shows the current colour and opens a popover through the portal from R0479, so build(self, &Kit) -> El with no layer argument.
  • The popover holds app-given named swatches, three sliders for OKLCH lightness, chroma and hue on range_value, an optional alpha slider, and a hex field.
  • All four inputs set one sRGB Color with straight alpha, and on_change receives it.
  • Arrow keys move through the swatches. Each slider steps with the arrow keys and with Page Up and Page Down. The hex field accepts #rgb, #rrggbb and #rrggbbaa.
  • An OKLCH value outside sRGB keeps its lightness and hue and lowers chroma until it fits. Document this.
  • The value is announced as its hex string, plus the swatch name when it equals a swatch.
  • Labels and names come from the app or from overridable defaults.

Add a kit-gallery scene and a manifest entry.

Done when
  • A swatch, the sliders and the hex field all set the same Color.
  • A keyboard test covers the swatches and each slider.
  • An out-of-gamut OKLCH value clamps to sRGB by reducing chroma.
  • The accessibility golden shows the announced value and each slider's range.
  • A kit-gallery scene exists, and the manifest's ColorPicker entry points at it.
How to check

Kit tests for the value round trip and the gamut clamp, the keyboard test and the golden run in T1.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 3 · priority P3 · size M
R0702Kit: no date pickerP3Phase 3LT16
api-kit-pickers · feature
What happens

SwiftUI has DatePicker. rune-kit has none. A date picker is a large build for an app: a field that parses typed dates, a calendar grid, keyboard navigation over the grid, range limits and the grid's accessibility roles. Apps that need a date today take a plain text field, so people type a date with no validation and no calendar.

Where
Why it matters

Forms for due dates, filters by date and booking screens need a picker that works from the keyboard and reads well to a screen reader. The targets: "Kit and core cover the standard desktop controls and hooks, with defined behaviour", with DatePicker one of the listed entries; every control "states its name, role, value, state and actions completely and truthfully"; and every control "works from the keyboard alone, in the platform's way, with no trap, a logical order, a visible focus indicator", with 100% of stories passing the keyboard walk.

What would help

Add DatePicker:

  • A field plus a calendar popover that mounts through the portal from R0479 and closes by the shared options from R0480.
  • Values are plain calendar dates (year, month, day) with no time zone, in the Gregorian calendar, with an optional min and max.
  • The field parses ISO 8601 (2026-11-08) and shows a documented display format. Bad input sets the field invalid and keeps the last good value.
  • The week start is a builder setting, default Monday (ISO weeks).
  • Opening moves focus to the selected day, or today. Arrow keys move by day and week. Page Up and Page Down move by month. Home and End go to the ends of the week. Enter picks. Escape closes and returns focus to the field.
  • Days outside min and max are disabled and skipped.
  • The grid uses grid and gridcell roles. Each day's label is the full date. Selected and today states are reported.
  • Month names and weekday labels can be overridden.

Times, time zones and other calendars are out of scope; document this.

Done when
  • A keyboard test covers day, week, month and week-end moves, range limits, Enter, Escape and focus return.
  • Typing an ISO 8601 date in the field sets the value. A bad date sets invalid.
  • The accessibility golden shows the grid roles with the selected and today states.
  • A kit-gallery scene exists, and the manifest's DatePicker entry points at it.
  • The kit README states the scope.
How to check

The keyboard test, the parse tests and the golden run in T1 with the kit tests. The keyboard walk covers the new story.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 3 · priority P3 · size L
R0703Kit: no Stepper, so a number field with increment and decrement buttons is built by handP3Phase 3ST16
api-kit-stepper · feature
What happens

SwiftUI has Stepper. rune-kit has none. Core already has the keyboard and accessibility parts for a stepped value: El::on_step, El::on_step_limit, range_value and range_step, and a spinbutton role. No kit component uses them for a number with minus and plus buttons. An app writes one by hand. It must get the rounding, the clamping, the disabled buttons at the bounds, press-and-hold repeat and the role right itself. #149 reports the same gap for sliders, with four hand-written copies in this repo.

Where
Why it matters

Quantities, font sizes and counts in settings use steppers. A hand-built stepper often has no role, so a screen reader announces two unlabelled buttons and no value. The targets: "Kit and core cover the standard desktop controls and hooks, with defined behaviour", with Stepper one of the listed entries, and every control "states its name, role, value, state and actions completely and truthfully, and offers and accepts only the actions its state allows".

What would help

Add Stepper, in the style #149 asks for:

Stepper::new("copies", value)
    .range(1.0..=99.0)
    .step(1.0)
    .label("Copies")
    .on_change(|s: &mut App, v: f64| { /* ... */ })
    .build(k)
  • A value with minus and plus IconButtons. Values round to the step and clamp to the range.
  • At a bound, that button disables, and on_step_limit reports the limit.
  • Holding a button repeats after 400 ms.
  • Up and Down step. Page Up and Page Down step by 10. Home and End go to the bounds.
  • The whole control has the spinbutton role with its value, min and max, and the buttons' names ("Decrease", "Increase") can be overridden.
  • A disabled stepper ignores all input and reports disabled.
  • Sizes come from ControlSize and all colours from Kit tokens.

Add a kit-gallery scene and a manifest entry.

Done when
  • Tests cover clamping, rounding and bound-disabling.
  • Tests cover the keyboard actions and press-and-hold repeat after 400 ms.
  • A disabled stepper ignores pointer and keyboard input.
  • The accessibility golden shows the spinbutton role with its current value and range.
  • A kit-gallery scene exists, and the manifest's Stepper entry points at it.
How to check

The kit tests, the keyboard test and the golden run in T1.

Depends on
Part of
  • Theme: T16
  • Tracked in R0691
  • Phase 3 · priority P3 · size S
R0704Agents: nothing tracks whether agents' first tries at Rune apps reach 85% compile and 75% spec matchP1Phase 4XLT01
api-agent-first-try · tracking
What happens

R0209 measures how often an agent's first try at a Rune app compiles and matches its spec. R0504 measures the same tasks in SwiftUI. Measuring the rate doesn't raise it. The changes that move it are in separate issues: preludes, misuse messages at the call site, compile-fail hints, examples that compile and teach, and fewer overlapping APIs (R0505). Nothing links a class of failure to the issue that should fix it, and nothing says when the result is good enough.

This tracker closes when the targets below hold for three folds in a row. It takes several issues because each failure class needs its own fix, and new classes show up as the API changes.

Where
Why it matters

Agents write many Rune apps. Each first try that fails to compile or does the wrong thing costs a repair turn, and some never get fixed. The targets: agents get Rune apps right on the first try at least as often as with the peer. First-try compile median is at least 85% and tree match at least 75%, each at least the same model's SwiftUI rate, for three folds in a row. A fold is blocked when either rate drops more than 5 points and the 95% interval excludes 0. Import errors cause at most 2% of first-try compile failures.

What would help

After each Rune-Bench run, group the failures by class: wrong import, wrong handler signature, wrong or missing key, missing kit component, stale doc, and others as they appear. Open or link one issue for each class above 3% of tasks. If the SwiftUI rate stays above what Rune reaches, report the gap with its classes rather than lowering the bar.

Done when
  • First-try compile median is at least 85% and tree match at least 75%, each at least the same model's SwiftUI rate, for three folds in a row.
  • Import errors cause at most 2% of first-try compile failures.
  • Every failure class above 3% of tasks has a linked issue.
How to check

Committed Rune-Bench and SwiftUI results for three consecutive folds, with the failure-class table for each.

Issues
Depends on
Part of
  • Theme: T01
  • Phase 4 · priority P1 · size XL
R0705Crates: whether to split text, shells and tooling out of the core crate has no measurement to decide itP3Phase 4ST06
arch-wider-split-decision · research
What happens

crates/rune is one crate of 784 Rust files, with about 116,000 lines in non-test files (in-file test modules included). Its src/ root holds 41 source files. runtime/ is about 29,000 of those lines, platform/ 7,600, text/ 6,800 and tooling/ 4,600.

The research note on language and renderer choice names 100,000-line single crates as half of GPUI's compile-time problem, and sets a 1.2 s incremental rebuild as Rune's target. Splitting the crate is the obvious lever, but moving tangled modules into crates does not untangle them, and the right split depends on numbers that don't exist yet. Two changes come first and may be enough: the non-generic runtime core (R0534) and the renderer crate (R0611).

Where
Why it matters

The target: an app pays for Rune's runtime once, not once per state type, and an incremental rebuild after a view edit stays at or below 1.2 s. The structure target: module, folder and crate shape and dependency direction are enforced by the merge gate, with scripts/crate-deps passing against a declared graph (rune-abi, then rune-render, then rune, then kit). App developers and hot-patching feel every second of rebuild.

What would help

Run this only if the incremental rebuild still misses 1.2 s after the non-generic core and rune-render land.

  • Use the compile-cost script from R0094 to measure the rebuild after a one-line edit in text/, platform/, tooling/ and runtime/, on the reference Mac, by median of paired runs.
  • For each candidate (rune-text, rune-shell, rune-tooling), decide go or no-go. A go needs the split to cut edit-to-build time by more than 20% for edits in that area, and a dependency direction the crate graph allows.
  • Record the numbers and decisions in a research note and on #124.
  • Each go gets its own issue with acceptance against the 1.2 s and 5% targets.

Splitting the core crate broadly before the gates exist is out of scope. This issue is the measurement and the decision.

Done when
  • Either the 1.2 s target is met and this closes with the numbers, or a research note gives per-module rebuild numbers and a go or no-go per candidate.
  • The numbers are posted on #124.
  • Each go has its own issue.
How to check

The compile-cost numbers are committed with the research note, and the macOS lane's rebuild trend shows the before and after.

Depends on
Part of
  • Theme: T06
  • Phase 4 · priority P3 · size S
R0706Text editing: typing, paste and undo cost grow with the size of the fieldP1Phase 4XLT08
text-editing-scale-tracking · tracking
What happens

In one text_input, a keystroke costs 2.2, 12.0 and 45.7 ms median at 5, 50 and 200 KB on an M4 Pro Mac mini, because every edit lays out the whole text again. Each undo step holds full copies of the text before and after it, inside a 1 MB budget. Of 100 small pastes, history keeps 53 steps at 5 KB, 9 at 50 KB and 2 at 200 KB, and none above about 512 KB. Each keystroke also copies, hashes and scans the whole text several times outside shaping. PLAN's 100 MB file target has no scenario.

A spike that lays out each paragraph on its own reached 0.10 ms per keystroke at 50 KB, exact in 384 of 384 runs. Turning that into a shipped field takes several pieces: file splits so the work can land, a bench with rich, single-paragraph, preedit and accessibility cases, the composite layout and its differential test, windowed reshaping inside long paragraphs, range-delta undo, the copy removals, a typing-latency measurement, and a large-file spike that decides whether an additive Document type is needed. TextEdit::text stays a String throughout.

Where
Why it matters

Long notes, chat drafts, logs and pasted data are where people type most, and a field that drops frames as it grows makes the whole app feel slow. Targets: keystroke p95 "at or below 2 ms at 50 KB and at or below 4 ms at 1 MB, plain and rich, with AccessKit on", tightened to "p95 <= 1 ms at 50 KB, <= 2 ms at 200 KB"; "100 of 100 steps kept at 1 MB"; and a 100 MB file's "first usable viewport p95 at or below 250 ms" with "peak extra memory at most 2.5x".

What would help

Land the file splits and the bench first, so every later change has a before and an after. Then the composite layout with its differential, delta undo and copy removal, which carry the 50 KB and undo targets. Long paragraphs, the 1 ms work and the 1 MB budgets follow. The large-file spike runs once the composite layout exists. The Document type is built only if its 10 MB trigger fires; the 100 MB viewer ships either way.

Done when
  • Keystroke and preedit p95 at or below 2 ms at 50 KB, plain and rich, with AccessKit on, on the reserved Mac; then 1 ms at 50 KB and 2 ms at 200 KB.
  • Bytes shaped per keystroke at most the edited paragraph or window plus 1 KB, and at most one whole-text copy and one whole-text scan per keystroke at 1 MB.
  • 100 of 100 undo steps kept at 1 MB, with history bytes per step at most 2 x (changed text bytes + 32 B per changed formatting record) + 256 B, and no allocation per existing step when an edit is recorded.
  • Keystroke p95 at or below 4 ms at 1 MB and in each 200 KB single-paragraph case. A 100 KB paste and a select-all delete at 1 MB each at or below 8 ms.
  • Event-to-present p95 at or below 16.7 ms and p50 at or below 8.3 ms at 50 KB on the 120 Hz Mac.
  • A 100 MB file shows its first usable viewport at p95 at or below 250 ms, with peak extra memory at most 2.5x, and typing stays at or below 4 ms p95 at 10 MB.
  • Every child is closed.
How to check

Count budgets in cargo test for bytes shaped, whole-text copies and scans, and history bytes. long_note and big_file on the macOS lane, with numbers recorded in research/27 for each change. The composite differential runs its seeded cases on every merge.

Issues
Part of
  • Theme: T08
  • Phase 4 · priority P1 · size XL
R0707Text: an additive Document type for editing past 1 MB, built only if text_input misses 4 ms at 10 MBP2Phase 4LT08
text-document-type-gated · feature
What happens

TextEdit::text is a public String, and apps read and write it directly. The plan keeps it that way. The composite layout and the copy removals should make a keystroke cost follow the edited paragraph, not the field. What they can't remove is the cost of the String itself. An insert in the middle moves every byte after it, and the UTF-16 offsets that platform text protocols need, and line lookups, scan from the start. At 10 MB those costs may decide the keystroke.

PLAN names Zed's sum_tree and rope for storage, for O(log n) UTF-8 and UTF-16 offsets on large files. Nobody knows yet whether text_input needs one. R0564 measures typing at 10 MB and decides.

Where
Why it matters

Editors, log tools and data apps hold files past 1 MB, and people type in them. The target: "editing stays inside the typing budget at 10 MB", with "Typing p95 at or below 4 ms at 10 MB" and "Peak extra memory at most 2.5x the file size".

What would help

The trigger: big_file's 10 MB typing p95 is above 4 ms after R0185 and R0188 land. Don't build this before it fires.

If it fires, add a rope-backed Document type beside TextEdit:

  • chunks with UTF-8, UTF-16 and line summaries, so offset conversions and line lookups are O(log n);
  • its own builder for the field, so no type that apps build as a literal gains a field;
  • plain and rich editing, with undo, IME and accessibility;
  • the text-input protocol works over both TextEdit and Document.

TextEdit and its public text field stay as they are. IME work doesn't wait on this type; it must work on TextEdit first.

Done when
  • The large-file note records whether the trigger fired. If it didn't, this issue closes with those numbers.
  • If built: typing p95 at or below 4 ms at 10 MB, with peak extra memory at most 2.5x the file size.
  • If built: the text-input protocol replay tests pass over a Document.
  • TextEdit's public API is unchanged (API snapshot).
How to check

Count budgets on copies and offset scans in cargo test, and big_file at 10 MB on the macOS lane.

Depends on
Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 4 · priority P2 · size L
R0708Text: no issue delivers a 100 MB file's 250 ms first viewport and 2.5x memory limit unless the Document type is builtP2Phase 4LT08
text-large-file-open · feature
What happens

A 100 MB text file has a target and, today, no owner. R0564 measures it and files children for the targets it misses, and R0707 is built only if typing at 10 MB misses 4 ms. If typing passes, nothing delivers the 100 MB viewport and memory targets.

The usual path can't meet them. A whole-text layout holds about 90 bytes of heap per byte of text, so laying out 100 MB at once needs about 9 GB against a 250 MB limit. Shaping at about 0.22 ms per KB takes about 22 s. Reading the file into one String and handing it to a text_input costs at least a full copy and a layout of all of it. Only a viewer that indexes lines off main and shapes only what is on screen can reach 250 ms.

Where
Why it matters

People open large logs, CSV exports and generated files in tools built with Rune. A file that takes seconds to show, or triples the process's memory, looks like a hang. The targets: "First usable viewport p95 at or below 250 ms. Peak extra memory at most 2.5x the file size."

What would help

Make the spike's viewer a supported, documented pattern:

1. Map the file, or read it in chunks, and build a line index off main. Show the first viewport as soon as its lines are indexed. 2. Put virtual_rows over lines, so only mounted rows are shaped. Let the line count grow as the index grows, without O(rows) work per change (#203). 3. Edit through a text_input over the visible window, mapped back to file offsets, or through the Document type if it is built. 4. Run selection across rows, find and copy over the source, not over mounted rows. 5. Count peak memory from the source, the index and the mounted rows only.

Done when
  • Over 5 paired runs on the reference Mac, a 100 MB file shows its first usable viewport at p95 at or below 250 ms.
  • Peak extra memory stays at most 2.5x the file size.
  • Scrolling meets PLAN's 1M-row list target: list CPU p95 at or below 1 ms for fixed and 2 ms for variable row heights.
  • The pattern is documented, and big_file uses it.
How to check

big_file at 100 MB runs weekly on the macOS lane and fails above 250 ms p95 or above 2.5x memory.

Depends on
Part of
  • Theme: T08
  • Tracked in R0706
  • Phase 4 · priority P2 · size L
R0709Threading: nobody has measured how often a busy main thread drops running motion in flagship workloads, so the presenter thread has no go or no-goP2Phase 4ST11
motion-presenter-decision · research
What happens

PLAN's second tenet says animation never runs through app code. In practice a slow handler, view, commit or synchronous platform call delays the next motion frame, because they share the event-loop thread with sampling and paint. FrameClock charges running motion the real gap, up to 250 ms, so motion stays on its path. But the refreshes in between are never drawn.

research/26 has one data point. Synced Glass with the main thread busy 8 ms a frame ran at about 60 Hz. PLAN's first open question asks whether the app side should leave the main thread at all, and says the answer needs latency numbers.

No number exists for flagship workloads. So nobody can say whether a presenter thread (R0710) would pay for its concurrency risk.

Where
Why it matters

This decides the threading model. The target: main-busy drops <= 0.5% of motion frames in every flagship workload, nightly, and after any stall motion resumes on its trajectory with 0 jump findings. If the rate stays above 0.5% after the named stalls are fixed, the opt-in presenter ships.

What would help

The metric comes from R0124. A refresh counts as lost to a busy main thread when tracks or scroll were running, no frame presented for that refresh, and main-thread work (a handler, a commit or the previous frame) overlapped its admission window.

1. With retained paint (R0605) in place, run the flagship scripts from R0065 in paired runs on R0125, R0402 and R0418: chat streaming while scrolling, a Markdown-heavy scroll, the Board long-card scroll, typing with animation, and multi-window. 2. Fix the named stalls (R0600), then measure again. 3. Go if any workload is still above 0.5% of motion frames, measured without an injected stall. 4. No-go: record the fixes, and add a nightly check. It keeps every workload at or under 0.5%, and it checks that motion resumes on its trajectory after a 30 ms stalled commit with 0 jump findings. A later regression reopens the decision.

The source records put the threshold at 1% or at 0.5%. Use 0.5%, the stricter one. The 1% busy-main limit stays as the general cadence target.

Done when
  • Unit tests with synthetic stamps classify lost refreshes correctly.
  • A research note gives main-busy drop rates per workload, platform and backend, from paired runs, before and after the stall fixes, with rev and device.
  • A go or no-go is recorded against 0.5%.
  • A 30 ms stalled-commit scenario is committed.
  • On no-go, the nightly check is running. On go, R0712 starts.
How to check

The reference-device lanes reproduce the note's numbers. On no-go, the nightly check keeps them.

Depends on
Part of
  • Theme: T11
  • Phase 4 · priority P2 · size S
R0710Threading: running animation and scroll drop frames whenever the main thread is busyP3Phase 4XLT11
perf-presenter · tracking
What happens

View, commit, layout, motion sampling, paint, encode and present all run on the event-loop thread. A 30 ms commit at 120 Hz drops about 3 refreshes of every running animation and scroll, in every window. FrameClock keeps motion on time across the gap, but it cannot draw the frames that were missed.

PLAN's second tenet says animation never runs through app code, and §3 draws a separate render thread. The crate README lists this as a difference: animation is evaluated on the main thread at frame time. Core Animation's render server and Chromium's compositor thread keep running motion and scroll going through main-thread stalls.

This takes several issues because a presenter needs four things first: a measured go decision, an eligibility contract, a Send snapshot of what to draw, and model-checked handoffs. Only then can a window opt in. It is built only if R0709 records go.

Scope: an opt-in presenter per window, for plain windows on macOS (native Metal and wgpu), Windows and Linux. Glass, transaction presents, live resize, LayerHost and web stay on main, and the docs say so.

Where
Why it matters

When app code is busy, users see scrolling and animations stutter. The targets: main-busy drops <= 0.5% of motion frames in every flagship workload. If the rate stays above 0.5% after the named stalls are fixed, the opt-in presenter ships, and its windows drop 0 frames of running animation and momentum in a 30 ms stall. Busy-main misses stay <= 1% of motion refreshes on every lane platform.

What would help

The children, in order: the contract, the snapshot, the concurrency model tests, then the window presenter.

Done when
  • All children are closed, or the decision records no-go and the nightly check is running.
  • On opted-in windows, a 30 ms stalled commit drops 0 frames of running animation and momentum on the reference Mac and the reference Windows machine.
  • Resize, hide, close, focus, hit testing and scroll callbacks behave the same with the presenter on and off.
  • Every host makes 0 idle submissions with the presenter on.
How to check

The stalled-commit scenario runs on the reference-device lanes. Headless runs the presenter logic synchronously, so the gate scenarios compare on and off in the required check.

Issues
Depends on
Part of
  • Theme: T11
  • Phase 4 · priority P3 · size XL
R0711Perf: no issue brings flagship scroll frames to 4 ms p95 with none over 8.3 ms on the reference MacP2Phase 4LT11
perf-frame-p95-4ms · perf
What happens

The retained paint work (R0601) closes when the Board long-card scroll runs under 8.3 ms p95. That is an interim step. The worst-case frame target is p95 <= 4 ms with 0 frames over 8.3 ms per run, and no issue owns the step from 8.3 ms to 4 ms.

research/37 measured the Board long-card scroll at 2.34 / 15.2 / 19.6 / 20.4 ms (p50 / p95 / p99 / max) with 82 frames over 8.3 ms. That was headless thread CPU at 506f5421. Its cost table names what remained after the paint walk: Runtime::build's own lines (13-21% self), highlight_target_in (6-11%), Scene::phase through subtree_exiting (5%), Keyed::new (3-4.5%), glyphs_in_band_cached (4-9%) and Renderer::prepare with pack_fade (3-12%).

Some of that has changed since. subtree_exiting now reads a per-frame exit mask before it walks ancestors, and highlight lookups can go through a key index. The numbers at HEAD need a new run.

Where
Why it matters

A frame over 8.3 ms is a missed refresh at 120 Hz, and users see it as a stutter while they scroll. The target, quoted: "Reference Mac: p95 <= 4 ms and 0 frames over 8.3 ms per run; GPU p95 <= 4 ms (PLAN §8), and on #204's table within 1.25x of GPUI Fast measured in the same session." Motion should also cost only what moves, at CPU p95 <= 4 ms and GPU p95 <= 4 ms.

What would help

1. After R0606 lands, profile the Board long-card scroll, #204's table scroll and a Markdown-heavy scroll on the reserved Mac (R0125). Use --profile perf and a 1 kHz main-thread sample. 2. Rank the remaining per-frame costs by inclusive share. Remove the largest one at a time, each in its own PR with paired numbers, until every scene meets the target. 3. Record GPU time beside CPU time, since a scene can meet 4 ms on CPU and still miss on GPU.

Done when
  • On the reserved-Mac lane over 5 paired runs, each flagship scroll scene has CPU p95 <= 4 ms and 0 frames over 8.3 ms in every run.
  • GPU p95 <= 4 ms in the same runs.
  • #204's table scroll CPU is recorded against GPUI Fast in the same session, within 1.25x.
How to check

The reserved-Mac lane runs the three scenes on every change to paint, scroll or layout, and fails a run with a frame over 8.3 ms or a p95 over 4 ms.

Depends on
Part of
  • Theme: T11
  • Phase 4 · priority P2 · size L
R0712Threading: no rule says which windows a presenter may own, so a compositor that is not Send and holds &S could move off the main threadP3Phase 4MT11
perf-presenter-contract · research
What happens

R0715 moves a window's renderer to a presenter thread. Nothing yet says which windows may move, or who owns what once they do.

  • Compositor<S> is bound by 'static only, not Send.
  • Frame hands the compositor rt: &mut Runtime<S>. R0412 replaces that with a frame view, but the view still exposes app state &S.
  • A compositor that holds an Rc, or that reads S while main runs handlers, would race on another thread.
  • PLAN §3 draws one render thread. R0710 plans one presenter per window. Nothing records which is right, or how either behaves on device loss, window close and app shutdown.
  • The one threaded present path today, on overlays, keeps the surface's lifetime simple: the owner waits for the job before it touches the surface again, and joins before the surface drops.
Where
Why it matters

Without a rule, a presenter could take a custom compositor off the main thread and break it in ways that are hard to see. The targets: renderers and compositors read an owned, Send frame packet, not the runtime, with "FramePacket: Send + 'static (resources by handle with device generation)" asserted at compile time. If the presenter ships, its supported windows (plain windows on macOS, Windows and Linux) drop 0 frames of running animation and momentum in a 30 ms stall.

What would help

A design note in research/ with an API sketch:

  • Eligibility. Plain windows only. A window with a custom compositor stays on main, unless the compositor implements a separate Send, data-only prepare and render contract that reads only the frame packet. Glass, transaction presents, live resize, LayerHost and web stay on main.
  • Ownership. Per device or per window, with the reason. Recommended: per window, sharing the device. It matches the opt-in, and it keeps "a blocked surface costs other windows <= 1 refresh".
  • Device loss. The presenter reports to main, main rebuilds, and resources are addressed by handle with a device generation.
  • Close and shutdown. Main asks, the presenter finishes the frame in flight, and the surface drops before the window. The note states the order.
Done when
  • The note is merged and lists which windows may and may not opt in.
  • A compile-fail test shows that a compositor that is not Send cannot be given to the presenter.
  • The note states ownership, device-loss, close and shutdown order, with a reason for each.
How to check

The compile-fail test runs in the required check. R0713 and R0715 cite the note for the rules they implement.

Depends on
Part of
  • Theme: T11
  • Tracked in R0710
  • Phase 4 · priority P3 · size M
R0713Threading: no snapshot of the paint list and scene exists for another thread to present fromP3Phase 4LT11
perf-presenter-snapshot · feature
What happens

The paint walk reads the runtime directly. It reads Nodes that hold Rc text layouts, plus the glyph atlas, images, growth, scroll and flights. It writes its output into Runtime::instances. Nothing it produces can be owned by another thread.

A presenter thread needs three things: what to draw, the motion state that changes it, and the order in which main changed them. None of these exists as an owned, Send value.

R0603 gives the frame an owned FramePacket. R0606 makes paint a retained list with transform groups. This issue publishes them for a presenter.

Where
Why it matters

Running motion survives a busy main thread only if another thread holds a complete, consistent copy of the frame. The targets: "PaintList: Send" and "FramePacket: Send + 'static (resources by handle with device generation)" asserted at compile time. If the presenter ships, its windows drop 0 frames of running animation and momentum in a 30 ms stall.

What would help
  • Make the retained paint list Send: Arc glyph runs, owned templates, resources by handle with a device generation.
  • After each commit, publish the paint list and frame packet through a triple buffer. Include the commit's track operations (inserts, retargets, removals) in order, so that a Scene copy on the presenter follows main's Scene.
  • Retire a resource only when no published snapshot holds it.
  • Tag hit lists with the generation of the frame they were built from, so main can reject hits from a frame that is no longer shown.
  • In headless, run the presenter logic synchronously on the same thread, so that the gate tests stay deterministic.

Follow the eligibility and ownership rules from R0712.

Done when
  • Compile-time asserts: the paint list and the Scene copy are Send, and FramePacket is Send + 'static.
  • Headless with the synchronous presenter path gives byte-identical output to the main-thread path in all gate scenarios.
  • Tests cover dropped intermediate snapshots, resource retirement while a snapshot holds the resource, track-operation order, and stale hit lists.
  • Publication cost per commit is recorded in the frame record.
How to check

The compile-time asserts and the differential harness run in the required check. R0714 adds the model tests over the same buffer before threading is turned on.

Depends on
Part of
  • Theme: T11
  • Tracked in R0710
  • Phase 4 · priority P3 · size L
R0714Threading: nothing tests the presenter's snapshot publication, track operations, hit-list generations, retirement and shutdown across thread interleavingsP3Phase 4MT11
perf-presenter-concurrency-model · infra
What happens

The presenter adds real concurrency to the core. Main publishes snapshots and track operations. The presenter samples, patches and presents, and returns hit lists. Resources retire across the two threads.

R0713 runs the presenter logic synchronously in headless tests. That proves the output is deterministic. It cannot find races in publication, track-operation order, stale hit lists, retirement or shutdown.

No model checker is in the workspace today: neither loom nor shuttle appears in any Cargo.toml. The one threaded part of the frame path, the macOS present worker, is tested with real threads and sleeps. Those tests cover only the orderings that the scheduler happens to pick.

Where
Why it matters

A race in the presenter would show as a frame drawn with stale geometry, a click that hits the wrong row, a use-after-free on a texture, or a hang at window close. The motion target is "0 frames of running animation and momentum" dropped in a 30 ms stall on opted-in windows. It must not cost correctness, and "after any stall, motion resumes on its trajectory with 0 jump findings".

What would help

Add model tests over the snapshot buffer and the main-to-presenter messages. They cover:

  • a publication while a present is running;
  • dropped intermediate snapshots;
  • hit-list generations, so that hits from a frame that is no longer shown are rejected;
  • device-generation retirement, so that a resource is freed only after no published snapshot holds it;
  • a close during a present;
  • shutdown order.

Options: loom explores every interleaving but only fits small primitives. Shuttle samples random schedules and fits a whole protocol. Recommended: loom for the triple buffer and the generation counters, shuttle for the message protocol. Put both behind a cfg or a dev-only feature, so normal builds do not change.

Done when
  • The model tests pass in the required check.
  • A seeded ordering bug fails them. Examples: a Release store weakened to Relaxed, or retirement before the generation check.
  • R0715 keeps threading off until these tests pass.
How to check

The model tests run in the required check under their cfg. The seeded-bug variant runs as a test that is expected to fail, so the models cannot quietly stop exploring.

Depends on
Part of
  • Theme: T11
  • Tracked in R0710
  • Phase 4 · priority P3 · size M
R0715Threading: no window can keep animating and scrolling while its app's commit runsP3Phase 4LT11
perf-presenter-window · feature
What happens

Even with retained paint, motion sampling and paint patching run on the main thread after the app's commit. A 30 ms commit at 120 Hz drops about 3 refreshes of running motion. FrameClock keeps the time right across the gap, but it cannot draw the missing frames.

The only off-main present path is the macOS overlay worker. It runs finish, submit and present for a frame that main already built. It cannot sample or draw a new frame while main is busy.

Where
Why it matters

Scroll momentum and running springs should not stutter while an app streams chat or parses Markdown. The target: on supported windows (plain windows on macOS, Windows and Linux), the opt-in presenter drops 0 frames of running animation and momentum in a 30 ms stall, and after any stall motion resumes on its trajectory with 0 jump findings. Busy-main misses stay <= 1% of motion refreshes on every lane platform.

What would help
  • Add a WindowOptions builder method that opts a window in. Use a builder, not a new pub field.
  • The presenter thread owns the window's renderer and surface, the paint-list snapshot, a Scene copy, and latest-wins wheel and momentum scroll state. Scroll offsets as tracks come from R0593.
  • On display ticks, the presenter samples, patches, encodes and presents without calling app code.
  • Hit lists return to main through a triple buffer. on_scroll_offset runs on the next main turn.
  • Supported windows: plain windows on macOS (native Metal and wgpu), Windows and Linux. Glass, transaction presents, live resize, LayerHost and web refuse the opt-in, stay on main, and the docs say so.
  • Keep threading off until R0714 passes. Follow R0712 for eligibility and shutdown.
Done when
  • The 30 ms stalled-commit scenario drops 0 motion frames on an opted-in window on the reference Mac and the reference Windows machine.
  • Headless with the presenter on and off gives identical presented geometry, pixels, hit lists and transaction order in all gate scenarios.
  • Tests cover resize, hide and close during a present, focus and hit testing against the shown frame, scroll callbacks, input during a stall, a reduced-motion toggle, a blocked surface, and device loss on the presenter thread.
  • Input-to-present p95 does not regress in paired runs.
  • An opted-in window at rest makes 0 submissions.
How to check

The stalled-commit scenario runs on R0125 and R0402. The on/off headless comparison runs in the required check. scripts/motion-audit runs the stall scenario and reports jump findings.

Depends on
Part of
  • Theme: T11
  • Tracked in R0710
  • Phase 4 · priority P3 · size L
R0716Web and Linux: research HDR output through WebGPU extended tone mapping and Wayland colour managementP3Phase 4MT12
render-hdr-web-linux-research · research
What happens

The web shell configures its canvas from wgpu's default config. It picks an sRGB or non-sRGB 8-bit format and never sets a colour space or tone-mapping mode. On Linux, windows use the same surface_config as other desktops, which also picks 8-bit sRGB. So neither platform can show brighter-than-white output.

The pieces may now exist. Chromium documents HDR WebGPU canvases: rgba16float with toneMapping mode extended. wgpu 30.0.1, which Rune pins, maps that onto SurfaceColorSpace::ExtendedSrgb and ExtendedDisplayP3 on its web backend. On Vulkan it exposes ExtendedSrgbLinear, Bt2100Pq and Bt2100Hlg 'where the driver exposes it', and Wayland compositors are adopting a colour-management protocol. On the web, wgpu's display_hdr_info reports only coarse booleans, and on Vulkan off Windows it reports no luminance. Nobody has checked what actually works in browsers or on GNOME and KDE with HDR on, or what Rune's shells would need.

Where
Why it matters

The colour target puts HDR on macOS, iOS and Windows, and on Chromium on the web only if this research says go. Otherwise the web is documented as SDR-only. That target is: a readback of at least 2.0 where content asks for it, a hardware capture that shows it, SDR in an HDR window within 2/255 of an SDR window, and GPU cost at most +25% over SDR on the 1,000-quad scene. Without a clear answer, the web and Linux stay undefined.

What would help
  • Prototype an extended-range canvas in the web shell, using the opt-in builder from R0620, in Chromium on macOS and Windows with HDR on. Check Safari and Firefox for support.
  • On Linux, list the Vulkan surface colour spaces wgpu reports on GNOME and KDE with HDR on, on Mesa and NVIDIA, and present an extended swatch.
  • Record the exact browser, compositor, wgpu, driver and display versions, what works, what is missing in wgpu or winit, and the GPU cost.
  • Give a go or no-go for R0717, and a separate one for a Linux follow-up.
Done when
  • A note in research/ has a working or failing prototype for the web and for Linux.
  • The note lists the versions tested.
  • The note gives a go or no-go for R0717 and for a Linux HDR follow-up.
How to check

The note is reviewed, and its prototypes can be re-run from a branch or an example.

Depends on
Part of
  • Theme: T12
  • Phase 4 · priority P3 · size M
R0717Web: canvases can't present HDR in browsers that support extended tone mappingP3Phase 4MT12
render-hdr-web-output · feature
What happens

Chromium supports rgba16float WebGPU canvases with toneMapping mode extended, which show brighter-than-white values on an HDR display. Rune's web shell always configures an 8-bit canvas from wgpu's default config, and it sets neither a colour space nor a tone-mapping mode. So a Rune app in the browser can't match the HDR output that R0620 and R0627 bring to native windows. HDR images and video on the web clip at SDR white.

wgpu 30.0.1, which Rune pins, exposes the browser's options as SurfaceColorSpace::ExtendedSrgb (canvas srgb with extended tone mapping) and ExtendedDisplayP3. Its web backend has no linear or PQ canvas colour space. So the web path must write sRGB-encoded extended values, unlike scRGB on Windows.

Where
Why it matters

Web users on HDR displays see Rune media apps flatter than the same app on the desktop, and flatter than other HDR web pages. The colour target asks for HDR on Chromium on the web if the research says go, and otherwise for the web to be documented as SDR-only. Where HDR is on, a readback holds at least 2.0 where content asks for it, and SDR content is within 2/255 of an SDR canvas. The web target says the web build is a first-class target in every browser engine, desktop and mobile, within 2/255 per channel of native.

What would help

This depends on R0716.

  • If the research says go: behind the same opt-in HDR builder as native, configure rgba16float with ExtendedSrgb, or ExtendedDisplayP3 where the browser supports it. Keep the sRGB-space blending and write encoded extended values in the final pass. Fall back to today's SDR config when the browser doesn't list the colour space.
  • If the research says no-go: document the web as SDR-only in WEB.md and in the colour target's platform list, and close this issue.
Done when
  • In Chromium with HDR on, a canvas readback holds values of at least 2.0 for an extended swatch.
  • A capture on an HDR display shows brighter-than-white output, recorded in the PR.
  • SDR content in an HDR canvas is within 2/255 of an SDR canvas.
  • Browsers without support draw exactly as today.
  • Or, on no-go: WEB.md states that the web is SDR-only.
How to check

A web test that configures the canvas and reads back the swatch in Chromium, plus one hardware check on an HDR display recorded in the PR.

Depends on
Part of
  • Theme: T12
  • Phase 4 · priority P3 · size M
R0718Render: research whether splitting the uber shader by cost class pays on low-end GPUsP3Phase 4MT12
render-uber-split-research · research
What happens

Rune draws almost everything with one uber pipeline. Its fragment shader is one chain of if branches over the instance kind, covering rects, borders, shadows, glyphs, images, gradients, dashes and more, in a 500-line WGSL file. A GPU allocates registers for the largest branch, so a plain rect or a glyph pays the register cost of the richest kind. On Apple GPUs, uniform branches within a SIMD group cost little. On integrated Intel and AMD GPUs, high register use can lower occupancy and raise fragment time.

The renderer research asked whether to split the shader into a simple pipeline (flat or rounded quads, borders, glyphs, images) and a rich one (shadows, gradients, materials). The question is still open, and windows record no GPU time outside tests, so there is no data to answer it.

Where
Why it matters

Users on low-end laptops are the first to see dropped frames in kit-heavy views. The frame-cost target says GPU p99 is at most 4 ms for 1,000 spring quads and the effects scene on the reference Mac and iPhone, and at most 12 ms at 1440p for kit gallery scrolling on the UHD 620-class laptop. A split also has a cost: every extra pipeline has to be precompiled (metallib, DXBC) and prewarmed, or it brings back first-use stalls.

What would help

1. With per-frame GPU time from R0129, measure register use, occupancy and fragment time for the kit gallery and a text-heavy scene. Use Xcode GPU counters, RGP and Nsight on Apple M1, Intel Xe and AMD integrated GPUs. 2. Prototype a split that picks the pipeline per painter run, so draw order is unchanged. 3. Ship only if GPU time drops by 15% or more on two of the three GPUs, and draws per frame rise by no more than 20%. Otherwise record a no-go.

Done when
  • A note in research/ records counters and paired timings per GPU for both scenes.
  • The note gives a go or no-go against the 15% and 20% thresholds.
  • If go, a follow-up issue lists the new pipelines to precompile and prewarm.
How to check

The note's paired, alternating runs under --profile perf, compared by median with outliers kept. Include the vendor counter captures.

Depends on
Part of
  • Theme: T12
  • Phase 4 · priority P3 · size M
R0719Media: Player plays and Recorder records only on macOSP2Phase 4XLT13
media-player-parity · tracking
What happens

Player and Recorder have one real backend each: AVFoundation on macOS. On Windows, Linux, iOS and the web every clip reports Failed and video draws a grey placeholder. Starting a recorder fails with "recording isn't supported on this platform". On the web, a drawn native surface ends the app. HDR video beyond Apple isn't planned in any backend.

This takes several issues because each platform needs its own decoder, GPU import, audio clock and permission model. The issues share one API, one headless fake and one fixture suite that proves they agree.

Where
Why it matters

Cross-platform apps that show clips or record voice notes have to drop those features off macOS. The targets: "5 of 5 platforms play every manifest fixture with 0 errors, A/V drift <= 40 ms and <= 1 dropped frame per minute at the clip rate", "a NativeSurface never ends the app on any platform", and Player, Recorder and images "work on every platform and are safe on hostile input".

What would help

Land the children in order. First the web placeholder, so no app ends. Then the Player backends for Windows, iOS and the web, with Linux through #30, checked by R0648. Then Recorder on Linux, Windows and iOS, and HDR on Windows and the web. Each backend keeps the Player and Recorder API unchanged and the headless fake deterministic.

Done when
  • Every child issue is closed.
  • The conformance suite shows 5 of 5 platforms playing every manifest fixture.
  • Recorder records a complete file on macOS, Linux, Windows and iOS.
  • The README's "Other platforms" notes are gone or name only the web Recorder.
How to check

R0648 runs in each platform lane on every push to dev. Each child names its own lane.

Issues
Part of
  • Theme: T13
  • Phase 4 · priority P2 · size XL
R0720Recorder: audio recording is missing on Linux (PipeWire)P3Phase 4MT13
platform-recorder-parity · feature
What happens

Recorder's only real backend is AVAudioRecorder, compiled for macOS. On Linux, start ends in Failed("recording isn't supported on this platform") and Recorder::permission() reports Restricted. Linux apps can't record from the microphone.

The headless fake already has what a sample-level backend needs: a level meter that works on 10 ms blocks of samples and a 16-bit WAV writer.

Where
Why it matters

The target is that Player, Recorder and images "work on every platform and are safe on hostile input", every case ending "in a safe result within 30 s: a readable failure, or a bounded result". Desktop apps with voice notes, dictation or meeting capture can't offer them on Linux.

What would help

Add a Linux backend on PipeWire that reads the default source on a thread of its own.

  • Feed samples to the existing meter, and write WAV with the fake's writer.
  • AAC needs an encoder Linux doesn't ship. Either refuse .m4a on Linux with a readable error, or add an optional encoder. Refusing is the smaller first step.
  • Load libpipewire at run time. Where it is missing, report Restricted with a message that says why, not a crash or a link error.
  • A removed device or a changed default source finishes the file and reports Interrupted(reason). A denied portal or sandbox request reports Denied.
  • stop must not block the UI thread (R0443).
  • The headless fake stays as it is.

The Windows and iOS backends are R0721 and R0727.

Done when
  • start, stop and dropping the last handle record a complete WAV file on Linux.
  • Without PipeWire, start ends in a readable Failed and the app keeps running.
  • Unplugging the source mid-recording finishes a playable file and reports Interrupted.
  • Levels from a known tone match the fake's levels for the same samples.
  • The capability matrix marks Recorder Native on Linux.
How to check

The Linux GUI lane from R0071 runs a PipeWire null source that plays a fixed tone. Tests record, unplug the source and stop, and check the file and the reported state.

Depends on
Part of
  • Theme: T13
  • Tracked in R0719
  • Phase 4 · priority P3 · size M
R0721Recorder: audio recording is missing on WindowsP3Phase 4MT13
platform-recorder-windows · feature
What happens

Recorder's only real backend is AVAudioRecorder, compiled for macOS. On Windows, start ends in Failed("recording isn't supported on this platform") and Recorder::permission() reports Restricted. A Windows build can't record a voice note or a dictation clip.

Where
Why it matters

The target is that Player, Recorder and images "work on every platform and are safe on hostile input", with every case ending "in a safe result within 30 s: a readable failure, or a bounded result". Laptops switch microphones when a headset is plugged in or a dock is unplugged, so default-device changes are common on Windows.

What would help

Add a Windows backend on Media Foundation, on a thread of its own.

  • Open the default audio capture device as a media source and read samples through IMFSourceReader.
  • Write WAV with the fake's writer, and AAC through IMFSinkWriter and the system AAC encoder. N editions without the Media Feature Pack have no encoder; refuse .m4a there with a message that names the pack.
  • Feed samples to the existing level meter.
  • Map denied capture access to MicPermission::Denied, with a message that points to Privacy and security, Microphone in Settings.
  • Watch for device removal and default-device changes with IMMNotificationClient. Each finishes the file and reports Interrupted(reason).
  • stop must not block the UI thread (R0443).
  • The headless fake stays as it is. It can share code with the Media Foundation player in R0647.
Done when
  • start, stop and dropping the last handle record a complete AAC and WAV file on Windows.
  • Denied microphone access ends in Failed with a readable message, and nothing crashes.
  • Removing the device and changing the default device each finish a playable file and report Interrupted.
  • The headless fake's tests pass unchanged.
  • The capability matrix marks Recorder Native on Windows.
How to check

The Windows GUI lane from R0063 records from a virtual or loopback capture device, then interrupts and finishes a file in each case. The test checks the file length and the reported state.

Depends on
Part of
  • Theme: T13
  • Tracked in R0719
  • Phase 4 · priority P3 · size M
R0722Video: Windows and web playback carry no HDR transfer or primaries, so HDR clips draw as SDRP3Phase 4MT13
render-hdr-video-windows-web · feature
What happens

The planned Windows and web players would bring HDR clips in through paths that hold only SDR:

  • The Windows shared-texture import accepts only BGRA8 and refuses any other format. push_shared tags every frame with the default colour, BT.709 and sRGB.
  • Transfer has only Srgb and Bt709, with no PQ or HLG. The video shader clamps colour to 0-1 before it linearizes.
  • On the web, wgpu's copy_external_image_to_texture writes into an srgb or display-p3 destination only.

So an HLG or PQ clip would lose its range on Windows and in the browser, or draw with the wrong transfer.

Where
Why it matters

HDR clips from phones are common. Drawn as SDR, they look washed out or too dark next to the same clip in a browser or the system player. The target: "HDR clips play with 0 errors and tone-map on SDR within 3/255 of the reference", and "a readback holds >= 2.0 where content asks for it", on macOS, iOS and Windows, and in Chromium on the web if the research says go.

What would help
  • Windows: have the Media Foundation backend from R0647 write P010 or FP16 frames into the shared texture. Accept those formats in the import, and carry transfer and primaries into the surface uniforms. Use the tone map and shader changes from R0618, and present through R0627.
  • Web: copy frames from R0646 into an Rgba16Float texture, and record per engine whether values above 1.0 survive the copy. Where they do, pass them to an HDR canvas from R0717. Where they don't, tone-map in the browser and document SDR-only.
  • Read colour metadata from the source (the Media Foundation media type, or VideoFrame.colorSpace on the web), not from the container's guess.
Done when
  • The HLG and PQ fixtures play with 0 errors on Windows and in Chromium.
  • On SDR targets, frames are within 3/255 of the committed CPU tone-map reference.
  • In an HDR window or canvas, a readback of the fixture's bright patch holds values >= 2.0.
  • Each browser engine's result is recorded, and the docs say which engines show HDR video.
How to check

The Windows and web lanes compare fixture frames with the CPU reference. One check on an HDR monitor is recorded in the PR. R0648 then holds the HDR fixtures in both columns.

Depends on
Part of
  • Theme: T13
  • Tracked in R0719
  • Phase 4 · priority P3 · size M
R0723iOS: Rune runs only as an embedded layer, with no input, text input or accessibilityP2Phase 4XLT14
platform-ios-tracking · tracking
What happens

PLAN's M6 asks for an iOS shell, UITextInput and a RuneView for embedding in SwiftUI. Today LayerHost mounts a runtime on a CAMetalLayer that the host app owns, in 230 lines of non-test code. The host must feed every touch and key through runtime_mut(). There is no text input, no accessibility, no safe-area or keyboard inset, no Swift wrapper, no lifecycle adapter, no clipboard, and pop-up menus and file dialogs are refused each frame.

This takes several issues because each piece is a separate UIKit protocol with its own tests, and they share one view. Building them before Rune's text-input protocol and shared frame core exist would make iOS a third design to maintain.

Where
Why it matters

An iOS user can't type into, scroll natively in, or hear a Rune view today, so no app can ship one. The target: iOS ships as a UIKit shell with native input, text, accessibility and lifecycle. Every simulator case passes on each push to dev, 0 command buffers are encoded while backgrounded, and after a memory warning the atlas and image-cache gauges fall to at most their launch values, with footprint within 10% of the warmed baseline. On the device, the scroll scene reaches at least 99% one-period frames at 120 Hz on an iPhone Pro, the IME conformance cases pass, and VoiceOver reaches and activates every Kit component.

What would help

Build iOS as one gated UIKit adapter over the shared runtime protocols. Start once R0113 and R0195 (which ports LayerHost onto the frame core) exist. R0726 comes first; the text, accessibility, settings and services issues build on it, and the lanes keep them proven.

Done when
  • Every child is closed.
  • Each threshold above holds, and the device numbers are committed.
How to check

The iOS simulator lanes (R0744, R0734, R0735) on each push to dev, plus a device checklist per release.

Issues
Depends on
Part of
  • Theme: T14
  • Phase 4 · priority P2 · size XL
R0724macOS: the shell patches winit's classes with trampolines, a KVO swap and view swizzlesP2Phase 4XLT14
platform-macos-shell-tracking · tracking
What happens

Beside the macOS code any shell needs (menus, clipboard, materials, displays), a large part of Rune's macOS host exists only to patch winit's objects:

  • panel_bridge.rs (357 lines) adds methods to winit's window class through naked-asm trampolines that read the caller's return address to decide whether a message came from Rune.
  • appearance.rs (78 lines) replaces winit's KVO observer implementation. Without it the process aborts when ReplayKit restyles a window.
  • reopen.rs adds applicationShouldHandleReopen: to winit's app delegate class.
  • Drag regions, drops and traffic lights subclass winit's view per instance (RuneDragRegions_, RuneDrops_).
  • PointerState carries click recovery because winit's view is moved into an NSPanel. platform/macos.rs holds 828 non-test lines, above the 800-line guideline.

Each winit release can break any of these silently. The work takes several stages because each owned class replaces a different winit role and needs its own soak in a real app.

Where
Why it matters

Users see crashes or dead panels when a winit update or an OS change moves one of these hooks. The target: Rune owns its shell seam, no out-of-band hook into winit goes unchecked, and the default macOS shell mutates no winit object. That means an exact (=) winit pin, 100% of hooks inventoried with 0 call sites missing, and 0 winit mutations once the owned macOS shell is the default.

What would help

Own the macOS shell in stages, as an adapter that produces the shell events from R0199: R0738 first (retires the trampolines), then R0739 with its view, then R0740. Each stage ships behind RUNE_SHELL=winit|native and an App builder method, soaks in a real app, then becomes the default. Its winit fallback is removed one release later. Windows and Linux stay on winit. Start only after R0061 and R0132 exist.

Done when
  • Every child is closed.
  • The native shell is the macOS default, and each stage's winit fallback was removed one release after it became the default.
  • A canary records winit's class method lists and object classes before and after startup, and sees 0 changes in the default build.
How to check

The class-change canary in the macOS GUI lane, on both GPU backends, on each push to dev.

Issues
Depends on
Part of
  • Theme: T14
  • Phase 4 · priority P2 · size XL
R0725Web: the web host refuses desktop hooks, files and pinch zoom, runs one app per page and misses its size targetP2Phase 4XLT14
platform-shells-web-tracking · tracking
What happens

The web host runs one app on one canvas and refuses much of what the desktop hosts accept. run returns an error when an app sets on_window or on_ready, opens a second window or uses an overlay. Each frame cancels pop-up menus and refuses file dialogs. The generated page sets user-scalable=no, so pinch zoom is blocked. The wasm is about 1.74 MB gzip with fonts off, above the research target of 1.5 MB brotli.

These gaps sit in different parts of the host (startup, page generation, input, size), so each is its own issue.

Where
Why it matters

An app that runs on the desktop should run on the web without forks, and readers who zoom or use a phone should be able to read it. The targets: the web build is a first-class target in every browser engine, desktop and mobile. Each .wasm is at most 1.5 MB brotli and the cold load at most 2.2 MB brotli, with a regression above 3% failing; 0 App hooks lack a stated web behaviour; several Rune apps or canvases can run on one page with 0 submits at rest. Rune also follows pinch zoom on the web (WCAG 1.4.4).

What would help

Work through the children, starting with the hook and page fixes, then files, size and several apps per page. All of them run in the browser lane from R0062.

Done when
  • Every child is closed.
  • Every web cell this work owns passes in Chromium, Firefox and WebKit.
How to check

The web browser lane in all three engines on each push to dev, and the wasm size gate.

Issues
Depends on
Part of
  • Theme: T14
  • Phase 4 · priority P2 · size XL
R0726iOS: there is no RuneView or Swift package, so a host app must drive frames, touches, keys and insets itselfP2Phase 4LT14
platform-ios-runeview · feature
What happens

Rune runs on iOS only as rune::embed::LayerHost, a struct that a host app attaches to its own CAMetalLayer. The host creates the layer and runs its own CADisplayLink. It calls LayerHost::frame on each tick, then reads animating and wake_after_secs to decide when to tick again. LayerHost has no input API. A host reaches into runtime_mut() to deliver touches, and it has no path for hardware keyboard keys, iPad pointer hover, or safe-area and keyboard insets.

An iPhone caps a third-party Metal view at 60 Hz unless the app sets CADisableMinimumFrameDurationOnPhone in its Info.plist and a preferredFrameRateRange on the display link. No Swift package, sample app or test target exists. So every iOS app writes this glue again, and the repo cannot test any of it.

Where
Why it matters

Next to SwiftUI on a ProMotion iPhone, a list that scrolls at 60 Hz looks broken. The target: "iOS ships as a UIKit shell with native input, text, accessibility and lifecycle", with "at least 99% one-period frames at 120 Hz in the scroll scene on the iPhone Pro". On every host, input-to-present p95 is at most 2 periods, and an app at rest makes 0 presents per second beyond the caret or media rate.

What would help

Ship a SwiftPM package with RuneView: UIView:

  • layerClass returns CAMetalLayer, and layoutSubviews updates the drawable size.
  • RuneView drives the shared frame core from R0195, where LayerHost is ported, so pacing, wake times and frame refusal live in Rune.
  • A CADisplayLink with CAFrameRateRangeMake(80, 120, 120) while animating, paused at rest and woken for timer deadlines. The sample app's Info.plist sets the key, and the docs tell apps to set it.
  • Input as shell::Event from R0199: UITouch with timestamps, plus coalesced and predicted touches; hardware keys through pressesBegan and UIKeyCommand; iPad pointer hover through UIHoverGestureRecognizer and UIPointerInteraction.
  • Insets through a builder method or setter, since apps build Env as a literal.
  • A text input view that implements R0113, which R0730 fills in.
  • A SwiftUI wrapper (UIViewRepresentable), a sample app and an XCUITest target, built by R0244.
  • Measure wgpu's Metal backend against Rune's own with embed_cost, then pick the iOS default.

The split-process dev mode stays a separate question.

Done when
  • The package builds with SwiftPM, and the sample app's XCUITest passes on the simulator lane.
  • On an iPhone Pro, the scroll scene has at least 99% one-period frames at 120 Hz over at least 10,000 frames, with the numbers committed.
  • Touch velocity uses UITouch timestamps, and hardware keys, shortcuts and iPad pointer hover reach the view in XCUITest.
  • Safe-area and keyboard insets reach the runtime.
  • The display link is paused, and 0 frames are presented at rest.
  • A minimal screen needs only a RuneView and an AppSpec, with no display link in the host.
How to check

XCUITest on the simulator on each push to dev. Cadence numbers from the scroll scene on a reserved iPhone Pro at each release, committed. embed_cost for CPU per frame on each backend.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size L
R0727Recorder: audio recording is missing on iOSP3Phase 4MT13
platform-recorder-ios · feature
What happens

Recorder's only real backend is compiled for macOS. On iOS, start ends in Failed("recording isn't supported on this platform"), and Recorder::permission() always reports Restricted. A voice-note or dictation feature can't ship in an iOS build.

The macOS backend uses AVAudioRecorder, which iOS also has. Two parts of it are macOS only: CoreAudio's system-object query for the default input device, and the lack of an AVAudioSession, which iOS needs before any recording.

Where
Why it matters

The target is that Player, Recorder and images "work on every platform and are safe on hostile input", every case ending "in a safe result within 30 s: a readable failure, or a bounded result". iOS is meant to ship "as a UIKit shell with native input, text, accessibility and lifecycle". A phone gets calls, Siri and headset changes mid-recording, so interruptions are the normal case there.

What would help

Add an iOS backend on AVAudioSession. There are two options:

1. Build the existing AVAudioRecorder backend for target_vendor = "apple", and replace the CoreAudio device watcher with AVAudioSession route-change notifications on iOS. This shares the encoder, metering and file handling that macOS tests already cover. 2. Write a new backend on AVAudioEngine with an input tap and AVAudioFile, as first proposed. This gives sample access but duplicates the metering.

Option 1 is the smaller change. Either way:

  • Set the record category (or playAndRecord while a Player plays) on start and deactivate the session on stop.
  • Map record permission to MicPermission, and fail with a readable message when NSMicrophoneUsageDescription is missing, as macOS does.
  • An interruption or route change finishes the file and reports Interrupted(reason).
  • stop must not block the UI thread (R0443).
Done when
  • start, stop and dropping the last handle record a complete AAC and WAV file on iOS.
  • Permission denial ends in Failed with a readable message, and nothing crashes.
  • A simulated interruption and a route change each finish a playable file and report Interrupted.
  • The headless fake's tests pass unchanged.
  • The capability matrix marks Recorder Native on iOS.
How to check

A simulator test in the iOS lane records, interrupts and finishes a file in each case. The RuneView host from R0726 runs it. The iOS device checklist adds a real interruption from a call or Siri.

Depends on
Part of
  • Theme: T13
  • Tracked in R0719
  • Phase 4 · priority P3 · size M
R0728iOS: VoiceOver sees nothing inside a Rune viewP1Phase 4LT14
a11y-ios-adapter · feature
What happens

LayerHost draws Rune on iOS, but no accessibility adapter runs there. Adapter::new returns None on iOS, and the accessibility feature pulls in only the Windows, macOS and Unix AccessKit adapters. A VoiceOver user meets an empty view: no buttons, no text, no headings. The runtime already builds the AccessKit tree and routes activation and actions through AccessibilityLink's inbox on the desktops. iOS has nothing that hands that tree to UIKit.

Where
Why it matters

Blind and low-vision users can't use any part of an app built on a Rune view, and no WCAG audit can pass. The targets: one semantic tree on every target and host kind, with 100% of scenes matching on all five targets; an app built on Rune and Kit can pass an independent WCAG 2.2 A and AA audit on iOS by the end of phase 4; VoiceOver on iOS drives Rune in automated lanes, with focus rects within 1 pt of the drawn rects; and VoiceOver reaches and activates every Kit component.

What would help
  • Add accesskit_ios to the accessibility feature for iOS, and an iOS Adapter that wraps it behind AccessibilityLink on R0726's view. Hosts that use LayerHost directly pass their UIView through a builder method.
  • Activation, deactivation and actions go through the existing inbox, so a VoiceOver activation runs the same handler as a tap.
  • Convert frames to screen coordinates through the view's window on each layout, rotation and safe-area change.
  • Map modal nodes to accessibilityViewIsModal, headings to the rotor, adjustable controls to increment and decrement, and live regions to announcements.
  • Add an iOS column to the AccessKit-to-platform mapping table, so the golden tests compare like with like.
  • Plan time for upstream fixes to accesskit_ios, the youngest adapter.
Done when
  • Every Kit gallery scene in the iOS Simulator matches its AccessKit golden through the iOS mapping table.
  • Element frames are within 1 pt of the drawn rects after a rotation.
  • Activating a button runs on_press, and an open modal hides the background from VoiceOver.
  • Removing and re-adding the host view gives a whole tree on the next update.
  • A refused or failed adapter shows as a procwatch warning and in --tree.
How to check

The simulator audit lane R0734 runs the gallery goldens and frame checks on each push to dev. R0735 drives real VoiceOver.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P1 · size L
R0729iOS: text ignores Dynamic TypeP1Phase 4MT14
a11y-ios-dynamic-type · feature
What happens

iOS users set a text size for the whole system, from xSmall up to the five accessibility sizes, where body text reaches about 310% of its default. SwiftUI and UIKit text follow it and reflow live. A Rune view keeps fixed sizes. Env carries only appearance and display scale, there is no Cx text scale, and Kit's Type scale is a fixed set of point sizes.

Where
Why it matters

Low-vision users set a large size once and expect every app to honour it. A Rune view that stays small fails WCAG 1.4.4, and it stands out next to SwiftUI views in the same app. The target: Rune follows the system's accessibility settings on every target and applies a change live, text size included, with every cell green or n/a with the platform reason, and 0 reflow-lint findings: no clipped, overlapping or unreachable content, except truncation a component marks and whose full text stays reachable.

What would help
  • Read traitCollection.preferredContentSizeCategory in R0726 and register for its trait change. Feed it into Cx::text_scale from R0681, and re-run the view on a change.
  • Scale each Kit Type style by UIFontMetrics(forTextStyle:).scaledValue(for:) of its own base size, as SwiftUI's .font(.system(size:relativeTo:)) does, rather than by one factor. Large styles grow less than small ones at the accessibility sizes.
  • Add a mapping table from Kit styles to UIFont text styles: ui and body to .body, small to .caption1, ui_compact to .callout, mono to .body, and titles to .headline or .title3. Line heights scale with their style.
  • Leave a per-element opt-out for fixed-size chrome, as dynamicTypeSize(...) limits do in SwiftUI.
Done when
  • At every category from xSmall to AX5, each Kit style is within 1 pt of UIFontMetrics scaling for its mapped text style, as SwiftUI renders it.
  • A category change applies on the next frame, in portrait and landscape.
  • The reflow lint from R0463 passes for every Kit gallery scene at AX5 at 320 pt wide.
  • VoiceOver frames from R0728 stay within 1 pt of drawn rects at AX5.
How to check

A simulator test sets each content size category through UIApplication launch arguments, then compares Kit sizes with a SwiftUI reference view in the same run. The reflow lint runs at AX5 in the iOS lane on each push to dev.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P1 · size M
R0730iOS: Rune fields have no UITextInput, so they get no software keyboard, marked text, autocorrect or dictationP1Phase 4LT14
text-ime-ios · feature
What happens

LayerHost exposes runtime_mut and leaves all input to the host app. Nothing in Rune adopts UITextInput, so focusing a Rune field never raises the software keyboard. Japanese and Chinese marked text, dictation, autocorrect and text replacements can't work, and secure entry and keyboard types can't be asked for. PLAN names iOS UITextInput as the place custom-rendered frameworks most visibly fail, and lists it among the top three risks.

Where
Why it matters

On a phone, a field without the keyboard is a field nobody can use. Users who type Japanese, dictate or rely on autocorrect notice at once. The targets: every input method talks to a Rune-owned document protocol, with 100% of the iOS UITextInput scenarios passing headless and 0 invariant violations in 100,000 seeded sequences; Rune fields offer the services the native field offers (dictation, autocorrect, keyboard type, secure entry); text input uses each platform's own protocol in every host type, with at most 4,096 units and under 1 ms per query; and on an iPhone the IME conformance cases pass.

What would help
  • Add a RuneTextInputView inside R0726: a UIView that adopts UITextInput (which includes UIKeyInput) and becomes first responder while a Rune field has focus.
  • Implement it against R0113's windowed UTF-16 ranges. UITextPosition and UITextRange subclasses wrap offsets plus a generation stamp, and a stale range answers nil.
  • Coalesce inputDelegate textWillChange/textDidChange and selection calls on the main queue, outside UIKit's callbacks.
  • Take UITextInputTraits from R0116: keyboardType, textContentType, autocorrectionType, autocapitalizationType, returnKeyType and isSecureTextEntry.
  • Answer firstRect(for:), caretRect(for:) and selectionRects(for:) from Rune's text layout, so the candidate bar and dictation placement match the glyphs.
  • Route hardware keyboard shortcuts through pressesBegan and UIKeyCommand to Rune's key path.
  • Selection handles and the loupe are R0743; spelling is R0747; AutoFill is R0745.
Done when
  • On the simulator and a device, focusing a field raises the keyboard and blur lowers it.
  • Japanese kana marked text and conversion commit as in a UITextView.
  • Dictation inserts at the caret, and autocorrect replaces a word.
  • Hardware keyboard shortcuts reach Rune.
  • The IME conformance cases from R0114 pass through the UIKit driver.
How to check

Replay fixtures recorded from UIKit run headless on each push to dev. R0744 drives the software keyboard, marked text and dictation in the simulator.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P1 · size L
R0731Android: Rune apps cannot run on AndroidP3Phase 4XLT14
platform-android-shell · tracking
What happens

Rune has no Android shell, IME or accessibility. The Android code is only cfg skips: arboard and the Linux Wayland and X11 crates are left out on Android, and the clipboard worker opens nothing. PLAN's platform order ends with Android as M7, after iOS.

This takes several issues. A spike first measures what Rune costs on Android and which host to use, and records the numbers. The shell itself is large and should reuse the text-input and lifecycle shapes that iOS proves first.

Where
Why it matters

Apps that ship on iOS also need Android, and a framework without it sends teams elsewhere. The target: Android runs Rune apps with native IME, accessibility, lifecycle and pacing. Every emulator case passes on each push to dev, aarch64-linux-android checks pass on every merge, the device reaches at least 99% one-period frames in the scroll scene with 0 presents while stopped and the numbers committed, and the template builds both an APK and an AAB in CI.

What would help

R0657 measures first. It needs only the shared frame core and the text-input protocol, and writes its emulator and device numbers and a recommended host to research/40. If it recommends a shell, build it after the iOS text input (R0730) ships, on API 29 through the current release:

  • Choreographer pacing, and touch with MotionEvent history and timestamps.
  • An InputConnection IME on the text-input protocol.
  • Accessibility through accesskit_android.
  • Back through OnBackPressedDispatcher, lifecycle with GPU release, state restoration after process death, rotation and window insets.
  • Clipboard, and intents for URLs.
  • A Gradle template that builds an APK and an AAB.
Done when
  • research/40 records the spike's numbers and a recommendation.
  • If the shell ships, the kit gallery passes IME, TalkBack, back, lifecycle, rotation and restoration cases on API 29 and the current API in CI.
  • On a 120 Hz device, the scroll scene reaches at least 99% one-period frames, and 0 frames are presented while stopped.
  • The template builds an installable APK and AAB in CI.
How to check

An Android emulator lane on each push to dev, aarch64-linux-android checks on every merge, and a device lane per release.

Issues
Depends on
Part of
  • Theme: T14
  • Phase 4 · priority P3 · size XL
R0732iOS: VoiceOver's escape, magic tap and three-finger scroll have no Rune routeP2Phase 4MT14
a11y-ios-gestures · feature
What happens

VoiceOver users dismiss a sheet or go back with a two-finger Z scrub (escape), run the main action with a two-finger double tap (magic tap), and page through content with three-finger swipes. UIKit sends these as accessibilityPerformEscape, accessibilityPerformMagicTap and accessibilityScroll(_:) up the responder and element chain. Rune's iOS host overrides none of them. It also posts no screenChanged notification when a modal opens and no layoutChanged or pageScrolled after a scroll, so VoiceOver keeps its cursor on content that is gone or hidden.

Where
Why it matters

Without escape, a VoiceOver user who opens a Kit dialog can't close it with the gesture they use everywhere else, and may be stuck. Without three-finger scroll, a long list has to be read item by item. The targets: an app built on Rune and Kit can pass an independent WCAG 2.2 A and AA audit on iOS by the end of phase 4; and a screen reader's own cursor reaches row 10,000 and the last line of long content and walks back to row 1, with set size and index correct at every step, and custom actions run their handlers on all five targets.

What would help
  • Escape: map accessibilityPerformEscape to the topmost modal's dismissal, the same path Escape takes on a hardware keyboard, and return whether something closed.
  • Magic tap: add an app-level hook, for example App::on_magic_tap, that returns whether it handled the tap. Unhandled taps go on to UIKit (which pauses media).
  • Scroll: map accessibilityScroll(_:) to paging the focused scroll view by one viewport, and post pageScrolled with a status string such as "Rows 41 to 60 of 10,000".
  • Notifications: post screenChanged with the modal's first element when a modal opens, and layoutChanged after a scroll or a large tree change.
  • Offer row actions as UIAccessibilityCustomAction through the adapter.
Done when
  • Calling accessibilityPerformEscape closes a Kit Dialog in an XCUITest and returns true.
  • accessibilityScroll(.down) pages a 10,000-row virtual list, and the status string has the right indexes.
  • The magic-tap hook runs when set, and UIKit's default runs when it's not.
  • Opening a modal posts screenChanged with focus on its first element.
  • The real gestures pass in R0735.
How to check

XCUITest cases call the accessibility methods directly in the simulator lane on each push to dev. R0735 drives real VoiceOver gestures.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size M
R0733iOS: Bold Text, Increase Contrast, Reduce Transparency and Smart Invert are not readP2Phase 4MT14
a11y-ios-settings · feature
What happens

iOS exposes Bold Text, Increase Contrast, Reduce Transparency and Smart Invert through UIAccessibility, each with a change notification, and SwiftUI apps follow them live. Rune's preference readers cover macOS, Windows and Linux. Every other target returns false. So on iOS, Kit text keeps its weights with Bold Text on, colours keep their contrast with Increase Contrast on, and glass stays translucent with Reduce Transparency on.

Rune draws into one GPU layer. Smart Invert inverts views as a whole unless a view sets accessibilityIgnoresInvertColors, so it may invert photos and video along with the UI. Nobody has checked what happens.

Reduce Motion on iOS is R0656.

Where
Why it matters

Users with low vision turn on Bold Text and Increase Contrast to read at all, and users who find blur distracting turn on Reduce Transparency. Users of Smart Invert see photos turned into negatives if media inverts. The target: Rune follows the system's accessibility settings on every target and applies a change live, including increased contrast and reduce transparency, with every cell green or n/a with the platform reason.

What would help
  • Extend the iOS preference source in R0726 to read isBoldTextEnabled, isDarkerSystemColorsEnabled and isReduceTransparencyEnabled, or the matching trait values (legibilityWeight, accessibilityContrast). Follow their notifications and feed the cross-platform settings.
  • Bold Text raises every Kit weight one step.
  • Increase Contrast selects the high-contrast palette from R0683.
  • Reduce Transparency turns glass opaque through R0469.
  • Smart Invert: test first in the simulator with a Kit scene holding a photo and a video. If the whole layer inverts, there are two options. Read isInvertColorsEnabled and draw media pre-inverted, or place media in sublayers that set accessibilityIgnoresInvertColors. Recommended: sublayers where Rune already draws media in its own layer, since UIKit then handles the inversion; pre-invert only images drawn into the main layer.
Done when
  • Each setting has a fake-source test that checks the Kit result (weight, palette, opacity).
  • The iOS lane changes each setting while the app runs and sees it applied on the next frame.
  • Under Smart Invert, a photo and a video keep their own colours in a simulator screenshot, within 2/255 per channel of the reference.
  • Each setting's iOS cell in the settings matrix is green.
How to check

Fake-source unit tests run headless on each push to dev. The iOS simulator lane toggles each setting and compares screenshots on each push to dev.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size M
R0734iOS: no simulator test runs an accessibility audit on a Rune viewP2Phase 4MT14
a11y-lane-ios · infra
What happens

On iOS a Rune view is a LayerHost that the host app drives on its own CAMetalLayer. Rune builds no platform accessibility tree there: a11y::Adapter::new returns None on iOS, so VoiceOver sees one opaque view. R0728 adds the adapter. Once it lands, nothing checks what it exposes.

XCUITest can read every UIAccessibility element and run Apple's performAccessibilityAudit. But the repo has no Xcode project, no Swift package and no iOS CI job. The only workflows are site.yml and www.yml. A wrong label, a missing trait or an offset frame on iOS would ship without a red build.

Where
Why it matters

A VoiceOver user on iPhone or iPad meets a bad label as a control they cannot find or cannot name. The target is one semantic tree, built from the one AccessKit tree, with "100% of scenes match on all 5 targets", and API lanes that are "green on every merge". For iOS, the WCAG 2.2 A and AA matrix must have 0 Rune or Kit cells marked "fails" or "partial" by the end of phase 4. Every machine-testable cell must name a test that passed in the latest run.

What would help
  • Host the Kit gallery in the sample app that R0726 ships, with the adapter from R0728.
  • In the sample app's XCUITest target, walk every gallery scene. For each element, read the label, traits, value and frame. Map them through the AccessKit-to-UIAccessibility mapping table and compare them with the AccessKit goldens that the other platforms use. The exceptions table holds only representation differences that lose no meaning.
  • Then call performAccessibilityAudit on each scene with no allowlist.
  • Run the target on the iOS Simulator in the macOS job from R0244, on every merge to dev.
  • On a failure, print the scene, the element and the field that differs.

The simulator misses behaviour that shows only on a device or with a real screen reader. R0735 covers that.

Done when
  • Every Kit gallery scene matches its AccessKit golden through the mapping table on the simulator.
  • Element frames are within 1 pt of the drawn rects.
  • performAccessibilityAudit reports 0 issues with an empty allowlist.
  • The lane runs on every merge to dev and is green.
  • Each machine-testable iOS cell in the WCAG matrix names a test from this lane.
How to check

The XCUITest target on the iOS Simulator in the macOS CI job, on every merge. It compares against the same AccessKit goldens as the headless tests and the desktop lanes, so a Kit change that breaks iOS fails in the same run.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size M
R0735iOS: nothing tests VoiceOver, Voice Control or Switch Control driving a Rune viewP2Phase 4LT14
a11y-lane-ios-at · infra
What happens

Element queries and the accessibility audit in R0734 show what a Rune view exposes. They do not show that a person can use it. On iOS that means VoiceOver swipes, double-tap, the two-finger scrub, magic tap and three-finger scroll. It also means Voice Control's "Tap <name>" and "Show numbers", and Switch Control's item and point scanning. Most iOS users with disabilities reach apps through one of these.

Nothing in the repo drives any of them against a Rune view. The web build has never run under VoiceOver in iOS Safari. Today a Rune view on iOS has no accessibility tree at all, so every scenario fails until R0728 and R0732 land.

Where
Why it matters

The target says real assistive technology drives Rune on each platform in automated lanes, VoiceOver on iOS included, and that "Voice Control, Voice Access and Switch Control can reach and operate every control." Each critical scenario must pass on each of the last 14 nights, with infrastructure failures counted apart from product failures. Every red product run opens an issue with its transcript, and each human check is less than 6 months old. For iOS, the WCAG 2.2 A and AA matrix must have 0 Rune or Kit cells marked "fails" or "partial" by the end of phase 4.

What would help

Run the scenarios over a form, a list and a dialog from the Kit gallery, plus a long virtual_rows list:

  • VoiceOver, on the simulator and on a reserved device or device farm: swipe through every element, double-tap to activate, scrub to close the dialog, magic tap, and three-finger scroll. Capture spoken output from VoiceOver's caption panel and compare it with the expected transcript.
  • Long list: VoiceOver's own next and previous commands, over focusable and plain rows, reach row 10,000 and come back. This shows that the reader's own cursor mounts the next range. A headless walk that calls ScrollIntoView itself does not count. This is the iOS part of the cross-reader speech certification that runs the same steps on VoiceOver for macOS, NVDA, Narrator, Orca and three browser pairs.
  • Voice Control: "Tap <name>" on each control, and "Show numbers" then a number.
  • Switch Control: item scanning and point scanning reach and activate every control.
  • Web: the same VoiceOver scenario in iOS Safari on the web build.
  • Steps that cannot be automated become human checks in the WCAG matrix, with the date and the iOS version.

Automation of VoiceOver and Switch Control on iOS is limited, so expect several human checks.

Done when
  • Every scenario passes under VoiceOver, Voice Control and Switch Control, scripted or by a human check less than 6 months old.
  • VoiceOver's own next command reaches row 10,000 of the long list, and previous returns to row 1, on focusable and plain rows.
  • VoiceOver in iOS Safari passes the web scenario.
  • Each scripted critical scenario passed on each of the last 14 nights, with infrastructure failures counted apart.
  • A product failure opens an issue with its transcript or capture.
How to check

A nightly iOS lane on the simulator and the reserved device. A script reads the WCAG matrix and fails the lane when a human check is older than 6 months.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size L
R0736Layout: iOS apps would draw under the notch, home indicator and keyboard, because nothing reports their insetsP2Phase 4MT14
layout-safe-area-ios · feature
What happens

Cx::safe_area returns the browser's safe-area insets on the web and [0.0; 4] on every native target. Rune has no keyboard inset at all. LayerHost, the iOS host today, takes a viewport and a scale and nothing else. It builds its Env from dark and scale alone.

So an iOS app built on Rune lays out under the notch or Dynamic Island, under the home indicator, and under the software keyboard. A field at the bottom of a form is hidden as soon as it takes focus. On rotation the insets move to other edges, and nothing tells the layout.

Where
Why it matters

On a phone, users see clipped titles, buttons under the home indicator that trigger the home gesture, and fields they type into without seeing them. The target is portable layout "with platform insets feeding layout", "insets reported on iOS, web and notched macOS fullscreen where the content view overlaps", and identical layout digests across the 5 targets at each scale.

What would help
  • In RuneView (R0726), override safeAreaInsetsDidChange and read UIView.safeAreaInsets in points. Pass them through a runtime setter or a builder method, not a new pub Env field, since apps build Env as a literal.
  • Observe UIKeyboardWillChangeFrameNotification. Convert UIKeyboardFrameEndUserInfoKey into the view's coordinate space, intersect it with the view's bounds, and report the bottom inset. Animate the inset with the notification's duration and curve, so content moves with the keyboard and not after it. Curve 7 is UIKit's private spring, so match it with a spring. Consider keyboardLayoutGuide with followsUndockedKeyboard, which tracks interactive dismissal frame by frame.
  • When the keyboard covers the focused field from R0730, scroll the field above the keyboard through the existing focus scroll-into-view path.
  • In layoutSubviews, update the drawable size and the insets in the same pass, so the first frame at a new size has the new insets.
  • An undocked or floating iPad keyboard gives a bottom inset of 0.
Done when
  • On an iPhone simulator with a Dynamic Island, content is inset by the reported safe area on all four edges, in portrait and landscape.
  • Focusing a field at the bottom keeps it above the keyboard, and the inset follows the keyboard's duration and curve.
  • Rotation updates the insets in the same frame as the new size. No frame has the new size with the old insets.
  • An undocked iPad keyboard gives a bottom inset of 0.
  • A headless layout test with fixed insets gives the same rects on every target.
How to check

XCUITest cases on the iOS simulator lane, on an iPhone with a Dynamic Island and on an iPad. A headless layout test feeds fixed insets and checks rects, so a regression also fails without a simulator.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size M
R0737iOS: no adapter stops Rune drawing in the background or frees its caches on a memory warningP2Phase 4MT14
platform-ios-lifecycle · feature
What happens

iOS ends an app that encodes GPU work after it enters the background. It also expects apps to free caches when memory runs low. Rune leaves both jobs to the host app. LayerHost's docs tell the host to pause its display-link calls in the background. LayerHost::frame stops drawing only when the viewport is zero, and it takes no lifecycle input. No UIKit adapter maps scene events to Rune, so every host has to get this right. A host that lets one display-link tick through after didEnterBackground crashes.

Nothing frees the glyph atlas or decoded images on a memory warning. The desktop has release paths, App::release_gpu_when_closed and OverlayOptions::release_gpu_when_hidden, but LayerHost has none. iOS is then more likely to end a backgrounded Rune app to reclaim its memory.

Where
Why it matters

A crash or a reload after a trip to the home screen is among the first things an iOS user notices. The target is a UIKit shell with native lifecycle: "0 command buffers are encoded while backgrounded. After a memory warning, atlas and image-cache gauges fall to at most their launch values, and footprint is within 10% of the warmed baseline." A hidden app costs "at most 1% of a core".

What would help

In RuneView (R0726), map sceneDidEnterBackground, sceneWillEnterForeground, sceneWillResignActive, sceneDidBecomeActive and UIApplication.didReceiveMemoryWarningNotification to shell::Event lifecycle events.

  • Background: pause the CADisplayLink, and have Rune's frame path refuse a frame before it acquires a drawable or encodes. This lives in Rune, not in the host. Count command buffers with a debug counter that the XCUITest can read.
  • Memory warning: drop glyph atlas pages and decoded images that the current frame does not use. Rebuild them on demand. Report the result through the procwatch gauges.
  • Foreground: keep the last presented drawable on the layer, so the system snapshot and the first frame back match. Draw the next frame within one refresh.
  • A host app needs no lifecycle code of its own.
Done when
  • 0 command buffers are encoded while backgrounded, counted by a hook that the XCUITest reads.
  • After a memory warning, the atlas and image-cache gauges are at most their launch values, and footprint is within 10% of the warmed baseline.
  • On return to the foreground, the last frame shows within one refresh, with no blank frame.
  • The sample app has no lifecycle code outside RuneView.
How to check

XCUITest on the simulator in the macOS job. It sends the app to the background with the home button, reads the command-buffer counter, posts the memory-warning notification in the sample app, and reads the gauges and footprint before and after.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size M
R0738macOS: non-activating panels move winit's content view into an NSPanel and patch winit's window class to copeP2Phase 4LT14
platform-macos-rune-panel · refactor
What happens

A non-activating overlay panel on macOS starts as a winit window. adopt_kind then creates a RuneOverlayPanel, moves winit's content view and its Metal layer into it, and points the panel's delegate at winit's window delegate. winit still holds its original window, so panel_bridge adds 15 forwarding methods to winit's own window class with class_addMethod. These make readbacks describe the panel.

-contentView is a naked-assembly trampoline. It reads the caller's return address and gives the moved view only to code in Rune's or winit's image. Other code that restyles the hidden source window could pull the view out of the panel. ReplayKit does this when a ScreenCaptureKit stream starts. So keep_view checks the view on every pointer observation and reattaches it.

Pointer input on a non-key panel comes from NSEvent global and local monitors and a 120 Hz poll. When the transplant loses a release, PointerState gives up on it after 100 ms, or after 2 s when an Up is queued.

Where
Why it matters

The target: "Rune owns its shell seam: no out-of-band hook into winit goes unchecked, and the default macOS shell mutates no winit object", with one shared SurfaceHost and 0 mutations once the owned shell is the default. Users see the current design as a launcher button that stays pressed for up to 2 s after a lost release, or a panel that loses its view when screen recording starts.

What would help
  • Add RunePanel, an NSPanel subclass that Rune creates, with its own RuneView and CAMetalLayer. It renders through the shared surface host from R0194 and feeds shell::Event directly. There is no view transplant, no borrowed delegate and no forwards.
  • Keep event monitors only where a non-key panel needs them for hover.
  • Select the shell with RUNE_SHELL=native and an App builder method. The winit path stays the default until the soak passes.
  • Keep each panel's Space, level, collection behaviour and activation as adopt_kind sets them today.
Done when
  • Overlays and launcher panels run on the native shell with no panel_bridge method installed, and the class-change canary reports 0.
  • Hover, drag and release on a non-key panel behave as on the winit path in GUI tests, and the timed lost-release recovery never runs.
  • overlay_soak, macos_overlay_source and overlay_gpu_lifecycle pass on both shells and both GPU backends.
  • A panel keeps its view, Space and level across a ScreenCaptureKit stream start.
  • The overlay soak runs on the native shell for a release before the default changes.
How to check

The macOS GUI lane from R0061, with RUNE_SHELL=native and with both values of RUNE_GPU_BACKEND. The class-change canary from R0132.

Depends on
Part of
  • Theme: T14
  • Tracked in R0724
  • Phase 4 · priority P2 · size L
R0739macOS: drag regions, drops and traffic lights swizzle winit's view per instanceP2Phase 4LT14
platform-macos-rune-window · refactor
What happens

App windows on macOS use winit's content view. Rune changes that view's class at run time, once for each feature:

  • Drag regions: RuneDragRegions_<class> overrides mouseDownCanMoveWindow.
  • Drops: RuneDrops_<class> adds the five NSDraggingDestination methods.
  • Traffic lights: RuneTrafficLights_<class> overrides layout to place the buttons again.
  • AccessKit's macOS adapter subclasses the same view. Window creation must install it first, "before anything observes the view".

Each one is object_setClass on a live winit object, and the install order matters. To draw a window's first frame before the window server reports it visible, PresumeShown also swaps the CAMetalLayer's delegate for a stand-in object, so wgpu's occlusion check passes.

Where
Why it matters

The target: "Rune owns its shell seam: no out-of-band hook into winit goes unchecked, and the default macOS shell mutates no winit object", with 0 mutations once the owned macOS shell is the default. One winit change to its view class, such as new ivars or a different -class, can break drag regions, drops, traffic lights and VoiceOver in the same release. A change to the install order can leave VoiceOver with nothing to read.

What would help
  • Add RuneWindow, an NSWindow subclass. Its content view is the RuneView from R0193, which already takes NSTextInputClient from winit's view.
  • Grow RuneView so that mouse and key events, NSDraggingDestination with file promises, mouseDownCanMoveWindow for drag regions and traffic-light placement in layout are plain methods.
  • Attach AccessKit to RuneView when it is created.
  • Make the layer's delegate Rune's own, so the first-frame case becomes a flag and not a delegate swap.
  • Ship it under RUNE_SHELL=native after R0738.
  • Turn the key routing list into a test that runs on both shells, full keyboard access and menu key equivalents included.
Done when
  • App windows on the native shell have 0 isa swizzles, and the class-change canary reports 0.
  • Drag regions, drops with positions and file promises, traffic lights and accessibility pass their GUI tests on both shells.
  • The first frame draws on the native shell without PresumeShown, and the launch tests pass.
  • The key routing test passes on both shells.
How to check

The macOS GUI lane on both shells: accessibility_macos, menu_key_equivalent_macos, macos_drag_out and the drop and traffic-light tests. The class-change canary from R0132.

Depends on
Part of
  • Theme: T14
  • Tracked in R0724
  • Phase 4 · priority P2 · size L
R0740macOS: reopen, URLs and termination are injected into winit's app delegateP2Phase 4MT14
platform-macos-app-delegate · refactor
What happens

winit owns NSApplication's delegate and the run loop. Rune grafts app-level events onto them at run time:

  • Reopen: Rune adds applicationShouldHandleReopen:hasVisibleWindows: to winit's delegate class with class_addMethod.
  • Dock menu: Rune adds applicationDockMenu: the same way.
  • Incoming URLs: winit 0.30 does not forward them, so Rune installs a raw get-URL Apple event handler on NSAppleEventManager before the loop starts.
  • Appearance: Rune replaces winit's effectiveAppearance KVO observer with method_setImplementation. It finds the class by its name, WinitWindowDelegate. Without the wrapper, winit messages NSNull inside a callback that cannot unwind, and the process aborts.
  • Opened documents are not received at all (#157).

Each hook depends on winit's class names and methods. If a winit update renames a class or adds one of these methods, the behaviour changes without an error: reopen falls back to winit, and the Dock menu hook returns an error.

Where
Why it matters

The target: "Rune owns its shell seam: no out-of-band hook into winit goes unchecked, and the default macOS shell mutates no winit object", with 0 mutations once the owned macOS shell is the default. App services must match Electron, and Electron apps open the document a user double-clicks in Finder. A Rune app cannot.

What would help

After R0739, the native shell owns its own NSApplicationDelegate class:

  • applicationShouldHandleReopen:hasVisibleWindows:.
  • application:openURLs:, which receives both links and files. It replaces the Apple event handler and closes #157.
  • applicationDockMenu:.
  • applicationShouldTerminate: and applicationWillTerminate:.
  • Appearance changes, observed on Rune's own objects, which replaces the KVO swap.

Feed them as shell::Event lifecycle events into the existing hooks on_reopen and on_open_url, and a new cross-platform on_open_files builder method. Change the run loop last. Keep winit's loop until the panels and windows have run on the native shell for a release.

Done when
  • On the native shell, no class_addMethod or method_setImplementation call runs.
  • on_reopen, on_open_url and on_open_files pass their tests under both shells.
  • Opening a document from Finder delivers its path to on_open_files.
  • The NSNull appearance sequence that aborts on winit passes on the native shell.
  • The Dock menu check passes under both shells.
How to check

The macOS GUI lane under both shells: open_activates, macos_appearance_kvo, scripts/check-dock-menu-macos.py, and a new open-files test. The class-change canary from R0132 reports 0 changes on the native shell.

Depends on
Part of
  • Theme: T14
  • Tracked in R0724
  • Phase 4 · priority P2 · size M
R0741Web: only one Rune app can run per page, with one canvas per appP2Phase 4LT14
platform-web-multi-app · feature
What happens

On the web Rune runs one app per page, in one canvas. web::run refuses an app that has overlays or extra windows: "web supports one canvas; overlays and multiple windows are unsupported". page::start refuses a second app while one runs, because winit allows one event loop per page. A route can swap one app for another, but two cannot run together.

So a docs article cannot show two live demos side by side. A web app cannot open a second window, and a popover cannot draw outside its canvas. Each app would also need its own GPU device. The Apple embed host already shares one device in the process, but the web host does not.

Where
Why it matters

The target: "The web build is a first-class target in every browser engine, desktop and mobile", with "0 submits at rest" and "Several Rune apps or canvases can run on one page." The shell seam target asks for one shared SurfaceHost. Today a docs page shows one live example and screenshots for the rest. A web app that needs a second surface must be rewritten.

What would help

After R0194 and R0199 exist, build a web adapter that does not use winit. Canvas, requestAnimationFrame and ResizeObserver already go mostly through Rune's own JS bridge.

  • One page scheduler: one requestAnimationFrame callback drives every runtime that asked for a frame. With no requests, it schedules nothing.
  • One GPU device shared by every runtime and canvas on the page.
  • App::window opens another canvas in a container the app or page gives. Overlays become positioned canvases above the page.
  • Route input to the canvas that is the event target, and keep focus for each canvas.
  • When one app quits, the others keep running.
  • Keep the winit web host until the new one passes the same smoke tests. Then switch the default.
Done when
  • Two Rune apps run on one page and share one GPU device.
  • App::window opens a second canvas on the web.
  • An overlay draws as a positioned canvas outside the app's canvas.
  • With two apps at rest, the page makes 0 submits.
  • Quitting one app leaves the other running.
  • The existing web smoke tests pass on the new host in Chromium, WebKit and Firefox.
How to check

A browser smoke test with two apps on one page, in the web lanes for each engine. It counts device creations and submits through a test counter. The existing web smoke tests run on both hosts until the old one is removed.

Depends on
Part of
  • Theme: T14
  • Tracked in R0725
  • Phase 4 · priority P2 · size L
R0742iOS: VoiceOver cannot read, navigate or edit a Rune fieldP2Phase 4MT14
text-ios-field-a11y · feature
What happens

UITextInput gives VoiceOver the editing calls: insert, delete and the selection. VoiceOver also needs an accessibility element for the field. The element needs a label, a value, traits (secure text included) and a frame. It also needs line and word navigation, and the caret's position for the rotor and for braille.

Rune has no iOS accessibility backend. a11y::Adapter has macOS, Windows and Linux backends and returns None on iOS. So a Rune field on iOS is silent, even after R0730 brings up the keyboard. Kit's TextInput::secure and TextArea::secure mask the text on screen, but on iOS no element exists to keep that text from a reader.

Where
Why it matters

A blind user who cannot fill in a sign-in field cannot use the app. The target: "Screen readers can read, navigate and edit every Rune field on every platform as they do a native field. Secure fields expose nothing beyond what the platform's native secure field exposes." Headless checks pass for every field kind and size up to 1 MB, and every reader step passes on each platform.

What would help
  • Make RuneTextInputView, the UITextInput view from R0730, the accessibility element for the focused field.
  • Take accessibilityLabel, accessibilityValue, accessibilityTraits and accessibilityFrame from the field's AccessKit node, through the mapping that R0728 defines.
  • Implement UIAccessibilityReadingContent for line navigation over the protocol's text window. Map window lines to line numbers of the whole field, so a 1 MB field reads line by line without loading all of it.
  • For a secure field, record what a UITextField with isSecureTextEntry exposes, and expose exactly that.
  • Fields that are not focused come through the general adapter in R0728.
Done when
  • Headless tests check the element's label, value, traits and frame for plain, multi-line and secure fields, up to 1 MB.
  • VoiceOver on the iOS simulator announces the field's name and value, reads by line and word, and echoes typed and deleted characters.
  • A secure field announces no characters and matches the recorded UITextField baseline.
  • The element's frame is within 1 pt of the field's drawn rect.
How to check

Headless tests on every merge. VoiceOver steps for plain, multi-line and secure fields in the iOS screen-reader lane (R0735).

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size M
R0743iOS: no selection handles, loupe, edit menu or floating cursor over Rune textP2Phase 4LT14
text-ios-text-interaction · feature
What happens

A native iOS field gets selection handles, the loupe, the edit menu (Cut, Copy, Paste, Look Up, Translate), the space-bar trackpad cursor and Scribble from UIKit's UITextInteraction and UIEditMenuInteraction. A Rune field has none of these.

Rune draws its text on the GPU, so a hidden UITextField cannot stand in. Its own TextKit layout and gestures do not line up with Rune's lines. PLAN.md names iOS UITextInput, with selection handles and the loupe, as the place where custom-rendered frameworks fail most visibly.

Where
Why it matters

iOS users notice at once when a long press shows no loupe or a selection has no handles. The input target covers handwriting. The editing target asks that caret movement and selection "follow the bindings of the platform the user is on ... an iPad keyboard included". The services target lists "a Cut, Copy, Paste and Select All menu" and Look Up on iOS, in every cell where the native field has them.

What would help
  • Attach UITextInteraction(for: .editable) and UIEditMenuInteraction to RuneTextInputView from R0730. Answer caretRect(for:), selectionRects(for:) and firstRect(for:) from the protocol's rects, in view coordinates.
  • Implement beginFloatingCursor(at:), updateFloatingCursor(at:) and endFloatingCursor(), and draw Rune's own caret as it moves.
  • Support Scribble on iPad for the focused field and for fields that are not focused yet.
  • Use UITextInteraction(for: .nonEditable) for read-only selectable text.
  • Coalesce inputDelegate notifications on the main queue, so UIKit does not re-enter with stale state. Keep the view in the responder chain as iOS 17 requires.
  • Edit menu: Cut, Copy, Paste, Select All, Look Up and Translate.
Done when
  • A long press shows the loupe, and the handles drag the selection.
  • The edit menu offers Cut, Copy, Paste, Select All, Look Up and Translate, and each one works.
  • Space-bar trackpad mode moves the caret.
  • Apple Pencil Scribble inserts text on iPad.
  • Read-only selectable text shows handles and a Copy menu.
  • XCUITest covers each item.
How to check

XCUITest on the iOS simulator lane. Scribble and the floating cursor also run on the reserved iPad in R0744.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size L
R0744iOS: no lane drives the software keyboard, marked text, dictation or Scribble against a Rune fieldP2Phase 4MT14
text-ime-lane-ios · infra
What happens

Japanese kana conversion, Korean, Pinyin, dictation, autocorrect, the floating cursor and Apple Pencil Scribble all go through UIKit's text system, and several need real hardware. Rune has no UITextInput adapter yet. R0730 adds it, and R0743 adds handles, the edit menu and Scribble. After they land, nothing will drive a real keyboard against a Rune field.

Headless tests can replay UITextInput calls. They cannot show that the candidate bar, the marked-text underline and the commit behave as they do in UITextView. The simulator cannot run some steps at all, such as Scribble. winit's iOS backend implements only UIKeyInput, which is why Rune owns this protocol and must test it itself.

Where
  • research/11-platform-shells.md:10: winit on iOS implements only UIKeyInput, which breaks autocorrect, CJK input, dictation, Scribble and selection handles.
  • PLAN.md:213-218: UITextInput plus UITextInteraction on iOS.
  • PLAN.md:525-527: iOS UITextInput is where custom-rendered frameworks most visibly fail.
  • crates/rune/src/platform/embed.rs:129-135: the embedded host has no text-input path today.
  • #165: the soft keyboard closes after a tap focuses a field in iOS Safari.
Why it matters

A Japanese or Korean user who cannot convert text cannot use the app at all. The target covers "CJK, Korean, Vietnamese, dead keys, press-and-hold, emoji pickers, dictation and handwriting": "100% of real-IME lane scenarios pass on the lane at each release cut. A failure becomes a replay fixture, and the release waits until it passes." Rune fields must also offer dictation, autocorrect and text replacements wherever the native field does.

What would help

An iOS lane in two parts:

1. Simulator, on every push to dev. XCUITest adds the Japanese, Korean and Pinyin keyboards, types, converts and commits. It checks the field's text and selection through the runtime's tree. It also covers autocorrect, text replacements and #165's step: the keyboard stays up after a tap focuses a field in iOS Safari on the web build. 2. A reserved iPad with an Apple Pencil and a hardware keyboard, on dispatch and at each release cut. A scripted run covers Scribble insert and delete, the space-bar floating cursor, dictation, and hardware shortcuts. It records the iOS version with each result.

Each failure uploads a replay fixture: the log of UITextInput calls and the expected text. A headless test replays it, and the release waits until it passes.

Done when
  • Every input-method scenario that applies to iOS passes in the simulator on every push to dev.
  • The device run passes its Scribble, floating-cursor, dictation and shortcut steps, recorded with the iOS version.
  • #165's keyboard step passes on the same lane.
  • A failing scenario uploads its fixture and blocks the release until it passes.
How to check

The iOS simulator job from R0244 on every push, plus the reserved-iPad run at each release cut. Replay fixtures run in the headless text-input tests on every merge.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size M
R0745iOS: Writing Tools, password AutoFill and one-time codes never reach a Rune fieldP2Phase 4MT14
text-ios-writing-tools-autofill · feature
What happens

On iOS, Writing Tools, password AutoFill and one-time codes from Messages reach a field through UIKit. AutoFill and codes read textContentType from the field's UITextInputTraits. Writing Tools reads and rewrites text through UITextInput.

Rune fields have no UITextInput on iOS yet. The planned adapter (R0730) and interaction work (R0743) do not cover these three services. Rune also has no field purpose for an adapter to map: Kit's text fields know only whether they are secure (TextInput::secure). So a Rune sign-in form on iPhone offers no saved password and no code from Messages, and a Rune field offers no Proofread or Rewrite.

Where
Why it matters

A sign-in form without AutoFill makes users type a password by hand on a phone, and many give up. The services target lists "Writing Tools (macOS and iOS)", "input purpose and keyboard type, secure entry, password and one-time-code autofill", and allows a platform limit "only where it is named here". The iOS shell target asks for native input and text.

What would help
  • Set textContentType on RuneTextInputView from the field's input purpose: username, password, new password, one-time code, email and so on. Until a purpose API exists, a secure field maps to password.
  • Set the keyboard type from the same purpose.
  • Adopt Writing Tools through UITextInput, and through UIWritingToolsCoordinator where UIKit offers it to custom views. Opt secure fields and code fields out.
  • Apply a rewrite as one undo step.
  • Compare each service with a native fixture: a UITextField sign-in form and a UITextView.
  • If Apple offers custom views no API for a service, propose a named limit for that cell. Do not close the issue with the cell empty.
Done when
  • On the simulator and on a reserved iPhone, AutoFill offers the same saved credentials in a Rune form as in the UITextField fixture, and fills both fields.
  • A one-time code from Messages fills a code field on the device.
  • Proofread and Rewrite give the same result as in the UITextView fixture, and one undo reverts it.
  • Secure fields and code fields offer no Writing Tools.
  • Each service with no iOS API has a proposed named limit with the iOS version.
How to check

XCUITest fixture comparisons on the simulator lane. Device steps on the reserved iPhone in R0744, recorded with the iOS version.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P2 · size M
R0746iOS: clipboard, open URL, incoming links, menus and file pickers are missingP3Phase 4MT14
platform-ios-services · feature
What happens

Most services an app asks Rune for do nothing on iOS:

  • Clipboard: the clipboard worker opens no backend on iOS or Android, so copy and paste never leave the app.
  • Open URL: Tx::open_url returns "this platform can't open links".
  • Incoming links: App::on_open_url is never called. The docs say "iOS isn't wired yet (winit owns the scene delegate)".
  • Pop-up menus: LayerHost::frame cancels every pop-up menu.
  • File dialogs: LayerHost::frame refuses every file dialog.

An iOS app must build each one in Swift and route the results back into the runtime by hand.

Where
Why it matters

Users expect copy, paste, links and a file picker in every app. When they do nothing, the app looks broken. The iOS shell target asks for native input and services, and the registry target asks that "every platform claim in the docs comes from a checked registry", with each cell Native or carrying a named reason.

What would help
  • Clipboard: a UIPasteboard backend for the clipboard worker, for plain text, images and the other formats Rune already moves. Read the pasteboard only on a paste action, so iOS shows its paste prompt only when the user asked to paste.
  • Tx::open_url: UIApplication.open(_:options:completionHandler:) on the main thread.
  • on_open_url: deliver URLs from the scene delegate's scene(_:openURLContexts:) and from the launch options, through the same path macOS uses, so the link that launched the app arrives too.
  • Tx::popup_menu: a UIMenu shown through UIContextMenuInteraction at the anchor.
  • File dialogs: UIDocumentPickerViewController to open and export files, with security-scoped URLs.
  • Each service gets an XCUITest case and a Native cell in the capability registry from R0134.

AVFoundation playback and native video surfaces on iOS belong to the media backend work, not to this issue.

Done when
  • Copy in a Rune field and paste in Notes works, and the reverse.
  • Tx::open_url opens Safari for an https link.
  • A custom-scheme link, whether it launches the app or reaches it while running, calls on_open_url once.
  • Tx::popup_menu shows a native menu, and a choice reaches the callback.
  • Open and save dialogs return the chosen file.
  • Each service is Native on iOS in the registry, and names its passing test.
How to check

One XCUITest case for each service in the sample app on the simulator lane. The registry check fails when a Native iOS cell names a test that did not pass in the latest iOS run.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P3 · size M
R0747iOS: a Rune field shows no spelling underlines or suggestionsP3Phase 4ST14
text-spellcheck-ios · feature
What happens

UITextView underlines misspelled words and offers corrections in its edit menu. A custom UITextInput view gets keyboard autocorrect from UIKit, but no spelling underlines and no suggestions in the menu. Rune has no spell checking on any platform at this commit. R0578 adds a spell-check service with backends for macOS, Windows and Linux, but it has no iOS backend. So once R0730 and R0743 land, a Rune field on iOS still shows no red underlines.

Where
Why it matters

Users who write messages, notes or documents rely on underlines to catch typos that autocorrect misses. The services target lists "spell check, autocorrect and text replacements" in a matrix that the platform's native field sets, and the web is the only platform where spelling for custom-drawn text is a named limit. iOS is not, so this cell must be filled.

What would help
  • Add a UITextChecker backend to the spell-check service.
  • Check each edited paragraph off the main thread where UIKit allows it. Where it does not, check on the main thread in slices of at most 2 ms, so typing never drops a frame.
  • Draw the underlines with the same dotted decoration the desktop backends use.
  • Show suggestions in the UIEditMenuInteraction menu from R0743, and apply a choice as one undo step.
  • Turn checking off for code and password fields, and for secure fields.
  • Use a fake checker in headless tests, so the service's logic is tested without UIKit.
Done when
  • A misspelled word is underlined within 500 ms on the iOS lane.
  • Choosing a suggestion in the edit menu replaces the word as one undo step, in a headless test with the fake checker.
  • A code field and a secure field show no underlines.
  • No main-thread checking slice is longer than 2 ms.
How to check

Fake-checker tests in the headless text tests on every merge, and an XCUITest step on the iOS simulator lane that types a misspelled word and waits for the underline.

Depends on
Part of
  • Theme: T14
  • Tracked in R0723
  • Phase 4 · priority P3 · size S
R0748Accessibility: no screen reader or platform accessibility API runs in CI on any platformP1Phase 4XLT15
a11y-at-lanes · tracking
What happens

Rune's platform accessibility trees are checked only by hand. The macOS and Windows tests need RUNE_GUI_TESTS=1 on a logged-in desktop, and no workflow runs them. Linux has no AT-SPI test. The web has no browser accessibility check. iOS has none, and no reader's speech is captured. .github/workflows holds only site.yml and www.yml. A change that breaks VoiceOver, NVDA, Narrator or Orca reaches dev, and every app that pins it, with nothing failing.

This tracks one outcome. A lane reads every platform API after every merge to dev. Every supported reader and browser pair is heard nightly. The support matrix lists only combinations whose lanes keep passing. It takes several issues because each platform has its own API, harness and runner: AX (R0238), UIA (R0240), AT-SPI (R0237), the browser tree (R0239), the iOS audit (R0734), and iOS VoiceOver, Voice Control and Switch Control (R0735). The nightly speech lanes are listed below.

Where
Why it matters

Targets: "API lanes are green on every merge", and "each critical scenario passed on each of the last 14 nights for every combination listed as supported". "Each desktop lane runs its accessibility test with roles, names, an action, focus and a state change; the web lane asserts the DOM mirror; iOS adds its test when #110 lands." Every accessibility suite must be "required on dev", and a refusal must show "as a procwatch warning and in --tree".

What would help

Shared rules for every child lane:

  • API lanes run post-merge on every change to dev. Speech lanes run nightly. No self-hosted lane runs on pull_request events.
  • Compare structured dumps, not timing. Retry an infrastructure failure once and count it apart from product failures.
  • A red product run files one report with its dump or transcript.
  • The support matrix lists a combination only after 14 green nights.
Done when
  • The macOS, Windows, Linux, web and iOS API lanes run on every merge to dev and are green.
  • Every supported reader and browser pair has a nightly lane, and each critical scenario passed on each of the last 14 nights.
  • The support matrix lists a combination only while its lane meets that rule.
How to check

Each child lane's history, and the support matrix test that reads it.

Issues
Depends on
Part of
  • Theme: T15
  • Phase 4 · priority P1 · size XL
09

About this plan

This plan was written on 8 November 2026 from an architecture review of dev at 1571ad57, and planned against dev at a9da7e3e. Each item was checked against the code at that commit, and every code link is a permalink there. dev moves fast, so check an item against current dev before acting on it.

Phase 0's fixes have since been written and filed, each with ready commits that haven't landed on dev yet: #260 fixes the documented test command, #261 the accessibility dump, #263 the docs that contradicted the code, and #264 adds an architecture map, an examples index and the layout-versus-CSS list. The items that set targets or policy are left as proposals. Any item here can be copied into its own issue.

For a sense of scale: the review and this plan took about 20 hours and about 250 agents. Opus 5.5 agents planned, wrote and judged every item, and gpt-6-astra, from another lab, checked their claims against the code. In all they processed about 1.9 billion tokens, most of it cached context. There was significant human review and intervention throughout.