Skip to content

Merge upstream 2026-11-15 - #38

Merged
tiper merged 9 commits into
mainfrom
upstream-merge-2026-11-15
Nov 15, 2026
Merged

tiper merged 9 commits into
mainfrom
upstream-merge-2026-11-15

Conversation

@tiper

@tiper tiper commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Merges PlxNative main up to 92e63a8 (plxnative#1397), 8 commits after plxnative#1386. No upstream release is pending; PLXNATIVE_BASE stays 0.11.0-dev.

Conflicts: only the two readonly certificates and their hashes, regenerated for the merged manifests (FinNative's i18n/mod.rs hash kept in I18N_SOURCES). plx_jellyfin: 160 passed.


Generated by Claude Code

GLinnik21 and others added 9 commits November 14, 2026 09:37
…changes (plxnative#1388)

ci/test_check_machine_shape.py ran as one 316 s process in a 330 s host python/shell/C gates job, so it alone set the job's wall. A profile showed repeated work, not hard work:

- readonly_dependencies._tokens sliced text[i:] at every probe (quadratic) and ran per crate source twice per certificate; it now matches at the cursor, and the crate token check is memoized on the file text.
- machine_readonly.builtin_macro rescanned the whole file for macro_rules and use items at each of 77k macro calls; a read-only Tokens list carries a one-pass Shadows index instead. The certificate is verified once (certify is provenance() is not None), and paths resolve once per proof.
- check-machine-shape.py lexed the same source three ways for each of 140 checks; rust_tokens, production_tokens and lexed() memoize on source text (never on path), whole-list facts are computed once per list, and the machine-body scan walks only the machine's impl tokens.

Every mutation is still applied and rejected by the real checker (owned-field matrix: 10 machines, 101 fields, 707 rejected writers), check-machine-shape.py's output is byte-identical, and a golden token stream from the old tokenizer plus SharedTokens/Shadows tests pin the rewrites. Locally the step went from 96.8 s to 10.2 s, the checker from 9.8 s to 1.5 s and test_transition_arguments from 20.0 s to 2.4 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ure (plxnative#1391)

A 1920x802 Dolby Vision Profile 8.1 re-encode of a letterboxed 3840x2160 master still carries the master's Level 5 active-area offsets (top 276, bottom 277). An LG C8 on webOS 4.4.3 blanks everything outside them and showed a 249-row strip. W18O libkadaptor's dolbyGenerateRegNLuts_IP writes those offsets into the DM's Active_area registers.

packet_to_annexb now checks every HEVC Dolby Vision RPU it feeds, including the Profile 7 to 8.1 conversion's output, against the stream's displayed raster. Foreign offsets are zeroed (DoviRpu::crop, what dovi_tool --crop does) and the RPU is rewritten; every other RPU is fed as it was. A wrong keep cuts picture, while a wrong clear only shows the encode's own black bars, so the rule leans to clear:
- a raster that is not 16:9 has been cropped, so any nonzero offsets are cleared;
- a 16:9 raster keeps offsets that can describe it (inside the frame, an area between 1:2 and 3:1);
- a per-stream latch clears every later RPU once one has been foreign.

The state is a DvActiveArea owned by the demux loop.

Host tests cover the reporter's case, cropped rasters, genuine letterboxes kept byte for byte, the latch, the P7 path and the bounds. They failed against the old behaviour. No TV has shown the fix: the dev set's firmware does not read L5 the same way. The URI engine and AV1 Profile 10 are not covered. docs/dolby-vision.md section 1a states the rule and its limits.

Closes plxnative#1367

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… instead of a ~10 s gap (plxnative#1393)

With subtitles Off, the main demuxer threw away image-subtitle (PGS, VobSub, DVB) packets as it read ahead of the playhead. Turning on an image track mid-play then showed nothing for as long as the read-ahead, about 10 s on a 4K direct play. Text tracks were unaffected, because their cues are kept for every track.

`SubTracks` now holds owned copies of those packets in an `ImageBacklog` while subtitles are Off. On the first packet read after a subtitle is selected, it decodes them through the existing image decoders, in demux order across tracks, ahead of the live packet. Each track keeps packets from the last one at or before the anchor onward; the anchor is the new `CaptionRetention::anchor_ns()`, the earlier of playhead and seek target, which `subtitle_floor_ns` now also uses. For PGS the cut stops at the newest display set's PCS, because M2TS carries each PGS segment as its own packet. A seek or close discards the backlog.

The per-packet subtitle step is one set of `SubTracks` methods that `demux()` and the tests share. The decode adds no FFmpeg symbol or struct offset: it uses an `av_packet_alloc` scratch packet over the owned, padded bytes, and `ci/ffabi-assert.c` pins the padding. The live subtitle path now reads the format's current stream table.

Verified on the dev TV with a mock PGS clip: turning the track on at ~5 s emitted the 0 s and 10 s cues at once. Before this change the first cue would have been the 20 s one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…not at boot (plxnative#1396)

Since plxnative#1281 the app created a second ACB handle, player type 0 for the URI engine, at every boot, whatever the viewer's Playback engine. On an LG C8 (webOS 4.4.3) running 0.10.0, every Feed Load then returned ~30 s late and every play failed load_timeout. The reporter's build without that handle played. The firmware does not prove the link: the 30 s is libplayerAPIs' synchronous videosinkmanager/private/register call, and the code tying it to the handle was not decompiled. The handle is only ever needed by the Experimental engine.

A boot now creates only Feed's handle (player type 10, with the same calls and log lines as before). The plane owner creates the URI engine's handle on demand:
- Event::HandleWanted -> Fx::Create, executed by PlaneOwner::ensure_handle on the main thread;
- at the first Experimental offer (UriDriver::ready_to_start, asked from offer_qualified_uri);
- or, while Feed's off-frame Unload is still in flight, at the Start's gate after it.

A create that fails at the offer declines it ("uri: original declined (the ACB handle for the URI engine could not be created)"), so Feed plays the title. The failure is recorded and later offers decline without retrying. A late boot record no longer resets a bound or releasing plane. The composition line reads handle=deferred on an ACB display and handle=none elsewhere; the binding result is unchanged.

Host tests (red first) cover:
- a boot that creates only Feed's handle;
- the create at the offer, and no second create;
- a declined offer handing the play to Feed;
- no create during a release;
- a Standard viewer creating nothing.

On the webOS 4.5 dev set, a Standard boot logged only `acb handle=feed`, and Feed's Load returned in 677 ms. The production URI case logged `acb handle=uri ptype=0 create=2` once, at the offer, and played 70 s bound. The C8's stall itself is not reproduced on that set.

Closes plxnative#1394

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cargo test builds every unit of the host unit suite (the 18 test binaries, the workspace libs under them and the third-party libs) with the test profile. That profile inherited the main checkout's full DWARF, which lanes and CI had already dropped. rust-modules/Cargo.toml now sets [profile.test] debug = "line-tables-only". Panic backtraces keep file:line; only debugger locals in host test builds are lost. CARGO_PROFILE_TEST_DEBUG=2 (or --config profile.test.debug=2) brings full DWARF back. The simulator's cargo build, the ARM library and clippy/check do not use this profile and are unchanged. In lanes and CI the unit graph is byte-identical, because their configs already set dev to line tables and test inherits it.

Measured on an M4 in scratch trees with no lane config (build-bench, base/head alternated, medians of 3 per run): the non-incremental leaf-edit rebuild went from 43.3 s to 34.7 s for plx_base (-20%), from 23.2 s to 19.1 s for plx_ui dwell.rs (-18%) and from 23.0 s to 19.2 s for the plx_ui hub (-17%). The incremental loop shows no clear change. target plus target-fast shrink by 19%.

The root manifest is pinned by two read-only certificates. With the owner's approval, both were re-certified:
- ci/proofs/serde-json-immutable.json: the manifest hash, and the ui/src/lib.rs hash, which had been stale since 6a74d2a
- ci/proofs/platform-generated-enums.json: the manifest hash

The comments above check-python-harness (Makefile) and the harness job (ci.yml) now describe plxnative#1386's per-rule `ci/check-deps.sh --only` runs. Prose about the test profile's debug level in build-gc.sh, agent-reference.md, module-layers.md, cargo-seed.py and the host-rust action is corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plxnative#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 (plxnative#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 plxnative#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 plxnative#1064; does not close it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er run (plxnative#1397)

EXPORTED_STRATA is now &[5, 6, 7, 9, 10]. On a set whose firmware reports major 6, 7 or 9, 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 `evidence=table`. No tester has run these majors.

They are admitted under the bracketing exception, which now reads "nearest admitted major on each side" (the maintainer's decision of 2026-11-13). A major with image evidence (a) but no tester run is admitted when the nearest majors below and above it were both admitted on tester evidence; a major admitted only as bracketed is skipped when looking for a side. Here those sides are 5 (plxnative#1331) and 10 (plxnative#1377). The old text required both major - 1 and major + 1.

(a) per major: libplayerAPIs.so.1.0.0, StarfishMediaAPIs::parseLoadMessage, reads option.windowId at load:
- 6.5.3, HE_DTV_W21O, sha 0b0f6654, at 0x41556;
- 7.6.0, HE_DTV_W22P, sha 0969903e, at 0x467c6;
- 9.2.4, HE_DTV_W24G, sha cc08e2b8, at 0x4385c.
A virtual call follows the store on each image; the AVProxy builder is identified on 11.2 only. Major 8 has no image read, so it has no (a) and plays Standard.

docs/uri-mode.md gains Results rows for 6.x and 7.x, rewrites the major-9 part of the 9.2.4 / 10.3.1 row, and corrects the windowId store offset: +0x90 on 6.5.3 and 7.6.0, +0x94 on 9.2.4 and 10.3.1. Host tests (red first against &[5, 10]) pin 5, 6, 7, 9 and 10 to Exported on the exported-window display, every other major 0..=30 (8 included) to Unbound, and the boot lines, including `major=8 evidence=none`.

Part of the webOS 5+ URI work tracked in plxnative#1064; does not close it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-11-15

# Conflicts:
#	ci/proofs/platform-generated-enums.json
#	ci/proofs/serde-json-immutable.json
#	ci/readonly_dependencies.py
#	ci/readonly_generated.py
@tiper
tiper merged commit a88d028 into main Nov 15, 2026
10 checks passed
@tiper
tiper deleted the upstream-merge-2026-11-15 branch November 15, 2026 06:11
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.

3 participants