S028: merge main (S031 timers patch kept) into s022-mse-proto; progress note
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
67095081bd
18 changed files with 248 additions and 17 deletions
|
|
@ -65,7 +65,7 @@ Never modify: `~/Documents/Apps/Nacre` (the original Python Nacre, reference onl
|
|||
| `nice cargo build --release -j 2` | compile check, produces `target/release/nacre` | now |
|
||||
| `nice cargo test --release -j 2` | unit tests (44, ~16 s test-profile build then <1 s run; shares the S001 build) (util, settings, history, bookmarks, permissions, vault, dns, bridge loopback, download, adblock, keys, scripts, updates, inject, hub, theme, ui::widgets input, ui::paint, ui::pages::newtab) | first successful build; not alongside a build |
|
||||
| `src/selftest.rs` | in-app self test: `NACRE_SCRIPT=<file>` runs script commands (listed at its top) | now |
|
||||
| `tools/smoke.sh <script> [outdir]` | smoke run on a hidden Xvfb display with a throwaway home and software GL; outdir (default `target/smoke/<name>-<time>`) gets `nacre.log`, `selftest.log`, `<shot>.png`, `<status>.json`, `home/`; exits non-zero on crash, panic, no `status done` or a failed `assert <js>`. Scripts in `tests/smoke/` (`launch.txt` offline, `https.txt` needs internet, `restore.txt` with `SMOKE_HOME=<launch outdir>/home`, `chrome.txt` chrome and every flyout dark and light, offline; `colours.txt` colours after welcome and site colour vs internal pages, hidden `SMOKE_SIZE=1280x1100`; `input.txt` real clicks, typing, right click, wheel on a web page, offline; `basics.txt` tabs, navigation, find, zoom, full screen, pop-ups, offline; `heavy-web.txt` DuckDuckGo, Wikipedia, YouTube, needs internet, `SMOKE_TIMEOUT=900`; `keys.txt` every shortcut action, offline; `privacy-net.txt` DNT/GPC/Save-Data headers and third-party cookies on a loopback server, offline, start `python3 tests/smoke/net/server.py &` first; `site-doctor.txt` Google sign-in, captchas, Reddit, GitHub, needs internet; `cache.txt` HTTP cache, offline, start `python3 tests/smoke/cache/server.py &` first; selftest `launch <args>` checks single instance; `cookies.txt` → `cookies-restart.txt` → `cookies-cleared.txt` encrypted cookies across restarts with `SMOKE_KEYRING=1` (own throwaway GNOME Keyring + bus) and `SMOKE_HOME`, `cookies-nokeyring.txt` without, server.py first); header documents env vars and commands. `SMOKE_VISIBLE=1` shows the run on the user's screen (DP-1, real GPU, niri tiles the window so shots are narrower); use it whenever the user is watching (D-009). Read the PNGs | now (S003) |
|
||||
| `tools/smoke.sh <script> [outdir]` | smoke run on a hidden Xvfb display with a throwaway home and software GL; outdir (default `target/smoke/<name>-<time>`) gets `nacre.log`, `selftest.log`, `<shot>.png`, `<status>.json`, `home/`; exits non-zero on crash, panic, no `status done` or a failed `assert <js>`. Scripts in `tests/smoke/` (`launch.txt` offline, `https.txt` needs internet, `restore.txt` with `SMOKE_HOME=<launch outdir>/home`, `chrome.txt` chrome and every flyout dark and light, offline; `colours.txt` colours after welcome and site colour vs internal pages, hidden `SMOKE_SIZE=1280x1100`; `input.txt` real clicks, typing, right click, wheel on a web page, offline; `basics.txt` tabs, navigation, find, zoom, full screen, pop-ups, offline; `heavy-web.txt` DuckDuckGo, Wikipedia, YouTube, needs internet, `SMOKE_TIMEOUT=900`; `keys.txt` every shortcut action, offline; `privacy-net.txt` DNT/GPC/Save-Data headers and third-party cookies on a loopback server, offline, start `python3 tests/smoke/net/server.py &` first; `site-doctor.txt` Google sign-in, captchas, Reddit, GitHub, needs internet; `cache.txt` HTTP cache, offline, start `python3 tests/smoke/cache/server.py &` first; selftest `launch <args>` checks single instance; `cookies.txt` → `cookies-restart.txt` → `cookies-cleared.txt` encrypted cookies across restarts with `SMOKE_KEYRING=1` (own throwaway GNOME Keyring + bus) and `SMOKE_HOME`, `cookies-nokeyring.txt` without, server.py first; `crash-adblock.txt` R5-01 regression, ~1300 blocked loads with reloads/navigations mid-load plus 3200 timers under GC pressure, offline, server.py first); header documents env vars and commands. `SMOKE_VISIBLE=1` shows the run on the user's screen (DP-1, real GPU, niri tiles the window so shots are narrower); use it whenever the user is watching (D-009). Read the PNGs | now (S003) |
|
||||
| `nacre://gallery` + `SMOKE_SIZE=1400x2800 tools/smoke.sh tests/smoke/gallery.txt` | every design token and widget, dark and light (+ new tab and settings shots); read the PNGs | now (S015) |
|
||||
| `SMOKE_SIZE=1400x1200 tools/smoke.sh tests/smoke/newtab.txt` | new tab page dark/light, nothing playing and a video playing, weather failed state, tall/narrow/phone widths (offline); `tests/smoke/newtab-weather.txt` shoots the real weather card (needs internet); read the PNGs | now (S017) |
|
||||
| `SMOKE_SIZE=1400x900 tools/smoke.sh tests/smoke/backgrounds.txt` | every new tab background with the pointer, Customize panel dark/light, image + blur, GIF frames; `perf-*-a/b.json` `frames` (median/max draw ms, `drawn` count) per background at Lots/Fast, hidden tab, still, Motion off. Selftest `pointer x y`, `customize`; `@PAGESDIR@` = path of tests/smoke/pages | now (S018) |
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ opt-level = 2
|
|||
# servo-net 0.7.0 keeps hyper's 16 KiB HTTP/2 header limit, which breaks YouTube; the vendored copy raises it
|
||||
# (vendor/servo-net/connector.rs, create_http_client). Drop when Servo sets it. Every servo-net patch is listed in
|
||||
# docs/DESIGN.md "Vendored servo-net patches".
|
||||
# servo-script 0.7.0 fires due timers from an unrooted list, so a GC in one callback freed the next one's function
|
||||
# (SIGSEGV, R5-01); the vendored copy roots them (vendor/servo-script/event_loop/timers.rs, `Nacre patch (S031)`).
|
||||
[patch.crates-io]
|
||||
epaint = { path = "vendor/epaint" }
|
||||
servo-net = { path = "vendor/servo-net" }
|
||||
|
|
|
|||
|
|
@ -16,14 +16,14 @@ Reproduce, find the faulting frame, fix the cause (in Nacre or in vendored Servo
|
|||
- `tools/smoke.sh` header, `tests/smoke/heavy-web.txt`, `tests/smoke/net-adblock.txt`
|
||||
|
||||
## Steps
|
||||
- [ ] Reproduce: offline first (a local page whose `<script src>` / module script / `ad_status.js`-style URL is on a local block list, loaded many times, with `tests/smoke/net/server.py`); if that does not crash, `heavy-web.txt` YouTube search step with `RUST_BACKTRACE=full`. Record the crash rate.
|
||||
- [ ] Get the faulting backtrace: `coredumpctl gdb` / run under `gdb -batch -ex run -ex bt` (debug symbols: `CARGO_PROFILE_RELEASE_DEBUG=line-tables-only` only if needed, same target/); note thread and frame in PROGRESS.
|
||||
- [ ] Find the cause (cancelled response answered twice or after drop, a dropped `WebResourceLoad`, a script-thread race, SpiderMonkey GC on a cancelled fetch, …) and write it down in two lines before changing code.
|
||||
- [ ] Fix at the cause. If it is in Servo, vendor the minimal crate like servo-net (D-017) and add the patch site to DESIGN.md "Vendored servo-net patches" (or a new "Vendored patches" list).
|
||||
- [ ] Unit test for the Nacre side when feasible (e.g. intercept answers exactly once per request).
|
||||
- [ ] Regression smoke `tests/smoke/crash-adblock.txt` (offline, local server, ≥ 200 blocked script loads incl. page reloads/navigations mid-load); add its row to CLAUDE.md §5.
|
||||
- [ ] Rerun: crash-adblock ×3, net-adblock, launch, heavy-web (internet, `SMOKE_TIMEOUT=900`) ×2 — no crash.
|
||||
- [ ] PROGRESS entry, phase5.md R5-01 → `[fixed <commit>]`, INDEX line, commit `S031: …`, push.
|
||||
- [x] Reproduce: offline first (a local page whose `<script src>` / module script / `ad_status.js`-style URL is on a local block list, loaded many times, with `tests/smoke/net/server.py`); if that does not crash, `heavy-web.txt` YouTube search step with `RUST_BACKTRACE=full`. Record the crash rate.
|
||||
- [x] Get the faulting backtrace: `coredumpctl gdb` / run under `gdb -batch -ex run -ex bt` (debug symbols: `CARGO_PROFILE_RELEASE_DEBUG=line-tables-only` only if needed, same target/); note thread and frame in PROGRESS.
|
||||
- [x] Find the cause (cancelled response answered twice or after drop, a dropped `WebResourceLoad`, a script-thread race, SpiderMonkey GC on a cancelled fetch, …) and write it down in two lines before changing code.
|
||||
- [x] Fix at the cause. If it is in Servo, vendor the minimal crate like servo-net (D-017) and add the patch site to DESIGN.md "Vendored servo-net patches" (or a new "Vendored patches" list).
|
||||
- [x] Unit test for the Nacre side when feasible (e.g. intercept answers exactly once per request).
|
||||
- [x] Regression smoke `tests/smoke/crash-adblock.txt` (offline, local server, ≥ 200 blocked script loads incl. page reloads/navigations mid-load); add its row to CLAUDE.md §5.
|
||||
- [x] Rerun: crash-adblock ×3, net-adblock, launch, heavy-web (internet, `SMOKE_TIMEOUT=900`) ×2 — no crash.
|
||||
- [x] PROGRESS entry, phase5.md R5-01 → `[fixed <commit>]`, INDEX line, commit `S031: …`, push.
|
||||
|
||||
## End criteria
|
||||
- `tools/smoke.sh tests/smoke/crash-adblock.txt` exits 0 three runs in a row; before the fix it crashed (or the cause is proven by the backtrace + test).
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ R4-06: Nacre's own right-click menu on pages (links, images, text, fields, page)
|
|||
colours, same look as the flyouts.
|
||||
|
||||
## Read
|
||||
- Style reference: the user's own Material You egui app **Damson** (`~/Projects/Damson`: `src/` widgets/theme/motion, `screenshots/`, `docs/`) — read-only, a reference only, not a spec: it is not perfect everywhere, but its motion and flow are fluent. Take the feel (lively motion, M3 Expressive surfaces), not its flaws; Nacre should feel like the user's Material You apps.
|
||||
- `docs/review/phase5.md` R5-05 · `docs/review/phase4.md` R4-06 · the three `old-flyout-*.png`
|
||||
- `src/ui/menus.rs` (`flyouts`, `flyout_body`, `placement`, page context menu) · `src/ui/mod.rs` `Flyout` · `docs/DESIGN.md` "UI system (S015)"
|
||||
- Load the `app-taste` skill for the look.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# S039 — Motion rules and animations
|
||||
|
||||
> Category 07 Polish pass · Model: Opus · Effort: medium · Depends on: S035 · Size: M · Human: no
|
||||
> Category 07 Polish pass · Model: Opus · Effort: medium · Depends on: — (S035 adds its new flyouts on top, following these rules) · Size: M · Human: no
|
||||
> Files touched: src/theme.rs (spring presets), src/ui/{menus,dialogs,chrome,widgets,paint}.rs, src/ui/pages/{settings,downloads,history}.rs, docs/DESIGN.md "UI system" (Motion rules), tests/smoke/motion.txt (new)
|
||||
|
||||
## Goal
|
||||
|
|
@ -51,6 +51,7 @@ switches, lists and toggles.
|
|||
settle time per preset.
|
||||
|
||||
## Read
|
||||
- Style reference: the user's own Material You egui app **Damson** (`~/Projects/Damson`: `src/` widgets/theme/motion, `screenshots/`, `docs/`) — read-only, a reference only, not a spec: it is not perfect everywhere, but its motion and flow are fluent. Take the feel (lively motion, M3 Expressive surfaces), not its flaws; Nacre should feel like the user's Material You apps.
|
||||
- `src/theme.rs` "Motion" section (from `// Motion`) · `src/ui/menus.rs` `flyouts`/`placement` · `docs/DESIGN.md` "UI system (S015)"
|
||||
- `src/ui/dialogs.rs` (how dialogs/toasts are shown) · load the `app-taste` skill · `tests/smoke/backgrounds.txt` (perf json)
|
||||
|
||||
|
|
|
|||
36
Plans/07 Polish pass/S043-ui-refine.md
Normal file
36
Plans/07 Polish pass/S043-ui-refine.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# S043 — UI refine pass: from "OK" to fluent
|
||||
|
||||
> Category 07 Polish pass · Model: Opus · Effort: medium · Depends on: S039 · Size: M · Human: 🧑 the user picks between before/after shots at the end
|
||||
> Files touched: src/ui/{menus,chrome,widgets,paint,dialogs}.rs, src/theme.rs, src/ui/pages/*.rs (only shared widgets), tests/smoke/refine.txt (new)
|
||||
|
||||
## Goal
|
||||
The user: things work but look "basic, not nice and fluent". Reference `docs/ui-reference/basic-protection-flyout.png`
|
||||
(the shield / Protection flyout): flat stacked sections, thin dividers, small headers, a lone big number, buttons
|
||||
floating at the right, generic spacing. Raise the visual quality of the chrome and flyouts to a designed Material You
|
||||
look that pairs with the S039 motion: clear hierarchy, grouped surfaces (tonal containers instead of dividers),
|
||||
consistent spacing on the 4 px grid, typography scale used with intent, icons with state colour, richer
|
||||
controls (status chips, meters), polished empty/active states. No new features.
|
||||
|
||||
## Read
|
||||
- Style reference: the user's own Material You egui app **Damson** (`~/Projects/Damson`: `src/` widgets/theme/motion, `screenshots/`, `docs/`) — read-only, a reference only, not a spec: it is not perfect everywhere, but its motion and flow are fluent. Take the feel (lively motion, M3 Expressive surfaces), not its flaws; Nacre should feel like the user's Material You apps.
|
||||
- `docs/ui-reference/basic-protection-flyout.png`, `docs/UI-BRIEF.md`, `docs/DESIGN.md` "UI system (S015)" incl. the S039 motion rules
|
||||
- `src/ui/menus.rs` (flyouts), `src/ui/widgets.rs`, `src/theme.rs` tokens · load the `app-taste` and `unslop` skills
|
||||
|
||||
## Steps
|
||||
- [ ] Shots of the current state: every flyout (shield, downloads, media, site info, profiles, main menu, bookmark edit), toolbar, tab strip, address dropdown, dark and light (`chrome.txt` / new `refine.txt`); list what reads as "basic" per screen (5 lines each max) in `docs/review/phase5-refine.md`.
|
||||
- [ ] Shared building blocks first (DRY): section card (tonal container, header row with icon + action), stat block (number + label + meter/sparkline), status chip, button row alignment, list row; tokens in `theme.rs`.
|
||||
- [ ] Shield flyout redesign with the blocks (the user's example): ad-block stat as a card with per-page/total and a small meter, privacy and VPN as cards with state chips, actions aligned; before/after shots.
|
||||
- [ ] Apply to every other flyout and the main menu; then toolbar/tab strip/address dropdown details (hover/press states, icon weights, spacing).
|
||||
- [ ] Check S039 motion still applies (anchor scaling, closing state) on the new layouts.
|
||||
- [ ] Rerun refine, chrome, gallery, settings, launch smokes; read the PNGs; `SMOKE_VISIBLE=1 tools/smoke.sh tests/smoke/refine.txt` for the user.
|
||||
- [ ] 🧑 Orchestrator shows the user before/after shots of the shield flyout and two others; record their verdict in phase5-refine.md.
|
||||
- [ ] PROGRESS entry, INDEX line, commit `S043: …`, push.
|
||||
|
||||
## End criteria
|
||||
- refine.txt green; before/after PNGs for every flyout in dark and light (read them); chrome, gallery, settings, launch smokes green; `nice cargo test --release -j 2` green.
|
||||
|
||||
## Pitfalls
|
||||
- Keep it a visual pass: no behaviour changes. Don't hand-tune per flyout what belongs in a shared widget.
|
||||
|
||||
## Handoff (→ PROGRESS.md)
|
||||
New shared widgets and tokens; screens still marked "basic".
|
||||
|
|
@ -47,7 +47,7 @@ Tracker: https://claude.ai/artifact/9AD7fPfwJ4ASFzVTJGKU4h
|
|||
- [x] [S025 — Cookies encrypted at rest](06%20Privacy/S025-cookie-encryption.md) · Opus medium
|
||||
|
||||
## 07 Polish pass
|
||||
- [ ] [S031 — Fix the SIGSEGV after an ad-blocked script load](07%20Polish%20pass/S031-adblock-crash.md) · Opus high
|
||||
- [x] [S031 — Fix the SIGSEGV after an ad-blocked script load](07%20Polish%20pass/S031-adblock-crash.md) · Opus high
|
||||
- [ ] [S032 — Page load performance pass](07%20Polish%20pass/S032-load-performance.md) · Opus high
|
||||
- [ ] [S033 — SVG and CSS masks render right](07%20Polish%20pass/S033-svg-masks.md) · Opus high
|
||||
- [ ] [S034 — Spelling underlines, inline autofill, "Settings updated" popup](07%20Polish%20pass/S034-small-fixes.md) · Opus medium
|
||||
|
|
@ -59,3 +59,4 @@ Tracker: https://claude.ai/artifact/9AD7fPfwJ4ASFzVTJGKU4h
|
|||
- [ ] [S040 — Little things sweep](07%20Polish%20pass/S040-little-things.md) · Opus medium
|
||||
- [ ] [S041 — Site passes](07%20Polish%20pass/S041-site-passes.md) · Opus high · 🧑
|
||||
- [ ] [S042 — Phase 5 review with the user](07%20Polish%20pass/S042-phase5-review.md) · Sonnet medium · 🧑
|
||||
- [ ] [S043 — UI refine pass: from "OK" to fluent](07%20Polish%20pass/S043-ui-refine.md) · Opus medium · 🧑
|
||||
|
|
|
|||
|
|
@ -29,3 +29,8 @@
|
|||
- D-023 — 2026-11-12 — Motion rules for the egui UI (translated from the web "animate" skill, full text in S039 and then DESIGN.md "UI system"): gate by frequency (no motion on keyboard/100+-a-day actions), one named purpose, only `theme::spring`, opacity + paint offset/scale (never scale from 0, flyouts from their anchor), critically damped for UI with settle 150–300 ms, bounce only for drag release, interruptible + exit mirrors entry, Motion Off = nothing moves or fades. — The user asked for more motion done well; reduced-motion in the skill maps to the existing Motion setting. — S039, S040 and every later UI plan
|
||||
- D-024 — 2026-11-12 — S031 (SIGSEGV, critical) runs before S010–S014 and before S028: main's `target/` was free while S027 finishes in its worktree, and a crash outranks the remaining review/gap plans. S028 GOes after S031 and S027 are validated. — orchestrator call (user: make recommended calls) — S028, S031, S010–S014
|
||||
- D-025 — 2026-11-12 — S027 accepted at WPT 239/407 (target 293 not met): the failing groups need the player side (metadata after the init segment, duration boundary conditions, play/seek, changeType across containers, errors before init, buffered after removeSourceBuffer, Opus/fLaC in MP4) and move to S028's scope, with the one-off script-thread hang at WPT file 19. S028's end report states the new WPT count. — the DOM work is done and smoke-verified; the rest is player integration — S028
|
||||
- D-026 — 2026-11-12 — User priority: Nacre must first work as a full daily browser (sites load and render, video plays, sign-ins, downloads, tabs/session solid) before broad bug-fix and polish sweeps. Run order after the in-flight work (S031 crash, S028 MSE merge): S029 YouTube/Reddit → S041 site passes → S032 load speed → S033 SVG/masks → S030 media packaging → S010 🧑 review → S011–S013 gaps → S034–S038 → S039/S040 polish last; S014/S042 reviews close their phases. — user, 2026-11-12: "patch it up until it works like a full fledged browser" before aggressive bug fixing — every remaining plan
|
||||
- D-027 — 2026-11-12 — Supersedes D-026's order: motion and visual quality move up (user: things look basic, not fluent; example the Protection flyout). Order after the in-flight work (S031, S028): S029 → S039 motion (no longer waits for S035) → S043 UI refine pass (new) → S041 → S032 → S033 → S030 → S010 🧑 → S011–S013 → S034–S038 → S040; reviews S014/S042 close their phases. — user, 2026-11-12 — every remaining plan
|
||||
- D-028 — 2026-11-12 — Supersedes D-027's order: S035 (history/passwords/bookmarks flyouts like shield and downloads) joins the UI block. Order after S031 finish + S028: S029 → S035 → S039 motion → S043 UI refine → S041 → S032 → S033 → S030 → S010 🧑 → S011–S013 → S034, S036–S038 → S040. Style reference for all UI plans: the user's Damson app (`~/Projects/Damson`, read-only), a reference only: not perfect everywhere, but fluent; take its feel (lively motion, Material You like the user's own apps), not its flaws. — user, 2026-11-12 — S035, S039, S043, S040
|
||||
- D-029 — 2026-11-12 — Orchestrator 3 lets the old sessions finish their in-flight plans (S031 in Spare A, S028 in its own session); every later plan runs in a fresh session started and linked from the current orchestrator, never in old prepared sessions (old S029/S030/Spare B waiting sessions are not used). — user, 2026-11-12 — orchestration from S029 on
|
||||
- D-030 — 2026-11-12 — "Looks right" is judged against a reference, not against "no crash". Every site check (S029, S041, S032, S033 and later) shoots the same page at the same size in a Chromium reference (QtWebEngine, `tools/refshot.py`, built by S029 as its first step) and puts Nacre's shot next to it; the session Reads both PNGs and lists every visible difference (layout, missing images/icons, unfilled skeletons, doubled inputs, black areas). A difference is fixed or written down in PROGRESS with the pair of shots; a pass with unlisted differences is not a pass. UI plans (S035, S039, S043) compare their shots with `docs/ui-reference/` and the Damson app the same way. — user, 2026-11-12, YouTube watch page screenshot: doubled search box, grey skeletons never filled, black player — S029 onward
|
||||
|
|
|
|||
|
|
@ -164,6 +164,15 @@ picture-in-picture, extensions, password capture, printing.
|
|||
| `resource_thread.rs` `create_http_states`, Exit; `nacre.rs` `set_cookie_persistence`, `cookie_jar_snapshot`; `Cargo.toml` (+ `serde_json`) | the public cookie jar comes from and goes to the embedder instead of plain `cookie_jar.json`: Nacre's initial jar at start, a JSON copy on demand, the final jar at Exit (S025, D-019) | `cookies.txt` + `cookies-restart.txt` + `cookies-cleared.txt` |
|
||||
| `fetch/methods.rs` `main_fetch` (step 12) | privacy mode's Firefox-style Accept-Language ("en-US,en;q=0.5", `nacre::append_accept_language`) replaces Servo's single locale; a page's own value stays (S024) | `privacy-net.txt` |
|
||||
|
||||
## Vendored servo-script patches
|
||||
|
||||
`vendor/servo-script` is servo-script 0.7.0 through `[patch.crates-io]` (S031), same rules as servo-net above.
|
||||
|
||||
| File, function | What and why | Re-check |
|
||||
|---|---|---|
|
||||
| `event_loop/timers.rs` `OneshotTimers::fire_timer`, `JsTimerTask::invoke` | due timers wait in a `RootedTraceableBox<VecDeque>` instead of a plain `Vec`, and the running timer's callback is rooted: a GC inside one callback swept the functions of the timers still waiting (SIGSEGV in `GlobalScope::from_object`, R5-01) | `crash-adblock.txt` |
|
||||
| `dom/media/`, `dom/html/embedded_content/htmlmediaelement.rs`, `dom/globalscope`, `dom/url` and more | Media Source Extensions (S022-S028), see "Media and Media Source Extensions" below; `grep -rn "Nacre" vendor/servo-script` lists them | `mse.txt`, `mse-player.txt` |
|
||||
|
||||
Third-party rule (S023): a request is third-party when its host's site (registrable domain, eTLD+1; an IP address
|
||||
or a single-label host stands for itself) differs from the top-level site of its webview. Scheme and port don't
|
||||
count, so `a.example.com` on `example.com` stays first-party. The top-level site comes from the last `Document`
|
||||
|
|
|
|||
|
|
@ -95,3 +95,42 @@ DevTools window, animations, little-things sweep, site passes), then `/orchestra
|
|||
- Then: S010 phase 2 review (🧑), 03 Gaps S011–S014 (never started), 07 Polish pass.
|
||||
- Validation habit: rerun each plan's own smoke (start its local server first: tests/smoke/net/server.py or
|
||||
`python3 -m http.server 8768 --directory tests/smoke/pages`); tap/drag scripts need hidden SMOKE_SIZE runs.
|
||||
|
||||
## Orchestrator resume (2026-11-12 night) — orchestrator 2
|
||||
|
||||
Orchestrator 2 = this run (started from the old orchestrator local_f8354413-…). Plans S031–S042 (07 Polish pass) written, tracker seeded; decisions D-020–D-025.
|
||||
- Validated: S025 (cookie smokes ×4 green), S027 (mse smoke green; WPT 239/407 < 293, gaps moved to S028 by D-025).
|
||||
- Running: S031 (crash) on main by spare-a local_373e46d7-2d38-4d5a-94c4-855dae433f88; S028 in worktree ~/Projects/Nacre-s022
|
||||
(own target/) by local_c57574e1-48d8-40b4-9a0c-386b7079f666 — must message the orchestrator before merging to main (after S031 is validated).
|
||||
- Waiting for GO: S029 local_b1da3720-150b-45f9-8689-684e25ef97af, S030 local_dea5e96f-16c8-4e0a-a13d-5105f2fa5c98 (both after S028),
|
||||
S010 (🧑, needs the user) prepared in spare-b local_4fb2df64-5994-4b0d-a834-cff2859cf94b.
|
||||
- Order after that (D-024): S028 merge → S029/S030 → S010 🧑 → S011–S014 → S032… (one cargo user of main's target/ at a time).
|
||||
- Sessions report by SendMessage to the orchestrator's id; a new orchestrator must message each running/waiting session its own id.
|
||||
|
||||
### Wrap-up (2026-11-12 late, weekly limit) — start a NEW orchestrator from here
|
||||
- User priority: D-026 then D-027 (motion S039 and new UI refine plan S043 moved up). Run order is in D-028 (S035 flyouts, S039, S043 moved up; Damson = style reference).
|
||||
- At wrap-up: S031 (spare-a, main tree) and S028 (worktree ~/Projects/Nacre-s022, branch s022-mse-proto) were told to
|
||||
commit their state (`WIP` if unfinished) with accurate plan boxes and a PROGRESS note, push, and stop. Check
|
||||
`git log`, `git status` (main and the worktree) and each plan's first unchecked box before anything else; a plan
|
||||
with unchecked boxes resumes in its own session (ids above) at that box.
|
||||
- S028 must not merge to main until S031 is validated (D-024). S029/S030/spare-b (S010) are waiting, untouched.
|
||||
- Next three steps: (1) validate or resume S031 (`python3 tests/smoke/net/server.py &` then
|
||||
`SMOKE_VISIBLE=1 tools/smoke.sh tests/smoke/crash-adblock.txt` ×3, heavy-web); (2) resume/validate S028 and let it
|
||||
merge; (3) GO S029, then S035, S039, S043 (D-028 order).
|
||||
- Known bugs: R5-01 crash until S031 lands; YouTube stalls / WPT 239/407 (S028); see PROGRESS "Later".
|
||||
- Build/test: `nice cargo build --release -j 2`, `nice cargo test --release -j 2` (never together, one cargo per target/);
|
||||
smokes per CLAUDE.md §5.
|
||||
- Open question for the user: none blocking; S010 needs them when its turn comes.
|
||||
- Stopped at 98 % weekly limit. At stop, S031's work (spare-a) was still UNCOMMITTED in the main tree
|
||||
(vendor/servo-script/, tests/smoke/crash-adblock.txt + pages, Cargo.toml/lock, DESIGN, PROGRESS, CLAUDE.md, plan file):
|
||||
don't discard it; message spare-a local_373e46d7-2d38-4d5a-94c4-855dae433f88 to resume at its first unchecked box.
|
||||
S028 was mid-work in ~/Projects/Nacre-s022 (check that worktree's `git status` too).
|
||||
- Update: S031 committed 0ecfd0f (cause: servo-script fire_timer kept due timers unrooted; fix = vendored servo-script
|
||||
with rooted timers, crash-adblock 3/3). Left: step 7 (heavy-web ×2, net-adblock, launch) + cargo test, then INDEX tick.
|
||||
S028 merge: the MSE branch also vendors servo-script — take the branch's files, re-apply the 2 `Nacre patch (S031)`
|
||||
hunks in event_loop/timers.rs.
|
||||
- Update: S028 stopped, WIP 71ec603 on s022-mse-proto (pushed, NOT merged). main merged into the branch; mse.txt + leak ok;
|
||||
new `tests/smoke/mse-player.txt` 7/9. Left: two gst_mse C fixes (msesrc EOS after endOfStream → 'ended';
|
||||
on_duration_changed shrinking a page-set duration), cargo test, WPT rerun, full smokes, DESIGN/FEATURES, merge.
|
||||
Details: side-session-notes/local_f8354413-73d5-4c6d-8be6-6a6a12c51e53/S028-notes.md. Resume in S028's own session
|
||||
local_c57574e1-48d8-40b4-9a0c-386b7079f666.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/orchestrate
|
||||
|
||||
Read docs/HANDOFF.md ("Orchestrator resume") first: the run order is D-007, the next steps are validating R1-09,
|
||||
building R1-10, then S021 with the user.
|
||||
Read docs/HANDOFF.md and docs/STATUS.md (if it exists), then continue from the next steps in the last section
|
||||
("Wrap-up (2026-11-12 late)"). Run order is D-028 in docs/DECISIONS.md. Only open other files when you need them.
|
||||
|
|
|
|||
|
|
@ -319,10 +319,21 @@ Later: S010 list: user checks the Discord icon with their own client (the Discor
|
|||
- Not to spec / not done: player integration (S028): `loadedmetadata`/HAVE_METADATA after the init segment only (duration-boundaryconditions 0/13, play/seek tests 0/1 each); changeType across containers (gst can't; changetype-play* ~1/19); errors before the init segment; `buffered` after `removeSourceBuffer` should throw; Opus/fLaC in MP4 (no decoder). Worker MSE and ManagedMediaSource out of scope.
|
||||
- Seen once: a full WPT run hung the script thread (driver timer stopped at file 19); not reproduced in the rerun. Watch in S028.
|
||||
|
||||
## S031 — SIGSEGV after an ad-blocked script load (R5-01, 2026-11-12)
|
||||
- Repro: `crash-adblock.txt` (685 cancelled loads/run) 0 crashes in 3 runs, heavy-web 0/2, a YouTube search loop 0/3. The crash is rare online; the two S024 cores (hidden Xvfb heavy-web runs) were symbolized with an unstripped rustc twin of the same commit (same .text).
|
||||
- Backtrace (both cores): script thread, `ScriptThread::handle_msgs` → `TimerListener` task → `OneshotTimers::fire_timer` → `Function::Call_` → `GlobalScope::from_object` → `JS::GetNonCCWObjectGlobal` reading a swept object (`0x4b4b…` poison). The ad-block log line before it was a bystander.
|
||||
- Cause: `fire_timer` (servo-script `event_loop/timers.rs`) moves every due timer out of the traced timer list into a plain local `Vec` and runs them one by one; a GC inside one callback can't see the rest, so their `TracedCallback` functions are swept and the next call reads a dead object (or a reused cell: the wrong function runs).
|
||||
- Proof offline: `pages/crash-timers.html` (40 timers due together, each allocating): 9 of 40 callbacks run, the other 31 are silently lost, 3 of 3 runs; without the allocation all run.
|
||||
- Fix: servo-script vendored (`vendor/servo-script`, `[patch.crates-io]`); `fire_timer` keeps due timers in a `RootedTraceableBox<VecDeque>`, `JsTimerTask::invoke` roots the running callback (DESIGN.md "Vendored servo-script patches"). After: 40 of 40 run.
|
||||
- Smoke `crash-adblock.txt` (~870 cancelled loads + 3200 timers under GC pressure): fixed build exits 0 3/3 (visible); the pre-fix build (68346f0) fails it (timer page never finishes). No Nacre-side change, so no unit test.
|
||||
- Reruns (resumed session): crash-adblock 3/3, net-adblock, launch green (visible); heavy-web ×2 no SIGSEGV and no core, both reach `status done`; their failed asserts are YouTube search/playback/PiP (main has no MSE, S028). `cargo test` 70 green.
|
||||
- S028 merge: the MSE branch also vendors `vendor/servo-script`; take the branch's files and re-apply the two `Nacre patch (S031)` hunks in `event_loop/timers.rs` (the branch's timers.rs is the pristine 0.7.0 file).
|
||||
|
||||
## S028 — MSE player integration (WIP, stopped for the weekly limit, 2026-11-12, branch s022-mse-proto)
|
||||
- Done: main merged in (mse smoke green). Attach doesn't block the script thread (max stall 35 ms, was ~1 s). loadedmetadata after the init segment (own MP4/WebM byte-stream check; gst_mse reports it only with frames), readyState from buffered at currentTime, byte-stream append errors (garbage / media before init), `buffered` throws once removed, failure steps detach the MediaSource, codec table (vp09, Opus/fLaC, vorbis, hevc). New `tests/smoke/mse-player.txt`: 7/9 cases.
|
||||
- Next: two gst_mse C fixes: (1) msesrc sends no EOS after endOfStream (S027's abort patch dropped it), so no `ended`: set EOS on the track buffers at end of stream, clear on reopen; (2) `on_duration_changed` shrinks a page-set duration (breaks seek past buffered): only raise it. Then cargo test (new unit tests never run), WPT rerun (baseline 239/407), full smoke set, DESIGN/FEATURES, merge.
|
||||
- Merge note: main vendors servo-script too (S031, 0ecfd0f): take the branch's servo-script files and re-apply the two `Nacre patch (S031)` hunks in event_loop/timers.rs.
|
||||
- State (stopped by orchestrator, 2026-11-12): gst_mse patches 10-11 (EOS at endOfStream, duration only grows) committed; mse-player 9/9, cargo test 70 + media crate tests 11 green; DESIGN/FEATURES/CLAUDE docs done; plan boxes 1-5 ticked. origin/main merged into the branch (servo-script = branch files + main's S031 timers.rs), merge NOT built. Smokes on the pre-merge binary: launch, basics, input, chrome, keys green; mse.txt fails `reopen` (mse-spec.html, regression from patch 10's clear-EOS on reopen? check first); settings, mse-player rerun, heavy-web, WPT not run. Next: fix `reopen`, build the merged branch, rerun smokes + crash-adblock + WPT, then merge into main.
|
||||
|
||||
## Later
|
||||
- Turnstile widget paints as a black half-disc (Servo painting of its iframe/shadow DOM, S006 site doctor).
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Input for `/plan-generate` → category `07 Polish pass` (and `03 Gaps` S011–S014, which haven't started yet).
|
||||
Same tags as phase 1/4: `[open]`, `[fixed <commit>]`, `[wontfix: reason]`.
|
||||
|
||||
R5-01 [open] CRASH: Nacre crashed (SIGSEGV) while searching. Last log line before it:
|
||||
R5-01 [fixed 0ecfd0f] CRASH: Nacre crashed (SIGSEGV) while searching. Last log line before it:
|
||||
`ERROR script::dom::html::scripting::htmlscriptelement] Fetching classic script failed Load cancelled (UrlWithBlobClaim
|
||||
{ url: "https://static.doubleclick.net/instream/ad_status.js", token: None })`, so the ad blocker cancels a script load
|
||||
just before the crash (YouTube/Google search page, throwaway profile). Reproduce, get a backtrace (`RUST_BACKTRACE=1`,
|
||||
|
|
|
|||
BIN
docs/ui-reference/basic-protection-flyout.png
Normal file
BIN
docs/ui-reference/basic-protection-flyout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
33
tests/smoke/crash-adblock.txt
Normal file
33
tests/smoke/crash-adblock.txt
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# R5-01 regression (S031): blocked script loads must not crash the browser. crash-adblock.html inserts 20 blocked
|
||||
# loads per round (classic, async, defer, module, dynamic import, fetch, image) from the local server, whose
|
||||
# /ads/banner.js is on its filter list, and reloads or navigates itself mid-load; 3 passes of 20 rounds plus tabs
|
||||
# opened and closed while loading, about 1300 blocked loads. Offline. Start the server first:
|
||||
# The crash itself was in Servo's timers (R5-01 cause): crash-timers.html lets 40 timers fall due together, each
|
||||
# allocating enough to start a GC; before the fix only 9 of each 40 callbacks ran (the rest were freed), or it crashed.
|
||||
# python3 tests/smoke/net/server.py & then tools/smoke.sh tests/smoke/crash-adblock.txt
|
||||
wait 3
|
||||
set /adblock/lists []
|
||||
set /adblock/custom ["http://127.0.0.1:8766/list.txt"]
|
||||
wait 5
|
||||
expect /adblock/rules 4
|
||||
open @PAGES@/crash-adblock.html?rounds=20
|
||||
waitfor 120 window.crash && window.crash.done && document.readyState === "complete"
|
||||
status pass1
|
||||
expect /active/blocked > 10
|
||||
open @PAGES@/crash-adblock.html?rounds=20
|
||||
waitfor 120 window.crash && window.crash.done && document.readyState === "complete"
|
||||
newtab @PAGES@/crash-adblock.html?rounds=20
|
||||
wait 1
|
||||
cmd close_tab
|
||||
newtab @PAGES@/crash-adblock.html?rounds=20
|
||||
waitfor 120 window.crash && window.crash.done && document.readyState === "complete"
|
||||
assert window.crash.errors > 0
|
||||
shot crash-adblock
|
||||
open @PAGES@/crash-timers.html?rounds=40&batch=40&pass=1
|
||||
waitfor 150 location.search.endsWith("pass=1") && window.crash && window.crash.done
|
||||
assert window.crash.fired === 1600
|
||||
open @PAGES@/crash-timers.html?rounds=40&batch=40&pass=2
|
||||
waitfor 150 location.search.endsWith("pass=2") && window.crash && window.crash.done
|
||||
assert window.crash.fired === 1600
|
||||
status done
|
||||
quit
|
||||
48
tests/smoke/pages/crash-adblock.html
Normal file
48
tests/smoke/pages/crash-adblock.html
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<!-- R5-01 / S031 stress page: every round inserts blocked script loads from the local server
|
||||
(tests/smoke/net/server.py, /ads/banner.js is on its /list.txt) as classic, async, defer and module
|
||||
scripts, plus a blocked fetch() and image, then reloads or navigates itself mid-load. ?n=<round> counts rounds;
|
||||
?rounds=<N> sets how many (default 20); ?stop=1 stays put. window.crash holds the state for smoke asserts. -->
|
||||
<head><meta charset="utf-8"><title>Crash adblock</title>
|
||||
<script>
|
||||
const q = new URLSearchParams(location.search);
|
||||
const n = Number(q.get('n') || 0), rounds = Number(q.get('rounds') || 20);
|
||||
const ad = (kind, i) => 'http://127.0.0.1:8766/ads/banner.js?' + kind + '=' + n + '-' + i;
|
||||
window.crash = { round: n, rounds, inserted: 0, errors: 0, done: n >= rounds };
|
||||
// Parser-inserted blocking scripts, decided while the document is still parsing.
|
||||
for (let i = 0; i < 4; i++) document.write('<script src="' + ad('sync', i) + '" onerror="crash.errors++"><\/script>');
|
||||
</script>
|
||||
<script src="http://127.0.0.1:8766/ads/banner.js?head" onerror="crash.errors++"></script>
|
||||
<script defer src="http://127.0.0.1:8766/ads/banner.js?defer" onerror="crash.errors++"></script>
|
||||
<script type="module" src="http://127.0.0.1:8766/ads/banner.js?module" onerror="crash.errors++"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="h">Crash adblock</h1>
|
||||
<img src="http://127.0.0.1:8766/ads/pixel.gif?img" onerror="crash.errors++">
|
||||
<script>
|
||||
const h = document.getElementById('h');
|
||||
for (let i = 0; i < 6; i++) {
|
||||
for (const type of ['', 'module']) {
|
||||
const s = document.createElement('script');
|
||||
if (type) s.type = type;
|
||||
s.async = i % 2 === 0;
|
||||
s.src = ad('dyn' + type, i);
|
||||
s.onerror = () => crash.errors++;
|
||||
document.head.appendChild(s);
|
||||
crash.inserted++;
|
||||
}
|
||||
}
|
||||
fetch(ad('fetch', 0)).catch(() => crash.errors++);
|
||||
import(ad('import', 0)).catch(() => crash.errors++);
|
||||
h.textContent = 'Crash adblock round ' + n + ' / ' + rounds;
|
||||
if (!crash.done && !q.get('stop')) {
|
||||
const next = location.pathname + '?n=' + (n + 1) + '&rounds=' + rounds;
|
||||
// Alternate: navigate while the blocked loads are still in flight, reload after load, navigate after a tick.
|
||||
if (n % 3 === 0) location.replace(next);
|
||||
else if (n % 3 === 1) addEventListener('load', () => location.replace(next));
|
||||
else setTimeout(() => location.replace(next), 0);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
40
tests/smoke/pages/crash-timers.html
Normal file
40
tests/smoke/pages/crash-timers.html
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>crash-timers</title>
|
||||
<!-- S031 (R5-01): many timers fall due in the same task; each callback allocates enough to start a GC. Servo 0.7
|
||||
fired them from an unrooted list, so a GC in one callback swept the next one's function (SIGSEGV in
|
||||
GlobalScope::from_object). ?rounds= (default 40), ?batch= timers per round (default 40). -->
|
||||
<body>
|
||||
<p id="out">running</p>
|
||||
<script>
|
||||
const q = new URLSearchParams(location.search);
|
||||
const rounds = +(q.get("rounds") || 40), batch = +(q.get("batch") || 40);
|
||||
window.crash = { round: 0, rounds, fired: 0, done: false };
|
||||
let keep = [];
|
||||
function churn() {
|
||||
if (q.has("nochurn")) return;
|
||||
// Short-lived objects and closures: enough to trigger nursery and major GCs.
|
||||
let junk = [];
|
||||
for (let i = 0; i < 20000; i++) junk.push({ a: i, b: [i, i + 1], f: () => i });
|
||||
keep.push(junk.length);
|
||||
if (keep.length > 100) keep = [];
|
||||
}
|
||||
function round() {
|
||||
if (crash.round >= rounds) {
|
||||
crash.done = true;
|
||||
document.getElementById("out").textContent = "done " + crash.fired;
|
||||
return;
|
||||
}
|
||||
crash.round++;
|
||||
let left = batch;
|
||||
for (let i = 0; i < batch; i++) {
|
||||
// A fresh closure per timer, referenced only by the timer list.
|
||||
setTimeout(((n) => () => {
|
||||
churn();
|
||||
crash.fired++;
|
||||
if (--left === 0) setTimeout(round, 0);
|
||||
})(i), 5);
|
||||
}
|
||||
}
|
||||
round();
|
||||
</script>
|
||||
11
vendor/servo-script/event_loop/timers.rs
vendored
11
vendor/servo-script/event_loop/timers.rs
vendored
|
|
@ -21,6 +21,7 @@ use net_traits::request::ParserMetadata;
|
|||
use rustc_hash::FxHashMap;
|
||||
use script_bindings::callback::{RootedCallback, TracedCallback};
|
||||
use script_bindings::cell::DomRefCell;
|
||||
use script_bindings::trace::RootedTraceableBox;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_base::id::PipelineId;
|
||||
use servo_config::pref;
|
||||
|
|
@ -348,7 +349,9 @@ impl OneshotTimers {
|
|||
|
||||
// select timers to run to prevent firing timers
|
||||
// that were installed during fire of another timer
|
||||
let mut timers_to_run = Vec::new();
|
||||
// Nacre patch (S031): the due timers leave the traced `self.timers`, so keep them rooted until they run;
|
||||
// in a plain Vec a GC inside one callback swept the functions of the timers still waiting.
|
||||
let mut timers_to_run = RootedTraceableBox::new(VecDeque::new());
|
||||
|
||||
loop {
|
||||
let mut timers = self.timers.borrow_mut();
|
||||
|
|
@ -357,10 +360,10 @@ impl OneshotTimers {
|
|||
break;
|
||||
}
|
||||
|
||||
timers_to_run.push(timers.pop_back().unwrap());
|
||||
timers_to_run.push_back(timers.pop_back().unwrap());
|
||||
}
|
||||
|
||||
for timer in timers_to_run {
|
||||
while let Some(timer) = timers_to_run.pop_front() {
|
||||
// Since timers can be coalesced together inside a task,
|
||||
// this loop can keep running, including after an interrupt of the JS,
|
||||
// and prevent a clean-shutdown of a JS-running thread.
|
||||
|
|
@ -804,6 +807,8 @@ impl JsTimerTask {
|
|||
// prep for step ? in nested set_timeout_or_interval calls
|
||||
timers.nesting_level.set(self.nesting_level);
|
||||
|
||||
// Nacre patch (S031): `self` is off the traced timer list while it runs; root its function and arguments.
|
||||
let _rooted_callback = RootedTraceableBox::new(self.callback.clone());
|
||||
let _guard = ScriptThread::user_interacting_guard();
|
||||
match self.callback {
|
||||
InternalTimerCallback::StringTimerCallback(ref code_str, ref fetch_info) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue