Skip to content

URI exported window: the product places it like the probe, and a debug override lets a tester run the product path on webOS 5+ - #1306

Merged
GLinnik21 merged 5 commits into
mainfrom
uri5/pr3-exported-parity
Nov 9, 2026
Merged

GLinnik21 merged 5 commits into
mainfrom
uri5/pr3-exported-parity

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Summary

The product URI backend's exported-window placement now matches the developer probe's and Feed's, and a debug-only trigger (plxnative-uriexported) lets a tester compose the exported binding for one boot on a webOS 5+ set. Production behaviour is unchanged: with the trigger absent (and in every release build) composition still never selects Binding::Exported.

What changed

  • rust-modules/play-uri/src/backend.rs: the Exported binding already created the window and placed it once with the 1920x1080 canvas as BOTH source and destination. It now also re-places it when the service's videoInfo carries a width and a height, with the coded size as the source and the canvas as the destination (the probe's uriprobe_drive placement and Feed's, which is where the tester pictures that the 5+ evidence rests on came from). A coded size is placed once. The start's placement and each re-placement log uri: exported window placed src=WxH rv=N. Nothing is placed for another binding, while a close runs, while quarantined, or after the window is destroyed (the destroy is still once, on the confirmed release). EXPORTED_CANVAS names the canvas once.
  • rust-modules/src/dev/uri_exported.rs (new, devtriggers + play-uri only): armed() is plx_base::devtrig::flag("uriexported"), read once at boot by install_uri_product, and compose(binding, display_mode, armed) is applied to uri_product_binding's answer under #[cfg(feature = "devtriggers")] at that call site, as dev::uri_product::compose is. Armed AND a display in VP_EXPORTED mode returns Binding::Exported { canvas: (1920, 1080) } and logs uri: product binding=Exported { canvas: (1920, 1080) } mode=2 evidence=override after the production line; anything else returns the binding untouched. uri_product_binding itself is what main has. The viewer still has to opt in and the qualifier is still ProductQualifier. A release build has no read and no evidence=override literal: the trigger name and the literal sit only in devtriggers-gated code.
  • rust-modules/src/dev.rs: plxnative-uriexported is in DIAG (it changes nothing about the boot, so a tester arming it before launch still gets the who's-watching picker, and ci/check-package.py greps the release bytes for the name), with its test.
  • rust-modules/platform/src/tv/sink.rs: ScriptedWindowSink, a VP_EXPORTED test double that records create, place and destroy (beside ScriptedPlaneSink).
  • docs/uri-mode.md: the placement now agrees with the probe's, and one paragraph names the trigger, that it is read once at boot so it can be armed only by writing the file before launch (plain /tmp or the jail's persistent path; the tester run's /proc/<pid>/root route cannot arm it), and the boot line that confirms it. The tester section is not touched.

No cfg(test) fork, no new worker, global or ledger line (ci/check-deps.sh counts unchanged: workers 7, globals 111, forks 68, fxlanes 11).

Red and green

Tests first, on the old code:

  • plx_play_uri: backend::tests::a_video_info_re_places_the_window_with_the_coded_size_and_the_destination_stays_the_canvas and backend::tests::the_window_is_never_re_placed_while_it_closes_or_after_it_is_destroyed_and_is_destroyed_once FAILED (left: [Create, Place { src: (1920, 1080), .. }], right: [Create, Place { src: (1920, 1080), .. }, Place { src: (1280, 720), dst: (0, 0, 1920, 1080) }]); test result: FAILED. 11 passed; 2 failed on the window filter.
  • application crate, against a compose stub that returns the binding unchanged (make test-hostsim T=uri_exported and T=exported_override): dev::uri_exported::tests::armed_it_composes_the_exported_window_only_on_an_exported_window_display and uri_boot_tests::the_exported_override_offers_the_uri_backend_and_loads_with_the_exported_window FAILED (test result: FAILED. 1 passed; 1 failed each). The passing ones are the arm test and the guard without_the_exported_override_the_same_display_keeps_the_feed_offer.

After the change, on the committed tree:

make test-crate C=plx_play_uri          test result: ok. 236 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.13s
make test-crate C=app                   test result: ok. 1285 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 35.49s
make test-hostsim T=uri_boot_tests      test result: ok. 23 passed; 0 failed; 0 ignored; 0 measured; 1455 filtered out; finished in 0.92s
make test-hostsim T=exported_override   test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 1476 filtered out; finished in 0.05s
make check-nodef                        Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.96s
bash ci/check-deps.sh                   check-deps: all gates green
python3 ci/check-module-layers.py       check-module-layers: green

(Run on the commit before main (#1304) was merged in; after the merge plx_play_uri is 236 passed, app 1285 passed, and ci/check-deps.sh is green.)

Verification

  • Backend placement: scripted ScriptedWindowSink answering VP_EXPORTED: one create and one place at start with the canvas as the source, one re-place with the coded source after videoInfo, none for a repeated coded size, a second re-place for a new one, the destination always the canvas, none while closing or quarantined or after the release, destroy exactly once on Released; a videoInfo with no usable size places nothing; the Unbound binding creates and places nothing.
  • Override: dev::uri_exported::compose returns Exported only for an armed override on VP_EXPORTED (and logs evidence=override), never on ACB or no window path, never without the flag; at the app rig, the override's binding takes an opted-in viewer's original to the URI backend with the exported window id in the load, and the same display without it keeps the Feed offer and sends no load.
  • The release build carries no read of the trigger: uriexported and evidence=override appear only in devtriggers-gated code (and DIAG).

Not verified on a TV

The whole webOS 5+ path. The development TV is a webOS 4.5 set, whose display is ACB, so the override is inert there and nothing in this PR ran on an exported window. Whether the 5+ service sends videoInfo before the first frame is not determined (the first frames may use the canvas source rectangle); picture, placement, aspect and the controls on a 5+ set need testers, per release.

Linking

Part of the webOS 5+ URI work tracked in #1064; does not close it.

🤖 Generated with Claude Code

GLinnik21 and others added 5 commits November 9, 2026 19:06
…e probe does, and a debug-only override composes it

The product URI backend created the exported window and placed it once with the full canvas as
BOTH source and destination rectangle, while the developer probe and Feed place it with the
service's coded size as the source (and the canvas as the destination). The tester pictures that
the webOS 5+ evidence rests on came from the probe's placement, so the product placed the window
differently from the code that produced them.

- play-uri backend: on a `videoInfo` carrying a width and a height, the Exported binding re-places the
  window with the coded size as the source and the canvas as the destination, once per coded size,
  and logs `uri: exported window placed src=WxH rv=N` (the start's canvas placement logs the same
  line). Nothing is placed for another binding, while a close runs, while quarantined or after the
  window is destroyed (the destroy still happens once, on the confirmed release).
- `plxnative-uriexported` (debug builds only, `dev::uri_exported`): read once at boot by
  `install_uri_product`; on a display in `VP_EXPORTED` mode it composes `Binding::Exported` on the
  1920x1080 canvas and the boot line ends `evidence=override`. The viewer still has to opt in and the
  qualifier is still `ProductQualifier`; on any other display, and without the flag, composition is
  unchanged. The trigger is in `dev::DIAG`, so arming it does not move the boot off the picker.
- `ScriptedWindowSink`: a platform test double (VP_EXPORTED, records create/place/destroy).
- docs/uri-mode.md: the placement and the trigger.

Production behaviour is unchanged: composition still never selects Exported without the override.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… not in release-compiled code

`uri_product_binding` had gained the override's bool, its Exported branch and the ` evidence=override`
literal, all compiled into a release build (keeping the string out of it depended on the optimiser).
It is back to what main has. The override is now `dev::uri_exported::compose(binding, display_mode,
armed)`, applied under `#[cfg(feature = "devtriggers")]` at its call site in `install_uri_product`
exactly as `dev::uri_product::compose` is: armed AND a display in `VP_EXPORTED` mode returns
`Exported` on the full canvas and logs its own `uri: product binding=Exported { canvas: (1920, 1080) }
mode=2 evidence=override` line after the production line; anything else returns the binding untouched.

The override's unit table moved to the dev module's tests; the application-rig pair stays in
run_uri_boot_tests.rs and is now devtriggers-gated, since `compose` only exists there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… through /proc

The tester run's route 2 (`/proc/<pid>/root` while the app runs) arms `plxnative-uriprobe` because that
trigger is read per Play. `plxnative-uriexported` is read once at boot, so a write after launch
arms nothing: only plain `/tmp` or the jail's persistent path, written before the app starts, work.
docs/uri-mode.md says so in the override's paragraph, and `dev::uri_exported`'s module doc no longer
claims the doc carries tester steps of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 711c6cb into main Nov 9, 2026
19 checks passed
@GLinnik21
GLinnik21 deleted the uri5/pr3-exported-parity branch November 9, 2026 16:54
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