Skip to content

ui: the press-and-hold card context menu (parity unit 16) - #14

Merged
GLinnik21 merged 1 commit into
mainfrom
unit-16-item-context-menu
Jul 30, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
unit-16-item-context-menu

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Closes docs/parity-gaps.md §1.2 / §1.3 / §5a. There was no item context menu anywhere in the app,
which is why Go-to-Show, per-item Mark-as-Watched and Play-from-Start had nowhere to live. The long
press was already detected and deliberately dropped — press.rs:47 LONG_MS, the
want_commit=false + long=true latch in tick, and is_long/was_long with zero call sites.
This builds the menu on that existing latch.

The short press is unchanged, on purpose. A Continue Watching tile still resumes immediately on
OK by design (the amber play badge is the affordance that says so); home_activate is not touched.
This is the other half of the interaction.

The design (owner-pinned — Apple TV, not Plex)

  • A popover anchored beside the focused card — the card and the rest of the shelf stay in place
    and readable behind it. Not full-screen, not centred, not a sheet.
  • Rounded 20px near-opaque dark panel (the frosted treatment the track menu uses; there is no true
    backdrop blur on the GLES plane) over a 0.34 scrim rather than the in-player panels' 0.58 —
    the shelf staying legible is the whole point of anchoring beside the card.
  • Rows are [leading icon] [label], left-aligned; the focused row is the shared TableView
    selection pill (filled light, rounded, spanning the panel width).
  • A hairline separator groups the navigation actions from the state actions.
  • Rows: Go to Episode · Go to Show — separator — Mark as Watched · Play from Start.

What landed where

File Change
ui/item_menu.rs (new) the screen: Popover + TableView, anchored beside the card, row set adapted per item kind. Like account_menu it only reports an Action — app.rs does the routing, the scrobble and the refresh.
ui/table.rs the two additions the design needs, in the SHARED component per ui/CLAUDE.md: Row::licon (a leading-icon column reusing the slot the active-row checkmark already owns, so an action list and a picker align identically) and Row::separator() (a non-focusable grouping hairline that move_sel / settle_sel / hit_row / set_sections all step over). A second headerless Section cannot do this — it adds air but draws no rule, because the hairline rides the section header. Also PAD_V, so popovers stop re-hardcoding panel_h - 40.0.
ui/icons.rs + assets/icons/ 4 new single-colour masks: episode, show, check-circle, play-start.
ui/home.rs focused_card_rect() — the focused card's rect off the same card_x/eff_scroll/base_y/scale the draw and the pointer hit-test use, so the panel cannot drift off its card.
ui/press.rs comments only. Four of them said the hold menu was a future thing ("until it exists a long press is deliberately a no-op"); they now describe what actually reads the latch.
app.rs Route::ItemMenu + Modal::ItemMenu, the modal key arm, pointer hover/click arms, update/draw, held-key repeat, the route=itemmenu heartbeat tag, open_item_menu, and apply_item_action — one dispatch shared by the key and pointer paths, because that pair has drifted here before.

Behaviour worth reviewing

  • The row set adapts per kind. Episode → Go to Episode + Go to Show; season → Go to Season (a
    season has no page of its own — it is the show page with that season selected); show → Go to Show;
    movie → Go to Movie. Play from Start is leaf-only. A row whose target rk is missing is not
    offered at all, rather than resolving to a blocking fetch for nothing and a blank page.
  • Mark as Watched is a real toggle on a leaf (PmsMovie::unwatched is exactly viewCount == 0,
    off the same container the shelf was built from) and one-way on a show/season, where the same
    field only means "no leaf watched yet" and cannot tell part-watched from finished.
    Follow-up: carrying viewedLeafCount/leafCount on the catalog row — or the watched flag a
    sibling unit is adding to metadata::Episode — makes it a toggle everywhere. The reasoning is
    recorded where the decision is made, not left implicit.
  • After a state action the shelf is refreshed through pms::refetch_hubs_reconcile(), the same
    idiom the detail page's watched toggle and the post-playback refetch use.
  • Nothing is an index. Every Action carries the identity it needs (rk / show rk / season),
    captured at open — a hub refetch can rebuild the catalog underneath an open popover.
  • play_item_now gained from_start: bool rather than a caller-computed resume, so Plex's
    resume rule (metadata::resume_ns, which also refuses to resume the last few percent) stays in
    one place.

Two testing-path repairs that fell out of this

  • /tmp/plxnative-press never actually committed anything. It fires an OK-down with no key-up
    and trusted the lost-key-up net — but that net is MAX_HOLD_MS = 1000 ms, which is past
    LONG_MS = 500, so it latched long and silently did nothing. With this change it would have
    opened the menu instead. It now schedules its own release ~150 ms in, so it is a genuine TAP again
    and is the headless regression net for "a short press still plays immediately".
  • New okdown / okup remote FIFO tokens (app + tools/stream-screen.py's VALID_KEYS).
    Every other token is a tap — the app pushes both key edges back to back — so a press-and-hold
    was not expressible over the FIFO at all.

Also: a /tmp/plxnative-itemmenu boot trigger (retries until the hubs land, so a slow fetch does not
read as "the scene never entered this screen"), --screen itemmenu in tools/tv-session.sh, and an
item-menu UI FPS scene.

Verification

  • make check: 66 passed, 0 failed (58 baseline + 8 new).
  • make (ARM cross-build): green. No new warnings — the 5 emitted are all pre-existing
    (gfx.rs/text.rs static-mut refs, gfx.rs's dead CapChain::out, the neon target-feature).
  • Reviewed by two independent agents (correctness + conventions). Findings addressed: the
    stream-screen.py token allowlist that would have 400'd the new tokens, the four stale press.rs
    comments, SEP_H taken off the theme::space::MD rung instead of being hand-tuned, the missing
    shelf-geometry host test, the focused_card_rect doc that claimed a parity with the draw it does
    not have (it deliberately omits press::scale() — reasoning now recorded), a modal_of comment
    that mis-attributed which code does the work, and the season arm's missing empty-show_rk guard.
    The correctness pass reported no blocking bugs across all five areas it was given.

New host tests — ui/item_menu.rs (7) and ui/home.rs (1):

  1. an episode offers the pinned row set, in order, the separator carrying no action and Go-to-Show
    targeting the SHOW rk + the episode's season;
  2. a watched leaf offers the reverse toggle and no Go-to-Show;
  3. a show has no Play-from-Start and never claims a toggle it cannot compute;
  4. a row whose target is missing is not offered — and a season with no parent gets no leading
    separator either;
  5. the focus walk steps over the separator in both directions and clamps at both ends;
  6. a selection landed on the separator settles onto a real row;
  7. the panel sits beside the card, flips left at the right edge without overlapping its card, and
    never leaves the screen;
  8. (home.rs, under the module's FOCUS mutex) the anchor rect tracks the drawn card through every
    scroll × snap × focus-scale phase.

Device verification: deferred to coordinator

Not run — I never held the TV lock. ./tests/run.py --fps is outstanding and is a real gate
here: this adds a full-screen scrim plus a panel over the live home grid on a fill-bound Mali. The
new item-menu scene is in tests/manifest.json with floor 45, matching the other two
scrim'd-popover scenes (track-menu, library-switch); home-grid alone is 50 and this is strictly
more fill than that. If it measures comfortably above 50, raise the floor.

One boot, one FIFO sequence that proves the whole thing

Use rk=1804 (morning_show, an episode — it is the only kind that shows both navigation rows,
and the harness already resets its viewOffset). Seed it so it is genuinely in Continue Watching:

# put the episode in Continue Watching (any offset past 10s makes it resumable)
curl -s -X POST "http://<PMS>/:/unscrobble?key=1804&identifier=com.plexapp.plugins.library&X-Plex-Token=$TOK"
curl -s -X PUT  "http://<PMS>/:/progress?key=1804&identifier=com.plexapp.plugins.library&time=600000&state=stopped&X-Plex-Token=$TOK"

tools/tv-session.sh up --screen home         # clears triggers, injects the token, asserts route=home
tools/tv-session.sh key down                 # hero -> grid; row 0 is Continue Watching

# --- the hold. okdown/okup are new; each is its own ssh round trip, so the gap is already > LONG_MS
tools/tv-session.sh key okdown
sleep 1
tools/tv-session.sh key okup

tools/tv-session.sh log 'route=itemmenu'     # EXPECT: matching FPS heartbeats -> the popover is up
tools/tv-session.sh shot /tmp/unit-16-menu.png

Judge that capture against docs/parity-gaps.md §5a, not against Plex's sheet. It should show a
~460×305 rounded panel beside the focused card with the shelf still visible behind it, four rows
(Go to Episode / Go to Show / rule / Mark as Watched / Play from Start), a light pill on row
0, and each row's glyph in one aligned leading column. If it reads as a full-screen or centred
sheet, that is a fail.

# --- walk the rows, then Go to Show
tools/tv-session.sh key down                 # -> Go to Show
tools/tv-session.sh key ok
tools/tv-session.sh log 'route=detail'       # EXPECT: matches -> landed on the SHOW page
tools/tv-session.sh shot /tmp/unit-16-show.png

# --- the regression that must NOT have changed: a SHORT press still plays immediately
tools/tv-session.sh key back                 # -> Home, same focused CW tile
tools/tv-session.sh key ok                   # a TAP, not a hold
tools/tv-session.sh log 'route=player'       # EXPECT: matches -> playback started, no menu
tools/tv-session.sh key stop
tools/tv-session.sh down

One extra worth a glance while you are there: DOWN from Go to Show must land on
Mark as Watched, never on the rule
— that is the separator-skip, and it is the one behaviour the
host tests cover but a capture proves.

A headless alternative for the popover alone, no FIFO: tools/tv-session.sh up --screen itemmenu
(the trigger snaps into the grid and opens the menu on the focused card). It cannot exercise the
hold gesture itself — only a live press can — which is exactly why the sequence above is the real
check.

🤖 Generated with Claude Code

https://claude.ai/code/session_018GuSHrq9oydnX7nhKE1Hvc

The long press was detected and deliberately thrown away: press.rs latched
`want_commit=false` + `long=true` at LONG_MS and nothing ever read it —
`is_long` and `was_long` had zero call sites, and app.rs disarmed without
activating. So the app had no item context menu anywhere, and Go-to-Show,
per-item Mark-as-Watched and Play-from-Start had nowhere to live. This builds
the menu on that existing latch rather than a new gesture.

The short press is untouched, on purpose. A Continue Watching tile resumes
immediately on OK by design — the amber play badge on the card is the
affordance that announces it — and `home_activate` is not modified. The hold is
the OTHER half of that interaction, which is the half that was missing.

The reference is Apple TV, not Plex: a popover anchored BESIDE the focused card
so the card and the rest of the shelf stay where they are and stay readable
behind it, over a 0.34 scrim rather than the in-player panels' 0.58. Not a
full-screen sheet, not centred. Rows are `[icon] [label]`, the focused one is
the same light pill `table.rs` already slides between rows, and a hairline
separator groups the navigation actions from the state actions.

Both things that separator needed went into the SHARED table, per ui/CLAUDE.md,
not into the screen: `Row::licon` reuses the column the active-row checkmark
already owns, so an action list and a picker align their labels identically, and
`Row::separator()` is a row that `move_sel`/`settle_sel`/`hit_row`/
`set_sections` all refuse to focus. A second headerless Section cannot do this
job — it adds air but draws no rule, because the hairline rides the header.

The menu only REPORTS an Action, like account_menu; app.rs's `apply_item_action`
does the routing, the scrobble and the hub refresh, and it is one dispatch for
both the key and the pointer paths because that pair has drifted here before.
Nothing an Action carries is an index: a hub refetch can rebuild the catalog
underneath an open popover, so every variant carries the rk it needs, captured
at open.

Two testing-path repairs fell out of it. /tmp/plxnative-press never actually
committed anything — it fires an OK-down with no key-up and trusted the
lost-key-up net, but that net is MAX_HOLD_MS (1000ms), PAST LONG_MS (500), so it
latched long and silently did nothing; with this change it would have opened the
menu instead. It now schedules its own release, so it is a real tap again and is
the headless regression net for "a short press still plays". And `okdown`/`okup`
join the remote FIFO, because every other token pushes both key edges at once —
a press-and-hold was not expressible over it at all.

Mark-as-Watched is an exact toggle on a leaf (PmsMovie::unwatched IS
viewCount == 0) and one-way on a show/season, where the same field only means
"no leaf watched yet" and cannot tell part-watched from finished. Carrying
viewedLeafCount/leafCount on the catalog row makes it a toggle everywhere; noted
where the decision is made rather than guessed at the call site.

Tests: +8 host (66)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018GuSHrq9oydnX7nhKE1Hvc
Copilot AI review requested due to automatic review settings July 29, 2026 18:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@GLinnik21
GLinnik21 merged commit fdf1f8d into main Jul 30, 2026
@GLinnik21
GLinnik21 deleted the unit-16-item-context-menu branch August 2, 2026 18:37
GLinnik21 added a commit that referenced this pull request Aug 3, 2026
Detail's below-hero sections were a flat draw() that computed each section's
absolute Y with section_y(), applied translate(-scroll), and culled each with a
visible() closure. They now compose through the shared retui ScrollColumn
container (impl Column for DetailView): child_top replaces section_y as the SOLE
below-hero Y source (section_y deleted), ScrollColumn::draw owns the scroll + the
on_axis off-screen cull, and each draw_* draws local-coord (section_y(N) -> 0.0)
under a painter the container pre-translates to the child origin. DetailView's
scroll: Spring became column: ScrollColumn.

So detail is now a container-composed screen sharing the SAME scroll/cull/hero
infra as home, not a bespoke flat dispatcher. Parity is provable: child_top(i)
equals the old section_y(s[i+1]) term-for-term on both movie ([0,3,4,5]) and show
([0,1,2,3,4,5]) layouts (incl. the tabs->episodes TAB_EP_GAP hug); scroll_target
via lift_target matches; the one theoretical scroll divergence (anchor absent) is
unreachable (episodes only ever populate from a season).

Deliberately LIGHTER than the design's full 8.4: sections stay free draw_* fns and
the springs (card_scale/ep_hscroll/related) stay on DetailView rather than being
promoted to per-section Views owning their springs — this keeps invariant #14
untouched and avoids reflow/spring-relocation risk for marginal gain. Home is NOT
forced into ScrollColumn (its fixed-pitch grid is not a document flow); it shares
only the two leaf primitives from 8.3.

Adversarially reviewed for reflow/cull/scroll/borrow/#14 parity (all sound, no
regression). Docs updated (ui/CLAUDE.md + ui-viewtree-plan.md Step 8 + new stop
condition). Build green. On-device profiler/FPS/capture verification PENDING (TV
busy). View-tree migration complete through Step 8.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Kcauj6zm932EtcdTTtW998
GLinnik21 added a commit that referenced this pull request Aug 23, 2026
…, and a proxy that can be slow

Three checklist items were unanswerable for three different reasons, and none of
them was a defect in the app.

**#50/#51 — resolution x codec.** The item is graded as a MATRIX and this repo
could only answer it as "pieces are covered": every pipeline fixture was 1080p
except one 4K HEVC, so SD and HD had never been played AT ALL, and 4K H.264
existed in neither pack — which is a fact about the maintainer's library (every
4K item there is HEVC or AV1) rather than about the player. Six new generated
clips complete the grid: SD 720x480 / HD 1280x720 / FHD 1920x1080 / UHD 3840x2160
x {h264, hevc}, with ONE audio codec per column so a row-to-row difference is the
raster and nothing else. Each of the eight cells now grades `expect.video_size`,
an EXACT WxH out of the `ff:` line, because `min_video_width` cannot tell 720x480
from 720x576 and a matrix answered with "at least 1900 wide" is the answer the
item is asking us to stop giving.

Four decisions in the matrix look arbitrary and are argued where they live
(`PIPE_SHAPES`' block comment): square pixels at 720x480 (an anamorphic fixture
would grade PAR handling, an axis with no assertion behind it anywhere here);
CRF held constant is constant QUALITY, not bitrate, so 4K H.264 is crf 26 and not
its 1080p sibling's 20 — the same CRF measures ~30 Mbit/s up there, a
quarter-gigabyte clip in service of no assertion; SDR 8-bit throughout, which
makes the UHD/HEVC cell the odd one out because it is the existing HDR10 fixture,
already device-verified; and E-AC-3 down the HEVC column, which is also the
better false-PASS defence, since `engine`'s `_ =>` arm can only ever produce
"AC3".

**#46 — replay after completion.** Its FIRST half now runs: `pipe_finish_eos`
plays a deliberately short 20 s clip to its end and asserts `EOS reached ...
-> ended` followed by `stop_bufferfeed: torn down`, in that order. Ordered
because every stop tears the engine down — the harness's own close included — and
searched forward from the EOS rather than compared against the first teardown in
the log, because `teardown` writes the same line for a `for_reload` stop, which
would fail the case for its whole cap with the evidence reading "the player froze
on the last frame". This is the only case in either tier that is SUPPOSED to run
out, so it gets its own fixture that nothing else may name (everything else is
sized so it cannot hit EOF mid-window, trap 9's second half), and
`_resolve_fixtures` grew the opposite duration bound: it SKIPS when the clip is
longer than 0.6x the cap, so a `--secs`-regenerated pack skips rather than failing
as a frozen player.

The SECOND half — starting the same content again — is NOT closed, and it is an
app gap rather than a test gap. `plxnative-playurl` is read behind `app.rs`'s
one-shot `auto_tried` latch, so a boot gets exactly one playback; on EOS
`finish_playback` -> `exit_player` leaves the player, and with no Plex session
there is no detail page, no Play control and no key path back in. The manifest
case carries a `_replay_note` naming the small app-side change that would close
it (`engine::start_bufferfeed` already re-reads `dev::playurl()` whenever
`route::url()` is empty), and `docs/lg-self-checklist.md` still marks the replay
half untested.

**#43 CASE1 and #14 — `tools/netcond.py` gains `rate:<kbps>`.** The proxy could
make the server dead in four ways and slow in none, so CASE1's own legs (512 Kbps
-> 1 Mbps -> 7 Mbps -> 17.5 Mbps) could not be PRODUCED and #14's degrading link
was anecdote. One token bucket for the whole proxy, because `rate:` names a link
and a link is shared; decimal kilobits, because that is the unit the item states
its legs in; empty at the start, because a full bucket hands the first
quarter-second a free burst and that is most of a short transfer; live under an
open connection, so one scripted run covers all four legs instead of four
launches. Measured through the real proxy: 512 -> 496 kbps, 2000 -> 2000,
17500 -> 17518.

Two pre-existing bugs surfaced in the code it touches, both fixed:

* **The mode SCOPE was honoured only at accept.** `serve_conn` consulted the
  scope-aware `applies()` and then handed `relay` a bare `Mode.split`, which
  discards it — so `stall@/:/timeline` really froze every open connection
  including the media stream, i.e. the exact opposite of what the scope exists
  for. Both docs claimed the working behaviour. `relay` now takes the
  connection's own first bytes.
* **The read poll's socket timeout was also the other direction's WRITE
  timeout.** Both relay threads share one pair of sockets, so `src.settimeout(0.5)`
  set the timeout on the other thread's `dst`; `sendall` on a timed-out socket
  raises having written an unspecified number of bytes, the `except OSError`
  swallowed it, and the stream truncated silently — reachable in exactly the
  situation the proxy exists to measure. The poll moved to `select` and both
  sockets are put back to blocking before relaying.

`--selftest` proves the shaper against a loopback transfer with no television in
the room, in its own temp control file so it cannot release the mode under a live
experiment.

**What this costs and what it does not prove.** The pipeline pack goes from ~0.4
to ~0.7 GB (the 4K H.264 clip is 93 MB of that) and from 8 clips to 15; resolution
is a property of the media, so a matrix cell cannot be a second case on an
existing file. Everything here is generated, so what none of it reaches is a PMS
DECISION on any of these shapes — `library_gaps` says so per entry. While
correcting those entries: `8-bit-hevc` was ALREADY covered by
`pipe_hevc_aac_mp4` (no `hdr` key, so Main / yuv420p) and the gap list had not
caught up; only `4k-h264` is newly closed.

Host-verified only — this lane has no television. `make check` is green (976 Rust
+ 47 harness tests, the harness suite now including the netcond shaper against
real loopback sockets), every fixture verifies under `make_fixtures.py`'s own
ffprobe checks, and `serve_fixtures.py` answers 206/416 with a byte-exact tail
for each new clip. The device run is the integrator's; the recipe is in the PR.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G
GLinnik21 added a commit that referenced this pull request Aug 23, 2026
…, and a proxy that can be slow (#59)

* tests: the resolution matrix LG asks for, a clip that is meant to end, and a proxy that can be slow

Three checklist items were unanswerable for three different reasons, and none of
them was a defect in the app.

**#50/#51 — resolution x codec.** The item is graded as a MATRIX and this repo
could only answer it as "pieces are covered": every pipeline fixture was 1080p
except one 4K HEVC, so SD and HD had never been played AT ALL, and 4K H.264
existed in neither pack — which is a fact about the maintainer's library (every
4K item there is HEVC or AV1) rather than about the player. Six new generated
clips complete the grid: SD 720x480 / HD 1280x720 / FHD 1920x1080 / UHD 3840x2160
x {h264, hevc}, with ONE audio codec per column so a row-to-row difference is the
raster and nothing else. Each of the eight cells now grades `expect.video_size`,
an EXACT WxH out of the `ff:` line, because `min_video_width` cannot tell 720x480
from 720x576 and a matrix answered with "at least 1900 wide" is the answer the
item is asking us to stop giving.

Four decisions in the matrix look arbitrary and are argued where they live
(`PIPE_SHAPES`' block comment): square pixels at 720x480 (an anamorphic fixture
would grade PAR handling, an axis with no assertion behind it anywhere here);
CRF held constant is constant QUALITY, not bitrate, so 4K H.264 is crf 26 and not
its 1080p sibling's 20 — the same CRF measures ~30 Mbit/s up there, a
quarter-gigabyte clip in service of no assertion; SDR 8-bit throughout, which
makes the UHD/HEVC cell the odd one out because it is the existing HDR10 fixture,
already device-verified; and E-AC-3 down the HEVC column, which is also the
better false-PASS defence, since `engine`'s `_ =>` arm can only ever produce
"AC3".

**#46 — replay after completion.** Its FIRST half now runs: `pipe_finish_eos`
plays a deliberately short 20 s clip to its end and asserts `EOS reached ...
-> ended` followed by `stop_bufferfeed: torn down`, in that order. Ordered
because every stop tears the engine down — the harness's own close included — and
searched forward from the EOS rather than compared against the first teardown in
the log, because `teardown` writes the same line for a `for_reload` stop, which
would fail the case for its whole cap with the evidence reading "the player froze
on the last frame". This is the only case in either tier that is SUPPOSED to run
out, so it gets its own fixture that nothing else may name (everything else is
sized so it cannot hit EOF mid-window, trap 9's second half), and
`_resolve_fixtures` grew the opposite duration bound: it SKIPS when the clip is
longer than 0.6x the cap, so a `--secs`-regenerated pack skips rather than failing
as a frozen player.

The SECOND half — starting the same content again — is NOT closed, and it is an
app gap rather than a test gap. `plxnative-playurl` is read behind `app.rs`'s
one-shot `auto_tried` latch, so a boot gets exactly one playback; on EOS
`finish_playback` -> `exit_player` leaves the player, and with no Plex session
there is no detail page, no Play control and no key path back in. The manifest
case carries a `_replay_note` naming the small app-side change that would close
it (`engine::start_bufferfeed` already re-reads `dev::playurl()` whenever
`route::url()` is empty), and `docs/lg-self-checklist.md` still marks the replay
half untested.

**#43 CASE1 and #14 — `tools/netcond.py` gains `rate:<kbps>`.** The proxy could
make the server dead in four ways and slow in none, so CASE1's own legs (512 Kbps
-> 1 Mbps -> 7 Mbps -> 17.5 Mbps) could not be PRODUCED and #14's degrading link
was anecdote. One token bucket for the whole proxy, because `rate:` names a link
and a link is shared; decimal kilobits, because that is the unit the item states
its legs in; empty at the start, because a full bucket hands the first
quarter-second a free burst and that is most of a short transfer; live under an
open connection, so one scripted run covers all four legs instead of four
launches. Measured through the real proxy: 512 -> 496 kbps, 2000 -> 2000,
17500 -> 17518.

Two pre-existing bugs surfaced in the code it touches, both fixed:

* **The mode SCOPE was honoured only at accept.** `serve_conn` consulted the
  scope-aware `applies()` and then handed `relay` a bare `Mode.split`, which
  discards it — so `stall@/:/timeline` really froze every open connection
  including the media stream, i.e. the exact opposite of what the scope exists
  for. Both docs claimed the working behaviour. `relay` now takes the
  connection's own first bytes.
* **The read poll's socket timeout was also the other direction's WRITE
  timeout.** Both relay threads share one pair of sockets, so `src.settimeout(0.5)`
  set the timeout on the other thread's `dst`; `sendall` on a timed-out socket
  raises having written an unspecified number of bytes, the `except OSError`
  swallowed it, and the stream truncated silently — reachable in exactly the
  situation the proxy exists to measure. The poll moved to `select` and both
  sockets are put back to blocking before relaying.

`--selftest` proves the shaper against a loopback transfer with no television in
the room, in its own temp control file so it cannot release the mode under a live
experiment.

**What this costs and what it does not prove.** The pipeline pack goes from ~0.4
to ~0.7 GB (the 4K H.264 clip is 93 MB of that) and from 8 clips to 15; resolution
is a property of the media, so a matrix cell cannot be a second case on an
existing file. Everything here is generated, so what none of it reaches is a PMS
DECISION on any of these shapes — `library_gaps` says so per entry. While
correcting those entries: `8-bit-hevc` was ALREADY covered by
`pipe_hevc_aac_mp4` (no `hdr` key, so Main / yuv420p) and the gap list had not
caught up; only `4k-h264` is newly closed.

Host-verified only — this lane has no television. `make check` is green (976 Rust
+ 47 harness tests, the harness suite now including the netcond shaper against
real loopback sockets), every fixture verifies under `make_fixtures.py`'s own
ffprobe checks, and `serve_fixtures.py` answers 206/416 with a byte-exact tail
for each new clip. The device run is the integrator's; the recipe is in the PR.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* docs: the which-tier skill still said the synthetic tier was twelve cases

It is 19 as of this branch, and the number in that sentence was going to rot
again — the same way the host test count in CLAUDE.md rotted three times — so it
now points at `./tests/run.py --list` instead of restating a census.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* docs: five sentences this branch made false, one of them mine twice over

`doc-claim-auditor` over the branch. All five are contradictions, not omissions.

**The one that matters, because it is the skill whose whole subject is this
error.** `which-tier` opens by warning against "reading a bare `./tests/run.py`
as the suite it used to be" — and its pasteable `sh` block still said **12
synthetic cases**. Worse, 8ede10e fixed the identical number in that file's
PROSE two paragraphs above and left the two copies in the code block, i.e. the
half a reader copies. The file contradicted itself inside one commit. Both counts
are gone; the block now points at `--list`, which it already named two lines down,
and says why a second copy of the number does not survive here.

**`tests/fixtures/README.md` listed two gaps as unbuilt that this script builds.**
Its `library_gaps` summary still named `8-bit HEVC` and `4K H.264` — while
`manifest.json`, rewritten in the same commit, says 4K H.264 is closed by
`pipe_res_h264_uhd` and 8-bit HEVC has been covered since `pipe_hevc_aac_mp4`
landed (no `hdr` key, so `-profile:v main` / yuv420p). A reader of that page goes
off to author media that already exists. Both cut, with what a generated clip
still cannot close said plainly: a PMS DECISION on such an item.

Same sentence, pre-existing and one word: it named **`plxnative-url`** as the
trigger these are fed through. `tests/README.md` says the opposite and is right —
`plxnative-playurl` is the one carrying the DECLARATION, and several remaining
gaps (HLG, HDR10+) are *about* what the payload declares.

**Trap 9 was falsified by this branch's own fixture, 260 lines below it.** "Nothing
is ever shorter than 60 s" is now false: `pipe_h264_ac3_short` is 20 s because
ENDING is what it grades, and `_resolve_fixtures` enforces the opposite bound for
it. The new shape's comment cited "trap 9's second half" as the rule it breaks;
trap 9 itself was never told, and neither was `PIPE_SHAPES`' header, which still
said the only length constraint left was "do not hit EOF". Both now carry both
bounds, and say that adding a second short clip means picking a side.

**`_probe_fixture`'s "three of the twelve" was never right.** It is four fixtures
carrying two cases each, and it was four of twelve on `main` too — a count that
was wrong before the denominator moved. Replaced with the property (a seek case
beside its play case; an audio-lane pair), which is true at any number.

**`docs/lg-self-checklist.md` was dated the day before its own newest content** —
"Status taken 2026-08-22" above four entries that name 2026-08-23. Bumped, and the
line now says to bump it in the same edit as any row, since it is the only sentence
in that file nothing else restates.

Rejected and recorded so the next run does not re-derive them: the Makefile's
"~0.5s" harness-suite note (measured 1.22 s, hedged with a tilde AND an explicit
"measure before budgeting", subprocess count unchanged); `README.md:176`'s "two
gitignored files", false since 072a60e and not this branch's; and four notes
recording the 6974 ms reporter-join measurement taken while netcond's scope was
broken — they assert the park and the mechanism, not that the media stream kept
flowing, so none is contradicted. Two more (`async-model-decision.md:399`,
`ui/library.rs:171`) described scoping as working per-request and were FALSE until
this branch fixed `relay`; they are true again.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* player: a finished stream can be started again, and #46 gets both halves

The replay half of LG App Self Checklist #46 was the one thing my last PR could
not reach from `tests/`, and the reason was six lines in `app.rs`: the synthetic
tier's only entry into the player is `plxnative-playurl`, read behind a one-shot
`auto_tried` latch, so a boot got exactly one playback. On EOS `finish_playback`
→ `exit_player` leaves the player, and with no Plex session there is no detail
page, no Play control and no key path back in.

Everything else was already in place, which is why the change is small:
`teardown` clears the URL and the `ended` flag on a real stop, and
`engine::start_bufferfeed` re-reads `dev::playurl()` whenever `route::url()` is
empty. So a replay is a second trip through the entry the boot already used.

**A COUNTER re-arming the latch, not a lifted latch.** `auto_tried` also guards
the `autoplay`+`playidx` arm, which does a `request_play_movie` +
`load_detail_now` — an unconditionally re-armable latch would re-fetch a catalog
item on every player exit and loop a REAL playback forever.
`/tmp/plxnative-replay[=N]` is bounded, opt-in, read once at boot (so no file
appearing mid-run can turn it into a loop), gated on `playurl` being armed, and
declines when `finish_playback` handed off to Up Next instead — an auto-advance
chain returns to the player, and that is exactly what the route check tells
apart. An absent file is 0, so every existing boot is byte-identical.
`dev::flag`/`dev::read` are `false`/`None` at COMPILE time without `devtriggers`,
so a release build has no replay arm at all; both feature sets type-check.

`replay_budget` is split out and host-tested for `note_global_press`'s reason one
step removed: the call site is inside the SDL event loop where no host test can
reach, and this half touches no SDL. It matters more than it looks, because every
value it can return is plausible and a misparse is invisible on the panel — 0
reads as "the replay arm is missing from this binary" and 2 reads as a loop.

**The two hazards in the lanes that landed in this file since I last read it are
both safe by construction, and I checked rather than assumed.** b6's
unconsumed-press invariant lives in `note_global_press`, and this change is
nowhere near key dispatch — it adds no press path and no global side effect. b7's
recorder cannot write a bogus record for a synthetic playback either:
`coldstart_place` answers `Route::Player` from `metadata::playing()`, which is
installed ONLY by `route::apply_plan` (the PMS decision path), so a URL-fed
session has no playing item and records nothing — before this change or after it.
A replay also re-enters on the next frame, so the 800 ms post-exit hub refresh
never fires between the two viewings.

**The case.** `pipe_replay_after_eos` plays the same 20 s clip, lets it end, and
starts it again. `expect.replays` is one statement, not two: the harness writes it
into the trigger AND `a_replayed` counts it, so the number the app is told cannot
drift from the number that is graded. Three signals, each worthless alone — the
`replay:` line exactly N times (counted, because more often than asked is a loop
and a loop satisfies everything else); at least N+1 `load:` lines, since
`start_bufferfeed` writes one per SESSION and `teardown` cleared the URL, so a
second line is what says the declaration was really re-read; and a media position
that FALLS and then climbs, which is the only thing separating a restart from a
session that carried on. `server_opens_min: 2` is the wire-side half no log line
can give: the second viewing has to fetch the clip again.

`_resolve_fixtures`' EOS bound becomes per VIEWING (`dur * (1 + replays)`), so a
`--secs`-regenerated pack skips this case instead of failing it as a missing
feature. `pipe_finish_eos` stays separate and grades the finish alone: "never
ends" and "ends and cannot be restarted" are different failures, and one case
would report either as the other.

**Two prose corrections this branch's netcond findings force, both about the same
sentence.** The root `CLAUDE.md` describes scoping — "`stall@/:/timeline` freezes
the progress reporter while video keeps streaming, which is what makes a clean
experiment possible" — as a working feature. It was FALSE for as long as it
existed, because `relay` took a scope-less `Mode.split`; it became true on
2026-08-23. Said so at the sentence rather than three sentences later.

And the **6974 ms** measurement cited beside it was taken under that broken
instrument, so the proxy was stalling every connection and not only the
reporter's. **The number and the conclusion both survive, and the mechanism is
worth recording rather than re-deriving:** it was logged as `THREADJOIN timeline
6974ms` — `task::join` emits one NAMED line per join, so the attribution came
from the instrument and not from inferring a total — and `timeline` is the only
join that COULD have parked whatever else was stalled, because `engine::teardown`
step 1 deliberately wakes the other two before joining them (`http_shutdown` on
the demux socket, `aq_abort` on both AU lanes) while the reporter's POST had no
such wake. Before and after were taken the same way, so the 14x is
apples-to-apples. What CANNOT be claimed from that session is that video kept
streaming while the reporter was frozen — a property of the tool today, not of
that run. Recorded in `CLAUDE.md`, `threads.rs` and `engine.rs`, all three of
which carried the number.

Host-verified: `make check` green — 1069 Rust tests (1066 on main + 3 new) and 51
harness tests — and `--no-default-features` type-checks. No television: the device
run is the integrator's.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* tests: the replay count is a third exception to the early-exit rule, and says so

`stream_case`'s soundness note names exactly two ABSENCE checks that early exit
cannot see, and asks that a third be REASONED ABOUT rather than added. `a_replayed`
is a third of the same shape: it grades an EQUALITY (exactly N `replay:` lines,
because more than N is a loop), and an equality can pass at N and fail at N+1.

What it cannot see, stated rather than left to be discovered: an app replaying
forever fires its next `replay:` line only after another full viewing — ~20 s on
the short clip — while the case satisfies everything else at ~28 s, so an early
exit two seconds later stops before the evidence arrives.

Not closed by making this one case burn its whole 100 s cap. That is ~1.5 min on
every suite run to guard three lines whose bound is ALREADY gradeable by `make
check`: `replay_left` is decremented before each re-arm, and `replay_budget`'s
parsing has host tests. `--no-early` is how to go looking for a loop deliberately,
and the trade is worth re-taking only if that app-side bound moves.

Also: `docs/ux-scenario.md`'s #46 row pointed at the checklist "where it is listed
as untested", which stopped being true one commit ago. It now points at the case.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* tests: the replay assertion passed on a replay that never played, and three notes it made false

`/code-review` on the replay work, five findings, all mine, all fixed.

**The one that mattered: `a_replayed` was a false PASS in the ordering the field
will actually produce.** It measured the post-drop climb from the GLOBAL floor —
and a floor is a VALUE, so it only lands in viewing 2 when viewing 2 happens to
reach viewing 1's minimum. The `pos=` heartbeat is 1 Hz and free-running, so
viewing 1 logging `pos=0s` while viewing 2's first sample lands at `pos=1s` puts
the anchor back in viewing 1 and measures VIEWING 1'S OWN CLIMB. Reproduced
against the real function: `[0,5,10,19,1]` read as "fell 18s then climbed 19s" and
PASSED with the second viewing having produced one sample and zero seconds of
playback — defeating near-miss (e) in its own docstring, "restarted and then
stalled at the join".

Worse than a corner: the harness exits the moment every assertion passes, so that
is the state it would NORMALLY have graded. My own near-miss test passed only
because its series starts at 2 rather than 0 — exactly the accident a regression
test is for, and there is now one carrying the counterexample verbatim.

The climb is anchored at the index of the deepest DROP, which the loop computing
`drop` already had in hand.

Four more, each a sentence this branch itself made false:

* `a_finished`'s docstring still said the replay half "is unreachable from this
  tier today and it is an app gap, not a test gap … exactly one playback per boot
  and no key path back into the player" — contradicted by the `a_replayed` fifty
  lines below it, by `/tmp/plxnative-replay`, and by `pipe_replay_after_eos`, all
  added in the same change. It now points at them and says why the two cases stay
  apart.
* `_eof_note`, `make_fixtures.py` trap 9, the `pipe_h264_ac3_short` shape comment
  and `tests/README.md` all said `pipe_finish_eos` was the ONLY case allowed to
  reach EOF and the only one allowed to name that fixture. Two cases do both now.
  The rule was never "one case" anyway — it is "a case graded through a teardown
  has to have declared `reaches_eos`", which is what the unit test was deliberately
  loosened to, so the prose was the last thing still asserting the old form.
* `CLAUDE.md` and the `which-tier` skill both said "19 cases as of 2026-08-23".
  The manifest holds 20. **That count rotted inside the branch that wrote it, one
  commit after that same branch corrected the previous stale copy of it.** Both are
  now the pointer to `--list` rather than a fourth number waiting to go stale.
* `NetcondRate.setUp` leaked a `mkdtemp` per test — six `/tmp` directories per
  `make check`, on the command run most often. `addCleanup(shutil.rmtree)`, like
  every other temp use in that file. Verified: no new directories after a run.

`make check` green — 1069 Rust, 52 harness.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
GLinnik21 added a commit that referenced this pull request Aug 26, 2026
Detail's below-hero sections were a flat draw() that computed each section's
absolute Y with section_y(), applied translate(-scroll), and culled each with a
visible() closure. They now compose through the shared retui ScrollColumn
container (impl Column for DetailView): child_top replaces section_y as the SOLE
below-hero Y source (section_y deleted), ScrollColumn::draw owns the scroll + the
on_axis off-screen cull, and each draw_* draws local-coord (section_y(N) -> 0.0)
under a painter the container pre-translates to the child origin. DetailView's
scroll: Spring became column: ScrollColumn.

So detail is now a container-composed screen sharing the SAME scroll/cull/hero
infra as home, not a bespoke flat dispatcher. Parity is provable: child_top(i)
equals the old section_y(s[i+1]) term-for-term on both movie ([0,3,4,5]) and show
([0,1,2,3,4,5]) layouts (incl. the tabs->episodes TAB_EP_GAP hug); scroll_target
via lift_target matches; the one theoretical scroll divergence (anchor absent) is
unreachable (episodes only ever populate from a season).

Deliberately LIGHTER than the design's full 8.4: sections stay free draw_* fns and
the springs (card_scale/ep_hscroll/related) stay on DetailView rather than being
promoted to per-section Views owning their springs — this keeps invariant #14
untouched and avoids reflow/spring-relocation risk for marginal gain. Home is NOT
forced into ScrollColumn (its fixed-pitch grid is not a document flow); it shares
only the two leaf primitives from 8.3.

Adversarially reviewed for reflow/cull/scroll/borrow/#14 parity (all sound, no
regression). Docs updated (ui/CLAUDE.md + ui-viewtree-plan.md Step 8 + new stop
condition). Build green. On-device profiler/FPS/capture verification PENDING (TV
busy). View-tree migration complete through Step 8.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Kcauj6zm932EtcdTTtW998
GLinnik21 added a commit that referenced this pull request Aug 26, 2026
…, and a proxy that can be slow (#59)

* tests: the resolution matrix LG asks for, a clip that is meant to end, and a proxy that can be slow

Three checklist items were unanswerable for three different reasons, and none of
them was a defect in the app.

**#50/#51 — resolution x codec.** The item is graded as a MATRIX and this repo
could only answer it as "pieces are covered": every pipeline fixture was 1080p
except one 4K HEVC, so SD and HD had never been played AT ALL, and 4K H.264
existed in neither pack — which is a fact about the maintainer's library (every
4K item there is HEVC or AV1) rather than about the player. Six new generated
clips complete the grid: SD 720x480 / HD 1280x720 / FHD 1920x1080 / UHD 3840x2160
x {h264, hevc}, with ONE audio codec per column so a row-to-row difference is the
raster and nothing else. Each of the eight cells now grades `expect.video_size`,
an EXACT WxH out of the `ff:` line, because `min_video_width` cannot tell 720x480
from 720x576 and a matrix answered with "at least 1900 wide" is the answer the
item is asking us to stop giving.

Four decisions in the matrix look arbitrary and are argued where they live
(`PIPE_SHAPES`' block comment): square pixels at 720x480 (an anamorphic fixture
would grade PAR handling, an axis with no assertion behind it anywhere here);
CRF held constant is constant QUALITY, not bitrate, so 4K H.264 is crf 26 and not
its 1080p sibling's 20 — the same CRF measures ~30 Mbit/s up there, a
quarter-gigabyte clip in service of no assertion; SDR 8-bit throughout, which
makes the UHD/HEVC cell the odd one out because it is the existing HDR10 fixture,
already device-verified; and E-AC-3 down the HEVC column, which is also the
better false-PASS defence, since `engine`'s `_ =>` arm can only ever produce
"AC3".

**#46 — replay after completion.** Its FIRST half now runs: `pipe_finish_eos`
plays a deliberately short 20 s clip to its end and asserts `EOS reached ...
-> ended` followed by `stop_bufferfeed: torn down`, in that order. Ordered
because every stop tears the engine down — the harness's own close included — and
searched forward from the EOS rather than compared against the first teardown in
the log, because `teardown` writes the same line for a `for_reload` stop, which
would fail the case for its whole cap with the evidence reading "the player froze
on the last frame". This is the only case in either tier that is SUPPOSED to run
out, so it gets its own fixture that nothing else may name (everything else is
sized so it cannot hit EOF mid-window, trap 9's second half), and
`_resolve_fixtures` grew the opposite duration bound: it SKIPS when the clip is
longer than 0.6x the cap, so a `--secs`-regenerated pack skips rather than failing
as a frozen player.

The SECOND half — starting the same content again — is NOT closed, and it is an
app gap rather than a test gap. `plxnative-playurl` is read behind `app.rs`'s
one-shot `auto_tried` latch, so a boot gets exactly one playback; on EOS
`finish_playback` -> `exit_player` leaves the player, and with no Plex session
there is no detail page, no Play control and no key path back in. The manifest
case carries a `_replay_note` naming the small app-side change that would close
it (`engine::start_bufferfeed` already re-reads `dev::playurl()` whenever
`route::url()` is empty), and `docs/lg-self-checklist.md` still marks the replay
half untested.

**#43 CASE1 and #14 — `tools/netcond.py` gains `rate:<kbps>`.** The proxy could
make the server dead in four ways and slow in none, so CASE1's own legs (512 Kbps
-> 1 Mbps -> 7 Mbps -> 17.5 Mbps) could not be PRODUCED and #14's degrading link
was anecdote. One token bucket for the whole proxy, because `rate:` names a link
and a link is shared; decimal kilobits, because that is the unit the item states
its legs in; empty at the start, because a full bucket hands the first
quarter-second a free burst and that is most of a short transfer; live under an
open connection, so one scripted run covers all four legs instead of four
launches. Measured through the real proxy: 512 -> 496 kbps, 2000 -> 2000,
17500 -> 17518.

Two pre-existing bugs surfaced in the code it touches, both fixed:

* **The mode SCOPE was honoured only at accept.** `serve_conn` consulted the
  scope-aware `applies()` and then handed `relay` a bare `Mode.split`, which
  discards it — so `stall@/:/timeline` really froze every open connection
  including the media stream, i.e. the exact opposite of what the scope exists
  for. Both docs claimed the working behaviour. `relay` now takes the
  connection's own first bytes.
* **The read poll's socket timeout was also the other direction's WRITE
  timeout.** Both relay threads share one pair of sockets, so `src.settimeout(0.5)`
  set the timeout on the other thread's `dst`; `sendall` on a timed-out socket
  raises having written an unspecified number of bytes, the `except OSError`
  swallowed it, and the stream truncated silently — reachable in exactly the
  situation the proxy exists to measure. The poll moved to `select` and both
  sockets are put back to blocking before relaying.

`--selftest` proves the shaper against a loopback transfer with no television in
the room, in its own temp control file so it cannot release the mode under a live
experiment.

**What this costs and what it does not prove.** The pipeline pack goes from ~0.4
to ~0.7 GB (the 4K H.264 clip is 93 MB of that) and from 8 clips to 15; resolution
is a property of the media, so a matrix cell cannot be a second case on an
existing file. Everything here is generated, so what none of it reaches is a PMS
DECISION on any of these shapes — `library_gaps` says so per entry. While
correcting those entries: `8-bit-hevc` was ALREADY covered by
`pipe_hevc_aac_mp4` (no `hdr` key, so Main / yuv420p) and the gap list had not
caught up; only `4k-h264` is newly closed.

Host-verified only — this lane has no television. `make check` is green (976 Rust
+ 47 harness tests, the harness suite now including the netcond shaper against
real loopback sockets), every fixture verifies under `make_fixtures.py`'s own
ffprobe checks, and `serve_fixtures.py` answers 206/416 with a byte-exact tail
for each new clip. The device run is the integrator's; the recipe is in the PR.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* docs: the which-tier skill still said the synthetic tier was twelve cases

It is 19 as of this branch, and the number in that sentence was going to rot
again — the same way the host test count in CLAUDE.md rotted three times — so it
now points at `./tests/run.py --list` instead of restating a census.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* docs: five sentences this branch made false, one of them mine twice over

`doc-claim-auditor` over the branch. All five are contradictions, not omissions.

**The one that matters, because it is the skill whose whole subject is this
error.** `which-tier` opens by warning against "reading a bare `./tests/run.py`
as the suite it used to be" — and its pasteable `sh` block still said **12
synthetic cases**. Worse, 8ede10e fixed the identical number in that file's
PROSE two paragraphs above and left the two copies in the code block, i.e. the
half a reader copies. The file contradicted itself inside one commit. Both counts
are gone; the block now points at `--list`, which it already named two lines down,
and says why a second copy of the number does not survive here.

**`tests/fixtures/README.md` listed two gaps as unbuilt that this script builds.**
Its `library_gaps` summary still named `8-bit HEVC` and `4K H.264` — while
`manifest.json`, rewritten in the same commit, says 4K H.264 is closed by
`pipe_res_h264_uhd` and 8-bit HEVC has been covered since `pipe_hevc_aac_mp4`
landed (no `hdr` key, so `-profile:v main` / yuv420p). A reader of that page goes
off to author media that already exists. Both cut, with what a generated clip
still cannot close said plainly: a PMS DECISION on such an item.

Same sentence, pre-existing and one word: it named **`plxnative-url`** as the
trigger these are fed through. `tests/README.md` says the opposite and is right —
`plxnative-playurl` is the one carrying the DECLARATION, and several remaining
gaps (HLG, HDR10+) are *about* what the payload declares.

**Trap 9 was falsified by this branch's own fixture, 260 lines below it.** "Nothing
is ever shorter than 60 s" is now false: `pipe_h264_ac3_short` is 20 s because
ENDING is what it grades, and `_resolve_fixtures` enforces the opposite bound for
it. The new shape's comment cited "trap 9's second half" as the rule it breaks;
trap 9 itself was never told, and neither was `PIPE_SHAPES`' header, which still
said the only length constraint left was "do not hit EOF". Both now carry both
bounds, and say that adding a second short clip means picking a side.

**`_probe_fixture`'s "three of the twelve" was never right.** It is four fixtures
carrying two cases each, and it was four of twelve on `main` too — a count that
was wrong before the denominator moved. Replaced with the property (a seek case
beside its play case; an audio-lane pair), which is true at any number.

**`docs/lg-self-checklist.md` was dated the day before its own newest content** —
"Status taken 2026-08-22" above four entries that name 2026-08-23. Bumped, and the
line now says to bump it in the same edit as any row, since it is the only sentence
in that file nothing else restates.

Rejected and recorded so the next run does not re-derive them: the Makefile's
"~0.5s" harness-suite note (measured 1.22 s, hedged with a tilde AND an explicit
"measure before budgeting", subprocess count unchanged); `README.md:176`'s "two
gitignored files", false since b6b9bdb and not this branch's; and four notes
recording the 6974 ms reporter-join measurement taken while netcond's scope was
broken — they assert the park and the mechanism, not that the media stream kept
flowing, so none is contradicted. Two more (`async-model-decision.md:399`,
`ui/library.rs:171`) described scoping as working per-request and were FALSE until
this branch fixed `relay`; they are true again.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* player: a finished stream can be started again, and #46 gets both halves

The replay half of LG App Self Checklist #46 was the one thing my last PR could
not reach from `tests/`, and the reason was six lines in `app.rs`: the synthetic
tier's only entry into the player is `plxnative-playurl`, read behind a one-shot
`auto_tried` latch, so a boot got exactly one playback. On EOS `finish_playback`
→ `exit_player` leaves the player, and with no Plex session there is no detail
page, no Play control and no key path back in.

Everything else was already in place, which is why the change is small:
`teardown` clears the URL and the `ended` flag on a real stop, and
`engine::start_bufferfeed` re-reads `dev::playurl()` whenever `route::url()` is
empty. So a replay is a second trip through the entry the boot already used.

**A COUNTER re-arming the latch, not a lifted latch.** `auto_tried` also guards
the `autoplay`+`playidx` arm, which does a `request_play_movie` +
`load_detail_now` — an unconditionally re-armable latch would re-fetch a catalog
item on every player exit and loop a REAL playback forever.
`/tmp/plxnative-replay[=N]` is bounded, opt-in, read once at boot (so no file
appearing mid-run can turn it into a loop), gated on `playurl` being armed, and
declines when `finish_playback` handed off to Up Next instead — an auto-advance
chain returns to the player, and that is exactly what the route check tells
apart. An absent file is 0, so every existing boot is byte-identical.
`dev::flag`/`dev::read` are `false`/`None` at COMPILE time without `devtriggers`,
so a release build has no replay arm at all; both feature sets type-check.

`replay_budget` is split out and host-tested for `note_global_press`'s reason one
step removed: the call site is inside the SDL event loop where no host test can
reach, and this half touches no SDL. It matters more than it looks, because every
value it can return is plausible and a misparse is invisible on the panel — 0
reads as "the replay arm is missing from this binary" and 2 reads as a loop.

**The two hazards in the lanes that landed in this file since I last read it are
both safe by construction, and I checked rather than assumed.** b6's
unconsumed-press invariant lives in `note_global_press`, and this change is
nowhere near key dispatch — it adds no press path and no global side effect. b7's
recorder cannot write a bogus record for a synthetic playback either:
`coldstart_place` answers `Route::Player` from `metadata::playing()`, which is
installed ONLY by `route::apply_plan` (the PMS decision path), so a URL-fed
session has no playing item and records nothing — before this change or after it.
A replay also re-enters on the next frame, so the 800 ms post-exit hub refresh
never fires between the two viewings.

**The case.** `pipe_replay_after_eos` plays the same 20 s clip, lets it end, and
starts it again. `expect.replays` is one statement, not two: the harness writes it
into the trigger AND `a_replayed` counts it, so the number the app is told cannot
drift from the number that is graded. Three signals, each worthless alone — the
`replay:` line exactly N times (counted, because more often than asked is a loop
and a loop satisfies everything else); at least N+1 `load:` lines, since
`start_bufferfeed` writes one per SESSION and `teardown` cleared the URL, so a
second line is what says the declaration was really re-read; and a media position
that FALLS and then climbs, which is the only thing separating a restart from a
session that carried on. `server_opens_min: 2` is the wire-side half no log line
can give: the second viewing has to fetch the clip again.

`_resolve_fixtures`' EOS bound becomes per VIEWING (`dur * (1 + replays)`), so a
`--secs`-regenerated pack skips this case instead of failing it as a missing
feature. `pipe_finish_eos` stays separate and grades the finish alone: "never
ends" and "ends and cannot be restarted" are different failures, and one case
would report either as the other.

**Two prose corrections this branch's netcond findings force, both about the same
sentence.** The root `CLAUDE.md` describes scoping — "`stall@/:/timeline` freezes
the progress reporter while video keeps streaming, which is what makes a clean
experiment possible" — as a working feature. It was FALSE for as long as it
existed, because `relay` took a scope-less `Mode.split`; it became true on
2026-08-23. Said so at the sentence rather than three sentences later.

And the **6974 ms** measurement cited beside it was taken under that broken
instrument, so the proxy was stalling every connection and not only the
reporter's. **The number and the conclusion both survive, and the mechanism is
worth recording rather than re-deriving:** it was logged as `THREADJOIN timeline
6974ms` — `task::join` emits one NAMED line per join, so the attribution came
from the instrument and not from inferring a total — and `timeline` is the only
join that COULD have parked whatever else was stalled, because `engine::teardown`
step 1 deliberately wakes the other two before joining them (`http_shutdown` on
the demux socket, `aq_abort` on both AU lanes) while the reporter's POST had no
such wake. Before and after were taken the same way, so the 14x is
apples-to-apples. What CANNOT be claimed from that session is that video kept
streaming while the reporter was frozen — a property of the tool today, not of
that run. Recorded in `CLAUDE.md`, `threads.rs` and `engine.rs`, all three of
which carried the number.

Host-verified: `make check` green — 1069 Rust tests (1066 on main + 3 new) and 51
harness tests — and `--no-default-features` type-checks. No television: the device
run is the integrator's.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* tests: the replay count is a third exception to the early-exit rule, and says so

`stream_case`'s soundness note names exactly two ABSENCE checks that early exit
cannot see, and asks that a third be REASONED ABOUT rather than added. `a_replayed`
is a third of the same shape: it grades an EQUALITY (exactly N `replay:` lines,
because more than N is a loop), and an equality can pass at N and fail at N+1.

What it cannot see, stated rather than left to be discovered: an app replaying
forever fires its next `replay:` line only after another full viewing — ~20 s on
the short clip — while the case satisfies everything else at ~28 s, so an early
exit two seconds later stops before the evidence arrives.

Not closed by making this one case burn its whole 100 s cap. That is ~1.5 min on
every suite run to guard three lines whose bound is ALREADY gradeable by `make
check`: `replay_left` is decremented before each re-arm, and `replay_budget`'s
parsing has host tests. `--no-early` is how to go looking for a loop deliberately,
and the trade is worth re-taking only if that app-side bound moves.

Also: `docs/ux-scenario.md`'s #46 row pointed at the checklist "where it is listed
as untested", which stopped being true one commit ago. It now points at the case.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* tests: the replay assertion passed on a replay that never played, and three notes it made false

`/code-review` on the replay work, five findings, all mine, all fixed.

**The one that mattered: `a_replayed` was a false PASS in the ordering the field
will actually produce.** It measured the post-drop climb from the GLOBAL floor —
and a floor is a VALUE, so it only lands in viewing 2 when viewing 2 happens to
reach viewing 1's minimum. The `pos=` heartbeat is 1 Hz and free-running, so
viewing 1 logging `pos=0s` while viewing 2's first sample lands at `pos=1s` puts
the anchor back in viewing 1 and measures VIEWING 1'S OWN CLIMB. Reproduced
against the real function: `[0,5,10,19,1]` read as "fell 18s then climbed 19s" and
PASSED with the second viewing having produced one sample and zero seconds of
playback — defeating near-miss (e) in its own docstring, "restarted and then
stalled at the join".

Worse than a corner: the harness exits the moment every assertion passes, so that
is the state it would NORMALLY have graded. My own near-miss test passed only
because its series starts at 2 rather than 0 — exactly the accident a regression
test is for, and there is now one carrying the counterexample verbatim.

The climb is anchored at the index of the deepest DROP, which the loop computing
`drop` already had in hand.

Four more, each a sentence this branch itself made false:

* `a_finished`'s docstring still said the replay half "is unreachable from this
  tier today and it is an app gap, not a test gap … exactly one playback per boot
  and no key path back into the player" — contradicted by the `a_replayed` fifty
  lines below it, by `/tmp/plxnative-replay`, and by `pipe_replay_after_eos`, all
  added in the same change. It now points at them and says why the two cases stay
  apart.
* `_eof_note`, `make_fixtures.py` trap 9, the `pipe_h264_ac3_short` shape comment
  and `tests/README.md` all said `pipe_finish_eos` was the ONLY case allowed to
  reach EOF and the only one allowed to name that fixture. Two cases do both now.
  The rule was never "one case" anyway — it is "a case graded through a teardown
  has to have declared `reaches_eos`", which is what the unit test was deliberately
  loosened to, so the prose was the last thing still asserting the old form.
* `CLAUDE.md` and the `which-tier` skill both said "19 cases as of 2026-08-23".
  The manifest holds 20. **That count rotted inside the branch that wrote it, one
  commit after that same branch corrected the previous stale copy of it.** Both are
  now the pointer to `--list` rather than a fourth number waiting to go stale.
* `NetcondRate.setUp` leaked a `mkdtemp` per test — six `/tmp` directories per
  `make check`, on the command run most often. `addCleanup(shutil.rmtree)`, like
  every other temp use in that file. Verified: no new directories after a run.

`make check` green — 1069 Rust, 52 harness.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
GLinnik21 added a commit that referenced this pull request Aug 27, 2026
…, and a proxy that can be slow (#59)

* tests: the resolution matrix LG asks for, a clip that is meant to end, and a proxy that can be slow

Three checklist items were unanswerable for three different reasons, and none of
them was a defect in the app.

**#50/#51 — resolution x codec.** The item is graded as a MATRIX and this repo
could only answer it as "pieces are covered": every pipeline fixture was 1080p
except one 4K HEVC, so SD and HD had never been played AT ALL, and 4K H.264
existed in neither pack — which is a fact about the maintainer's library (every
4K item there is HEVC or AV1) rather than about the player. Six new generated
clips complete the grid: SD 720x480 / HD 1280x720 / FHD 1920x1080 / UHD 3840x2160
x {h264, hevc}, with ONE audio codec per column so a row-to-row difference is the
raster and nothing else. Each of the eight cells now grades `expect.video_size`,
an EXACT WxH out of the `ff:` line, because `min_video_width` cannot tell 720x480
from 720x576 and a matrix answered with "at least 1900 wide" is the answer the
item is asking us to stop giving.

Four decisions in the matrix look arbitrary and are argued where they live
(`PIPE_SHAPES`' block comment): square pixels at 720x480 (an anamorphic fixture
would grade PAR handling, an axis with no assertion behind it anywhere here);
CRF held constant is constant QUALITY, not bitrate, so 4K H.264 is crf 26 and not
its 1080p sibling's 20 — the same CRF measures ~30 Mbit/s up there, a
quarter-gigabyte clip in service of no assertion; SDR 8-bit throughout, which
makes the UHD/HEVC cell the odd one out because it is the existing HDR10 fixture,
already device-verified; and E-AC-3 down the HEVC column, which is also the
better false-PASS defence, since `engine`'s `_ =>` arm can only ever produce
"AC3".

**#46 — replay after completion.** Its FIRST half now runs: `pipe_finish_eos`
plays a deliberately short 20 s clip to its end and asserts `EOS reached ...
-> ended` followed by `stop_bufferfeed: torn down`, in that order. Ordered
because every stop tears the engine down — the harness's own close included — and
searched forward from the EOS rather than compared against the first teardown in
the log, because `teardown` writes the same line for a `for_reload` stop, which
would fail the case for its whole cap with the evidence reading "the player froze
on the last frame". This is the only case in either tier that is SUPPOSED to run
out, so it gets its own fixture that nothing else may name (everything else is
sized so it cannot hit EOF mid-window, trap 9's second half), and
`_resolve_fixtures` grew the opposite duration bound: it SKIPS when the clip is
longer than 0.6x the cap, so a `--secs`-regenerated pack skips rather than failing
as a frozen player.

The SECOND half — starting the same content again — is NOT closed, and it is an
app gap rather than a test gap. `plxnative-playurl` is read behind `app.rs`'s
one-shot `auto_tried` latch, so a boot gets exactly one playback; on EOS
`finish_playback` -> `exit_player` leaves the player, and with no Plex session
there is no detail page, no Play control and no key path back in. The manifest
case carries a `_replay_note` naming the small app-side change that would close
it (`engine::start_bufferfeed` already re-reads `dev::playurl()` whenever
`route::url()` is empty), and `docs/lg-self-checklist.md` still marks the replay
half untested.

**#43 CASE1 and #14 — `tools/netcond.py` gains `rate:<kbps>`.** The proxy could
make the server dead in four ways and slow in none, so CASE1's own legs (512 Kbps
-> 1 Mbps -> 7 Mbps -> 17.5 Mbps) could not be PRODUCED and #14's degrading link
was anecdote. One token bucket for the whole proxy, because `rate:` names a link
and a link is shared; decimal kilobits, because that is the unit the item states
its legs in; empty at the start, because a full bucket hands the first
quarter-second a free burst and that is most of a short transfer; live under an
open connection, so one scripted run covers all four legs instead of four
launches. Measured through the real proxy: 512 -> 496 kbps, 2000 -> 2000,
17500 -> 17518.

Two pre-existing bugs surfaced in the code it touches, both fixed:

* **The mode SCOPE was honoured only at accept.** `serve_conn` consulted the
  scope-aware `applies()` and then handed `relay` a bare `Mode.split`, which
  discards it — so `stall@/:/timeline` really froze every open connection
  including the media stream, i.e. the exact opposite of what the scope exists
  for. Both docs claimed the working behaviour. `relay` now takes the
  connection's own first bytes.
* **The read poll's socket timeout was also the other direction's WRITE
  timeout.** Both relay threads share one pair of sockets, so `src.settimeout(0.5)`
  set the timeout on the other thread's `dst`; `sendall` on a timed-out socket
  raises having written an unspecified number of bytes, the `except OSError`
  swallowed it, and the stream truncated silently — reachable in exactly the
  situation the proxy exists to measure. The poll moved to `select` and both
  sockets are put back to blocking before relaying.

`--selftest` proves the shaper against a loopback transfer with no television in
the room, in its own temp control file so it cannot release the mode under a live
experiment.

**What this costs and what it does not prove.** The pipeline pack goes from ~0.4
to ~0.7 GB (the 4K H.264 clip is 93 MB of that) and from 8 clips to 15; resolution
is a property of the media, so a matrix cell cannot be a second case on an
existing file. Everything here is generated, so what none of it reaches is a PMS
DECISION on any of these shapes — `library_gaps` says so per entry. While
correcting those entries: `8-bit-hevc` was ALREADY covered by
`pipe_hevc_aac_mp4` (no `hdr` key, so Main / yuv420p) and the gap list had not
caught up; only `4k-h264` is newly closed.

Host-verified only — this lane has no television. `make check` is green (976 Rust
+ 47 harness tests, the harness suite now including the netcond shaper against
real loopback sockets), every fixture verifies under `make_fixtures.py`'s own
ffprobe checks, and `serve_fixtures.py` answers 206/416 with a byte-exact tail
for each new clip. The device run is the integrator's; the recipe is in the PR.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* docs: the which-tier skill still said the synthetic tier was twelve cases

It is 19 as of this branch, and the number in that sentence was going to rot
again — the same way the host test count in CLAUDE.md rotted three times — so it
now points at `./tests/run.py --list` instead of restating a census.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* docs: five sentences this branch made false, one of them mine twice over

`doc-claim-auditor` over the branch. All five are contradictions, not omissions.

**The one that matters, because it is the skill whose whole subject is this
error.** `which-tier` opens by warning against "reading a bare `./tests/run.py`
as the suite it used to be" — and its pasteable `sh` block still said **12
synthetic cases**. Worse, 8ede10e fixed the identical number in that file's
PROSE two paragraphs above and left the two copies in the code block, i.e. the
half a reader copies. The file contradicted itself inside one commit. Both counts
are gone; the block now points at `--list`, which it already named two lines down,
and says why a second copy of the number does not survive here.

**`tests/fixtures/README.md` listed two gaps as unbuilt that this script builds.**
Its `library_gaps` summary still named `8-bit HEVC` and `4K H.264` — while
`manifest.json`, rewritten in the same commit, says 4K H.264 is closed by
`pipe_res_h264_uhd` and 8-bit HEVC has been covered since `pipe_hevc_aac_mp4`
landed (no `hdr` key, so `-profile:v main` / yuv420p). A reader of that page goes
off to author media that already exists. Both cut, with what a generated clip
still cannot close said plainly: a PMS DECISION on such an item.

Same sentence, pre-existing and one word: it named **`plxnative-url`** as the
trigger these are fed through. `tests/README.md` says the opposite and is right —
`plxnative-playurl` is the one carrying the DECLARATION, and several remaining
gaps (HLG, HDR10+) are *about* what the payload declares.

**Trap 9 was falsified by this branch's own fixture, 260 lines below it.** "Nothing
is ever shorter than 60 s" is now false: `pipe_h264_ac3_short` is 20 s because
ENDING is what it grades, and `_resolve_fixtures` enforces the opposite bound for
it. The new shape's comment cited "trap 9's second half" as the rule it breaks;
trap 9 itself was never told, and neither was `PIPE_SHAPES`' header, which still
said the only length constraint left was "do not hit EOF". Both now carry both
bounds, and say that adding a second short clip means picking a side.

**`_probe_fixture`'s "three of the twelve" was never right.** It is four fixtures
carrying two cases each, and it was four of twelve on `main` too — a count that
was wrong before the denominator moved. Replaced with the property (a seek case
beside its play case; an audio-lane pair), which is true at any number.

**`docs/lg-self-checklist.md` was dated the day before its own newest content** —
"Status taken 2026-08-22" above four entries that name 2026-08-23. Bumped, and the
line now says to bump it in the same edit as any row, since it is the only sentence
in that file nothing else restates.

Rejected and recorded so the next run does not re-derive them: the Makefile's
"~0.5s" harness-suite note (measured 1.22 s, hedged with a tilde AND an explicit
"measure before budgeting", subprocess count unchanged); `README.md:176`'s "two
gitignored files", false since 4f69d32 and not this branch's; and four notes
recording the 6974 ms reporter-join measurement taken while netcond's scope was
broken — they assert the park and the mechanism, not that the media stream kept
flowing, so none is contradicted. Two more (`async-model-decision.md:399`,
`ui/library.rs:171`) described scoping as working per-request and were FALSE until
this branch fixed `relay`; they are true again.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* player: a finished stream can be started again, and #46 gets both halves

The replay half of LG App Self Checklist #46 was the one thing my last PR could
not reach from `tests/`, and the reason was six lines in `app.rs`: the synthetic
tier's only entry into the player is `plxnative-playurl`, read behind a one-shot
`auto_tried` latch, so a boot got exactly one playback. On EOS `finish_playback`
→ `exit_player` leaves the player, and with no Plex session there is no detail
page, no Play control and no key path back in.

Everything else was already in place, which is why the change is small:
`teardown` clears the URL and the `ended` flag on a real stop, and
`engine::start_bufferfeed` re-reads `dev::playurl()` whenever `route::url()` is
empty. So a replay is a second trip through the entry the boot already used.

**A COUNTER re-arming the latch, not a lifted latch.** `auto_tried` also guards
the `autoplay`+`playidx` arm, which does a `request_play_movie` +
`load_detail_now` — an unconditionally re-armable latch would re-fetch a catalog
item on every player exit and loop a REAL playback forever.
`/tmp/plxnative-replay[=N]` is bounded, opt-in, read once at boot (so no file
appearing mid-run can turn it into a loop), gated on `playurl` being armed, and
declines when `finish_playback` handed off to Up Next instead — an auto-advance
chain returns to the player, and that is exactly what the route check tells
apart. An absent file is 0, so every existing boot is byte-identical.
`dev::flag`/`dev::read` are `false`/`None` at COMPILE time without `devtriggers`,
so a release build has no replay arm at all; both feature sets type-check.

`replay_budget` is split out and host-tested for `note_global_press`'s reason one
step removed: the call site is inside the SDL event loop where no host test can
reach, and this half touches no SDL. It matters more than it looks, because every
value it can return is plausible and a misparse is invisible on the panel — 0
reads as "the replay arm is missing from this binary" and 2 reads as a loop.

**The two hazards in the lanes that landed in this file since I last read it are
both safe by construction, and I checked rather than assumed.** b6's
unconsumed-press invariant lives in `note_global_press`, and this change is
nowhere near key dispatch — it adds no press path and no global side effect. b7's
recorder cannot write a bogus record for a synthetic playback either:
`coldstart_place` answers `Route::Player` from `metadata::playing()`, which is
installed ONLY by `route::apply_plan` (the PMS decision path), so a URL-fed
session has no playing item and records nothing — before this change or after it.
A replay also re-enters on the next frame, so the 800 ms post-exit hub refresh
never fires between the two viewings.

**The case.** `pipe_replay_after_eos` plays the same 20 s clip, lets it end, and
starts it again. `expect.replays` is one statement, not two: the harness writes it
into the trigger AND `a_replayed` counts it, so the number the app is told cannot
drift from the number that is graded. Three signals, each worthless alone — the
`replay:` line exactly N times (counted, because more often than asked is a loop
and a loop satisfies everything else); at least N+1 `load:` lines, since
`start_bufferfeed` writes one per SESSION and `teardown` cleared the URL, so a
second line is what says the declaration was really re-read; and a media position
that FALLS and then climbs, which is the only thing separating a restart from a
session that carried on. `server_opens_min: 2` is the wire-side half no log line
can give: the second viewing has to fetch the clip again.

`_resolve_fixtures`' EOS bound becomes per VIEWING (`dur * (1 + replays)`), so a
`--secs`-regenerated pack skips this case instead of failing it as a missing
feature. `pipe_finish_eos` stays separate and grades the finish alone: "never
ends" and "ends and cannot be restarted" are different failures, and one case
would report either as the other.

**Two prose corrections this branch's netcond findings force, both about the same
sentence.** The root `CLAUDE.md` describes scoping — "`stall@/:/timeline` freezes
the progress reporter while video keeps streaming, which is what makes a clean
experiment possible" — as a working feature. It was FALSE for as long as it
existed, because `relay` took a scope-less `Mode.split`; it became true on
2026-08-23. Said so at the sentence rather than three sentences later.

And the **6974 ms** measurement cited beside it was taken under that broken
instrument, so the proxy was stalling every connection and not only the
reporter's. **The number and the conclusion both survive, and the mechanism is
worth recording rather than re-deriving:** it was logged as `THREADJOIN timeline
6974ms` — `task::join` emits one NAMED line per join, so the attribution came
from the instrument and not from inferring a total — and `timeline` is the only
join that COULD have parked whatever else was stalled, because `engine::teardown`
step 1 deliberately wakes the other two before joining them (`http_shutdown` on
the demux socket, `aq_abort` on both AU lanes) while the reporter's POST had no
such wake. Before and after were taken the same way, so the 14x is
apples-to-apples. What CANNOT be claimed from that session is that video kept
streaming while the reporter was frozen — a property of the tool today, not of
that run. Recorded in `CLAUDE.md`, `threads.rs` and `engine.rs`, all three of
which carried the number.

Host-verified: `make check` green — 1069 Rust tests (1066 on main + 3 new) and 51
harness tests — and `--no-default-features` type-checks. No television: the device
run is the integrator's.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* tests: the replay count is a third exception to the early-exit rule, and says so

`stream_case`'s soundness note names exactly two ABSENCE checks that early exit
cannot see, and asks that a third be REASONED ABOUT rather than added. `a_replayed`
is a third of the same shape: it grades an EQUALITY (exactly N `replay:` lines,
because more than N is a loop), and an equality can pass at N and fail at N+1.

What it cannot see, stated rather than left to be discovered: an app replaying
forever fires its next `replay:` line only after another full viewing — ~20 s on
the short clip — while the case satisfies everything else at ~28 s, so an early
exit two seconds later stops before the evidence arrives.

Not closed by making this one case burn its whole 100 s cap. That is ~1.5 min on
every suite run to guard three lines whose bound is ALREADY gradeable by `make
check`: `replay_left` is decremented before each re-arm, and `replay_budget`'s
parsing has host tests. `--no-early` is how to go looking for a loop deliberately,
and the trade is worth re-taking only if that app-side bound moves.

Also: `docs/ux-scenario.md`'s #46 row pointed at the checklist "where it is listed
as untested", which stopped being true one commit ago. It now points at the case.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* tests: the replay assertion passed on a replay that never played, and three notes it made false

`/code-review` on the replay work, five findings, all mine, all fixed.

**The one that mattered: `a_replayed` was a false PASS in the ordering the field
will actually produce.** It measured the post-drop climb from the GLOBAL floor —
and a floor is a VALUE, so it only lands in viewing 2 when viewing 2 happens to
reach viewing 1's minimum. The `pos=` heartbeat is 1 Hz and free-running, so
viewing 1 logging `pos=0s` while viewing 2's first sample lands at `pos=1s` puts
the anchor back in viewing 1 and measures VIEWING 1'S OWN CLIMB. Reproduced
against the real function: `[0,5,10,19,1]` read as "fell 18s then climbed 19s" and
PASSED with the second viewing having produced one sample and zero seconds of
playback — defeating near-miss (e) in its own docstring, "restarted and then
stalled at the join".

Worse than a corner: the harness exits the moment every assertion passes, so that
is the state it would NORMALLY have graded. My own near-miss test passed only
because its series starts at 2 rather than 0 — exactly the accident a regression
test is for, and there is now one carrying the counterexample verbatim.

The climb is anchored at the index of the deepest DROP, which the loop computing
`drop` already had in hand.

Four more, each a sentence this branch itself made false:

* `a_finished`'s docstring still said the replay half "is unreachable from this
  tier today and it is an app gap, not a test gap … exactly one playback per boot
  and no key path back into the player" — contradicted by the `a_replayed` fifty
  lines below it, by `/tmp/plxnative-replay`, and by `pipe_replay_after_eos`, all
  added in the same change. It now points at them and says why the two cases stay
  apart.
* `_eof_note`, `make_fixtures.py` trap 9, the `pipe_h264_ac3_short` shape comment
  and `tests/README.md` all said `pipe_finish_eos` was the ONLY case allowed to
  reach EOF and the only one allowed to name that fixture. Two cases do both now.
  The rule was never "one case" anyway — it is "a case graded through a teardown
  has to have declared `reaches_eos`", which is what the unit test was deliberately
  loosened to, so the prose was the last thing still asserting the old form.
* `CLAUDE.md` and the `which-tier` skill both said "19 cases as of 2026-08-23".
  The manifest holds 20. **That count rotted inside the branch that wrote it, one
  commit after that same branch corrected the previous stale copy of it.** Both are
  now the pointer to `--list` rather than a fourth number waiting to go stale.
* `NetcondRate.setUp` leaked a `mkdtemp` per test — six `/tmp` directories per
  `make check`, on the command run most often. `addCleanup(shutil.rmtree)`, like
  every other temp use in that file. Verified: no new directories after a run.

`make check` green — 1069 Rust, 52 harness.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
GLinnik21 added a commit that referenced this pull request Aug 28, 2026
…, and a proxy that can be slow (#59)

* tests: the resolution matrix LG asks for, a clip that is meant to end, and a proxy that can be slow

Three checklist items were unanswerable for three different reasons, and none of
them was a defect in the app.

**#50/#51 — resolution x codec.** The item is graded as a MATRIX and this repo
could only answer it as "pieces are covered": every pipeline fixture was 1080p
except one 4K HEVC, so SD and HD had never been played AT ALL, and 4K H.264
existed in neither pack — which is a fact about the maintainer's library (every
4K item there is HEVC or AV1) rather than about the player. Six new generated
clips complete the grid: SD 720x480 / HD 1280x720 / FHD 1920x1080 / UHD 3840x2160
x {h264, hevc}, with ONE audio codec per column so a row-to-row difference is the
raster and nothing else. Each of the eight cells now grades `expect.video_size`,
an EXACT WxH out of the `ff:` line, because `min_video_width` cannot tell 720x480
from 720x576 and a matrix answered with "at least 1900 wide" is the answer the
item is asking us to stop giving.

Four decisions in the matrix look arbitrary and are argued where they live
(`PIPE_SHAPES`' block comment): square pixels at 720x480 (an anamorphic fixture
would grade PAR handling, an axis with no assertion behind it anywhere here);
CRF held constant is constant QUALITY, not bitrate, so 4K H.264 is crf 26 and not
its 1080p sibling's 20 — the same CRF measures ~30 Mbit/s up there, a
quarter-gigabyte clip in service of no assertion; SDR 8-bit throughout, which
makes the UHD/HEVC cell the odd one out because it is the existing HDR10 fixture,
already device-verified; and E-AC-3 down the HEVC column, which is also the
better false-PASS defence, since `engine`'s `_ =>` arm can only ever produce
"AC3".

**#46 — replay after completion.** Its FIRST half now runs: `pipe_finish_eos`
plays a deliberately short 20 s clip to its end and asserts `EOS reached ...
-> ended` followed by `stop_bufferfeed: torn down`, in that order. Ordered
because every stop tears the engine down — the harness's own close included — and
searched forward from the EOS rather than compared against the first teardown in
the log, because `teardown` writes the same line for a `for_reload` stop, which
would fail the case for its whole cap with the evidence reading "the player froze
on the last frame". This is the only case in either tier that is SUPPOSED to run
out, so it gets its own fixture that nothing else may name (everything else is
sized so it cannot hit EOF mid-window, trap 9's second half), and
`_resolve_fixtures` grew the opposite duration bound: it SKIPS when the clip is
longer than 0.6x the cap, so a `--secs`-regenerated pack skips rather than failing
as a frozen player.

The SECOND half — starting the same content again — is NOT closed, and it is an
app gap rather than a test gap. `plxnative-playurl` is read behind `app.rs`'s
one-shot `auto_tried` latch, so a boot gets exactly one playback; on EOS
`finish_playback` -> `exit_player` leaves the player, and with no Plex session
there is no detail page, no Play control and no key path back in. The manifest
case carries a `_replay_note` naming the small app-side change that would close
it (`engine::start_bufferfeed` already re-reads `dev::playurl()` whenever
`route::url()` is empty), and `docs/lg-self-checklist.md` still marks the replay
half untested.

**#43 CASE1 and #14 — `tools/netcond.py` gains `rate:<kbps>`.** The proxy could
make the server dead in four ways and slow in none, so CASE1's own legs (512 Kbps
-> 1 Mbps -> 7 Mbps -> 17.5 Mbps) could not be PRODUCED and #14's degrading link
was anecdote. One token bucket for the whole proxy, because `rate:` names a link
and a link is shared; decimal kilobits, because that is the unit the item states
its legs in; empty at the start, because a full bucket hands the first
quarter-second a free burst and that is most of a short transfer; live under an
open connection, so one scripted run covers all four legs instead of four
launches. Measured through the real proxy: 512 -> 496 kbps, 2000 -> 2000,
17500 -> 17518.

Two pre-existing bugs surfaced in the code it touches, both fixed:

* **The mode SCOPE was honoured only at accept.** `serve_conn` consulted the
  scope-aware `applies()` and then handed `relay` a bare `Mode.split`, which
  discards it — so `stall@/:/timeline` really froze every open connection
  including the media stream, i.e. the exact opposite of what the scope exists
  for. Both docs claimed the working behaviour. `relay` now takes the
  connection's own first bytes.
* **The read poll's socket timeout was also the other direction's WRITE
  timeout.** Both relay threads share one pair of sockets, so `src.settimeout(0.5)`
  set the timeout on the other thread's `dst`; `sendall` on a timed-out socket
  raises having written an unspecified number of bytes, the `except OSError`
  swallowed it, and the stream truncated silently — reachable in exactly the
  situation the proxy exists to measure. The poll moved to `select` and both
  sockets are put back to blocking before relaying.

`--selftest` proves the shaper against a loopback transfer with no television in
the room, in its own temp control file so it cannot release the mode under a live
experiment.

**What this costs and what it does not prove.** The pipeline pack goes from ~0.4
to ~0.7 GB (the 4K H.264 clip is 93 MB of that) and from 8 clips to 15; resolution
is a property of the media, so a matrix cell cannot be a second case on an
existing file. Everything here is generated, so what none of it reaches is a PMS
DECISION on any of these shapes — `library_gaps` says so per entry. While
correcting those entries: `8-bit-hevc` was ALREADY covered by
`pipe_hevc_aac_mp4` (no `hdr` key, so Main / yuv420p) and the gap list had not
caught up; only `4k-h264` is newly closed.

Host-verified only — this lane has no television. `make check` is green (976 Rust
+ 47 harness tests, the harness suite now including the netcond shaper against
real loopback sockets), every fixture verifies under `make_fixtures.py`'s own
ffprobe checks, and `serve_fixtures.py` answers 206/416 with a byte-exact tail
for each new clip. The device run is the integrator's; the recipe is in the PR.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* docs: the which-tier skill still said the synthetic tier was twelve cases

It is 19 as of this branch, and the number in that sentence was going to rot
again — the same way the host test count in CLAUDE.md rotted three times — so it
now points at `./tests/run.py --list` instead of restating a census.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* docs: five sentences this branch made false, one of them mine twice over

`doc-claim-auditor` over the branch. All five are contradictions, not omissions.

**The one that matters, because it is the skill whose whole subject is this
error.** `which-tier` opens by warning against "reading a bare `./tests/run.py`
as the suite it used to be" — and its pasteable `sh` block still said **12
synthetic cases**. Worse, 8ede10e fixed the identical number in that file's
PROSE two paragraphs above and left the two copies in the code block, i.e. the
half a reader copies. The file contradicted itself inside one commit. Both counts
are gone; the block now points at `--list`, which it already named two lines down,
and says why a second copy of the number does not survive here.

**`tests/fixtures/README.md` listed two gaps as unbuilt that this script builds.**
Its `library_gaps` summary still named `8-bit HEVC` and `4K H.264` — while
`manifest.json`, rewritten in the same commit, says 4K H.264 is closed by
`pipe_res_h264_uhd` and 8-bit HEVC has been covered since `pipe_hevc_aac_mp4`
landed (no `hdr` key, so `-profile:v main` / yuv420p). A reader of that page goes
off to author media that already exists. Both cut, with what a generated clip
still cannot close said plainly: a PMS DECISION on such an item.

Same sentence, pre-existing and one word: it named **`plxnative-url`** as the
trigger these are fed through. `tests/README.md` says the opposite and is right —
`plxnative-playurl` is the one carrying the DECLARATION, and several remaining
gaps (HLG, HDR10+) are *about* what the payload declares.

**Trap 9 was falsified by this branch's own fixture, 260 lines below it.** "Nothing
is ever shorter than 60 s" is now false: `pipe_h264_ac3_short` is 20 s because
ENDING is what it grades, and `_resolve_fixtures` enforces the opposite bound for
it. The new shape's comment cited "trap 9's second half" as the rule it breaks;
trap 9 itself was never told, and neither was `PIPE_SHAPES`' header, which still
said the only length constraint left was "do not hit EOF". Both now carry both
bounds, and say that adding a second short clip means picking a side.

**`_probe_fixture`'s "three of the twelve" was never right.** It is four fixtures
carrying two cases each, and it was four of twelve on `main` too — a count that
was wrong before the denominator moved. Replaced with the property (a seek case
beside its play case; an audio-lane pair), which is true at any number.

**`docs/lg-self-checklist.md` was dated the day before its own newest content** —
"Status taken 2026-08-22" above four entries that name 2026-08-23. Bumped, and the
line now says to bump it in the same edit as any row, since it is the only sentence
in that file nothing else restates.

Rejected and recorded so the next run does not re-derive them: the Makefile's
"~0.5s" harness-suite note (measured 1.22 s, hedged with a tilde AND an explicit
"measure before budgeting", subprocess count unchanged); `README.md:176`'s "two
gitignored files", false since 8a5ac95 and not this branch's; and four notes
recording the 6974 ms reporter-join measurement taken while netcond's scope was
broken — they assert the park and the mechanism, not that the media stream kept
flowing, so none is contradicted. Two more (`async-model-decision.md:399`,
`ui/library.rs:171`) described scoping as working per-request and were FALSE until
this branch fixed `relay`; they are true again.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* player: a finished stream can be started again, and #46 gets both halves

The replay half of LG App Self Checklist #46 was the one thing my last PR could
not reach from `tests/`, and the reason was six lines in `app.rs`: the synthetic
tier's only entry into the player is `plxnative-playurl`, read behind a one-shot
`auto_tried` latch, so a boot got exactly one playback. On EOS `finish_playback`
→ `exit_player` leaves the player, and with no Plex session there is no detail
page, no Play control and no key path back in.

Everything else was already in place, which is why the change is small:
`teardown` clears the URL and the `ended` flag on a real stop, and
`engine::start_bufferfeed` re-reads `dev::playurl()` whenever `route::url()` is
empty. So a replay is a second trip through the entry the boot already used.

**A COUNTER re-arming the latch, not a lifted latch.** `auto_tried` also guards
the `autoplay`+`playidx` arm, which does a `request_play_movie` +
`load_detail_now` — an unconditionally re-armable latch would re-fetch a catalog
item on every player exit and loop a REAL playback forever.
`/tmp/plxnative-replay[=N]` is bounded, opt-in, read once at boot (so no file
appearing mid-run can turn it into a loop), gated on `playurl` being armed, and
declines when `finish_playback` handed off to Up Next instead — an auto-advance
chain returns to the player, and that is exactly what the route check tells
apart. An absent file is 0, so every existing boot is byte-identical.
`dev::flag`/`dev::read` are `false`/`None` at COMPILE time without `devtriggers`,
so a release build has no replay arm at all; both feature sets type-check.

`replay_budget` is split out and host-tested for `note_global_press`'s reason one
step removed: the call site is inside the SDL event loop where no host test can
reach, and this half touches no SDL. It matters more than it looks, because every
value it can return is plausible and a misparse is invisible on the panel — 0
reads as "the replay arm is missing from this binary" and 2 reads as a loop.

**The two hazards in the lanes that landed in this file since I last read it are
both safe by construction, and I checked rather than assumed.** b6's
unconsumed-press invariant lives in `note_global_press`, and this change is
nowhere near key dispatch — it adds no press path and no global side effect. b7's
recorder cannot write a bogus record for a synthetic playback either:
`coldstart_place` answers `Route::Player` from `metadata::playing()`, which is
installed ONLY by `route::apply_plan` (the PMS decision path), so a URL-fed
session has no playing item and records nothing — before this change or after it.
A replay also re-enters on the next frame, so the 800 ms post-exit hub refresh
never fires between the two viewings.

**The case.** `pipe_replay_after_eos` plays the same 20 s clip, lets it end, and
starts it again. `expect.replays` is one statement, not two: the harness writes it
into the trigger AND `a_replayed` counts it, so the number the app is told cannot
drift from the number that is graded. Three signals, each worthless alone — the
`replay:` line exactly N times (counted, because more often than asked is a loop
and a loop satisfies everything else); at least N+1 `load:` lines, since
`start_bufferfeed` writes one per SESSION and `teardown` cleared the URL, so a
second line is what says the declaration was really re-read; and a media position
that FALLS and then climbs, which is the only thing separating a restart from a
session that carried on. `server_opens_min: 2` is the wire-side half no log line
can give: the second viewing has to fetch the clip again.

`_resolve_fixtures`' EOS bound becomes per VIEWING (`dur * (1 + replays)`), so a
`--secs`-regenerated pack skips this case instead of failing it as a missing
feature. `pipe_finish_eos` stays separate and grades the finish alone: "never
ends" and "ends and cannot be restarted" are different failures, and one case
would report either as the other.

**Two prose corrections this branch's netcond findings force, both about the same
sentence.** The root `CLAUDE.md` describes scoping — "`stall@/:/timeline` freezes
the progress reporter while video keeps streaming, which is what makes a clean
experiment possible" — as a working feature. It was FALSE for as long as it
existed, because `relay` took a scope-less `Mode.split`; it became true on
2026-08-23. Said so at the sentence rather than three sentences later.

And the **6974 ms** measurement cited beside it was taken under that broken
instrument, so the proxy was stalling every connection and not only the
reporter's. **The number and the conclusion both survive, and the mechanism is
worth recording rather than re-deriving:** it was logged as `THREADJOIN timeline
6974ms` — `task::join` emits one NAMED line per join, so the attribution came
from the instrument and not from inferring a total — and `timeline` is the only
join that COULD have parked whatever else was stalled, because `engine::teardown`
step 1 deliberately wakes the other two before joining them (`http_shutdown` on
the demux socket, `aq_abort` on both AU lanes) while the reporter's POST had no
such wake. Before and after were taken the same way, so the 14x is
apples-to-apples. What CANNOT be claimed from that session is that video kept
streaming while the reporter was frozen — a property of the tool today, not of
that run. Recorded in `CLAUDE.md`, `threads.rs` and `engine.rs`, all three of
which carried the number.

Host-verified: `make check` green — 1069 Rust tests (1066 on main + 3 new) and 51
harness tests — and `--no-default-features` type-checks. No television: the device
run is the integrator's.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* tests: the replay count is a third exception to the early-exit rule, and says so

`stream_case`'s soundness note names exactly two ABSENCE checks that early exit
cannot see, and asks that a third be REASONED ABOUT rather than added. `a_replayed`
is a third of the same shape: it grades an EQUALITY (exactly N `replay:` lines,
because more than N is a loop), and an equality can pass at N and fail at N+1.

What it cannot see, stated rather than left to be discovered: an app replaying
forever fires its next `replay:` line only after another full viewing — ~20 s on
the short clip — while the case satisfies everything else at ~28 s, so an early
exit two seconds later stops before the evidence arrives.

Not closed by making this one case burn its whole 100 s cap. That is ~1.5 min on
every suite run to guard three lines whose bound is ALREADY gradeable by `make
check`: `replay_left` is decremented before each re-arm, and `replay_budget`'s
parsing has host tests. `--no-early` is how to go looking for a loop deliberately,
and the trade is worth re-taking only if that app-side bound moves.

Also: `docs/ux-scenario.md`'s #46 row pointed at the checklist "where it is listed
as untested", which stopped being true one commit ago. It now points at the case.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

* tests: the replay assertion passed on a replay that never played, and three notes it made false

`/code-review` on the replay work, five findings, all mine, all fixed.

**The one that mattered: `a_replayed` was a false PASS in the ordering the field
will actually produce.** It measured the post-drop climb from the GLOBAL floor —
and a floor is a VALUE, so it only lands in viewing 2 when viewing 2 happens to
reach viewing 1's minimum. The `pos=` heartbeat is 1 Hz and free-running, so
viewing 1 logging `pos=0s` while viewing 2's first sample lands at `pos=1s` puts
the anchor back in viewing 1 and measures VIEWING 1'S OWN CLIMB. Reproduced
against the real function: `[0,5,10,19,1]` read as "fell 18s then climbed 19s" and
PASSED with the second viewing having produced one sample and zero seconds of
playback — defeating near-miss (e) in its own docstring, "restarted and then
stalled at the join".

Worse than a corner: the harness exits the moment every assertion passes, so that
is the state it would NORMALLY have graded. My own near-miss test passed only
because its series starts at 2 rather than 0 — exactly the accident a regression
test is for, and there is now one carrying the counterexample verbatim.

The climb is anchored at the index of the deepest DROP, which the loop computing
`drop` already had in hand.

Four more, each a sentence this branch itself made false:

* `a_finished`'s docstring still said the replay half "is unreachable from this
  tier today and it is an app gap, not a test gap … exactly one playback per boot
  and no key path back into the player" — contradicted by the `a_replayed` fifty
  lines below it, by `/tmp/plxnative-replay`, and by `pipe_replay_after_eos`, all
  added in the same change. It now points at them and says why the two cases stay
  apart.
* `_eof_note`, `make_fixtures.py` trap 9, the `pipe_h264_ac3_short` shape comment
  and `tests/README.md` all said `pipe_finish_eos` was the ONLY case allowed to
  reach EOF and the only one allowed to name that fixture. Two cases do both now.
  The rule was never "one case" anyway — it is "a case graded through a teardown
  has to have declared `reaches_eos`", which is what the unit test was deliberately
  loosened to, so the prose was the last thing still asserting the old form.
* `CLAUDE.md` and the `which-tier` skill both said "19 cases as of 2026-08-23".
  The manifest holds 20. **That count rotted inside the branch that wrote it, one
  commit after that same branch corrected the previous stale copy of it.** Both are
  now the pointer to `--list` rather than a fourth number waiting to go stale.
* `NetcondRate.setUp` leaked a `mkdtemp` per test — six `/tmp` directories per
  `make check`, on the command run most often. `addCleanup(shutil.rmtree)`, like
  every other temp use in that file. Verified: no new directories after a run.

`make check` green — 1069 Rust, 52 harness.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.

2 participants