Repository navigation
ACB: create the URI engine's handle at the first Experimental offer, not at boot - #1396
Merged
Merged
Conversation
…y boot 0.10.0 (#1281) created a second ACB handle, player type 0, at every boot on a webOS 4.x display, whatever the viewer's Playback engine was. On an LG OLED55C8 (W18O firmware) every Feed Load then returned only after ~30 s and failed load_timeout (#1394); with the call removed the Load returned at once. The cause on that firmware is not proven; the handle has no purpose unless the URI engine plays, which only an Experimental viewer's play does. A boot now creates only Feed's handle (player type 10, the same calls and log lines). The plane owner's machine answers a new HandleWanted event with a Create effect until that handle's boot is recorded; PlaneOwner::ensure_handle runs it through the sink on the main thread and the handle's own boot event is the result. The URI driver's gate (Op::Check, shared with the dev probe) asks for the handle before it reads the gate's facts, so it is created once, before the first URI-engine bind that needs it, and logs `acb handle=uri ptype=0 ..` at that moment. The product binding is Acb on any ACB display ("handle=deferred" on the composition line). Two things that were only safe while both creates happened at boot are fixed: a later BootUri no longer resets the plane state to Idle (it erased a Bound, Releasing or Quarantined state), and a create made after the owner selected a handle puts that handle back as the sink's current one (the C seam makes the newest handle current). A failed on-demand create refuses that Start (Failure::Unsupported) with a logged reason and is not retried. The route does NOT hand that play to Standard today: a refused URI Start settles StartFailed (see the PR body). Closes #1394 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… a Standard handoff The refusal log line, its test name and media/src/player/CLAUDE.md said a refused URI Start sends the play to Standard. The route settles a refused URI Start as a failed start (BufferfeedStartOutcome::Failed), and only a post-open URI failure hands over to Feed. Wording only. Closes #1394 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…the boot Comments and the harness manifest notes still said the boot creates the URI engine's handle. Wording only. Closes #1394 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…eed plays the title The handle is now made when the first source is OFFERED, not at the Start. The URI driver gets a UriDriver::ready_to_start (default: ready); the product driver on an ACB display runs the plane owner's ensure_handle through the shared gate, and offer_qualified_uri asks it last, on the main thread. A failed create or initialize declines the offer with `uri: original declined (the ACB handle for the URI engine could not be created)` and the route's existing declined-source retry hands the same play to Feed. The failure is recorded, so every later offer declines at once and makes no second attempt. The Start's gate stays the backstop. An exported-window driver, a driver off the ACB display and the fake driver are always ready. Before this, a failed create at the Start refused that Start, which the route settles as a failed start with no handoff to Feed, and every later Experimental play in the process failed the same way; a failed boot-time create used to leave the binding Unbound and the play on Feed. Closes #1394 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…oments and two fixture-only seams pr-reviewer's four MINOR findings on the offer-time check: - offer_qualified_uri runs from pump_play's landing without checking the release. While a release is in flight the previous Feed object may still be inside its off-frame Unload, and no create may run against the display then (Feed's sink fence refuses it; a Start waits for the Unload for the same reason). The driver is not asked to set anything up while the release is busy: the offer is taken and the Start's gate makes the handle once the release is done. - PlaneOwner::any_handle and the acb_ok field said the URI handle is made at its first bind / first URI Start; they now say the first Experimental offer or, while a release is in flight, the Start's gate. - PlaneOwner::attempted and PlaneOwner::boot_handle were called only by tests; both are now behind cfg(any(test, feature = "test-support")). PlaneOwner::boot seats Feed's handle without it, and the URI handle is seated only by ensure_handle in production. Closes #1394 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 task done
GLinnik21
added a commit
that referenced
this pull request
Nov 14, 2026
One conflict, rust-modules/src/app/adapters/backends.rs. Main's #1396 made the URI engine's ACB handle on-demand: uri_product_binding no longer takes the plane owner, and the composition tests stopped building a booted owner. This branch's major-10 composition assertions are kept, written against that new signature: majors 5 and 10 bind Exported on VP_EXPORTED, every other major 0..=30 is Unbound, and the boot line pins major=5 and major=10 evidence=table. No behaviour changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Nov 14, 2026
…#1377) EXPORTED_STRATA listed firmware major 5 only. It now lists major 10 too. On a set reporting major 10 (an LG C2 on webOS 25, firmware 33.31.68, is the one set that has run), a viewer on the Experimental engine now plays a qualifying original through the TV's own pipeline in the exported window. A qualifying original is a direct play with one audio track and no subtitle stream, on quality Original or on Auto over a local link. The boot line reads `major=10 evidence=table`. Every other webOS 5+ major (6 to 9, 11 and later) still plays Standard, and major 9 is not bracketed, because major 8 has no entry. The evidence is the docs/uri-mode.md admission rule, met on one tester's set (#1064): - (a) The 10.3 image reads option.windowId at load. - (b) The product run of 2026-11-14 had the override armed (`evidence=override`). Its 2.39:1 original was placed from src=3840x1608, "full width with black bars". There was sound, and two seeks were logged landing on seekDone. Pause and resume rest on the tester's words. Two earlier product runs on the same set support it. - (c) The drive probe, with amendment (1). A replay test, uri_drive_webos_25_c2_run_replays_to_pause_froze_from_the_paused_event_and_resume, has the current grader answer pause=froze from the run's recorded numbers. Host tests pin majors 5 and 10 to Exported on the exported-window display, every other major 0..=30 to Unbound, and both admitted majors to nothing on ACB and on no display. A boot-line test pins `major=10 evidence=table`. The merge of main kept #1396's binding signature and its boot line. Not checked on major 10: subtitles, HLS, track switching and end of stream through the product, other 10.x minors, and a build carrying this entry. Part of the webOS 5+ URI work tracked in #1064; does not close it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1394
What
The URI engine's ACB handle (player type 0) is no longer created at every boot on a webOS 4.x ACB display. A boot creates only Feed's handle. The URI handle is created once, on the main thread, when the first source is OFFERED to the URI engine (an Experimental viewer's play routed to it on an ACB display), and is never destroyed. If it cannot be made, the offer is declined and Feed plays the title.
tv/plane.rs(the plane owner, a pure machine): newEvent::HandleWanted { handle }answered withFx::Create { handle }while that handle's boot is not recorded.PlaneOwner::ensure_handleis the runner that executes it through the sink (create, read the initialize confirmation, log, record the boot); the handle's own boot event is the result. No IO enters the machine and noci/allow/line is added.Boot/BootUrinow only promotesUnavailabletoIdle. It used to reset the state toIdle, which was harmless while both boots ran together and would have erased aBound/Releasing/Quarantinedstate once the second one ran later.acb_create) makes the newest handle current, so without this Feed's verbs would address the URI handle.playback-contractUriDriver::ready_to_start(default: ready), asked byoffer_qualified_uri(media/src/player/adapter.rs) last, on the main thread, before it stores the offer. The product driver on an ACB display answers it throughacb_drive::uri_handle_gate(PlaneOwner::ensure_handleplus the existing gate); a false gate declines the offer withuri: original declined (the ACB handle for the URI engine could not be created)and the route's existing declined-source retry (retry_declined_uri_source) hands the same play to Feed. The failure is recorded, so every later offer declines at once with no new create attempt. An exported-window driver, an ACB-bound driver over a display that is not ACB, and the fake driver answer "ready" (nothing to set up); the Start's own gate is unchanged and stays the backstop.play-uri/src/acb_drive.rs:Op::Check(the first step of a bind) reads the sameuri_handle_gate, so the dev probe, which has no offer, creates the handle at its first check.executeis shared by the product backend and the dev probe.product_bindingisAcbon anyVP_ACBdisplay. The composition line stays truthful:handle=deferred ptype=0.acb create=1,acb handle=feed ptype=10 create=.. initialized=..,acb handle=uri ptype=0 create=.. initialized=..,uri: product binding=Acb mode=1 handle=true ptype=0 ...acb create=1,acb handle=feed ptype=10 create=.. initialized=..,uri: product binding=Acb mode=1 handle=deferred ptype=0 .... Noacb handle=uriline.acb handle=uri ptype=0 create=<id> initialized=..at the moment it is created, once, before the Start.acb-control/acb-dassarms callacb_drive::execute, whose gate creates the handle if it is missing. The oldboot_handlehelper inbackends.rsis gone (Feed's boot usesensure_handle), and thebackend.rstest rigs boot Feed's handle and let the gate create the URI handle, or script the sink.play-uri: the binding result and playback are unchanged (the new create code runs only underVP_ACB), but theuri: product binding=...composition line's text changed on EVERY display. A 5.x set used to readhandle=false ptype=10 initialized=falseand now readshandle=none ptype=0; theinitialized=field is gone,ptype=is the URI engine's fixed 0, and an ACB display readshandle=deferred ptype=0. The binding andmajor=/evidence=fields are as before.Unload)offer_qualified_uridoes NOT ask the driver to set anything up: no create may run against the display then (Feed's own sink fence refuses it, and a Start waits for theUnloadfor the same reason). The offer is taken and the Start's gate makes the handle once the release is done. A create that fails THAT way refuses that Start, with the logged reason (uri-acb: the ACB gate refused this start ...), rather than handing the play to Feed; the next offer then declines at once.PlaneOwner::attemptedandPlaneOwner::boot_handleare fixture-only (#[cfg(any(test, feature = "test-support"))]).boot_handleseating the URI handle is not reachable in production: onlyensure_handleseats it (and Feed's), andPlaneOwner::bootno longer goes through it.Why
#1394: on an LG OLED55C8 (webOS 4.4.3, W18O firmware) 0.10.0 makes every Feed
Loadreturn only after ~30 s, so every play failsload_timeout, and LG's own player stalls afterwards until a reboot. 0.9.0 was fine; with the second boot handle removed (and a reboot) the Load returns at once. The handle has no purpose unless the URI engine plays, and the URI engine plays only for a viewer whose Playback engine is Experimental. The handle was created for everyone.Tests
Red first:
an_acb_boot_creates_only_feeds_handle_and_records_itfailed on the unchanged code withleft: [("com.beb.plxnative", 10), ("com.beb.plxnative", 0)] right: [("com.beb.plxnative", 10)]; it passes now.plx_platform(tv/plane.rs):HandleWantedanswered withCreateonly while the handle is not booted; late boot keeps Bound/Releasing/Quarantined;ensure_handlecreates once and logs; re-select after a later create; a failed create is recorded and not retried.plx_play_uri(backend.rs):ready_to_startcreates the type-0 handle once and a Start after it makes no second; a failed create answers not-ready and is not retried; exported and non-ACB displays are ready and create nothing; the Start's gate (the backstop) still creates on demand and refuses on a failed create; composition tests updated forhandle=deferred.plx_media(adapter.rs): an offer the driver is not ready for is declined with its logged reason, keeps no authorization and leaves Feed as the offer; the next offer asks again.run_uri_boot_tests.rs): an Experimental offer creates the handle at the offer, is taken, and the Start makes no second; an offer whose create fails is declined and the same play starts on Feed; a second offer after a failed create declines with no second create attempt; a Standard viewer (production qualifier,NotOptedIn) is never offered and nothing is created.an_acb_offer_whose_handle_cannot_be_created_is_declined_and_feed_playsanda_second_acb_offer_after_a_failed_create_declines_without_another_attemptatthe offer is declined, andan_acb_offer_creates_the_uri_handle_at_the_offer_and_a_second_play_makes_no_second(renamed..._at_the_offer_and_is_takenafterwards) withleft: [] right: [0]: the handle was not there at the offer. The Standard-viewer test (a_standard_viewers_play_on_an_acb_display_creates_no_uri_handle) passed on both sides, as a guard.plx_media(adapter.rs):an_offer_while_a_release_is_in_flight_is_taken_without_asking_the_driver. Red with the release check neutralised: it fails atthe offer is taken(a driver that would decline was asked during the release); green with the check: the offer is taken, the driver is asked 0 times while the release runs and once on the next offer after it. The Start-after-release creation is the existing Start-gate test inplay-uri(the_first_acb_start_creates_the_uri_handle_once_and_a_later_start_reuses_it); no app-level test drives a real FeedUnload.Not verified
play-feed; not the shipping feature set)PlaneOwner::any_handle()stays false until the first offer, soacb_okreads false and diagnostics (app/diagnostics.rs:994) would show the video-plane fault before the first URI play. The doc comments say so; the shipping build hasplay-feedand is not affected, and this is left as is.make checkare CI's. pr-reviewer ran one round on the offer-time commit: four MINOR findings, fixed in the last commit.acb_createslot logic (2 slots, newest current, failed create keeps the current) is safe for a create after Feed's bind.TV verification checklist (4.5 set,
FLAVOR=debug,--guest --mock)Standard boot:
acb create=1,acb handle=feed ptype=10 create=.. initialized=true,uri: product binding=Acb mode=1 handle=deferred ptype=0 major=.. evidence=none; noacb handle=uriline and noacb selector secondacb initialize playerType=0line. A Feed play loads as on 0.9.0, and a Standard viewer's play adds noacb handle=uriline either.Experimental first URI play: the offer makes the handle, before the Start:
acb initialize playerType=0 rv=1 callback_installed=true(C seam) andacb handle=uri ptype=0 create=<id> initialized=true, then at the Starturi-acb: request=1 step=Check,acb gate mode=1 boot_handle=true actual_ptype=0 dass_available=false initialized=true, thenplane: uri handle <id> selected=trueat the MediaId bind. A second URI play shows no secondacb handle=uriline. A Feed play after a URI play showsplane: feed handle <id> selected=truebefore its bind.Failure path (only if the set can be made to fail the create):
acb handle=uri ptype=0 create=0 initialized=false,uri: original declined (the ACB handle for the URI engine could not be created), and the same title plays on Feed; a later Experimental play logs the declined line again with no secondacb handle=uriline.🤖 Generated with Claude Code