Repository navigation
The television's webOS-shaped types become neutral ones - #1485
Merged
Merged
Conversation
The sealed session envelope is what the session layer stores on disk, and its backend tag is the one spelling a TV's saved login cannot survive a change of. Nothing pinned it: the persistence fixtures carry the keymanager3 tag inside the session wrapper and only read it back, and palm_keymanager appeared in no fixture at all. The test serializes a Sealed for each tag the type can name today and compares the JSON with a literal written from today's code, then reads the literal back and compares the value. A second test pins that a member an earlier build wrote (the 0.6.3 to 0.6.5 files carry an identity member the type has no field for) is still ignored on read. Co-Authored-By: Claude <noreply@anthropic.com>
Backend was a closed enum naming the two webOS key managers, in the one type the stored session envelope shares with every platform. It becomes an opaque string tag, serde transparent, so the wire form is the bare string it always was and a platform can name its own store in its own code (Backend::new). The two spellings a TV has already written stay as constants, KEYMANAGER3 and PALM_KEYMANAGER; the pinned envelope literals from the previous commit pass unchanged. A tag no installed platform knows now parses instead of failing the whole envelope, so the refusal moves to open: keymanager's open answers None for it (the session layer reports the file locked, as it did for the parse failure) and its remove asks no service and leaves the backend cache alone, so a foreign tag is never handed to keymanager3 on the strength of the shared key name. Tests pin both in keymanager and one through the session file, with a control that the platform's own tag still opens. Co-Authored-By: Claude <noreply@anthropic.com>
tv::sandbox becomes tv::native_video. Its verdict is Available, Blocked(reason) or NotApplicable, where webOS's old Ok, Missing and NotApplicable map one to one and the reason word stays "missing", so the devjail: log line, the rtkmem telemetry context and PRIVACY.md read exactly as before. The repair is an optional hook, Services.identity.repair_native_video, and a platform that states none answers Unsupported, the answer the all-None services gave. The readers in media, appkit, screens, telemetry and the application follow the rename. The platform publishes the name and version the Plex headers report. tv::device keeps a once-set Platform, webOS's probe states the release it read (or the "4.5" literal when the set named none) and plex::identity::platform() and platform_version() answer it, falling back to "webOS" and the old release-or-"4.5" when nothing is published. The X-Plex headers are the same bytes on every path; the client no longer carries a copy of the platform name. device::Info keeps release, build and major; codename, API version and name move to a WebosDetail behind Info::webos, and the readers (the probe log line, devcaps, the Sentry and PostHog contexts, the diagnostics panel, the lab snapshot) print the same text. devcaps reads its files through the platform. The parsed model stays and keeps its paths and its log lines; the reads go through tv::device::Files, which Services.identity states and which webOS fills from the file system. devcaps::probe() and caps() keep their paths and signatures. Not on the host and so read by hand: the ARM-only Sentry block in telemetry/native.rs now reads the same three strings from info.webos. Co-Authored-By: Claude <noreply@anthropic.com>
The L15c row still said W3a to W3c were planned; #1477, #1478 and #1479 landed them, and the row beside it now says W3d has. The Backend doc said no shared code branches on a tag, but the legacy-migration decoder in plex::session::persistence compares the one spelling earlier builds wrote. Co-Authored-By: Claude <noreply@anthropic.com>
Target shape 1 still listed repair_sandbox in the identity group. After W3d the group carries repair_native_video, an optional hook, and device_files, the reader devcaps parses through, as tv.rs's IdentityHooks does. Co-Authored-By: Claude <noreply@anthropic.com>
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 W3d of the platform plan (discussion #1460). The television seam's types no longer name webOS: the secure envelope's backend becomes an opaque tag,
sandboxbecomesnative_video, and identity publishes a neutralPlatform. webOS fills them with the values it used before. No behaviour change on webOS or the simulator. The X-Plex headers, thedevjail:log line, the telemetry fields and the session file's wire form are unchanged.What changes
tv::secure::Backend:pub struct Backend(Cow<'static, str>), serialized transparently, with the constantsKEYMANAGER3andPALM_KEYMANAGER.keymanager::openreturnsNonefor any other tag, without an LS2 call, andremoveignores it. The session layer reports Locked, the file is not written or deleted, and a sign-out retires it as before: the same outcome as the old serde failure. One log line changes. Such a file used to fail to parse and logsession: unsupported or damaged secure envelope is locked. It now parses,openrefuses it, and it logssession: secure file is present but its device key is unavailable. webOS only ever writes the two known tags, so a webOS install can meet another tag only in a file that a different build wrote.persistence::decode_legacy_at_depthstill accepts onlykeymanager3. TheBackenddoc names it as the one shared reader.tv::sandboxbecomestv::native_video(git mv):VerdictisAvailable | Blocked(&'static str) | NotApplicable. webOS maps Ok toAvailable, Missing toBlocked("missing"), and NotApplicable to itself.blocks_native_video()becomesblocked().context()still returnsok,missingorn/a, sodevjail:, the telemetryrtkmemfield and PRIVACY.md read as before.Services.identity.repair_sandboxbecomesrepair_native_video: Option<fn() -> Result<(), Failure>>.NoneanswersFailure::Unsupported, as before.port.rsgivesSome(webos::jail_repair::execute).tv::device:Infobecomes{ release, build, major, webos: WebosDetail { codename, api, name } }.Platform { name, version }, withplatform()andpublish_platform(). It uses the same publish-once pattern as the rest oftv::device.Platform { "webOS", release or "4.5" }, the values the headers always carried.plex::identity::platform()reads it, defaulting toPLATFORMuntil a platform publishes.Clientloses itsplatformfield.tv::device::Files { read, exists }(withFiles::NONE): devcaps' file reads go through it.read_caps(&Files)is split out ofprobe();probe()andcaps()keep their path and signature. webOS supplieswebos::DEVICE_FILESthroughServices.identity.device_files. The log lines are unchanged.app/{diagnostics,playback}.rsandlab/snapshot.rs.docs/module-layers.md's L15 / L15c / L15d rows and its interface table follow. L15c is marked done, since Keep no credential on platforms that cannot store one: a memory-only store mode #1477, URI drivers report their own display evidence; LG's binding moves into the LG driver #1478 and run_application returns its exit; only the executable entry ends the process #1479 are on main. One comment changes inci/module-layers.ini.FFI: no
extern,dynlib!or link directive changes. The keymanager LS2 URIs are the same.libc::accesson the rtkmem device is the same call, moved into a closure passed to the purejail_verdict. The ARM-only Sentry block changes three field paths. I reviewed these hunks by hand in place of fw-compat-reviewer, and the armv7 artifact assertions are green on this head.Nothing changes in the certificate-pinned sources (
ci/readonly_generated.py), the C ABI,extern/dynlib!declarations or the ledgers. The only file move is insideplx_os(rust-modules/os/src/tv/), so no crate orrust-modules/src/layout changes and there is no build-bench table.Tests
New:
the_sealed_envelope_keeps_its_wire_form_for_every_backend_tagcompares against a literal written from the old code, and passes byte for byte after it. An envelope member the type no longer has (0.6.3–0.6.5'sidentity) is still ignored on read.an_envelope_with_a_backend_tag_no_platform_knows_is_locked_and_left_as_it_waslocks it and leaves the file, with a control test.metadata_receives_versions_for_this_client) passes as it was.Bounded runs on the committed head, through
tools/check-lock.py:make test-crate C=plx_os:test result: ok. 460 passed; 0 failed; 0 ignored; 0 measured; 0 filtered outC=plx_plex T=identity:ok. 27 passed;T=backend_tag:ok. 2 passed;T=metadata_receives_versions:ok. 1 passedC=plx_media T=repair:ok. 3 passed;C=plx_appkit T=player_hud:ok. 211 passedC=plx_screens T=jail_fixture:ok. 1 passed;T=player::ass_subtitles:ok. 21 passedC=plx_telemetry T=sentry:ok. 22 passed;T=schema:ok. 17 passedmake test-hostsim C=plx_media T=jail_refusal:ok. 1 passed;T=app::diagnostics:ok. 49 passed;T=app::playback:ok. 13 passedlab/snapshot.rsis gated onlab-diagnostics. It type-checks undercargo check --lib --tests --features lab-diagnosticswith 0 warnings, but it was not run.make test-crate C=plx_screens T=playerdies with SIGSEGV inplayer::automatic_marker_tests::actual_visible_player_paint_reports_typed_watch_without_mutating_it, a paint test with no GL context on this Mac. An older log shows the same crate crash on a tree without this change. With that test skipped, the crate's binary gives 2285 passed, 0 failed.ci/check-deps.sh,ci/check-module-layers.py,ci/check-ledger-ratchet.pyandci/test_readonly_generated.py: green.Not run here:
make check,check-nodefand the ARM cross-build. This PR's own CI gates them, including the ARM-only Sentry block intelemetry/native.rs, where three field paths change.🤖 Generated with Claude Code