Repository navigation
Serialize the quality global in route decision tests to fix a flaky preview assertion - #240
Merged
Merged
Conversation
on_deck_hevc_p5_preview_uses_the_selected_episodes_codec called playback_preview_with_capability_for_test without holding crate::testlock::serial(), unlike its sibling test right above it (the_preview_tells_a_container_remux_apart_from_a_re_encode). That function reads the process-global quality ceiling (quality()) and the plex server registry (client_for), both of which other tests in the suite write while correctly holding the test lock. Without the lock on this test's side, a concurrent test's restore_quality()/set_quality() call could land between (or during) this test's two assertions and flip the computed Preview from DirectPlay to Converts, which is exactly the CI failure signature. Fix the test itself by wrapping it in fresh_registry() + a baseline restore_quality(Original), matching the established convention. Also close the systemic gap: restore_quality and persist_quality_choice were the only crate-global mutators route::decision reaches that did not call testlock::assert_held, so a future test writing this global without the lock would race silently instead of panicking at the offending call site the way every other global mutator already does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
GLinnik21
added a commit
that referenced
this pull request
Sep 25, 2026
#234, #235, #236, #237 and #239 passed on the television on a debug build of 3a30a01, each with the log lines behind it; #238 stays pending (it needs real playback), and #237's new focus-on-Sign-out finding is pending its own fix. Records the second pass's harness results and marks the 0.6.6 -> 0.7.0 in-place upgrade as blocked, with what unblocks it and what was observed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Sep 25, 2026
The note gains the image-subtitle fix, the trailer stop/reporting/redirect behaviour, the art-crop, library-seat and profiles read-out fixes, and a line for nightly users about BACK from the player. The audit records the seven changes as host-verified and pending the device pass, the bundled FFmpeg's new libz.so.1 dependency with its firmware evidence, and the https HLS cross-origin redirect gap as a known follow-up. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Sep 25, 2026
#234, #235, #236, #237 and #239 passed on the television on a debug build of 3a30a01, each with the log lines behind it; #238 stays pending (it needs real playback), and #237's new focus-on-Sign-out finding is pending its own fix. Records the second pass's harness results and marks the 0.6.6 -> 0.7.0 in-place upgrade as blocked, with what unblocks it and what was observed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Sep 25, 2026
…brary firmware gate (#241) * docs: correct two claims #235 and #239 left stale ci/build-ffmpeg.sh: the firmware database fwsym holds spans platform releases 1.2.0 to 11.2.0, not webOS 3 to 10; libz.so.1 is in every image. docs/trailer-ux-plan.md: the deferred just_finished proposal names the preview machine's current transitions, Machine::eos and Machine::stopped, as docs/TODOS.md already does. Co-Authored-By: Claude Opus 5.5 <[email protected]> * 0.7.0 release note and audit: cover #234-#240 The note gains the image-subtitle fix, the trailer stop/reporting/redirect behaviour, the art-crop, library-seat and profiles read-out fixes, and a line for nightly users about BACK from the player. The audit records the seven changes as host-verified and pending the device pass, the bundled FFmpeg's new libz.so.1 dependency with its firmware evidence, and the https HLS cross-origin redirect gap as a known follow-up. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: the audit lint refuses an unfilled placeholder in the authored half Nothing substitutes into a release audit's authored half; gen-release-audit only replaces the generated block, so a __PLACEHOLDER__ left there publishes literally. Watched red on the v0.7.0 audit's __GATES__ row before it was filled; every existing audit and the template pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> * v0.7.0 audit: record the gates run on the release-prep tree Co-Authored-By: Claude Opus 5.5 <[email protected]> * v0.7.0 audit: fold in the second device pass over #234-#240 #234, #235, #236, #237 and #239 passed on the television on a debug build of 3a30a01, each with the log lines behind it; #238 stays pending (it needs real playback), and #237's new focus-on-Sign-out finding is pending its own fix. Records the second pass's harness results and marks the 0.6.6 -> 0.7.0 in-place upgrade as blocked, with what unblocks it and what was observed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * 0.7.0 release note and audit: #242 fixes the device pass's Sign-out focus finding The audit lists #242 among the changes landed after the device pass, host-verified and pending the device, and marks #237's focus-on-Sign-out finding fixed by it. The note's smaller fixes gain the menu-focus line. Co-Authored-By: Claude Opus 5.5 <[email protected]> * v0.7.0 audit: the gate row names the tree rebased onto #242 Co-Authored-By: Claude Opus 5.5 <[email protected]> * 0.7.0 note and audit: scope the trailer and library promises, record the pass's account writes Review findings on #241: - A trailer started with Play Trailer is an ordinary playback (request_play, preview: false) and reports a timeline; only the background preview, full-screen mode included, never reports. - The library DOWN fix holds only when the reader has not moved before the shelves load. - The device-pass summary counts #236 as passed only for shelves-first. - The pass wrote to the Guest profile: the explicit PGS pick's PUT /library/parts selection, and the harness's unscrobble, progress seeds and playback timelines. - The gate row states that every commit after b99e79f is note/audit only and which checks were re-run on the head. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fwcompat: grade the bundled FFmpeg libraries, and put their DT_NEEDED in the audit #235 gave libavformat-plx a DT_NEEDED on libz.so.1, and nothing graded it: the libraries are dlopen'd, webosbrew-ipk-verify grades only the app and service executables, and fwcompat on a bundled library reported every firmware FAIL for the sibling libav*-plx names no firmware carries. tools/fwcompat.py --shipped DIR takes DT_NEEDED names that are files in DIR off the firmware's list and counts what they export as resolved. Watched: bare, libavformat-plx FAILs everywhere on its siblings; with --shipped pkg all three pass from 4.4.2 to 11.2.0; against a copy of the 4.4.2 database with libz removed it FAILs on libz.so.1 (4 symbols) and exits 1. CI's firmware load matrix and the build's fwcompat gate now run it over each bundled library; the build appends the matrix to pkg/ipk-verify.md, which gen-release-audit.py embeds, and gen-release-audit.py lists each bundled library's DT_NEEDED. Review finding on #241: the zlib verdict is now read from the published package instead of typed into the audit. Co-Authored-By: Claude Opus 5.5 <[email protected]> * v0.7.0 audit: the zlib entry defers to the generated half; the gate row names the tooling commits Co-Authored-By: Claude Opus 5.5 <[email protected]> * fwcompat review: row() takes its cells, and --shipped says what it trusts Co-Authored-By: Claude Opus 5.5 <[email protected]> * build-package: the bundled-library matrix goes into ipk-verify.md unfenced gen-release-audit.py already wraps that whole file in one code fence; a nested fence closed it. Only the step summary fences the aligned columns now. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- 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.
Summary
route::decision::resolve_route_tests::on_deck_hevc_p5_preview_uses_the_selected_episodes_codecflaked in CI and under local load, sometimes assertingSome(Converts)whereSome(DirectPlay)was expected.playback_preview_with_capability_for_testreads the process-global playback quality ceiling (QUALITY: AtomicU8inrust-modules/src/route/decision.rs, exposed viaquality()) and the process-global server registry (crate::plex::client_for). This test ran unguarded, so a concurrently-running test on another thread could mutate the quality ceiling between this test's two assertions and flip the observed codec/decision outcome. Its sibling test right above it,the_preview_tells_a_container_remux_apart_from_a_re_encode, already avoided the bug by takingfresh_registry's lock and callingrestore_quality.on_deck_hevc_p5_preview_uses_the_selected_episodes_codecthe samefresh_registry+restore_quality(Quality::Original)guard, and add#[cfg(test)] crate::testlock::assert_held(...)torestore_qualityandpersist_quality_choiceso any future test that mutates the quality global without holdingtestlock::serial()fails deterministically instead of racing silently.Relative to #238
This PR does not contain the loopback-
accept()/WouldBlockfixture fix. That class of flake (macOSaccept()inheriting the listener'sO_NONBLOCK) is already fixed onmainby #238's sharedcrate::testnet::accept()helper (merged at6d0b8e5b), which this branch is rebased on top of. This PR is scoped to only the independent quality-global race.Evidence
make checkon the committed tree — full host suite green (test result: ok).CARGO_INCREMENTAL=0 cargo +nightly check --manifest-path rust-modules/Cargo.toml --lib --no-default-features— clean.codex-companion.mjs --wait --base main --scope branch -m gpt-6-astra) flagged one additional finding:back_dismisses_more_including_the_quality_recovery_variantinscreens/player/overlay_tests.rsalso constructs a More menu viaMoreMenuState::new_quality, which readsquality()unguarded. Verified this is not a realistic flake:initial_selectionandrow_foronly use the value to pick an initial focus row and a "checked" label, both bounded/unwrap_or(0)-safe for anyQualityvalue, and the test's only assertions (handled,reqs.is_empty(),dismissed) are about BACK-key dismissal, which does not depend on which row started focused. No code change made for this finding per "fix only realistic findings."Test plan
make checkon the committed tree (fulltest result: ok)cargo +nightly check --lib --no-default-features🤖 Generated with Claude Code