S028: merge main (S031 timers patch kept) into s022-mse-proto; progress note

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-12 21:24:38 -06:00
commit 67095081bd
7 changed files with 248 additions and 17 deletions

View file

@ -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

View file

@ -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`

View file

@ -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.

View file

@ -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.

View file

@ -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).

View file

@ -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`,

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB