Skip to content

URI: say in the event log why the Experimental engine did not take a play - #1332

Merged
GLinnik21 merged 5 commits into
mainfrom
uri5/decline-reason
Nov 11, 2026
Merged

GLinnik21 merged 5 commits into
mainfrom
uri5/decline-reason

Conversation

@GLinnik21

@GLinnik21 GLinnik21 commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Why a play stayed in Standard, in one event-log line

A tester on webOS 5.6.2 turned on Settings > Playback engine > Experimental and every play went to Standard
with nothing in the event log saying why. The reason was quality Auto on a link the app reads as remote (Auto
streams adaptively unless the link is known to be local). He tried three titles before reading the code. Other
refusals were as silent: a file with subtitle streams and none selected, several audio tracks on the exported
window, a file Standard itself would not direct-play.

What a tester sees now

For a viewer whose Playback engine is Experimental, each play that did not take the URI engine writes one line
to the event log, once per resolve:

uri: original declined (<reason>)

for example uri: original declined (quality Auto on a link that is not local; set quality to Original).
Standard viewers get no line, a play the URI engine took gets none, and the line names no title, host, URL or
token. The reason is the first check that said no.

How

  • uri_preflight::UriDecline is a typed reason, one variant per distinct refusal in the plan's guards,
    ResolvePort::qualify and ProductQualifier, with log_name(). Verdict::Unknown and Verdict::Refused
    carry it. Every branch keeps its kind (Refused stays Refused, Unknown stays Unknown); the refusal chain is
    the same checks in the same order, now one function that names the first one that fires. uri_preflight.rs
    stays pure: nothing logs there.
  • The checks after a qualifier answers Known are split into three reasons, judged in this order: a certificate that
    does not match the play (selection, source, Dolby Vision record, audio track map, expiry) is CertificateMismatch;
    a selected embedded subtitle the certificate does not carry (no native track for it, or no certified render) is
    SubtitleNotCarried (the product carrier certifies no subtitle render, so today every selected embedded subtitle
    ends here, by design: any file with a subtitle stream stays in Standard); one that matches but has no display path
    to show it is NoDisplayEvidence. The routing is the same boolean as before; the split only names the group. Standard's four verdicts are named separately (video, Dolby
    Vision, audio, container) through StandardDirectPlay::first_gap.
  • Plan::uri_decline records the reason beside pms_decline, including the guards that skip qualification
    (no URI port, the backend policy no longer offers a URI original, an audio or subtitle pick the Part does not
    list). build_stream writes the line once, after the plan is chosen, through uri_decline_line (pure), so a
    play that tries a first Part for URI and then the default Part logs once. No new effect, worker or global; the
    ci/allow ledgers are unchanged.
  • Docs: docs/uri-mode.md has a "Why a play stayed in Standard" section with each reason, what it means and what
    the tester changes; docs/playback-settings.md says the event log names the reason.

Reasons

In the order the code checks them: no URI engine in this build or boot; the URI original was already tried or is
not offered for this play (a play that fails over from the URI engine logs this on its handoff to Standard); the
picked audio or subtitle track is not in this file; playback speed is not 1x; the quality ceiling or Direct Play
setting rules out the original (set quality to Original and Direct Play to Auto); the link is a Plex relay; quality
Auto on a link that is not local; an audio enhancement is on; a subtitle is burned in; the selected subtitle is an
external file; the file has subtitle streams and none is selected (subtitle streams keep a play in Standard
today); the file has Dolby Vision and the Dolby Vision setting is Off; a trailer preview; no duration or URL for the
file; Playback engine is not Experimental; Standard would not direct-play the video / Dolby Vision / audio /
container; several audio tracks on the exported window; the certified source did not match this play; subtitle
streams keep a play in Standard today, try a file without subtitle streams; no exported-window evidence for this
firmware (report the uri: product binding=... boot line and the devcaps: firmware= build= line); the qualifier
did not certify the file.

Tests

Written first against a stub that answered every branch with one placeholder reason: 8 uri_preflight tests
and the plan-level test failed on the reason, then passed with the real ones.

  • uri_preflight: a table over ResolvePort::qualify (every refusal, the Unknowns, and that the first failing
    check names the reason), the post-Known split (expired or unmapped certificate vs. no display path), a
    qualifier's own reason passing through, ProductQualifier (not opted in, each Standard verdict, several audio
    tracks only on the exported window), first_gap order, and that every reason has its own one-line phrase with
    no parenthesis. The existing matches!(.., Verdict::Unknown) sites now pin the reason they were already about.
  • Plan level (decision_resolve_route_tests): an opted-in Auto play on a remote link records
    AutoOnNonLocalLink and the exact log line, Standard gets none; the three guards leave their reasons; a
    qualified play leaves none.
    The subtitle reason is pinned for the product qualifier, for a certificate with no render proof and one with the
    wrong codec, and for its order against an expired certificate and a missing display path.
  • Gates on the committed tree: make test-crate C=plx_media T=uri_preflight, T=route, make test-crate C=app T=uri_product, make check-nodef, ci/check-deps.sh, ci/check-module-layers.py.

Not covered on a device: it is a host-side log line; the reasons are as accurate as the checks they name.

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

🤖 Generated with Claude Code

GLinnik21 and others added 5 commits November 11, 2026 14:31
A tester on webOS 5.6.2 turned on Playback engine > Experimental and every play
went to Standard with nothing in the event log saying why (quality Auto on a
link the app reads as remote). The URI qualification now returns a typed reason
instead of a bare Unknown/Refused: `UriDecline`, one variant per refusal in the
plan's guards, `ResolvePort::qualify` and `ProductQualifier`, with a
`log_name()` phrase a tester can act on. `Verdict::Unknown` and `Refused` carry
it; every branch keeps its kind, and the certificate checks after a qualifier's
Known are split into "does not match this play" and "no display-path evidence".

The plan records the reason (`Plan::uri_decline`, beside `pms_decline`),
including the guards that skip qualification, and `build_stream` writes one line
per resolve, `uri: original declined (<reason>)`, only for a viewer on
Experimental whose plan carries no URI original. No new effect, worker or
global.

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

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The production qualifier answers Unknown(NotOptedIn) for a request that did not
opt in, which is what this test's unarmed port asked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and docs say what is true

Review of #1332:
- A selected embedded subtitle the certificate does not carry (no native track
  for it, or no certified render) is now `SubtitleNotCarried` ("subtitle streams
  keep a play in Standard today; try a file without subtitle streams"), judged
  after the rest of the certificate and before the display path. It was
  `CertificateMismatch`, which told a tester to report a designed refusal. The
  certificate check is the same boolean as before, split into two groups that
  only name which failed; routing is unchanged (still Unknown). The docs'
  subtitle rows now say a file with subtitle streams stays in Standard today and
  the remedy is a file without them; the no-subtitle-selected phrase says so too.
- `QualityOrDirectPlay` names the Direct Play setting in its remedy; `NoPort`
  says "build or boot" (a refused URI driver install leaves no port either).
- docs/uri-mode.md: the plan guards run first, so their rows come first; a play
  that fails over from the URI engine logs the `already tried` line on its
  handoff; the firmware remedy points at the product boot line and the
  `devcaps: firmware= build=` line, not the probe's `armed` line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit e8442d5 into main Nov 11, 2026
19 checks passed
@GLinnik21
GLinnik21 deleted the uri5/decline-reason branch November 11, 2026 12:04
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.

1 participant