Repository navigation
Discover: one base for the person page and the Watchlist; a mock boot never reaches the real provider - #857
Merged
Merged
Conversation
…red) The profile and credits URLs were spelled inline on the real host, so arming the loopback stand-in the Watchlist honours did nothing for them. Extract the two URL builders (behaviour unchanged) and add the test that fails against them. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…token boot never reaches the real provider
The person profile and credits URLs were spelled on the real host, so the loopback stand-in the
Watchlist honours, and a redirected plex.tv, did nothing for them: a sim run against the mock sent
two GETs to discover.provider.plex.tv. The base now lives once in account.rs beside plex_tv(),
and both discover.rs and watchlist.rs read it: the plxnative-discover trigger, else the loopback
plxnative-plextv already redirects to, else the real host. A devtriggers build driven by a
dev-token boot (plxnative-token) with neither armed REFUSES the provider reads (person routes and
Watchlist GETs), logged once per endpoint shape, instead of dialling it with an identity that has
no account behind it; boot logs 'discover: base=... reads=...'. Release builds and interactive
boots are unchanged. No FFI, curl option or net.rs change: URL selection only.
tests/mock_pms.py's Discover stand-in now answers GET /library/people/{tagKey} and .../credits
with synthetic data (credits 401 without a token, as the provider does).
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…oot assertion, truthful docs The Discover base was pinned by tests of URL helpers, not of the requests the person page and the Watchlist actually make. Now the account GET path has a recording seam (probe_gets, no socket) and the person profile and credits are asked through the public methods; every Watchlist request site is asked against an armed stand-in. Putting the real host back in any of them turns those tests red (shown: the three tests fail with the base use replaced by the real host). The host is private to account.rs, and make check (ci/check-plex-requests.py) fails on the Discover host spelled in any other non-test Rust, in any crate. The simulator drivers that boot against tests/mock_pms.py (screenshots.py, site_video.py, watchlist_captures.py) now fail the run unless the boot logged discover: base=stand-in (mock_pms.discover_stand_in_problem, fail-closed). The mock no longer invents a birth date, place or biography for the demo library's real actors; its docstring lists the person routes. The request registry's evidence lines point at the request lines. Sentences the earlier change made false or unproven (scenarios.rs, focusfp.sh, the ui-sim skill, person.rs, the refusal's own comments) now say what holds. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…(red) A dev-token boot with no Discover stand-in armed has both person reads refused in-process. The refusal comes back as a failure, so the store respawns a worker for each mailbox every ~2 s for as long as the page is open: five asks per read over ten simulated seconds. The test counts the asks at the host transport cut and fails with profile=5 credits=5. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ked again The refusal of Discover reads on a dev-token boot with no stand-in armed stays (fail closed). What changes is how the person page meets it. The refusal came back as a failure, so each of the profile and credits mailboxes respawned a worker every ~2 s for as long as the page was open (five asks per read over ten simulated seconds). The person store now asks the refusal on its own thread before it spawns a worker, because the answer is fixed at boot. A refusal lands as Landing::Refused through the mailbox and settles the page the way an empty answer does: profiled/profile_tried and credited turn, the placeholder sweep stops, address() stops asking, and no backoff is armed. Nothing is invented and a seeded filmography is left alone. Controlled boots still land None on a tape without asking. The Watchlist and catalog needed no change: a refused list read clears list_wanted when its worker spawns and nothing sets it again, so it lands once as the unavailable read-out. A test pins it. Every sentence about the refusal now states the decision and its cost once (such a boot shows no biography and no filmography credits; arm the stand-in to see them): account.rs, person.rs, docs/watchlist.md, docs/pms-api.md, the tv-session and ui-sim skills, tests/README.md, focusfp.sh. The registry's evidence lines point at the current request lines. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…g what they grade Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Oct 20, 2026
…st, deep shelves, Home and Recommended Detail return) (#864) App-tier route tests for the routes #857-#861 changed, in the World rig (real screens behind the real dispatch). Each was watched red against a stub of the production behaviour it guards (applied to the committed tree, restored, never committed). - A released card is at exact rest on Home and Recommended after an 8-card held walk (red with Spring::land a no-op: "only the focused card is off rest, got [(0, 0, 1.0000001) ... (0, 8, 1.0899999)]"). - The same rule as conformance case eight, released_card_lands_at_rest: Tier 1 shelf and eight Tier 2 shelf screens go red with the same stub; the grid components pass by construction (one pop and one shrink spring). - A publication that adds a shelf leaves focus on its card (guards key stability; red with an identity-minting rebuild) and the new shelf is reachable (red with sync ignoring later publications). - A held Down through a deep Home reaches every row on a card that has landed (red with the hold band's reach at 0). - A deep Recommended page returns from Detail onto the same published card (red with Enter::Restored passing no focus; the rows-in-view clauses live through the latched-band premise). - Home -> Detail -> BACK lands on the card it left, at rest, with OK performed by the World pump through home_requests' guards and input::activate_deck_card -> activate_card -> open_detail (red with Enter::Restored dropping the focus, and with activate_card handing open_detail a focus-less return state). content::home_requests' arm and activate_home_item take the whole App and are not covered. Outside the tests: test-support accessors only (HomeScreen/RecommendedScreen::probe_card_pops, BrowseStore::released_rows_for_test, World helpers), each #[cfg(any(test, feature = "test-support"))]. No production path change. Gates on the committed tree: make check 103 steps ok, hostsim 938/0, check-nodef clean, check-replay 6/0. One review (no blockers; its should and nits fixed here). CodeQL cleartext-logging alerts on test assert messages printing fixture probe text dismissed as used in tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while checking captions in the simulator: a run against
tests/mock_pms.pywithplxnative-plextvandplxnative-discoverboth armed opened a person page. It sent 2 GETs (biography, credits) to the realhttps://discover.provider.plex.tv, carrying the mock's demo token. The real service answered 401. Nothing was written and no real account was involved, but a mock run must never reach the real provider.Cause
plex/src/plex/discover.rsspelled its host as its ownconst DISCOVER. The Watchlist already resolved a loopback stand-in (plxnative-discover), but that resolution never reached the person profile and credits requests.Fix
account::discover()is the only place the provider's address is decided: thediscovertrigger, else the loopbackplextvpoints at, else the real host. The person profile, the credits and every Watchlist request read it.ci/check-plex-requests.py(inmake check) fails on the host string in non-test Rust anywhere else.plxnative-token) with neither trigger armed refuses Discover reads and logs the refusal. The boot logsdiscover: base=real|stand-in reads=open|refused. A refused read settles the person page once, like an empty answer: no worker respawns every ~2 s and no repaint loop. The Watchlist's refused read is asked once and not retried on a timer.tv-session --guest,--guest --mock,tests/run.py --mockand real-PMS--guestscenes. Arm the stand-in to see them. This is stated once ataccount::permit_read, with pointers from the docs and skills.Nonewithoutdevtriggers, so a public build's URLs are byte-identical. The one interactive change is that Discover now follows a loopbackplxnative-plextvredirect.tests/mock_pms.pyserves/library/people/{tagKey}and.../creditswith synthetic data. The demo library's real actors get a name and departments only, no invented birth dates, places or biographies.tools/screenshots.py,tools/site_video.pyandtools/watchlist_captures.pyrefuse to drive a boot whose log does not readbase=stand-in. The ui-sim skill says how to arm it.Verification
person_urls_are_built_on_the_armed_stand_in: the person URL was built on the real host.the_person_reads_hand_the_transport_a_url_on_the_armed_stand_inandevery_watchlist_request_site_is_built_on_the_armed_stand_in: these use acfg(test)recorder on the request path that opens no socket. With the base swapped for the real host, all three went red.a_refused_discover_read_settles_the_page_and_is_never_asked_again:got profile=5 credits=5asks over 10 simulated seconds, now 0.tests/test_mock_pms_discover.py.git status --shortempty before and after):make checkexit 0: 29test result:lines, all0 failed;103 steps — all ok.make check-nodefclean.make check-replay:3 fixtures, 6 replays, 0 failures.12-filmography-detail-returnisverdict=SAMEon 927/927 frames; controlled boots skip the fetch.--guestruns the public biography is settled by keeping the fail-closed refusal and stating its cost. The terminal refused landing, the request-path tests and lint, the false sentences it listed, and its nits are all fixed here.net.rschange, so this is not a firmware-compat concern. No Makefile, Cargo, build.rs or workflow change, so no build-bench table.Not in this PR
A stored session from a mock QR sign-in, booted later with no triggers, reads
base=real; plex.tv itself is affected in the same way. Below the screens layer it cannot be told from a real session, so fixing it needs a persisted-session schema change.🤖 Generated with Claude Code