Repository navigation
webOS version: read /usr/lib/os-release when nyx's os_info.json is unreadable - #1376
Merged
Merged
Conversation
…os_info.json is unreadable A 75QNED91TPA (webOS 6.5.3) logged "/var/run/nyx/os_info.json unreadable — version unknown" on one boot, so every gate keyed on the firmware major ran as for an unknown firmware (#1351). The developer-mode jail mounts /usr/lib read-only, and /usr/lib/os-release (ID=starfish, VERSION_ID=6.5.3 on every image checked from 5.5 to 11.2) names the release. probe() now reads it when the nyx read fails and publishes the release and its major; the codename, API version, name and build stay empty, not invented. The nyx verdict stays "unreadable" for Diagnostics and the crash report. A file whose ID is not starfish names nothing: the simulator installs the webOS port's probe, and a Linux host's own VERSION_ID (Ubuntu's 24.04) is numeric. The nyx path's "webos: ... major=" line is unchanged; the fallback logs "webos: release=6.5.3 major=6 (from /usr/lib/os-release; nyx os_info.json unreadable)". The Diagnostics identity line no longer ends in an empty "api " for a release with no API version. Closes #1351 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…comments say where the verdict reaches No 3.x or 4.x firmware image ships /usr/lib/os-release (measured on every unpacked image, both /usr/lib and /etc), and every image from 5.5.0 to 11.2.0 does. The parser now yields nothing for a VERSION_ID below 5, so a text no firmware of that age writes cannot flip the decisions that read a known major (credential default, VP9 10-bit, DV platform gate, old-ABI seek). The nyx verdict reaches the event log and the crash/handled-event hardware.probe field, not the Diagnostics panel, whose head text comes from the version: the comments in webos.rs, diagnostics.rs, seek.rs and sf_event.rs now say that, and that `major == 0` means neither file named a release. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Its source is pinned by ci/proofs/platform-generated-enums.json, so the one-word doc-comment edit broke ci/test_readonly_generated.py and, through the same certificate, ci/test_transition_arguments.py. The comment's "the firmware file could not be read" still describes the "webOS unknown" read-out. 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.
What changes for a viewer
On a television where
/var/run/nyx/os_info.jsoncannot be read at boot, the app now takes the webOS release from/usr/lib/os-releaseinstead of treating the firmware as unknown. The reporter's 75QNED91TPA (webOS 6.5.3) loggedwebos: /var/run/nyx/os_info.json unreadable (No such file or directory) — version unknownon one boot and found the file on a later one. While the version was unknown, every decision keyed on the firmware major (the Feed seek and sink-counter rules, the VP9 bit-depth rule, the URI route's per-major table, and for webOS 1-4 the credential-protection default) ran as for firmware 0. The Diagnostics panel and the failure read-out said "webOS unknown", and the release the app reports to the Plex server fell back to the literal "4.5"./usr/lib/os-releaseis readable there: the developer-mode jail mounts/usr/libread-only. It carries five lines on 6.5.3 and 5.6.2 firmware (ID="starfish",NAME,VERSION,VERSION_ID="6.5.3",PRETTY_NAME); newer images (7.6 to 11.2) write the values unquoted and add aCPE_NAMEline. Measured on every unpacked firmware image (both/usr/lib/os-releaseand/etc/os-releasechecked): every image from 5.5.0 to 11.2.0 has the file, withID=starfishand aVERSION_ID(5.5.0, 5.6.2, 6.5.3, 7.6.0, 9.2.4, 10.3.1, 10.3.2, 11.2.0), and no 3.x or 4.x image has it (3.4.3, 3.9.2, 4.4.2, 4.4.3, 4.10.0, 4.10.2). So the fallback can only ever answer on webOS 5 and later, and the parser says so: aVERSION_IDbelow 5 names nothing. A major 1 to 4 would flip the decisions that read a known major (the credential default, the VP9 10-bit rule, the DV platform gate, the old-ABI seek) on a text no firmware of that age writes.What the change does
rust-modules/platform/src/webos.rs: a pure parser,os_release_info, readsKEY=valuelines (value bare or in one pair of quotes) and yields the release fromVERSION_IDand the major from its first component. It yields nothing whenIDis notstarfish, whenVERSION_IDis missing or not dotted decimal numbers, or when its major is below 5 (OS_RELEASE_FIRST_MAJOR). A purefirmware_from(nyx text, os-release text)decides: nyx's file answers whenever it was read, whatever it holds;/usr/lib/os-releaseis consulted only when the nyx read FAILED.probe()stays a thin IO shell around it and reads the second file only in that case.buildis empty, not the release, so a fallback boot and a nyx boot (6.5.3-47) of the same set never read as two builds (the crash fingerprint and the learned-refusal layer compare it). The learned layer stays off on such a set, as it is for any set with no codename.NyxFile::Unreadableis still what the event log line above and thehardware.probefield of the crash and handled-event reports say aboutos_info.json, because the fallback fills the version, not the verdict. The Diagnostics panel does not print that verdict: its head text comes from the version, so on a fallback boot it readswebOS 6.5.3, and only a boot that reads neither file shows "webOS unknown — os_info.json unreadable".ID=starfishis required because the simulator installs this probe too: on a Linux host (WSLg)/usr/lib/os-releaseis the host's, and Ubuntu'sVERSION_ID="24.04"would otherwise read as webOS 24.webos: /var/run/nyx/os_info.json unreadable (...) — version unknownline is unchanged (its wording is now followed by a version when the fallback answers), and the fallback adds one line,webos: release=6.5.3 major=6 (from /usr/lib/os-release; nyx os_info.json unreadable). Thewebos: <name> release=... codename=... api=... major=Nline is byte-identical for the nyx path.rust-modules/src/app/diagnostics.rs): the identity line printedwebOS 6.5.3 · apiwith nothing after the label for a release with no API version. It now readswebOS 6.5.3(the nyx spellingwebOS 4.10.2 · api 4.1.0is unchanged), built from the sharedwebos_release_linein a pure helper. The Firmware row still readsunknownfor a set with no name or codename. On a fallback boot that is the codename, which/usr/lib/os-releasedoes not carry, so it is true; the row's comment now says what the head line carries in each state. No locale string changes.webos.rsmodule doc, thetv::devicedocs onInfo,info()andProbe, theplatform_versionandwebos_release_linecomments, and the two docs that list what the app reads (docs/install-and-verify.md,docs/lab-diagnostics.md).Verification
Tests first.
an_os_release_below_webos_5_names_nothing(aVERSION_ID="4.10.2"starfish text, 4.4.3, 3.9.2 and 1.0.0 name nothing, 5.0.0 is the lowest that answers) failed against the first version of the parser, which took any major above 0 (panicked at platform/src/webos.rs: 4.10.2), and passes withOS_RELEASE_FIRST_MAJOR. Against stubs that keep the old behaviour,os_release_names_the_release_and_the_major_and_nothing_more,os_release_values_may_be_quoted_or_bareandan_unreadable_nyx_file_falls_back_to_os_release_and_is_still_reported_unreadablefailed, and the Diagnostics test failed withleft: "webOS 6.5.3 · api ",right: "webOS 6.5.3". They pass with the change. The parser is pinned on the 6.5.3 and 5.6.2 texts, a bare-value 11.2.0 text, single quotes, comment and CRLF lines, an Ubuntu text, and a table of missing or non-numericVERSION_IDs;firmware_fromon nyx-wins, nyx-NoKeys-stays-unknown, fallback, and neither-source.Gate lines, on the committed tree (
git status --shortempty before and after):Not verified on a television: the fallback needs a set whose nyx file is absent at boot, which the reporter's set only did once.
Closes #1351
🤖 Generated with Claude Code