Repository navigation
Conversation
… once Platform gains a MediaBoot: early_init runs at the old acb_init line, before the first adapter, and compose installs the platform's drivers on the adapter and returns a Composition, the resolver and nothing else. Compose takes no session and publishes nothing. The boot then calls one function, publish_composition, which gives the route session the resolver and then the set the adapter's installed drivers form, every boot, a zero-driver platform included, and logs one "compose: backends=<set> resolver=<yes|no>" line. The set and the resolver can no longer disagree: a refused URI install returns no resolver, and the adapter holds no URI driver. The webOS port fills the table with backends::acb_init and backends::compose_native; the desktop installs the Feed over the host sink and no URI driver, with a no-op early_init; the host-test platform composes nothing. The bodies stay in adapters/backends.rs until W11a: dev and the tests name UriProduct and its siblings, and the layer fence forbids them naming port. compose_backends is gone, split into compose_feed (shared), compose_native and the compose_with core the host rig drives over its own ports. install_uri_product(_with_ports) now return the resolver instead of writing it into a session. The ten play-uri gates in playback.rs and run.rs that only read what the installed drivers do at run time are removed; the 41 that name ACB or the URI product stay. install_uri_preflight_port takes a bare port or an Option, and the session has a reader for it. The 18 URI boot rig tests now publish through the same function as the boot instead of installing the resolver by hand; none changed its outcome. New tests cover a composed URI driver, a refused install, a controlled boot and a platform that composed nothing, each asserting the session's set and resolver agree. Co-Authored-By: Claude <noreply@anthropic.com>
…ollows the desktop change A platform that composed no URI driver returns Composition::default(). The NONE constant was read only by the simulator's platform, so a television build that does not compile the simulator saw it as dead code and refused to build. Three sentences that the desktop change made false are corrected: the module-layers note that every play-uri build resolves the URI media pipe at boot, the desktop DISPLAY constant's note about a plane boot the simulator no longer runs, and the per-file counts of the play-uri sites that remain. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
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.
Step W6b of the platform plan (discussion #1460): the platform supplies the playback composition, in two boot phases. The app publishes what it gets once, on every boot. Before,
app/boot.rscalledacb_initandcompose_backendsdirectly, andplayback.rsandrun.rschose code paths withfeature = "play-uri"gates. NowPlatformcarries aMediaBoot: webOS fills it with today's bodies, the desktop with the Feed host sink alone, andPlatform::HOST_TESTwith nothing. webOS boots the same way at the same points, with one new log line.What changes
app/platform.rsPlatformgainsmedia: MediaBoot { early_init: fn(&MainThread), compose: fn(&mut PlayerAdapter, controlled: bool) -> Composition }.Platform::newtakes it as a fourth argument.Composition { resolver: Option<ResolvePort> }derivesDefault, which means no resolver.publish_composition(session, adapter, Composition)publishes the resolver first, theninstall_backends(adapter.composed_backends()).BackendSet::NONEand no resolver. The session's set and its resolver can no longer disagree.compose: backends=<uri+feed|uri|feed|none> resolver=<yes|no>. Every existing log line is unchanged.HOST_TESTcomposes nothing, and the pin test covers the new field.app/boot.rs: two hunks.acb_initcall becomes(platform.media.early_init)(&mt). It stays on the same line, inside the sameif !controlled, beforeffi::boot().compose_backendsblock becomes(platform.media.compose)(…), thenpublish_composition(…), at the same site.src/port.rs(webOS):MediaBoot { early_init: backends::acb_init, compose: backends::compose_native }.src/platform_desktop.rs: a no-opearly_init. Itscomposecallscompose_feedand returnsComposition::default().app/adapters/backends.rscompose_backendsis split intocompose_feed(shared),compose_native, andcompose_with(adapter, controlled, install_uri), which the tests use.install_uri_productandinstall_uri_product_with_portsno longer take the session. They returnOption<ResolvePort>, built only after the physical URI install succeeds.uri: product driver installation refusedline moved intoinstall_uri_product, with its text unchanged.media/src/route/decision.rsinstall_uri_preflight_porttakesimpl Into<Option<ResolvePort>>, so an absent resolver clears the slot, and the 14 existing callers compile unchanged.uri_preflight_port(), is added for the tests.playback.rsandrun.rs: the tenfeature = "play-uri"lines that chose a path at build time are deleted, six inplayback.rsand four inrun.rs. Those paths now read the published set at run time. Nothing else in either file changes.docs/platform-ports.mdgains an "As landed" note, anddocs/module-layers.mdfollows.Deviations from the plan
port.rspoints at functions inapp/adapters/backends.rsinstead 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.composetakes no&PlaybackSession. The only use of the session was the old resolver publication, which now happens inpublish_composition. 6a records that W10 adds a read-only session parameter if a Tizen driver needs one.play-urilines remain: 40 inbackends.rs, 1 in arun.rstest fixture, 3 indev.rs, 1 inlib.rsand 1 in the rig. None remain inboot.rs, productionrun.rs,playback.rsorplatform.rs. This commit adds five gated lines tobackends.rs, so the docs give the grep instead of a count.Composition::NONEbecameDefault: the constant was read only by the desktop platform, andmake check-nodeffailed on it as dead code.What the simulator does differently
play-uriis 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.vplane: exported window …orvplane: this device has NEITHER libAcbAPI …line, nor theuri: product binding=…anduri: display path=…lines.PlaneOwner::boot(ABSENT)is no longer called. The default plane facts are the same absent facts.dev::uriprobe::installno longer runs in a simulatordevtriggersbuild.Tests
New tests drive the real composition, not a stand-in. In each case, the published set and resolver must agree:
compose_feedshape;The URI boot rig's 18 calls, and
install_exported_uri, now publish throughpublish_composition. A rig adapter is Feed plus URI, so its session set is nowBOTH(it wasFEED). That is the set a production boot publishes with both drivers.Results on b951d2a, all on the committed tree:
make test-hostsim T=uri_boot:test result: ok. 29 passed; 0 failed; 0 ignored; 0 measured; 1725 filtered outmake test-crate C=plx_media:test result: ok. 2159 passed; 0 failed; 104 ignored; 0 measured; 0 filtered outmake 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 indeeplink_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=0ci/check-deps.sh,ci/check-module-layers.py,ci/check-ledger-ratchet.pyandci/check-statics.share green.ci/test_readonly_generated.py(22 tests) andci/test_readonly_dependencies.py(64 tests) pass..cargoor certificate-pinned file changes. Both spellings of every touched path were checked againstci/proofs/*.json.Not covered
check-nodefonly compiles. The single-backend shapes (uri,feed,none) are not built as tests or run anywhere in CI.--guest --mocklease, base then head, with no setting change. It shows that Feed plays a mock title, the URI case binds and displays as before,vplane:/ptype=sit at the same point relative to the identity line, and thecompose:line appears on head only.🤖 Generated with Claude Code