Skip to content

webOS version: read /usr/lib/os-release when nyx's os_info.json is unreadable - #1376

Merged
GLinnik21 merged 3 commits into
mainfrom
platform/os-release-fallback
Nov 13, 2026
Merged

GLinnik21 merged 3 commits into
mainfrom
platform/os-release-fallback

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

What changes for a viewer

On a television where /var/run/nyx/os_info.json cannot be read at boot, the app now takes the webOS release from /usr/lib/os-release instead of treating the firmware as unknown. The reporter's 75QNED91TPA (webOS 6.5.3) logged webos: /var/run/nyx/os_info.json unreadable (No such file or directory) — version unknown on 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-release is readable there: the developer-mode jail mounts /usr/lib read-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 a CPE_NAME line. Measured on every unpacked firmware image (both /usr/lib/os-release and /etc/os-release checked): every image from 5.5.0 to 11.2.0 has the file, with ID=starfish and a VERSION_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: a VERSION_ID below 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, reads KEY=value lines (value bare or in one pair of quotes) and yields the release from VERSION_ID and the major from its first component. It yields nothing when ID is not starfish, when VERSION_ID is missing or not dotted decimal numbers, or when its major is below 5 (OS_RELEASE_FIRST_MAJOR). A pure firmware_from(nyx text, os-release text) decides: nyx's file answers whenever it was read, whatever it holds; /usr/lib/os-release is consulted only when the nyx read FAILED. probe() stays a thin IO shell around it and reads the second file only in that case.
  • The codename, API version, name and build stay empty: the file names none of them, and nothing is invented. In particular build is 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.
  • The nyx verdict is untouched: NyxFile::Unreadable is still what the event log line above and the hardware.probe field of the crash and handled-event reports say about os_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 reads webOS 6.5.3, and only a boot that reads neither file shows "webOS unknown — os_info.json unreadable".
  • ID=starfish is required because the simulator installs this probe too: on a Linux host (WSLg) /usr/lib/os-release is the host's, and Ubuntu's VERSION_ID="24.04" would otherwise read as webOS 24.
  • Logging: the existing webos: /var/run/nyx/os_info.json unreadable (...) — version unknown line 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). The webos: <name> release=... codename=... api=... major=N line is byte-identical for the nyx path.
  • Diagnostics (rust-modules/src/app/diagnostics.rs): the identity line printed webOS 6.5.3 · api with nothing after the label for a release with no API version. It now reads webOS 6.5.3 (the nyx spelling webOS 4.10.2 · api 4.1.0 is unchanged), built from the shared webos_release_line in a pure helper. The Firmware row still reads unknown for a set with no name or codename. On a fallback boot that is the codename, which /usr/lib/os-release does not carry, so it is true; the row's comment now says what the head line carries in each state. No locale string changes.
  • Prose that the change made false is corrected: the webos.rs module doc, the tv::device docs on Info, info() and Probe, the platform_version and webos_release_line comments, 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 (a VERSION_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 with OS_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_bare and an_unreadable_nyx_file_falls_back_to_os_release_and_is_still_reported_unreadable failed, and the Diagnostics test failed with left: "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-numeric VERSION_IDs; firmware_from on nyx-wins, nyx-NoKeys-stays-unknown, fallback, and neither-source.

Gate lines, on the committed tree (git status --short empty before and after):

make test-crate C=plx_platform:        test result: ok. 435 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.89s
make test-crate C=app T=diagnostics:   test result: ok. 54 passed; 0 failed; 0 ignored; 0 measured; 1322 filtered out; finished in 0.20s
make test-crate C=plx_play_feed:       test result: ok. 306 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.31s
make check-nodef:                      Finished `dev` profile [unoptimized + debuginfo] target(s) in 30.92s
bash ci/check-deps.sh:                 check-deps: all gates green
python3 ci/check-module-layers.py:     check-module-layers: green — 18 layers, 1923 modules, 169 Cargo layer declarations, 0 migration entries left in ci/allow/layers.txt, 0 of them into [port webos]; 0 cfg(test) items still named across layers (--report)

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

GLinnik21 and others added 3 commits November 13, 2026 14:56
…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]>
@GLinnik21
GLinnik21 merged commit fbec5ed into main Nov 13, 2026
19 checks passed
@GLinnik21
GLinnik21 deleted the platform/os-release-fallback branch November 13, 2026 12:42
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.

[webOS 6.5.3 / 75QNED91TPA] E-AC3 Atmos direct play: audio slow, deep and out of sync when Play lands before smp_cb type=26

1 participant