Repository navigation
Catalog store emits its read as a store job; a read that panics lands as unreachable - #999
Merged
Merged
Conversation
… first)
A catalog read that panics on its worker thread dies with the thread and posts no landing, so the
page waits on Loading for ever. The test scripts a read that panics, lets the unwind stop at the
job's boundary as a thread's would, pumps, and asks for the failure an unanswered read lands.
It fails against the unguarded worker:
assertion `left == right` failed: a read that panicked answers as a failed one does
left: Loading
right: Unreachable
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1156 filtered out
The guard that makes it pass lands with the job lane, in the next commit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Catalog store no longer starts its own worker from its step. It emits one typed
StoreJob::Catalog per read, which the app's StoreRunner starts: the lane Detail, Collection and
Person took, for a plex.tv read, so there is no ClientKeys input and no Fetch.
The step: open and the owed retry push one Job<CatalogReq> carrying the WatchlistAuth and the
title's guid hash, addressed by a per-open request number. open and reset drop untaken jobs, so a
superseded title or a signed-out credential never reaches a runner. The io seam rides on
CatalogPort (compared by its mailbox), which is also how the answer lands: done posts the read,
refused posts a store-local NotStarted landing into the existing mailbox. The next pump turns
NotStarted for the current request into the owed retry, which keeps RETRY_FRAMES (120) and the
never-starve rule; a landing for an earlier request is dropped as before. The refusal therefore
applies one pump later than the failed spawn it replaces did.
finish_catalog_job runs the same LiveCatalogIo::fetch, so the dev-build refusal in
AccountClient::watchlist_transport is unchanged. It runs the read under catch_unwind and posts the
answer outside the guard: a panic lands as Load::Unreachable, which is what the preceding commit's
test asks for (it fails with the guard removed, passes with it).
The runner: start_catalog has no tape admission (Catalog is an untaped kind) and launches the
read directly: spawn_small("catalog-fetch") in Live, parked for run_held in Held; a failed spawn
refuses the job. A newer Detail request leaves a parked Catalog job alone. Bridge::catalog_open,
catalog_pump and catalog_reset step the store and drain StoreId::Catalog in the same call, and
catalog_feed and catalog_reread use them in the same order and frame as before.
Not pure: the step still reads capture::current_snapshot, capture::session::peek and
is_current::current_snapshot; no purity is claimed for Catalog.
Tests, in data/src/catalog_tests.rs: an open emits one job naming the title and the identity (the
contract is pinned with assert_fx!), an untaken job goes with the request that superseded it, and
a refusal for a retired request owes nothing; the refused-spawn test becomes "a refused job posts
NotStarted and asks again after RETRY_FRAMES and never blocks" (119 empty pumps, then one job);
the late-landing, switched-profile and reset tests now run the emitted job through
finish_catalog_job, the no-credential test pins that no job is emitted, and the panic test from
the preceding commit runs through finish_catalog_job too. In
app/adapters/stores.rs: a Catalog job is started and answered exactly once and not taped, a Held
one runs once when the test runs it, a newer Detail request leaves a parked Catalog job alone, and
the Bridge entry points start the read they emitted in the same call. The watchlist rig runs
emitted jobs through run_held_store_jobs_of_for_test in place of with_spawn_for_test.
Not covered on the host: the runner's failed-spawn branch (nothing in plx_base::task can make
spawn_small fail); the port's refusal path is covered through CatalogPort::refused in the data tests.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The Catalog store's one worker start left data/src/stores/catalog.rs with the previous commit, so its ledger line goes: ci/allow/workers/data-catalog.txt (one line, count 1) is deleted, which leaves no file in that area for the data-catalog area. PINNED_LEDGER_TOTALS workers 22 -> 21; globals 97, forks 60 and fxlanes 11 are unchanged, matching the sums ci/check-deps.sh prints (the Catalog step still reads the data-watchlist globals, and those lines stay). docs/sans-io.md, "The store job lane": Catalog is the fourth lane (no server, no client, no ClientKeys, no tape admission, not pure); the shape bullet lists CatalogReq and CatalogPort; Bridge::catalog_open and catalog_pump are named among the drains, the bypassed-drain list and the public-step note; two new bullets say what the lane does (the same LiveCatalogIo::fetch, the panic guard, the store-local NotStarted landing and its retry one pump later than the spawn refusal it replaces) and what the step still reads. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…pin what they claimed) F1: StoreRunner::start's doc said every job is admitted through the tape; the Catalog arm admits nothing. N3: the late-landing test asserts each open emitted its one job again. N4: the profile-switch test runs the re-open's job on the port the job carries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Catalog's landing is a bare mailbox take: CatalogStore::pump takes no Gate, a job is parked and started with no tape admission, and a second answer is queued and applied instead of refused. Four sentences this lane wrote or left said otherwise: - docs/sans-io.md "Results do not return as FIFO events" spoke for every store; it now names the gated ones (Detail, Collection, Person) and states Catalog's ungated take. - StoreRunner::Held's doc said every parked job had its tape admission. - machine/src/job.rs Port doc: silence, a second call and a second answer described a reservation-holding landing only; they are scoped to it, with the mailbox case named. - bridge.rs assert_no_store_jobs_left_for_test's message omits catalog_open / catalog_pump that its two sibling messages name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ore job lane) into sansio/store-jobs-catalog Both lanes extended the same shared store-job pieces; both sides are kept. - data/src/stores/mod.rs: StoreJob carries Catalog beside SubtitleSearch and ViewReconcile; StoreJob::store, take_jobs_of and has_jobs_of name all five job stores. - app/adapters/stores.rs: StoreRunner::start, the start_* / launch_* pairs, run_held_where, run_held_of and retire_parked_details' kept list cover Catalog, SubtitleSearch and ViewReconcile; the Held doc names the three admission cases (tape, key check, neither). Both sides' tests are kept (35 tests = 19 base + 4 + 12). - app/bridge.rs: catalog_open / catalog_pump / catalog_reset beside subsearch_run / subsearch_pump; the drain strings and the assert doc name every entry point. - docs/sans-io.md: the intro orders the lane Detail, Collection, Person, Catalog, then subtitle search and the view-state read-back (fifth and sixth); the FIFO bullet lists the five gated stores and states Catalog's ungated take. - tests/test_harness.py: PINNED_LEDGER_TOTALS is the sum of the '# count:' headers at the resolved tree: workers 19, globals 95 (forks 60, fxlanes 11 unchanged). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 24, 2026
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.
Closes #998
The Catalog store no longer starts its own worker from inside its step. It emits a typed
StoreJob::Catalog, and the app'sStoreRunnerstarts it. Detail, Collection, Person, subtitle search and view reconcile already take this lane (#975, #987, #990, #996). This is wave 2, lane B of the Sans-IO series (docs/sans-io.md, "The store job lane"). Catalog is a plex.tv read, so it takes noClientKeysand does not touchFetch.The change also fixes a defect: a catalog read that panicked left the page on Loading for good. The read now runs under
catch_unwind, and a panic lands as an unreachable page.What changed
The store (
data/src/stores/catalog.rs):openand the profile-switch branch ofpumppush aJob<CatalogReq>instead of spawning.CatalogReqcarries the watchlist auth and the title's hex.Landingis now{ req, outcome }, withoutcomeeitherRead(Load)orNotStarted. ANotStartedlanding makes the pump that takes it setowed. The store then asks again afterRETRY_FRAMES(120), with no respawn spin. That is one pump later than the old synchronous spawn failure, with the same backoff, and the owed flag cannot starve.CatalogPortholds the mailbox and the io seam. ItsdonepostsRead, and itsrefusedpostsNotStarted.The job body:
finish_catalog_jobruns the fetch undercatch_unwindand posts the answer outside the guard.Load::Unreachable.LiveCatalogIo::fetch, so the dev-build read refusal insideAccountClient::watchlist_transportis unchanged byte for byte.The runner (
app/adapters/stores.rs):start_cataloguses no tape admission (Catalog is untaped). Live starts the job withspawn_small("catalog-fetch"); Held parks it.run_heldis split intorun_held_wherewith a test-onlyrun_held_of(StoreId), so the watchlist rigs settle only Catalog reads.The Bridge:
catalog_openandcatalog_pumpstep the store and drainStoreId::Catalogin the same call;catalog_resetdrains nothing because a reset emits no job.app/watchlist.rscatalog_feedandcatalog_rereadcall these instead of the store, in the same order and frame.with_spawn_for_testis gone. The watchlist rigs run the emitted jobs instead.Not pure yet. The step still reads the watchlist auth snapshot:
capture::current_snapshot,capture::session::peekandis_current::current_snapshot. Those threedata-watchlistglobals lines stay until the Watchlist store's own migration. Thewallgate is not widened for Catalog.Ledgers
ci/allow/workers/data-catalog.txtspawn_worker::spawn_small)PINNED_LEDGER_TOTALS(workers/globals/forks/fxlanes)with_spawn_for_testwas#[cfg(any(test, feature = "test-support"))]. The fork scanner counts that as a test-only item, so the forks count is unchanged.Tests
a_read_that_panics_leaves_loading_for_the_unreachable_pageis its own commit, against the unguarded code:catch_unwindremoved again, the test fails again.data/src/catalog_tests.rs(15 → 19 tests; the job-lane ones):AddrandCatalogReq(assert_fx!);NotStarted, then 119 pumps emit nothing and the 120th emits one job;Gates, run on the committed tree
The gates ran on 639b32c, the merge of
mainat c7fbbca (#996) into this branch.git status --shortwas empty before and after each one.make check: exit 0, "check: 106 steps — all ok". The harness ran 542 tests, OK. Every Rusttest result:line reads0 failed. check-deps:workers (19 sites),globals (95 sites),forks (60 sites),fxlanes (11 sites), "all gates green".make check-nodef: exit 0, no warnings.make check-replay: "3 fixtures, 6 replays, 0 failures".1-boot-home-chip-grid,6-settings-familyand12-filmography-detail-returnall readverdict=SAMEwith every*_diffs=0, under both resolve and targets. No fixture file changed.make(ARM):pkg/plxnativelinked.Since then,
mainhas gained #991 (Makefile,ci/test_arm_profile.pyanddocs/agent-reference.mdonly), which merges cleanly. This PR's CI runs on the merged tree.The merge with #996 kept both lanes' arms in
StoreJob,take_jobs_of/has_jobs_of, the runner and the Bridge drain lists, and dropped no test. The runner's tests number 35: 19 base, 4 from this lane and 12 from #996.One review, verdict FIX FIRST. Its should-fix finding, a runner doc that still said every kind goes through the tape, is fixed here, as are two of its notes: two tests now pin what they claimed. Another note, a
debug_assert!beforeopen's outbox clear, is left out. It would fail the test that pins that clear, and both Bridge entry points drain in the same call.A doc-claim audit found three sentences this change made false, each a general rule that Catalog breaks. All three are fixed here:
docs/sans-io.md's "Results do not return as FIFO events" now names the gated stores, and says Catalog's landing is an ungated mailbox take that the replay anchors do not record.StoreRunner::Helddoc no longer says every parked job went through tape admission.Porttrait doc scopes "silence holds the reservation" and "a second answer is refused" to the stores whose landing holds a reservation. A mailbox port such as Catalog's queues and applies a second answer.Live path
Catalog is untaped, so the Live runner was checked in the macOS simulator. It ran against
tests/mock_pms.py, with plex.tv and Discover pointed at the mock, a QR sign-in through the mock, and theplxnative-catalogdev trigger. These were mock-only runs, with no real account.StoreRunner::Live.GET /library/metadata/<hex>, followed only by the Watchlist store's own list reads. There was no re-ask and no refusal loop.Not run live, covered by tests only: the runner's failed-spawn branch and the profile-switch re-open. This is host-simulator evidence only, with no TV claim. No drawing code or FFI changed.
🤖 Generated with Claude Code