Skip to content

The URI backend returns as plx_play_uri: installed in the shipping binary, never selected, dev triggers back (P5) - #1275

Merged
GLinnik21 merged 5 commits into
mainfrom
uri-first/p5-play-uri
Nov 7, 2026
Merged

GLinnik21 merged 5 commits into
mainfrom
uri-first/p5-play-uri

Conversation

@GLinnik21

@GLinnik21 GLinnik21 commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The URI playback backend lands as its own crate and joins the shipping feature set, but production never selects it: Feed stays the
only backend a normal play uses. The owner's decision (F45) is that a Settings opt-in turns URI on later, in its own PR.

  • plx_play_uri (rust-modules/play-uri/, layer play_uri, names base, platform, playback_contract): the com.webos.media
    protocol and request lifecycle (uri_protocol, uri_lifecycle), the LS2 session I/O (session_io), the ACB bind machine and its
    envelope map (acb_bind, acb_drive, acb_envelope), the picture gate, the trace/event text, and the product driver
    backend::UriBackend
    , which implements the contract's UriDriver. The developer probe's machine and driver (uriprobe,
    uriprobe_drive) live here too: P3+P4 took uriprobe.rs, uri_lifecycle.rs and uri_protocol.rs out of plx_media, and they return
    in this crate. plx_media does not name it: the route planner and the player adapter see the contract's traits and the UriProbe port.
  • The application composes it in app/adapters/backends.rs::install_uri_product, behind the application crate's play-uri feature
    (default = play-uri,play-feed,devtools,devtriggers,threadcheck). RUST_BACKEND_FEATURES = play-uri,play-feed in the Makefile, so
    RELEASE=1 is --no-default-features --features play-uri,play-feed and make check-nodef passes the same words.
  • The dev triggers are back. plxnative-uriprobe (src/dev/uriprobe.rs, the URI mode on webOS 5+: looking for testers with a newer TV #1064 probe) and plxnative-uridev
    (src/dev/uri_product.rs, the debug-only route that makes the production driver play a URL) work again in devtriggers builds;
    docs/uri-mode.md and player/CLAUDE.md describe them again, and the "arrives in a later PR" sentences P3+P4 left are true as written.
  • Platform. Feature uri-transport (turned on by play-uri): webos.rs's URI_MEDIA = ls2::uri::Transport, the LSCall extern
    and the com.webos.media worker (webos/ls2/uri.rs) are now gated on it instead of on devtriggers.
  • The rest of the shared edits are the crate lists (the eight ci/test_* / check-* pins, the Makefile lists, ci.yml's budget
    --src, tools/build-bench.py, every quoted cargo test --lib -p ... line), ci/{machines,list-caps,module-layers}.ini,
    ci/check-deps.sh (SRC_PLAY_URI in every scan list), docs/module-layers.md's play_uri row (18 layers), the three URI
    measurement notes, and the tests/ URI cases and HLS fixtures.
  • Not here (P7): the build/package matrix (PLAYBACK_BACKENDS, the uri/feed/none variants, ci/expected-dt-needed-uri.txt,
    ci/test_sim_backend.py, docs/uri-first-migration.md, the backend-removal drill). git grep for any of those names prints nothing.

Behaviour

  • Playback is unchanged: Feed is the only backend a production play reaches. The URI driver is installed on every
    non-controlled boot and is never offered a source. The chain, file:line on this branch (rust-modules/):
    • installed: src/app/boot.rs:2325 -> src/app/adapters/backends.rs:110 compose_backends -> :320 install_uri_product ->
      :342 install_uri_product_with_ports. UriBackend::new is pure construction (play-uri/src/backend.rs:119); the LS2 worker
      thread (ls2uri, spawned in Transport::open, platform/src/webos/ls2/uri.rs:84) opens only on a Start with a staged source
      (play-uri/src/session_io.rs).
    • the evidence certifies nothing: media/src/route/uri_preflight.rs:40-52 (ProductEvidence::unqualified_on: certified all
      false), :332 could_qualify_pms false, :368 qualify_pms returns UnavailableCapability before it asks the qualifier,
      :498-501 ProductQualifier answers Verdict::Unknown, :312-314 the default qualify_pms is PmsVerdict::Unknown.
    • the planner: media/src/route/plan.rs:1984 (the uri_preflight_port gate), :2037-2040 (uri_original only on a Known
      verdict), :2044-2046 (pms_uri_possible needs could_qualify_pms), :3052-3088; route/decision.rs:10739-10777 builds a
      uri_offer only from uri_known / uri_pms_known.
    • the policy: route/backend_policy.rs:131-163 every offer starts Qualification::Unknown, :207 choose() opens only a
      Qualified offer; the only production write of Qualified for Uri is media/src/player/adapter.rs:1065-1110
      offer_qualified_uri, which needs a QualifiedUriOffer from pump_play (src/app/run.rs:2864-2880), i.e. from the planner above.
    • dev only: src/dev/uri_product.rs replaces the qualifier (backends.rs:333, #[cfg(feature = "devtriggers")]) and
      src/dev/uriprobe.rs installs the probe (backends.rs:131, devtriggers + play-uri); plx_base::devtrig::read returns None
      without devtriggers (base/src/devtrig.rs:135-136); media/src/player/route_start.rs:425 reads plxnative-uriprobe through that same
      reader. RELEASE=1 passes --no-default-features --features play-uri,play-feed (Makefile:563), so none of the dev
      code is compiled into a shipped binary.
    • pin: src/app/run_uri_boot_tests.rs:239 boot_without_source_certificate_keeps_feed_offer (a qualifier that WOULD qualify,
      unqualified evidence: the Feed offer opens, no URI Load), green in make test-hostsim.
  • The shipping set is play-uri,play-feed. Binary size, stripped, fat-LTO (ARM_PROFILE=release), measured on this tree:
    make ipk FLAVOR=debug (the CI cross-build job's artifact, default features) 17,570,496 bytes; make RELEASE=1 16,091,088 bytes.
    ci/build-budgets.json keeps main's binary_bytes limit of 18,750,000 (it grades the first number): the measured binary does not
    exceed it, so the limit is not raised; integ's 20,000,000 is not brought. The recorded baseline is 17,041,608 (2026-11-06), so
    the CI-shape binary grew by 528,888 bytes (3.1%) with the dormant backend linked in. measured / measured_on in the JSON are
    main's and not re-recorded.
  • The foreground-tick call. app/run.rs:2024-2031 calls plx_media::player::retire_if_server_stopped on every foreground tick
    whenever play-uri is on, whichever backend plays. It is idempotent, for the Feed and for no live backend:
    accept_server_stop (media/src/player/mod.rs:1515) returns false with no side effect when the session has no URL or no
    server-stop note applies (one atomic load, with_server_stop :1497); when the stop is already retired it returns true after
    discard_stale_flight_landing (route/flight.rs:456, one atomic load when the mailbox is empty), and
    release_server_stopped_engine (route_start.rs:880) tears down only while something still plays (pa.is_live(),
    adapter.rs:1943, active_uri_attempt(), or a queued Feed start), none of which holds after the first teardown. The Feed's own
    pump opens with the same door every frame (player/pump.rs:1071) and stop_for_replacement calls it too (route_start.rs:859),
    so the new call is the same door earlier in the same frame; foreground_flight_tests::server_stop_retires_a_parked_resume_and_cancels_an_outstanding_rebuild
    covers a stop followed by polled frames.
  • LSCall and the uri-transport code are in the shipping binary. Before this PR they were devtriggers-only. LSCall is a
    hard import (.dynsym FUNC GLOBAL DEFAULT UND) of libluna-service2.so.3, which is already DT_NEEDED; the worker thread
    starts only on open, which a release build never reaches (see the chain above). ci/check-elf.sh does not name LSCall; on the
    RELEASE=1 link it passes every assertion and reports DT_NEEDED 15 entries, unchanged, equal to ci/expected-dt-needed.txt.
    tools/fwcompat.py --min-release 4.4.2 on the release ELF: 15 DT_NEEDED, 362 global undefined symbols, all resolved on every gated
    release (4.4.2, 4.10.0, 5.3.1, 6.4.0, 7.4.0, 8.3.0, 9.2.0, 10.2.0, 11.2.0); LSCall is in all 14 inventories.
  • Telemetry (no change of scope). The backend tag of the playback error report already allows unknown / feed / uri
    (PRIVACY.md). backend=uri is now producible, and only from a dev trigger: media/src/player/report.rs:612-622 takes it from the
    terminal failure's attempt, which is a URI attempt only after begin_attempt_view(.., Backend::Uri) (adapter.rs:2231), reached
    only through the chain above. A production play reports feed or unknown. Same Errors consent, same report, no identifier, URL or
    source text.
  • Other deltas found while carving: none. src/video_plane.c keeps main's acb_unload (its own zeroed static long unload_task):
    integ's copy predates the fw-compat fix, so the one C hunk here is comments only; starfish.h is a comment line.

Content size (non-whitespace characters of the changed paths, origin/main -> branch)

Git reports 85 files changed (22 added, 63 modified; +17,622/-305 lines). Almost all of it is the new crate and the tests that exercise it.

area changed paths before after delta
rust-modules/play-uri (new crate) 15 0 342,797 +342,797
tests/ 9 1,617,391 1,813,465 +196,074
rust-modules/src (application) 10 695,552 836,854 +141,302
docs/ 10 437,468 460,754 +23,286
rust-modules/media 9 534,112 537,039 +2,927
ci/ 16 407,401 409,340 +1,939
.agents/ 2 45,989 46,848 +859
AGENTS.md, Makefile 2 185,211 186,037 +826
rust-modules/Cargo.{toml,lock} 2 56,592 57,259 +667
rust-modules/platform 5 95,689 95,888 +199
.github/ 1 31,570 31,631 +61
tools/ 1 38,670 38,704 +34
rust-modules/playback-contract 1 3,233 3,246 +13
src/ (C) 2 23,700 23,639 -61

Left for P7

The build/package matrix: PLAYBACK_BACKENDS (both/uri/feed/none) and the per-backend feature / native-source / link-input selection,
ci/expected-dt-needed-uri.txt and the check-elf.sh modes, ci/test_sim_backend.py, the matrix packages in build-package.yml,
docs/uri-first-migration.md, the backend-removal drill, and the prose that describes the matrix. A Settings opt-in that makes URI
selectable is a later PR of its own.

Verification

Run on the committed tree (git status --short empty before and after):

  • make check on cd1f63a: 126 steps, all ok (595 s wall); 43 libtest test result: lines, every one ok., 25,462 passed, 0 failed,
    198 ignored (several crates run under more than one feature configuration, so the sum counts some tests twice; the lines are per
    crate, never one total). Among them: plx_play_uri 203, plx_playback_contract 40, plx_platform 402, plx_play_feed 300,
    plx_media 1927 (84 ignored), plxnative-modules 1236, hostsim plx_media 2194 (84 ignored) and the application's hostsim suite 1419;
    tests/test_harness.py 722 tests OK. The same counts on 99692b2 before the audit round. ci/test_no_host_staticlib.py (11),
    ci/test_build_not_always_dirty.py (10) and tests/test_mock_pms_library.py (121) are not make check steps; run on their own, OK.
  • make check-nodef (the shipping set, --no-default-features --features play-uri,play-feed): ok. bash ci/check-deps.sh: all gates green,
    no ci/allow/ line added or changed. ci/check-module-layers.py: 18 layers.
  • ARM, ARM_PROFILE=release, on cd1f63a (the same two sizes were measured on 99692b2, before the comment-only audit round): make + make ipk FLAVOR=debug (CI's cross-build shape) and make RELEASE=1 both link; bash ci/check-elf.sh
    passes every assertion on each (hook export, exit interposer, 0 CP15 barriers, soft-float/libm, DT_NEEDED 15 entries unchanged,
    storage helper 6 entries unchanged, no build-host paths); python3 ci/check-build-budgets.py --binary <staged> ok, numbers above;
    python3 tools/fwcompat.py --min-release 4.4.2 <RELEASE=1 ELF> exit 0, OK on all nine gated releases.
  • fw-compat-reviewer on origin/main...carve/p5 (graded the two ELFs above with tools/fwcompat.py): PASS WITH NOTES, loader start and symbol
    resolution only. LSCall's declaration (webos.rs:660-668) matches the NDK lunaservice.h prototype; no new extern "C" /
    dynlib! / #[link] / dlopen was added (play-uri/src has none; its ACB calls go through DisplaySink to the unchanged
    sys::acb_* externs); no new DT_NEEDED; no LS2 registration is reachable at boot in a release build (two independent guards: the
    qualifier answers Unknown and the certified capabilities are all false). Notes, none fixed here: (1) the production driver
    registers on the bus only as com.webos.media.client.plxprobe (backend.rs:270), with no anonymous fallback outside the
    devtriggers probe, so on a set without that role an attempt would fail at register: bounded, non-fatal, unreachable in release,
    to be settled before any opt-in PR certifies a source; (2) acb_send_atmos lacks a starfish.h prototype, as on main. Not
    verifiable without the device: com.webos.media registration shapes and the LS2 event schema off the 4.x set, webOS 5+ ACG
    rules, ACB behavior beyond 4.10. The reviewer's agent file now names play-uri/src, starfish.h and the LS2 URI worker.
  • doc-claim-auditor on origin/main...carve/p5: 12 findings, all fixed in cd1f63a (docs/module-layers.md tv::uri sentence,
    player/CLAUDE.md product_binding locator, docs/building.md check-nodef command, the track-menu doc block that sat on
    reconfigure_uri_audio, the video-plane-bit prose in player/{mod,machine}.rs, platform/tv/uri.rs's header, a dangling link in
    play-uri/src/uriprobe.rs, the which-tier "14 binaries" count, tests/README.md's case counts, the release hook's layer list in
    docs/agent-reference.md, the RUST_FEATFLAGS comment in the Makefile). No "arrives in a later PR" sentence and no matrix prose
    remains. Not touched: the Claude-only hook .claude/hooks/release-config-check.py still watches thirteen layer crates and the bare
    --no-default-features (it covers neither play-feed nor play-uri); docs/agent-reference.md says so, and the hook itself is the
    owner's.
  • Review round (pr-reviewer on origin/main...cd1f63ace, then 55bad42): the dormancy chain above was re-checked line by line and holds
    (no path missed: boot, the foreground tick, commit_track, update(), telemetry, settings). Fixed: ci/check-deps.sh's sink gate now holds
    play-uri to the injected sink exactly as play-feed (it may name the traits, never resolve tv::sink::installed / display_installed)
    instead of a blanket pass; tests/run.py keeps main's three moved locators (plx_play_feed::fps_rational, plx_play_feed::sink_envelope,
    route_start::start_bufferfeed). On 55bad42: bash ci/check-deps.sh all gates green, python3 tests/test_harness.py 722 tests OK.
  • The nine tests/manifest.json pipeline cases this PR adds: probe route (uriprobe=load / acb-control) pipe_abr_uri_ladder_collapse,
    pipe_abr_uri_ladder_capped, pipe_abr_uri_continuous_20000, pipe_uri_hls_720p24_20m_bound, pipe_uri_hls_720p24_20m_bound_collapse;
    product route (plxnative-uridev, --guest --mock) pipe_uri_product_hls_720p24_20m_bound, ..._bound_collapse, pipe_uri_product_hls_720p24_2a_audio2,
    ..._audio1. All need a devtriggers build; none is in a RELEASE=1 package.

build-bench

make build-bench --runs 3 without the incremental rows, interleaved, same host. The base run was taken under heavier load (swap 94 %,
26 load warnings) than the head run (5 warnings), so the negative deltas are noise, not a speed-up; compare medians only.

Scenario main 5d9c590 (median) P5 55bad42 (median) delta
No-op host test build 36.3 s 29.6 s -6.7 s
Edit leaf (plx_base cbuf.rs), non-incremental 58.7 s 60.5 s +1.8 s
Edit leaf (plx_machine landgate.rs), non-incremental 53.1 s 55.0 s +1.9 s
Edit leaf (plx_platform devcaps.rs), non-incremental 52.2 s 51.6 s -0.6 s
Edit leaf (plx_gfx overdraw.rs), non-incremental 34.5 s 35.0 s +0.5 s
Edit leaf (plx_net stream_redirect.rs), non-incremental 48.5 s 49.9 s +1.4 s
Edit leaf (plx_ui dwell.rs), non-incremental 33.0 s 33.7 s +0.7 s
Edit leaf (plx_plex retry.rs), non-incremental 53.6 s 43.1 s -10.5 s
Edit leaf (plx_telemetry window.rs), non-incremental 45.8 s 39.1 s -6.7 s
Edit leaf (plx_data tape.rs), non-incremental 42.0 s 37.8 s -4.2 s
Edit leaf (plx_session scripted.rs), non-incremental 30.6 s 27.3 s -3.3 s
Edit leaf (plx_media units.rs), non-incremental 34.5 s 31.5 s -3.0 s
Edit leaf (plx_appkit skip_pill.rs), non-incremental 29.5 s 29.2 s -0.3 s
Edit leaf (plx_screens clock_readout.rs), non-incremental 26.6 s 26.7 s +0.1 s
Edit leaf (app coldstart.rs), non-incremental 17.6 s 16.8 s -0.8 s
Edit hub (plx_ui lib.rs), non-incremental 25.7 s 24.9 s -0.8 s
Unit suite run (default features) 69.4 s 68.8 s -0.6 s
ARM staticlib rebuild (touch lib.rs) 23.1 s 23.1 s +0.0 s

Unit suite: main 12,201 passed / 0 failed / 99 ignored, P5 12,444 / 0 / 99. ARM staticlib archive 121.1 MiB -> 122.0 MiB.

TV regression

The pipeline tier (tests/run.py --pipeline --panel off) on the dev set, with the ARM_PROFILE=release binary of 55bad42 deployed
and its md5 checked on the set: 57 passed, 0 failed. The run was stopped at the owner's request when the set was needed, during the 58th
of 61 cases (pipe_h264_1080p5994); three did not start (pipe_hevc_4k_60fps, pipe_seek_inplace, pipe_side_reader_srt). Those four are
Feed cases this PR does not touch; pipe_h264_1080p5994, pipe_hevc_4k_60fps and pipe_seek_inplace passed on the P3+P4 binary (#1274) the
day before. All nine new URI cases passed: the five probe-route cases (pipe_abr_uri_ladder_collapse, pipe_abr_uri_ladder_capped,
pipe_abr_uri_continuous_20000, pipe_uri_hls_720p24_20m_bound, pipe_uri_hls_720p24_20m_bound_collapse) and the four product-route
cases (pipe_uri_product_hls_720p24_20m_bound, ..._bound_collapse, pipe_uri_product_hls_720p24_2a_audio2, ..._audio1).

Related: #1064

🤖 Generated with Claude Code

GLinnik21 and others added 5 commits November 7, 2026 19:02
…hipping set

Integ's URI backend (play-uri crate, the product driver and dev routes in the application,
the uriprobe drive, uri_preflight/decision_memory prose, the platform uri-transport feature,
the URI product test cases and measurement notes), with the build/package matrix
(PLAYBACK_BACKENDS, the single-backend CI jobs, the ELF/package re-grading, the removal-drill
document) left for a later change. The shipping set is one fixed list, play-uri,play-feed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…lab-diagnostics list and the layer doc

src/video_plane.c takes integ's reworded comments only: its acb_unload still had the stack
local that main's fw-compat round replaced with a static slot. docs/module-layers.md gains the
play_uri layer row and paragraph; docs/lab-diagnostics.md quotes the unit-suite list with the new crate.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The doc audit of origin/main...carve/p5 found twelve sentences the tree
makes false or leaves dangling; all are fixed here:
- docs/module-layers.md: tv::uri::installed() is resolved by the
  composition in every play-uri build, not only by the devtriggers probe.
- player/CLAUDE.md: product_binding lives in plx_play_uri::backend.
- docs/building.md: check-nodef passes play-uri,play-feed.
- app/playback.rs: the track-menu doc block is back on commit_track,
  not on the first of the three URI fallback functions inserted above it.
- which-tier skill, tests/README.md: drop the hard counts (14 test
  binaries, 20/21 cases, "two" product cases) for the census commands.
- docs/agent-reference.md: the release hook's layer list does not watch
  playback-contract, media-codecs, play-feed or play-uri.
- player/mod.rs + machine.rs: the video-plane bit is also set while the
  product URI driver owns the ACB plane.
- platform tv/uri.rs, play-uri uriprobe.rs, Makefile comment: transport
  doc names both users; dangling ForegroundLifecycle link; the RUST_FEATFLAGS
  note names "at least one backend".
- fw-compat-reviewer agent: scope names play-uri/src, starfish.h and the
  LS2 URI worker with its LSCall import.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…sts/run.py keeps main's moved locators (review round)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 3ae2ebf into main Nov 7, 2026
29 checks passed
@GLinnik21
GLinnik21 deleted the uri-first/p5-play-uri branch November 7, 2026 22:40
GLinnik21 added a commit that referenced this pull request Nov 7, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21 added a commit that referenced this pull request Nov 7, 2026
The fixes the P5 carve made after it took integ's tree (git diff fdd1461 55bad42):
src/video_plane.c acb_unload uses main's zeroed static task-id slot, ci/check-deps.sh's
sink gate holds $SRC_PLAY_URI to the injected sink like $SRC_PLAY_FEED, tests/run.py's
three moved locators, docs/module-layers.md's play_uri row, fw-compat-reviewer's play-uri
scope, and the audit round's prose. Four files conflicted with integ's matrix rewrite
(Makefile comment, ci/check-package.py, ci/rust_toolchain.py, fw-compat-reviewer.md); the
patch's hunks for the two python files are comment fixes inside blocks the matrix
replaced, so integ's side stays; the other two carry the fix and the matrix lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

1 participant