Skip to content

Merge upstream 2026-11-21 - #45

Open
tiper wants to merge 27 commits into
mainfrom
upstream-merge-2026-11-21
Open

tiper wants to merge 27 commits into
mainfrom
upstream-merge-2026-11-21

Conversation

@tiper

@tiper tiper commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Merges PlxNative main through 0c9a64d (plxnative#1500): 23 upstream commits, plxnative#1479 to plxnative#1500. Not release-aligned; PLXNATIVE_BASE stays 0.11.0-dev.

Conflicts resolved

  • Makefile, ci/module-layers.ini, ci/test_no_host_staticlib.py, rust-modules/Cargo.toml: upstream's new shell-sdl crate added beside plx_jellyfin, locales-finnative and the finnative screens feature.
  • ci/readonly_*.py, ci/proofs/*: upstream's scripts with the FinNative I18N hash re-added; both proofs regenerated.
  • plex/library.rs: upstream's metadata_path / metadata_many_path helpers and new metadata_background, each keeping the alt-backend hook.
  • data/stores/notify_map.rs: upstream's module doc plus the LibraryKind::Unknown note.
  • screens/detail: upstream's Stops (no-playback platforms) with the favourite toggle kept: carried carries focus across both faces, and writes_account counts Favorite/Unfavorite as account writes. The no-driver test covers the favourite face too.
  • ci/test_platform_axis.py: expects the FinNative debug app id.

Gates (committed tree)

  • make check: 145 of 146 steps passed; the one failure (test_platform_axis.py, upstream app id) is fixed in the second commit and passes.
  • make check-nodef: clean.
  • cargo test --lib -p plx_jellyfin: 162 passed, 0 failed.

Generated by Claude Code

GLinnik21 and others added 27 commits November 20, 2026 09:14
…he ambient shader (plxnative#1481)

Samsung's TV 10.0 emulator (YaGL GLES 2.0 over the host's Mesa) refused the ambient vertex shader, so plx_gfx could not start there: a required shader's rejection stops the app from starting. The one statement in `shaders/` that declared several names, `uniform vec4 u_atl, u_atr, u_abr, u_abl;` in `vs_ambient.vert`, is now four statements, and a host test keeps every shader to one name per `uniform`, `varying` or `attribute` statement.

On the emulator (probe build `samsung/hello-tpk` at e8da14c) the unsplit source fails with `0:37(9): error: syntax error, unexpected NEW_IDENTIFIER` at `varying highp vec2 v_dither_nc;` and the split one compiles, as does a cut-down variant before and after; with the split, all 14 required programs compile and link and plx_gfx draws, with glGetError clean. A `#version 100` preamble also made it compile but failed the link on a language-version mismatch, so it was dropped. Why YaGL rejects the multi-declarator is not established, and the optional straighten program still fails there with the same kind of error.

On the LG dev set the driver compiles both spellings to the same GPU code: `glGetProgramBinaryOES` returned byte-identical Mali binaries before and after for all four programs built from `vs_ambient.vert` (APROG, APROG_PLAIN, SCRIM_PROG, ART_WASH) and for two unchanged controls, with identical uniform and attribute tables, so frame cost cannot change.

The scan blanks comments and preprocessor lines, cuts statements at `;`, `{` and `}`, and counts a storage-qualified statement with a comma outside every `(…)` and `[…]`; its self-test covers the array and multi-line forms and leaves comments, parameter lists, array sizes, locals and longer identifiers alone. It walks `shaders/`, so a new shader is covered by being added.
…tforms of one app (plxnative#1480)

The plan for running PlxNative on webOS, the desktop simulators and Samsung Tizen from one repo is now in `docs/platform-ports.md` (step W0 of discussion plxnative#1460). Documentation only.

- One crate per platform sits on top of the app crate: `plx_platform_webos`, `plx_platform_desktop` and `plx_platform_tizen`. Exactly one is compiled per build, chosen by a `PLATFORM` make axis. There is no runtime capability registry.
- `tv::Port` becomes `tv::Services`, and every hook in it is required except the legacy webOS media group.
- The contracts land first: W3a, a memory-only store mode; W3b, URI drivers reporting their own display evidence; W3c, `run_application` returning its exit. After them, W1-W7 make the platforms real crates, W8 splits the shared pieces and W9 brings up Tizen.
- Samsung goes through a thin C# .NET `.tpk` host that loads the Rust `.so`. Rust creates its own Ecore_Wl2 window and EGL context on its own thread.
- The MVP is W9 on the TV 10.0 x86_64 emulator, labelled emulator only: the interface on a dev-token boot against `tests/mock_pms.py`, with no playback. Signing in against the mock plex.tv comes later, because `plex_tv()` accepts only loopback and that rule is not widened. Retail sets wait on H1 (armv7 or aarch64) and H2 (whether the `.so` loads under a Public certificate).
- The emulator evidence (E1-E13) is folded in: the hosted window, EGL and key path, curl to the mock, and plx_gfx on YaGL after the one-declaration split.
- `docs/module-layers.md` describes the landing order: `system` and `port` are modules of the top crate, not of `plx_os`. The top crate stays the staticlib root until L15f puts the platform crates on top, and W9 adds `plx_platform_tizen`.
…process (plxnative#1479)

`run_application` now returns its exit, and only the executable entry ends the process (step W3c of the platform plan, discussion plxnative#1460). A library that another program hosts must never end that program's process. On Samsung the .NET host owns it, and until now `run_application` ended in `_exit`. On webOS the process ends in the same order as before.

- `run_application` returns `Exit { code, release: Complete | Retained }`. `port::plex_run` keeps its C signature and is one call to the private `fn plex_main(..) -> !`. That function installs the port, runs the app and calls `plx_base::process::exit_now(exit.code)` straight after it returns. `main.c`, `sim.rs` and the teardown order are unchanged.
- The entry is still proven never to return. `const _: fn(*const c_char, c_int) -> ! = plex_main;` replaces the `-> !` consts on `run_and_shutdown` and `run_application`. The lifecycle scan in `app/exit.rs` holds `plex_run`'s comment-stripped body to exactly `plex_main(pms_host, pms_port)`, and requires the const and `plex_main`'s `exit_now(`. `ci/check-deps.sh` budgets `plex_main` at 10 lines and `plex_run` at 3. If `plex_run` could return, `main.c` would return into `__libc_start_main`'s libc `exit`, and `OPENSSL_cleanup` would run under live curl workers (plxnative#1115).
- New `app/exit.rs`:
  - `release_of`, an exhaustive match over `NativeExit` that `quits_sdl` is derived from;
  - `entry<T>`, which leaks the App through `ManuallyDrop`;
  - `HostGate { stopping, inflight }`, so a stop report waits for a callback in flight;
  - a once-only `Completion` shared by the loop and deadline threads, which disarms the watchdog before `on_stopped`;
  - the libc-exit source guard, moved from `boot.rs`. It now also covers `exit_now`, which only `port.rs`, `bin/sim.rs` and `dev/framedump.rs` may call.
- `plx_gfx`'s shader and link exits return a typed `GfxFault` through `init_gl`, `init_text` and `init_image`, and `link_required` runs over an injected `ProgramDriver`. Every refusal in the boot chain returns `Err(Exit)` with the same status (1), so a shader fault now drops the telemetry guard on the way out like the SDL_Init and GL-context refusals.
- Behaviour change: a driver that rejects the `fs_blur` or `fs_glass` compile no longer refuses the boot. The blur backdrop's lazy link uses `link_optional_program`, so the app boots with blur off and opaque panels, as a link failure already did.
- `watchdog::disarm`, `arm` and `is_armed`. The loop thread id sits in a mutex slot held across the signal send, so `disarm` waits for a probe in flight.

On the dev set, a `--guest --mock` boot and a close by app id matched main within the noise floor, each ending `APP_CLOSED` with `exit_status: 0`.
…et (plxnative#1482)

`PLATFORM` is now a make variable with three values, `webos`, `desktop` and `tizen` (step W1 of the platform plan, discussion plxnative#1460). Nothing reads it yet, so no build changes. Later steps hang the per-platform crates and packaging on it.

- The values come from `ci/platform_axis.py --list`, and `PLATFORM ?= webos`. A value that is not exactly one listed word, such as `webos bogus` or `%`, stops make before the stamp reset deletes anything. The file is not `ci/platform.py`, because a module of that name would shadow the stdlib `platform` for `ci/mkmacapp.py`, `ci/build-libass.py` and `ci/test-compat.py`.
- `sim`, `sim-%`, `macapp` and `macapp-zip` imply `desktop` when PLATFORM was not given. An explicit value wins. The other goals that build the simulator (`check-replay`, `screenshots`, `screenshots-sim`, `site-video-sim`) imply nothing yet; that waits for W4.
- `print-platform` and `print-rust-target` are query targets in `QUERY_GOALS`. `RUST_TARGET` does not move with PLATFORM.
- PLATFORM is not exported, is not part of `RUST_CFG` or `RUST_TDIR`, and adds no cargo-running target. Like `FLAVOR`, an environment value is read.
- `ci/test_platform_axis.py` (22 tests, in `ci/check-python-steps.txt`) covers the list, each value and each refusal, and the desktop implication over 16 sim and macapp goals. It also checks that a refused value and both queries leave a seeded stamp and binary alone in a scratch tree, and the stdlib-shadow guard.
- `make -n` is byte-identical to before for the default goal, `ipk`, `RELEASE=1 ipk`, `FLAVOR=stable RELEASE=1 ipk`, `sim-macos`, `sim-linux`, `macapp`, `lint`, `check-nodef` and `test-hostsim`. Each make pays one more python start, measured at +12 ms.
…::Platform (plxnative#1483)

The bottom layer's hook table is split by who reads it (step W2 of the platform plan, discussion plxnative#1460). The lower layers keep `tv::Services`. The window, bus and frame-probe entries, which only the loop reads, move to an app-private `app::Platform` that `run_application` takes as a parameter. webOS and the simulator behave as before.

- `plx_os::tv::Port` (27 fields) becomes `tv::Services` with the same function pointers in four groups:
  - `identity { probe_device, start_capability_probe, repair_sandbox, system_locale, sound_output }`;
  - `secure { seal, open, remove, mode }`, which absorbs W3a's separate once-set mode and `publish_mode`. `secure::mode()` keeps its signature and still reads the test override first;
  - `system { go_home, poll_home, deliver_toast }`;
  - `legacy_webos_media { sink, display_sink, uri_media }`.
  Every hook is required, and each group has a named `NONE`. `Services::HOST_TEST` replaces `ABSENT`. The install is still once-only.
- The seven window and bus entries become the `Shell` trait and the six frame probes become `FrameProbe`. Both live in `app/platform.rs` beside the loop, and `tv/window.rs` is deleted.
- `app::Platform { services, shell, diag }`. `Platform::new` builds it, and `install_services` is the only reader of the private `services`, so app code cannot call a raw hook past the guards in `tv`'s modules.
  - `run_application(platform, ..)` installs the services, and `App.platform` holds the platform at both construction sites.
  - Boot code that runs before `App` exists takes it as a parameter, and the bridge's opaque-region hooks read the shell from `BridgeRetained`.
  - `Platform::HOST_TEST` is `#[cfg(test)]`, so a production entry cannot boot with the no-op shell.
- `port.rs` builds the webOS `SERVICES` and `PLATFORM` over the same `crate::system` functions as before. `plex_main` installs gfx's thread-local clear-probe hook. `plex_run` and the proof that `plex_main` never returns are unchanged.
- The plxnative#1479 scan also asserts that `fn plex_run(` and `fn plex_main(` each occur exactly once in `port.rs`. A second, cfg-gated `plex_run` no longer passes it.
- The `frame` gate in `ci/check-deps.sh` pins the call text of `pump_bus`, `opaque_route` and `clear_opaque_region` to `app/run.rs`. It matches the shell receiver, the trait path, and a chained call whose previous line ends in `shell`, so the bridge `Rig` trait's methods of the same name pass. Two self-tests in `tests/test_harness.py` cover both cases.

On the dev set, three `--guest --mock` boots (this change, main, main) each reached idle Home and closed with `APP_CLOSED`, `exit_status: 0`. The logs match within the noise floor, apart from a race in the order of two lines and a one-block difference in the image cache's cap.
Quit and the four app-switch edges now reach the loop as an app-private `HostEvent` instead of raw SDL codes. This is step W5a of the platform plan, the first step of the event contract (discussion plxnative#1460). A hosted platform will deliver its stop as the same `HostEvent::Quit`. webOS and the simulator behave as before.

- `app/events.rs` gains `HostEvent { Lifecycle(Lifecycle), Quit }` and `Lifecycle { WillBackground, DidBackground, WillForeground, DidForeground }`. `decode_host_event` maps SDL `0x100` and `0x103`-`0x106` to them. Every other event returns `None` and keeps today's raw path; keys, text and pointer are W5b and W5c.
- In `app/run.rs`, the drain decodes first and hands a `HostEvent` to `ingest_host_event`, which routes both background edges to `host_background` and both foreground edges to `host_foreground`. The effects run in the base's order:
  1. window activity and the window telemetry;
  2. `session::lifecycle` on `0x106`;
  3. the controlled-replay restore and refusal;
  4. the presentation damage note;
  5. the recorder;
  6. the park or resume of playback, or the quit.
  `ingest_sdl_event_with_window` keeps its name, because `ci/list-caps.ini` keys an entry on it.
- The recorder still writes the SDL code (`Lifecycle::sdl_code()`), so tapes are byte-equal, and a quit is still not recorded.
- The source pin in `ui/src/fixture.rs`, which proves the loop delivers an app switch to every body, now finds `host_background` and `host_foreground`, bounded to each function's body. It also pins `ingest_host_event`'s arms, which send both edges of each pair to them.
- The tests feed each event both ways, as SDL bytes and as a `HostEvent`, and compare what the loop leaves:
  - quit, during playback and during a controlled replay;
  - a full park and resume, including the crash-step trail;
  - a WILL edge sent alone, which must do its own work (the test fails if either arm is narrowed to its DID edge);
  - the recorded tape.
The television seam's types no longer name webOS (step W3d of the platform plan, discussion plxnative#1460). The secure envelope's backend becomes an opaque tag, `sandbox` becomes `native_video`, and identity publishes a neutral `Platform`. webOS fills each with the values it carried before. The X-Plex headers, the `devjail:` log line, the telemetry fields and the session file's wire form are unchanged.

- `tv::secure::Backend` is now an opaque tag: `Backend(Cow<'static, str>)`, serialized transparently, with `KEYMANAGER3` and `PALM_KEYMANAGER` as constants.
  - `keymanager::open` refuses any other tag without an LS2 call, and `remove` ignores it. The session layer reports Locked and leaves the file untouched, which is how an unknown tag ended before, when serde failed. Its log line now reads "device key is unavailable" rather than "unsupported or damaged secure envelope".
  - A fixture written from the old code pins both tags' wire form byte for byte.
- `tv::sandbox` becomes `tv::native_video`, and its `Verdict` becomes `Available | Blocked(&'static str) | NotApplicable`.
  - `context()` still answers `ok`, `missing` or `n/a`.
  - `Services.identity.repair_sandbox` becomes `repair_native_video: Option<fn>`. `None` answers `Failure::Unsupported` as before.
- `tv::device`:
  - `Info` moves webOS's codename, API and name into `Info.webos`.
  - A publish-once `Platform { name, version }` arrives. webOS publishes `("webOS", release or "4.5")`, and `plex::identity::platform()` reads it, defaulting to the old constant.
  - Device file reads go through `Files { read, exists }`. devcaps' parsing is split into `read_caps(&Files)`, and webOS supplies the fs-backed `DEVICE_FILES` through `Services.identity.device_files`.
- The readers in media, appkit, screens, telemetry, the app's diagnostics, playback and lab snapshot follow the renames. `docs/module-layers.md` follows too, and marks L15c done.
…lxnative#1487)

Keys and text reach the loop as `HostEvent`s (step W5b of the platform plan, discussion plxnative#1460). They sit beside W5a's lifecycle and quit. A key carries a canonical `Action` where one is defined, and the raw pair it arrived as where there is one, so a platform with no SDL key codes can deliver an `Action` alone. webOS and the simulator behave as before. The replay tapes, `tests/keytable.json` and the machine's `InputKind::Key` are unchanged.

- `plx_ui::consts` gains `Action` (19 variants), `raw_pair(Action)` (the one pair the app builds for an action) and `action_of(sym, wcode)`.
  - `action_of` reads `classify`, then paging, then the edit keys, then digits by `sym`.
  - `is_remote_bound` is now `action_of(..).is_some()`, checked against the old predicate over the whole grid.
  - The PIN screen's `digit_of` moves down unchanged as `pin_digit`.
- `HostEvent` gains `Key(KeyPress)` and `Text(String)`.
  - `KeyPress` keeps an action and its pair consistent: with a pair, the action is `action_of` of it; without one, the action must round-trip; a press with neither is refused.
  - `decode_host_event` decodes SDL `KEYDOWN`, `KEYUP` and `TEXTINPUT` at both layouts' offsets.
  - The named remote-FIFO tokens build their pair through `raw_pair`.
- `run.rs`'s drain hands keys and text to `ingest_key` and `ingest_text_commit`, unchanged in order and effect.
  - A press with no action takes today's raw path.
  - The pointer-hide early return reads `classify` of the pair.
  - The `key type=0x300 raw=` log line stays in the SDL drain.
- `textinput.rs` splits `queue(String)` out of `on_event`, so a hosted `Text` and the FIFO's `txt:` share it.

Tests feed the pairs the set and the simulator really send and assert the consumer's effect:
- transport (Play is not Pause; Rewind and FF commit a seek, a plain Left or Right does not);
- paging, Search editing and the PIN keypad;
- pointer hide, unknown pairs and the lab-trigger pin;
- the decode table and `KeyPress`'s refusals.

A mutation matrix shows which guard catches each swapped table entry. `make check-replay` reports `SAME=4 REFUSED_EXPECTED=8 unexpected=0`.

On the dev set, a `--guest --mock` key script ran against main and against this change. The 38 raw key lines were byte-identical once the SDL timestamp was masked, and the 20 state snapshots were equal.
The simulator becomes its own platform (step W4 of the platform plan, discussion plxnative#1460). It no longer runs the television's service tables through `hostsim` arms in `system.rs`, `port.rs`, `webos*.rs` and `keymanager.rs`. Those 102 gated lines fall to 0. The television's code is now always compiled, and the linker strips it from the simulator because nothing reaches it. webOS is unchanged, and the replay fixtures replay identically.

- `src/platform_desktop.rs` (`[platform desktop]`) never names `port`, `system`, `webos` or `keymanager`.
  - It supplies its own `tv::Services`. The hooks a desktop host has nothing for are named `NONE` groups: the device probe, native-video repair, device files, locale, sound output, home polling, URI media and the secure store.
  - It has its own bodies for the capability probe (which publishes the DV answer), `go_home`, toasts and the sink.
  - Its `Shell` and `FrameProbe` are explicit no-ops.
  - Its entry returns the exit code, and `bin/sim.rs` ends the process.
- The dev-trigger DV override moves from `webos/caps.rs` to the neutral `os/src/devcaps/dv.rs`, which both probes end in.
- CI: `simulators.yml`'s macOS job also links the macOS app's feature set in debug, which guards the dead-strip reliance until W7 takes `webos` out of the desktop build. `ci/check-deps.sh`'s sink rule follows the moved arms.
- The prose that put the simulator on the television's tables or on `port::plex_run` now says it has its own platform. The exception is `rust-modules/Cargo.toml`'s `hostsim` comment. The `ci/proofs` certificates pin that file, so W7 rewords it when it re-seals.

What the simulator does differently, all in its own log and none read by a test, tool or fixture:
- The webOS device-probe lines are gone, and the Sentry `probe` context reads `unprobed`.
- The surface grab's `FB bits` and `wm sdl` lines and its `wm_query` crash step are gone.
- The first `devcaps:` line's error text reads `entity not found`.
- The keymanager stand-in's sign-in line is gone. The session is still stored in plaintext, as the harnesses expect.
- The toast line has new wording, with the same `NoBus` outcome.
- The DV probe runs synchronously, with the same answer and the dev triggers intact.
- `X-Plex-Platform` stays `webOS`.

Tests, base against head: the app hostsim suite ran 1726 passed on both (the two macOS-only no-GL tests skipped), `plx_media` hostsim 2478 on both, and `plx_os` 460 on both. No test was lost; two moved with their code. `make check-replay` was unchanged. The simulator boots to Home against `tests/mock_pms.py`, and `make macapp` builds. `nm -u` shows no Wayland, LS2, ACB, Starfish or luna symbol in any simulator binary. fw-compat-reviewer: SAFE.
…orage (plxnative#1488)

Part of step W8a of the platform plan (discussion plxnative#1460). The platform now states where the account's records live, instead of the build's CPU and OS deciding it.

The session record, the install's preferences and the consent record have two homes. On a webOS television the LS2/DB8 storage helper owns them; everywhere else they are files. `plex` and `telemetry` chose between the two with `all(target_os = "linux", target_arch = "arm", not(feature = "hostsim"), not(any(test, feature = "test-support")))`. That predicate means "32-bit ARM Linux", not "a television". A Tizen ARM build would select the helper with none behind it.

## What changes
- `tv::Services` gains a fifth group, `storage: StorageHooks { authority }`, in the new `os/src/tv/authority.rs`:
  - `Authority::Helper` is stated by webOS (`port.rs`). The helper is the canonical store there. The app still keeps three kinds of its own files on webOS, as before: the legacy migration inputs, the marked session fallback it writes during a helper outage, and the install preferences `clear_for_erase` saves when a helper sign-out clear is not durable. The module doc names only the first two; the stacked `plex` PR completes its list.
  - The authority does not decide the session record alone. `secure::mode()`'s `MemoryOnly` comes first, and under it nothing is written, whatever the authority says. Tizen starts in `MemoryOnly` (W9).
  - `Authority::Files` is `StorageHooks::NONE`, stated by the desktop platform and `Services::HOST_TEST`. It is also what an uninstalled process reads, like every other group's host-test answer.
  - `tv::authority::authority()` reads the installed table.
- There is no test override. The layers that will read the value take it as a parameter, so a test passes whichever authority it grades.
- `storage::client::install_activator` (the helper's wake-up, installed by `port::plex_main`) belongs in this group later. It moves with the `os` part of W8a after W7b, and the module doc says so.
- `docs/module-layers.md` and `docs/platform-ports.md` name the new group.

Nothing reads the value yet. Two PRs stacked on this one re-key the fences to it: `plex` (21 lines) and `telemetry` (29 lines).

## Tests
- `Services::HOST_TEST`'s destructuring test in `tv.rs` pins `Files`.
- `port.rs` pins webOS's `Helper`, and `platform_desktop.rs`'s hostsim test `the_desktop_table_keeps_the_account_in_files` pins the desktop table's `Files`.
- A source-order pin in `port.rs`'s tests checks that `run_application` installs the services before it enters the application. An uninstalled television would read `Files` and write a plaintext session file.
- The lane's runs:
  - `plx_os` tv tests: 79 passed;
  - `port` tests: 2 passed;
  - the hostsim desktop table test: 1 passed;
  - `make check-nodef`: exit 0;
  - `ci/test_readonly_generated.py` and `ci/test_readonly_dependencies.py`: ok.

No `Cargo.toml`, lock or certificate-pinned source changes. No ledger line.
…ot the build's CPU (plxnative#1490)

Part of step W8a of the platform plan (discussion plxnative#1460). Telemetry's consent store now follows the storage authority the platform states (plxnative#1488), instead of `all(target_os = "linux", target_arch = "arm", not(feature = "hostsim"), not(test))`. That predicate means "32-bit ARM Linux", not "a webOS television". webOS behaves as before. Every other platform keeps the files arm it already took.

## What changes
- **The 29 fenced lines** (`persistence.rs` 23, `consent.rs` 5, `mod.rs` 1) become a run-time `match` on `plx_os::tv::authority::authority()`.
  - `load`, `record_at` and `forget_at` read the authority once per operation, then hand it to `load_with(authority, transport, …)`, `record_with(…)` and `forget_with(authority, legacy, root)`. `Helper` runs the helper arm; `Files` runs the files arm.
  - Only the selection changes. Every `*_helper` item (`load_helper`, `record_helper`, the legacy import, the legacy sweep) and every files-arm body is byte-for-byte as before, apart from its deleted cfg line. No fallback, migration read or sweep is dropped.
  - The helper-arm items and the consent codec (`split_canonical`/`join_canonical`) now compile on every build.
- **`cleanup_after_account_clear` is unconditional.** It calls a private `account_clear_sweep(authority, legacy)`.
  - `Helper` sweeps the legacy candidates through `cleanup_after_combined_clear`.
  - `Files` answers `true` without reading a path.
- **`app/boot.rs` `install_plex_seams`** installs `install_account_clear_cleanup` on every platform. Its cfg line is removed and its doc bullet follows; the hunk is 5 lines.
  - `plex/session.rs` loses the matching cfg on `ACCOUNT_CLEAR_CLEANUP` and `install_account_clear_cleanup`.
  - The two lines go from `ci/allow/forks/plex.txt`, whose count falls from 33 to 31.
  - The call site in `clear_for_erase` keeps its fence, so until the stacked `plex` PR re-keys it, a non-webOS build installs the hook and never calls it.
- **Consent on Tizen** takes `Files`, with no third `Authority` value. How `StoreMode::MemoryOnly` applies to consent is decided in W9.

## Counts in `rust-modules/telemetry`
| | before | after |
|---|---|---|
| `target_arch = "arm"` | 38 | 9 |
| `target_os = "linux"` | 41 | 12 |

- **The 9/9 left in `native.rs`** (the Sentry Native crash capture: `mod sdk`, 17 externs, `src/sentry_context.c`) are the recorded follow-up for Tizen ARM retail builds. They do not affect the x86_64 emulator, where both predicates already pick the non-webOS arm.
- **The 3 `target_os = "linux"` lines in `crashreport.rs`** are true Linux facts and stay.

## Tests
New tests pass the authority as a parameter. There is no process-global override:
- `upgrade_tests::the_platform_authority_picks_the_store_for_{load,record,forget}`;
- `tests::the_account_clear_sweep_retires_legacy_files_only_where_the_helper_defers_it`.

Results on the committed, restacked tree (`git status --short` was empty before and after):
- `make test-crate C=plx_telemetry`: `test result: ok. 381 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out`
- `make check-nodef`: exit 0
- `make test-hostsim T=lifecycle_regression_tests::parking`: `test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 1750 filtered out`
  - This shows the app crate builds under `hostsim` with the `boot.rs` change.
  - The whole `lifecycle_regression_tests` module was not graded. One test in it, `player_owner_events_record_and_replay_through_the_actual_app_host`, kills the test binary (SIGSEGV) on the lane's Mac at 8f55751 and 641ba14 too.
- `ci/check-deps.sh`, `ci/check-module-layers.py`, `ci/check-ledger-ratchet.py` and `ci/check-statics.sh` are green.
- `ci/test_readonly_generated.py` (22 tests) and `ci/test_readonly_dependencies.py` (64 tests) are OK.
- No `Cargo.toml`, lock, `.cargo` or certificate-pinned source changes.

## Not covered
- No television run. The helper-arm bodies are unchanged; what changed on webOS is the dispatch, which now reads `authority()`. plxnative#1488's pin keeps `install_services()` ahead of every reader.
- The `plex` W8a PR edits the same lines in `plex/session.rs` and `ci/allow/forks/plex.txt`, with identical hunks. Whichever lands second merges `main`, and may need to resolve the `# count:` line.
… once (plxnative#1489)

Step W6b of the platform plan (discussion plxnative#1460): the platform supplies the playback composition, in two boot phases. The app publishes what it gets once, on every boot. Before, `app/boot.rs` called `acb_init` and `compose_backends` directly, and `playback.rs` and `run.rs` chose code paths with `feature = "play-uri"` gates. Now `Platform` carries a `MediaBoot`: webOS fills it with today's bodies, the desktop with the Feed host sink alone, and `Platform::HOST_TEST` with nothing. webOS boots the same way at the same points, with one new log line.

## What changes
- **`app/platform.rs`**
  - `Platform` gains `media: MediaBoot { early_init: fn(&MainThread), compose: fn(&mut PlayerAdapter, controlled: bool) -> Composition }`. `Platform::new` takes it as a fourth argument.
  - `Composition { resolver: Option<ResolvePort> }` derives `Default`, which means no resolver.
  - `publish_composition(session, adapter, Composition)` publishes the resolver first, then `install_backends(adapter.composed_backends())`.
    - It runs on every boot, for every platform, so a platform with no drivers publishes `BackendSet::NONE` and no resolver. The session's set and its resolver can no longer disagree.
    - It logs one new line, `compose: backends=<uri+feed|uri|feed|none> resolver=<yes|no>`. Every existing log line is unchanged.
  - `HOST_TEST` composes nothing, and the pin test covers the new field.
- **`app/boot.rs`**: two hunks.
  - The `acb_init` call becomes `(platform.media.early_init)(&mt)`. It stays on the same line, inside the same `if !controlled`, before `ffi::boot()`.
  - The `compose_backends` block becomes `(platform.media.compose)(…)`, then `publish_composition(…)`, at the same site.
- **Who fills what**
  - `src/port.rs` (webOS): `MediaBoot { early_init: backends::acb_init, compose: backends::compose_native }`.
  - `src/platform_desktop.rs`: a no-op `early_init`. Its `compose` calls `compose_feed` and returns `Composition::default()`.
- **`app/adapters/backends.rs`**
  - `compose_backends` is split into `compose_feed` (shared), `compose_native`, and `compose_with(adapter, controlled, install_uri)`, which the tests use.
  - `install_uri_product` and `install_uri_product_with_ports` no longer take the session. They return `Option<ResolvePort>`, built only after the physical URI install succeeds.
  - The `uri: product driver installation refused` line moved into `install_uri_product`, with its text unchanged.
- **`media/src/route/decision.rs`**
  - `install_uri_preflight_port` takes `impl Into<Option<ResolvePort>>`, so an absent resolver clears the slot, and the existing callers that pass a resolver compile unchanged.
  - A reader, `uri_preflight_port()`, is added for the tests.
- **`playback.rs` and `run.rs`**: the ten `feature = "play-uri"` lines that chose a path at build time are deleted, six in `playback.rs` and four in `run.rs`. Those paths now read the published set at run time. Nothing else in either file changes.
- **Docs**: Target shape 6a in `docs/platform-ports.md` gains an "As landed" note, and `docs/module-layers.md` follows.

## Deviations from the plan
- **Composition is a seam, not a move.** `port.rs` points at functions in `app/adapters/backends.rs` instead of owning their bodies, because those bodies name ACB, and the app crate's own ACB names leave it only in W11a. The 6a text and the W6b paragraph say so.
- **`compose` takes no `&PlaybackSession`.** The only use of the session was the old resolver publication, which now happens in `publish_composition`. 6a records that W10 adds a read-only session parameter if a Tizen driver needs one.
- **46 `play-uri` lines remain**: 40 in `backends.rs`, 1 in a `run.rs` test fixture, 3 in `dev.rs`, 1 in `lib.rs` and 1 in the rig. None remain in `boot.rs`, production `run.rs`, `playback.rs` or `platform.rs`. This commit adds five gated lines to `backends.rs`, so the docs give the grep instead of a count.
- `Composition::NONE` became `Default`: the constant was read only by the desktop platform, and `make check-nodef` failed on it as dead code.

## What the simulator does differently
- No URI driver is composed. `play-uri` is a default feature, so before this change the simulator composed the product URI driver over null ports. Its session set is now Feed alone, with no resolver.
- Its log no longer has the `vplane: exported window …` or `vplane: this device has NEITHER libAcbAPI …` line, nor the `uri: product binding=…` and `uri: display path=…` lines.
- `PlaneOwner::boot(ABSENT)` is no longer called. The default plane facts are the same absent facts.
- `dev::uriprobe::install` no longer runs in a simulator `devtriggers` build.

## Tests
In each case, the published set and resolver must agree:
- `a_composed_uri_driver_is_published_with_its_resolver` and `a_controlled_boot_composes_no_uri_driver_and_no_resolver` call webOS's own `compose_native`, the function `port.rs` installs as `Platform.media.compose`;
- `a_refused_uri_install_publishes_neither_the_driver_nor_a_resolver` drives `compose_with` with an injected install failure;
- `the_desktop_platform_composes_the_feed_and_no_resolver` (in `platform_desktop.rs`) calls the desktop's `PLATFORM.media.compose`;
- a zero-driver publish;
- reading back the published resolver.

The URI boot rig's 18 calls, and `install_exported_uri`, now publish through `publish_composition`. A rig adapter is Feed plus URI, so its session set is now `BOTH` (it was `FEED`). That is the set a production boot publishes with both drivers.

Results on the committed tree at 036034f:
- The app crate's lib tests without `hostsim` (`make test-crate C=app`), each by name: `a_composed_uri_driver_is_published_with_its_resolver`, `a_refused_uri_install_publishes_neither_the_driver_nor_a_resolver` and `a_controlled_boot_composes_no_uri_driver_and_no_resolver`, each `test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1503 filtered out`
- `make test-hostsim T=uri_boot`: `test result: ok. 29 passed; 0 failed; 0 ignored; 0 measured; 1725 filtered out`
- `make test-hostsim T=the_desktop_platform_composes_the_feed_and_no_resolver`: `test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1753 filtered out`
- `make check-nodef PLAYBACK_BACKENDS=feed`: exit 0
- The four static gates are green.

Results on b951d2a, the head before the test-only fix commit:
- `make test-crate C=plx_media`: `test result: ok. 2159 passed; 0 failed; 104 ignored; 0 measured; 0 filtered out`
- Full `make test-hostsim`, without two tests that kill the test binary (SIGSEGV) on the lane's Mac at base 8f55751 as well: 1750 passed, 2 failed. The two failures were in `deeplink_route_tests`, which passed on rerun: `test result: ok. 9 passed; 0 failed`.
- `make check-nodef PLAYBACK_BACKENDS=both|uri|feed|none`: all four compile.
- `make check-replay`: `6 fixtures, 12 replays, SAME=4 REFUSED_EXPECTED=8 unexpected=0`
- `ci/test_readonly_generated.py` (22 tests) and `ci/test_readonly_dependencies.py` (64 tests) pass.
- No Cargo, `.cargo` or certificate-pinned file changes. Both spellings of every touched path were checked against `ci/proofs/*.json`.

## Reviews
- `fw-compat-reviewer` on b951d2a found nothing. CI's firmware load matrix passes on all 9 gated releases, from 4.4.2 to 11.2.0. The binary still has 15 DT_NEEDED entries and 371 undefined symbols, as at base. `acb_init` still runs before `ffi::boot()` inside the same `if !controlled`, and no FFI, link directive or `dynlib!` changes.
- `doc-claim-auditor` found three stale claims, all fixed.

## On the television
On the dev TV (webOS 4.x, ACB), `--guest --mock`, base 8f55751 against b951d2a. Both binaries were md5-verified on the set. No key was sent and no setting changed.
- **Boot.** These lines are identical and in the same main-thread order on both: `vplane: ACB (webOS 4.x)`, `ptype=10`, the `acb initialize`/`create`/`handle=feed` lines, `ff: bound …`, `uri: product binding=Acb mode=1 …` and `uri: display path=acb ready`. Head adds `compose: backends=uri+feed resolver=yes` once, right after the display-path line. Neither build logs an installation-refused line.
- **Feed.** `pipe_h264_aac_mp4` passes on both: `feed: presented`, 24.1 fps, `dropped=0`.
- **URI.** `pipe_uri_product_hls_720p24_20m_bound` passes all 10 checks on both, including `uri_plane_bound`, `uri_presented` and `uri_service_playing`.
- **`…_bound_collapse` fails identically on base and head.** The check is `uri_drain_warning: buffered lead fell 3 -> 2 …`. This change does not cause it.
- **One line moves.** The identity line, `pms: server 0 version=…`, comes before `vplane:` on base and after `ptype=10` on head, 4 of 4 boots each way, including an interleaved repeat. That line comes from the `serverinfo` worker thread, not the main thread, so its position is a race; nothing at that point reads the version. The main thread's own order does not change.
- The TV ran on b951d2a. The commit after it, 036034f, changes tests and one test-only cfg.

## Not covered
- `check-nodef` only compiles. The single-backend shapes (`uri`, `feed`, `none`) are not built as tests or run anywhere in CI.
…tead of the build's CPU (plxnative#1491)

Part of step W8a of the platform plan (discussion plxnative#1460). `plex`'s session persistence now follows the storage authority the platform states (plxnative#1488). Before, it was fenced by `all(target_os = "linux", target_arch = "arm", not(feature = "hostsim"), not(any(test, feature = "test-support")))`, which means "32-bit ARM Linux", not "a webOS television". webOS behaves as before. Every other platform keeps the files arm it already took. On x86_64, the Tizen emulator build's CPU, that fence was already false.

## What changes
- **The fenced lines** (21 at plxnative#1488's base; 19 left after plxnative#1490 ungated the account-clear hook's two) in `plex/session.rs`, `session/persistence.rs` and `session/install_preferences.rs` become a run-time choice on `plx_os::tv::authority::authority()`.
  - The `persistence.rs` dispatchers take `(authority, &mut dyn Transport)`. The public functions pass `authority()` and the native transport.
  - `Helper` runs the storage-helper arm and `Files` runs the files arm.
  - Only the selection changes. The session layer's marked fallback during a helper outage and the legacy migration reads are untouched.
  - Both arms now compile on every build.
- **The account-clear hook.** `clear_for_erase` calls the telemetry account-clear hook only when the authority is `Helper`. An unset hook still reads as retired, so this PR and plxnative#1490 (telemetry, which installs the hook on every platform) were safe in either order. plxnative#1490 has landed.
- **`ci/allow/forks/plex.txt`** falls from 31 lines to 12, by deletion only. It was 33 before plxnative#1490, which deleted two of the same lines first.
- **plxnative#1488's last review minor is folded in.** `os/src/tv/authority.rs` and `docs/platform-ports.md` now:
  - name the third file the app keeps on webOS beside the helper, the install preferences `clear_for_erase` saves when a helper sign-out clear is not durable;
  - say that `secure::mode()`'s `MemoryOnly` decides the session record before the authority does.
- **Docs.** `plex/src/plex/CLAUDE.md` says what reads the authority, and two prose claims that named the ARM fence as plex's store fence follow. So does a doc comment in `base/src/paths.rs` that called the helper-owned DB8 record "the canonical ARM adapter". The guide and the `persistence.rs` module doc name the two helpers that still name `NativeTransport` without a `_via` seam: `reset_cleared_language`, which `clear_for_erase` calls on a television only, and `helper_commit`, which has no caller.
- **Left for W8c.** `plex/Cargo.toml` still declares the `hostsim` feature, though nothing in `plex` reads it now. `Cargo.toml` is certificate-pinned.

## Counts in `rust-modules/plex`
| | before plxnative#1490 | main, before this PR | after |
|---|---|---|---|
| `target_arch = "arm"` | 21 | 19 | 0 |
| `target_os = "linux"` | 21 | 19 | 0 |
| `feature = "hostsim"` | 21 | 19 | 0 |
| `ci/allow/forks/plex.txt` lines | 33 | 31 | 12 |

## Tests
- Fake-transport tests in `migration_tests.rs` drive the `Helper` arm on every host, with the authority passed as a parameter. There is no process-global override.
  - Positive `Helper` tests cover load and clear.
  - Write, migrate, commit and bootstrap are covered through an unavailable transport. The helper fake cannot accept a positive commit outside a device.
- `plx_plex` lib tests went from 823 to 828.

Results on the committed tree at a637194, after merging main at 3923286:
- `make test-crate C=plx_plex`: `test result: ok. 828 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out`
- `make test-crate C=plx_os T=tv`: `test result: ok. 79 passed; 0 failed; 0 ignored; 0 measured; 383 filtered out`
- `make test-crate C=plxnative-modules T=port::tests`: `test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 1501 filtered out`
- `make test-crate C=plxnative-modules T=app::adapters::session`: `test result: ok. 35 passed; 0 failed; 0 ignored; 0 measured; 1468 filtered out`
- `make test-crate C=plx_session T=auth`: `test result: ok. 353 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out`
- `make test-hostsim T=app::adapters::session`: `test result: ok. 35 passed; 0 failed; 0 ignored; 0 measured; 1718 filtered out`
- `make test-hostsim T=the_desktop_table_keeps_the_account_in_files`: `test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1752 filtered out`
- `make check-nodef`: exit 0
- ARM `cargo check --target armv7-unknown-linux-gnueabi` for `plx_plex` and for the app crate with `play-uri,play-feed`: both exit 0
- `ci/check-deps.sh`, `ci/check-module-layers.py`, `ci/check-ledger-ratchet.py` and `ci/check-statics.sh` are green.
- `ci/test_readonly_generated.py` (22 tests) and `ci/test_readonly_dependencies.py` (64 tests) are OK.
- No `Cargo.toml`, lock, `.cargo` or certificate-pinned source changes.

## Prose left for one follow-up
The review found two stale sentences in prose this PR edits. Both are left for one docs PR, after a doc-claim audit of the whole W8a series (plxnative#1488, plxnative#1490, this PR):
- `docs/platform-ports.md` says telemetry's sites "follow in its own PR". They landed in plxnative#1490.
- `plex/CLAUDE.md` and the `persistence.rs` module doc list `cleanup_temporaries` among the `*_via(authority, helper, ..)` dispatchers. It calls `cleanup_temporaries_for(authority)`, which takes no transport.

## Not covered
- **The television.** The ARM evidence is a `cargo check`, so there is no link and no size figure. Both arms now compile into the ARM binary, so a small size change is possible and unmeasured.
  - The device check: on a `--guest --mock` boot, `session: authority read reason=miss` still appears, the identity line is unchanged, and no `session.json` appears under the state root.
- **Device-only paths.** `clear_for_erase`'s `Helper` branch has no transport seam, so it, and the telemetry sweep after a durable clear, run only on a device.
- **Read order.** A read before `run_application` installs the services would see `Files`. plxnative#1488's pin holds `install_services()` first in `run_application`. Nothing earlier that we found reads `plex::session`: `port::plex_main`'s storage activator and clear probe, or `main.c`'s crash and launch-argument entries. That was checked by reading the code, not by a test.
…is the platform's (plxnative#1492)

Step W5c of the platform plan (discussion plxnative#1460). Pointer and wheel input now reach the loop as `HostEvent`s, as keys and text did in W5b (plxnative#1487). The Magic Remote's cursor hide moves behind the platform's `Shell`. webOS hides and shows the pointer exactly as before. The desktop and the host-test platform hide nothing, which is what the simulator already did.

## What changes
- **`HostEvent::Pointer { x: f32, y: f32, edge: PointerEdge }`**, where `PointerEdge` is `Move`, `Down` or `Up`, and **`HostEvent::Wheel { dy: i32 }`**.
  - `decode_host_event` (`app/events.rs`) maps `SDL_MOUSEMOTION`, `SDL_MOUSEBUTTONDOWN` and `SDL_MOUSEBUTTONUP` to `Pointer`, and `SDL_MOUSEWHEEL` to `Wheel`.
  - x and y are logical coordinates, from `plx_base::surface::to_logical`. At 1920x1080 that is the identity. Because they are floats, `HostEvent` keeps `PartialEq` but loses `Eq`.
  - `decode_wheel_dy` keeps the existing wheel-offset handling and its comment. Under hostsim it reads the float at +32 and rounds it; otherwise it reads the `Sint32` at +20.
- **The plan proposed `Pointer { x, y, buttons, shown }`. This lands without `buttons` and `shown`:**
  - The loop never read which button was pressed: the edge is the SDL event type alone, whatever the button. `the_edge_is_the_event_type_whatever_the_button_bytes_say` pins that.
  - Whether the pointer is shown is the pointer machine's own `cur_hidden`, not event data.
- **`ingest_host_event`** (`app/run.rs`) handles both events through `ingest_pointer_{motion,down,up}` and `ingest_wheel`. Effect order, the recorder rows (`enc_pointer`, and `("wheel", 0, dy)` after the 250 ms debounce) and the drop of real input under a controlled replay do not change.
- **The cursor hide.** `app/boot.rs` gives up `hide_cursor`, `cursor_is_transparent`, `show_cursor_after_motion`, `hide_through`, `show_through`, `SHOWN_CURSOR`, `CursorDoor` and `cursor_door` to `rust-modules/src/system.rs`. `system` already sits in `[platform webos]`, so no module is added.
  - `Shell` gains `hide_pointer`, `show_pointer_after_motion` and `hide_is_cursor_swap`.
  - `WebosShell` forwards each one to `system`. `DesktopShell` and `HostShell` are no-ops and answer `hide_is_cursor_swap` false. A test-only `SwapShell` counts its calls and says true.
  - Callers in `input.rs`, `playback.rs` (through a new `Bridge::shell()`) and `run.rs` reach the hide through the shell.
  - Apart from the cfg lines, the television's code paths are unchanged. The hostsim gates and arms are gone, the three wrappers are safe `fn`s, and `wl_sym` is renamed `self_sym`.
  - `SHOWN_CURSOR` moves with no new ledger line.
  - `boot.rs` keeps the pre-`SDL_Init` cursor sleep hint (`webos3_cursor_sleep_hint`, `cursor_sleep_hint`, its own `self_sym`) and its source-order pins.
- **`feature = "hostsim"` occurrences.** The ones on the moved cursor functions go from 13 to 0. Across the touched files the count goes from 99 to 89:

  | file | before | after |
  |---|---|---|
  | `boot.rs` | 52 | 39 |
  | `run.rs` | 27 | 26 |
  | `events.rs` | 8 | 12 |

  `events.rs` rises by one production `cfg!` in `decode_wheel_dy` and three test-only gates.
- **Carried from plxnative#1487's review:**
  - The `press()` helper's vacuous `armed` assertions now observe the real press with `is_live`, with a direction-key control.
  - The "minted by `plex_run`" prose is fixed. The main-thread token is minted in `enter_application`. The fix covers `base/src/task.rs`, `media/src/player/{adapter,mod}.rs`, `dev.rs`, `docs/async-model-decision.md`, `docs/agent-reference.md` and `docs/remote-keys.md`.
  - The `docs/agent-reference.md` fuzz wording is fixed.

## Tests
- **Decode:**
  - `pointer_event_tests`: the edge and position; the edge ignoring the button bytes; the synthesized bytes round-tripping; the wheel offset at +20; the FIFO token's television-shaped wheel decoding to 0 under hostsim; and, under hostsim, a fractional trackpad tick rounding to whole ticks.
  - `host_event_tests`.
- **The loop** (`lifecycle_regression_tests`, hostsim):
  - pointer and wheel take the paths their SDL events took;
  - the D-pad motion gate;
  - OK-as-click under a cursor swap, and its button-up;
  - the D-pad hiding the pointer through the shell, and a motion showing it again;
  - the recorder rows;
  - the wheel FIFO token;
  - the controlled-replay drop.
- **The hide door:**
  - `system::cursor_door_tests`, five tests, not gated;
  - `input::pointer_hide_tests`;
  - the shells' own tests in `platform.rs` and `platform_desktop.rs`.
- **Mutations.** 21 mutants were applied one at a time, and each was killed by the test aimed at it.
  - No mutant exists for the three one-line `WebosShell` forwards or for the `sync_back_cursor` call in `playback.rs`, because the host cannot observe them.
  - Three more call sites are moved verbatim but no test guards them:
    - the idle-over-video hide in `run.rs`'s `playback_tick` (`shell.hide_pointer()` after 3000 ms without motion);
    - `host_background`'s `sync_back_cursor`;
    - `controlled_key_input`'s `note_cursor_motion`.

    `SwapShell` could now observe them, but no test drives those paths on it. Deleting any one of them fails no test.

Results on the committed tree at 17d0574, after merging main at f7038a8 (W6b plxnative#1489, which contains plxnative#1488 and plxnative#1490):
- Full hostsim suite, without the two tests that kill the test binary on the lane's Mac at base too: `test result: ok. 1781 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out`
- Default-feature suite, the same way: `test result: ok. 1514 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out`
- `make test-hostsim T=uri_boot`: `test result: ok. 29 passed; 0 failed; 0 ignored; 0 measured; 1754 filtered out`
- `make test-crate C=plxnative-modules`:
  - `T=port::tests`: `test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 1513 filtered out`
  - `T=pointer`: `test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 1497 filtered out`
  - `T=cursor_door`: `test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 1510 filtered out`
- `make check-nodef`: exit 0. `make lint` was exit 0 on b7ec914; the only edit since the merge is a test-only line.
- `make check-replay`: `6 fixtures, 12 replays, SAME=4 REFUSED_EXPECTED=8 unexpected=0`
- The merge needed one fix: `SwapShell::platform()` passes `MediaBoot::HOST_TEST` to W6b's four-argument `Platform::new`. `the_host_test_platform_answers_nothing_and_says_so` destructures all four `Platform` fields.

Results on b0ad245, before the merge:
- Full hostsim suite, without the two tests that kill the test binary on the lane's Mac at base too: `test result: ok. 1774 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out`
  - The skipped tests are `player_owner_events_record_and_replay_through_the_actual_app_host` and `an_unregistered_product_screen_uses_generic_navigation_and_actual_store_effects`.
- Default-feature suite, the same way: `test result: ok. 1509 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out`
- `make check-replay`: `6 fixtures, 12 replays, SAME=4 REFUSED_EXPECTED=8 unexpected=0`
- `tests/keytable.json` is unchanged.
- `ci/check-deps.sh`, `ci/check-module-layers.py`, `ci/check-ledger-ratchet.py` and `ci/check-statics.sh` are green.
- `ci/test_readonly_generated.py` and `ci/test_readonly_dependencies.py` pass.
- No change under `ci/`, to any Cargo file or `.cargo`, or to `rust-modules/src/lib.rs`.
- `fw-compat-reviewer`: no findings. It graded the source only. The same `SDL_*` symbols are looked up in the same order, with the same hide method per firmware release. The 3.x releases sit below the graded floor.
- `doc-claim-auditor`: five findings, all fixed.

## Not covered
- **No television run.** Not checked on a set: the pointer hide and show on a 3.x set against a 4.5+ set, the `WebosShell` forwards, and the Back sync in `playback.rs`.
- **The `wheel:<dy>` FIFO token.** It builds the television's +20 layout, so under hostsim it decodes to 0. This was already true before this PR, and a test now pins it.
…plxnative#1493)

This is a docs follow-up to the platform plan (discussion plxnative#1460). It corrects the sentences that W8a (plxnative#1488, plxnative#1490, plxnative#1491) and W5c (plxnative#1492) made false. It is prose only, plus one code comment.

- rust-modules/plex/src/plex/CLAUDE.md and the session/persistence.rs module doc:
  - Seven public dispatchers hand the authority and NativeTransport to a *_via form.
  - cleanup_temporaries goes through cleanup_temporaries_for(authority) with no transport. Its Helper arm sweeps nothing.
- docs/module-layers.md:
  - L15e reads "W5a to W5c and W6b landed".
  - L15g reads "W8a started" (plxnative#1488, plxnative#1490, plxnative#1491).
- docs/platform-ports.md:
  - F39 says telemetry was re-keyed first, in plxnative#1490.
  - In Target shape 4, the gate sits above the storage-authority selection, not a target_arch selection.
  - The HostEvent list gains an "As landed (W5c)" note: Pointer { x, y, edge } and Wheel { dy }, with no buttons or shown field.
- rust-modules/os/src/storage/mod.rs: the comment on StoreError's allow(dead_code) no longer claims a compiled-out half. Both arms compile on every build. No variant warns without the allow, because the enum is public and the storage module allows dead_code. The attribute is unchanged.

Two review minors are left for W6's docs, which edit the same row:
- The L15g row does not name telemetry's nine native.rs crash-capture sites, the follow-up for Tizen ARM retail builds.
- The row does not say that the storage-authority part of W8a ran ahead of W7.

plex/Cargo.toml's stale hostsim comment is certificate-pinned and goes with W8c.
…ive#1495)

* ci: fall back to OpenRouter when Claude cannot label an issue

When the Anthropic organization ran out of credit, every new issue got
only `user-report` and a red run. The labeler now retries the same
request through OpenRouter's Anthropic-compatible Messages endpoint:
the same Haiku (anthropic/claude-haiku-5.5) billed from OpenRouter
credit, with google/gemini-3.1-flash-lite as OpenRouter's own retry so
an Anthropic outage is covered too.

The fallback needs the repository secret OPENROUTER_API_KEY and is off
without it. A run that fell back stays green with a ::warning::, and
the Anthropic error body (e.g. "credit balance is too low") is now
printed instead of a bare HTTP status. When every model fails the run
still adds only `user-report` and exits 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P6ZnFdmaenGaJUBJBDz5WS

* ci: run the OpenRouter fallback as its own job, in a main-only environment

Review of plxnative#1495: a repository secret reaches a workflow_dispatch run
from any branch, whose copy of the script could do anything with it.
The key now lives in the `issue-labels` environment, limited to the
default branch. An environment changes the job's OIDC subject away
from `...:ref:refs/heads/main`, which the Anthropic federation rule
matches, so the Anthropic job keeps no environment: it reports the
issues it failed on (`failed` output) and a second job, holding the
key and no id-token, labels exactly those with --provider openrouter.

A run that fell back is green and keeps the Anthropic job's error
annotations; errors now carry the failure reason. The header comments
no longer claim the workflow holds no API key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P6ZnFdmaenGaJUBJBDz5WS

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…a URI Load

A Results row for the static reads behind plxnative#1399. On every image, the
DolbyHdrInfo node on a URI Load is checked only for presence: it pins
hdrType to DolbyVision and nothing reads profileId or trackType. Whether
Dolby Vision is decoded is decided by the demuxer. qtdemux handles it on
every major. matroskademux has no Dolby Vision code before 10.3; this was
read in the code on 5.5.0, 5.6.2, 6.5.3, 7.6.0 and 9.2.4, and 10.3.x and
11.2 carry it. The 5.6.2 CX badge for a Profile 8.6 MKV played without
the node is not explained by any userspace element, so it is recorded
as open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erver skips its synchronous refresh (plxnative#1496)

When the app reads an item by rating key in the background, it now sends skipRefresh=1, so PMS skips the synchronous local media agent and analysis refresh it runs by default (docs/plex-openapi.json: skipRefresh defaults to false). Plex Web sends skipRefresh=1 on every re-read by key.

- Client::metadata_many always sends it. Every caller is a background read: Home's re-read of a row by the keys it showed, the view-state read-back, the section shelves, the detail chain's batch reads and the person page's roles.
- New Client::metadata_background: the detail read's parameters plus skipRefresh=1. The two guid lookups use it (viewstate.rs resolved_guid, stores/watchlist_job.rs).
- Client::show_language_prefs's first read sends it.
- Unchanged on the wire: the detail page's own reads, the play-time read, the trailer reads, and the re-read after the viewer's own subtitle write (subsearch.rs subtitle_rows), which compares streams before and after the install.
- ci/plex-requests.ini classes metadata_background; docs/pms-api.md §4 gains "Reads by key — skipRefresh"; docs/plex-api-catalog.md and docs/watchlist.md say which reads send it.

Part of plxnative#1458 (Home rows slow over a remote link while the server streamed "item processed" notifications).

Closes plxnative#1458
…, not every 5 s (plxnative#1497)

A server's library notifications now refresh its lists once, after its notification feed has gone quiet, instead of every 5 s for as long as entries keep coming. The plxnative#1458 reporter's server sent about one "item processed" entry per second while they scrolled Home; each entry owed a quiet Home refetch, a section-shelf invalidate, a re-list and a Watchlist re-match, and over their remote link the app kept re-reading Home, the shelves and the grids, so every row they scrolled to queued behind those reads.

- data/src/stores/notify_map.rs: each server's library entries start one Settling { first, last, entries } wait. It ends after 10 s with no entry for that server (LIBRARY_QUIET_FRAMES) or 60 s after the oldest unspent entry (LIBRARY_LONGEST_WAIT_FRAMES), so a feed that never goes quiet still refreshes about once a minute. Its end owes the refetch, the invalidate and the re-list once and logs "notify: library settled sid= entries= waited=".
- The Watchlist re-match waits for the same quiet. LibraryOwed's sweep flag becomes Sweep { No, AfterQuiet, Now }: only a feed gap's sweep (Now) skips the wait; a delete during the first Watchlist read sweeps its kind after the quiet. An owe whose wait has ended but which the store could not start that frame (another re-match or a list read out) is marked wait_over and starts as soon as it can, not held again by the wait the feed's next entry begins.
- The listings spacing (listings_next) is removed: a re-list is owed only when a wait ends, and two waits of one server end at least 10 s apart.
- Unchanged: held-item read-backs, a stop's quiet refetch and invalidate (never held by a library wait), the resync sweep, reread_allowed gating and the downstream 5 s spacings in pms.rs and browse/section_hubs.rs.
- Docs: the module doc, docs/pms-api.md and docs/watchlist.md describe the new timing; tests/scenarios/watchlist_captures.json's library-add capture sleeps 14 s.

Closes plxnative#1458
…ivate Shell and Surface (plxnative#1498)

SDL's bring-up, the window and its GL context, the swap, the event poll and
decode, the synthetic events the dev tooling pushes back, and the text-input
calls leave the application crate for `rust-modules/shell-sdl`, a new crate in a
new `[shell_sdl]` layer (`uses = base machine os`; the crate names `plx_base`
alone). Step W6 of the platform plan (discussion plxnative#1460).

The application keeps its own vocabulary: `Shell`, `Surface`, `HostEvent` and
`KeyPress` stay app-private (W7a publishes them), and the television's LG half
stays in `system.rs` and the webOS platform. The `SDL_SysWMinfo`
over-allocation, the opaque region and the LS2 pump do not move, and the
crate's pins fail if it ever names a Wayland or Luna symbol, the over-writing
window query or its handshake.

`Shell` gains `init` and `open`. `open` returns a `Surface` (window, swap, swap
interval, poll, and an unsafe quit that `run::shutdown` calls), which `App` owns
in place of the raw window pointer. The boot order is kept and pinned: SDL_Init
and the GL request, then the stored session is read, then the window. The
window's place and size are a value, `OpenAsk { title, placement, high_dpi }`,
so the panel's size with its smaller fallback and the desktop fit (hostsim
builds only) belong to the crate. The cursor-sleep hint before SDL_Init and the
relaunch tap after it move into `system.rs` without their `hostsim` gates, and
the webOS shell hands them to `init` as two hooks; the hint's SDL_SetHint goes
through the crate's `set_hint`.

The byte layouts are written once, in the crate, and both arms of every LG
versus stock layout still compile in every build (`cfg!`, not `#[cfg]`). The
byte-level tests moved with the code; the HostEvent-level tests stay in the
application over re-exports. A new pin holds the application to declaring SDL
functions in `system.rs` and `app/clock.rs` only. Three loop call sites into
the shell that no test would have missed now have one each, each shown to fail
with its call deleted: the idle pointer hidden over the video in
`playback_tick`, `host_background`'s hand-back of the pointer Back hid, and a
controlled pointer input's wake in `controlled_key_input`.

`SCR_W` and `SCR_H` in `app/mod.rs` are now read only by the television's
window request and tests, and share the gate `any(not(feature = "hostsim"),
test)`; the devtools fps digits read `plx_base::surface::LOGICAL_W` directly.

The lists that name layer crates gain the new one: the Makefile's suites and
inputs, the CI workflow, the build-budget source list, `check-deps.sh`'s scans,
`list-caps.ini` (five moved cap sites re-keyed, one new), the release-config
hook and the module-layers config. Both read-only certificates are re-sealed
over the new manifest set and lock file. The docs follow: the L15e row and the
shell_sdl layer paragraph, the two points the plxnative#1493 review left in the L15g row,
F14 and the W6 record in the platform plan, and the fw-compat reviewer's prompt,
whose first-pass scan now reads the crate.

On the development television, base and head played the Feed case
`pipe_h264_aac_mp4` and the URI case `pipe_uri_product_hls_720p24_20m_bound`
alike, and their SDL init lines are identical. The ARM binary's DT_NEEDED and
undefined dynamic symbols equal base's. Non-incremental `make build-bench` rows
are flat to better, with three more units for the new crate.
…y composition is tested through the planner (plxnative#1494)

Step W6c of the platform plan (discussion plxnative#1460). Tests prove that each
playback composition a platform can publish plays an ordinary title or refuses
it with a typed reason, through the real planner: URI only, a source the driver
declines, no driver (a typed refusal before any PMS decision or encoder
request) and both drivers (a qualified URI original before the Feed original,
on the URI tie-break of Target shape 6d). `media/src/route/
decision_composition_tests.rs` uses the contract's `FakeUriDriver`;
`src/app/run_uri_boot_tests.rs` boots the real product driver over the
lifecycle rig. No planner change was needed.

When a platform composes no playback driver, which only the Tizen emulator MVP
(W9) will, the screens say so instead of failing on a press. webOS composes
both drivers and the desktop composes Feed, so neither draws or behaves
differently.

- `ScreenInputs.backends` is the set the session was told at boot, filled by
  `bridge.rs` in `publish_player_presentation`. A cold or controlled host keeps
  the default, Feed; `can_play()` is true when either driver is present.
- Detail's Play, Restart and Trailer (`HeroCtl::starts_playback`) draw the
  shared disabled idiom (`Button::enabled(false)`, and a new
  `CircleButton::enabled` that follows `Button` and `TransportButton`), own no
  focus stop, and do nothing on a press. The facts line's play-mode clause shows
  one word, "Playback unavailable" (`browse.detail.no_playback`, in all twelve
  languages), through the existing `Bit::Word` path.
- Detail never leaves a focus the page chose on a control that writes to the
  account (the Watchlist disc and the watched toggle,
  `HeroCtl::writes_account`). With no driver, a fresh open marks its focus as
  the page's own (`DetailScreen::provisional`, after the screens guide's "a
  seat nobody chose follows the head"), and while it is, `reconcile` answers
  `default_elem`: the row's first stop that writes nothing, else the first
  section below the row, seated through the engine's own `Focusable::seat`. The
  item landing, a later landing, a restore waiting on a season and a restore
  that retires all re-seat by that rule. The claim ends when the viewer moves,
  presses OK on a landed page, or holds to open a menu. A restore that names the
  control the viewer left keeps it, and the write controls stay reachable by
  travel. With a driver composed, Play stays the default and nothing changes.
- The Version list's rows are disabled `FormSection` rows with one note giving
  the reason; OK on one does nothing and BACK closes the panel.
  `AppMsg::PlayVersion` asks for no play.
- The hero trailer preview is refused when no Feed is composed, through the
  preview machine's existing refusal path (`Fact::RefusedDirect`,
  `Settle::Refused`), before any metadata, PlayQueue, decision or encoder
  request, with no standing verdict, no Error read-out and no failure report.

`Preview` gains no variant: it describes how the server delivers an item, and
"this build has no driver" is a platform fact. Every existing fixture renders as
before (`make check-replay`: SAME=4 REFUSED_EXPECTED=8 unexpected=0). Other Play
entry points (the card item menu, Continue Watching on OK, episode rows, Extras)
rely on the planner's typed refusal and draw nothing new.
… EventSink for input (plxnative#1500)

Step W7a of the platform plan (discussion plxnative#1460). The application crate
publishes what a platform crate needs to build its `static Platform` and hand
it over through one module, `plxnative_modules::host`; nothing else of the
application is public to a television build. The television and the simulator
behave as before: the SDL events take the same bytes through the same `poll`.

`host` re-exports `Platform`, `Shell`, `Surface`, `EventSink`, `FrameProbe`,
`MediaBoot`, `Composition`, `Exit` and `Release`, and the lower layers'
vocabulary their signatures name (`Services`, `MainThread`, `Edge`, `Action`,
`RawKey`, `Lifecycle`, `PointerEdge`, `OpenAsk`, `Placement`). Its one function
is `run`, the application's entry. By the owner's amendment to Decision 3
(2026-11-21), the eight application-crate items are reachable only through
`host`. A platform crate names the application's types through `host` alone,
and takes the hook tables from `plx_os` and `PlayerAdapter` from `plx_media`
directly.

Input has a public face, `EventSink`. A platform reports its events through
`Surface::deliver`, and the application converts them into its private
`HostEvent` in one place, `HostQueue`. SDL's surface delivers nothing there,
and `poll` is hidden, defaulted, and retires at W9 at the latest. `RawKey`
moves to `plx_ui::consts` beside `Action`. `sdl_init` and `sdl_open` are left
for W7b.

Two source pins in `host.rs` hold the ruling. The crate root's `pub` items are
`host` plus the simulator's doors, each confined to `hostsim` by an evaluated
`cfg`. `host.rs` is the only `pub use` of the application. An integration test,
`rust-modules/tests/host_interface.rs`, builds a `static Platform` from fakes
outside the crate and boots it through `host::run` to the fake shell's refusal
of the window. `make test-host-interface` runs it incrementally, and
`check-cargo-unit-hostsim` runs it in `make check`.

The ARM binary's DT_NEEDED and undefined dynamic symbols equal the base's.
Non-incremental `make build-bench` rows are flat.
…-11-21

# Conflicts:
#	Makefile
#	ci/module-layers.ini
#	ci/proofs/platform-generated-enums.json
#	ci/proofs/serde-json-immutable.json
#	ci/readonly_dependencies.py
#	ci/readonly_generated.py
#	ci/test_no_host_staticlib.py
#	rust-modules/Cargo.toml
#	rust-modules/data/src/stores/notify_map.rs
#	rust-modules/plex/src/plex/library.rs
#	rust-modules/screens/src/detail/hero.rs
#	rust-modules/screens/src/detail/mod.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants