Repository navigation
Browse section hubs emit store jobs for the list and row reads; the step decides the client from ClientKeys - #1021
Merged
Merged
Conversation
A section-hubs step must start no worker of the store's own (red on this base: the step's own worker answers), and a landing whose client moved is not ours and leaves the section owed (a pin on this base). The refusal settle test needs the job seams and lands with them. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A library's section hubs (the list read and the per-row page read) no longer start their own worker and no longer read the registry in the step. Each read is a typed job on Browse's outbox, decided from the borrowed ClientKeys the Bridge filled; the application's StoreRunner checks the key at launch (resolve) and hands the worker the &'static Client. The one shared Fetch holds the claim, the mailbox and the refusal for both reads, so one read is in flight across all sections. - StoreJob::BrowseHubs(Job<BrowseHubsReq>, BrowseHubsPort), admission Direct (controlled runs never emit this work: bootstrap/effects.rs work_value refuses every StoreWork but Hubs and BrowseDiscovery). - The claim is raised at the step and lowered by the landing or the refusal; a refused read is settled by the store's next hub step to the state of a read that never started. - hubs_land compares the result's ClientKey with the section's current row of ClientKeys. - Bridge: browse_run, the StoreWork::Browse arm and reconcile_pump refill the keys and drain Browse's outbox in the same call; the viewstate and notify fan-outs drain it through their FILLS lists. - Ledger: workers -2 (hubs_spawn, hubs_spawn_row), globals -3 (their client_for reads and hubs_land's); PINNED_LEDGER_TOTALS 16/87/58/11. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
- adapters/stores.rs: the BrowseHubs branches (start on a worker and answer once, refused when the registry's key moved, refused when the system refuses the thread, held park and run, a parked job whose client is gone, Direct admission under a Home ledger), each checked by breaking the branch it pins; the Hubs launch hook now covers the section hubs' reads too. - browse_hubs_drain_tests.rs: every Bridge entry that can step the section hubs (browse_run, the StoreWork::Browse arm, reconcile_pump, viewstate_pump through VIEWSTATE_FILLS, notify_pump through NOTIFY_FILLS) starts the read its step left in the same call; each test fails when its drain is removed. - BrowseStore: two test-only reads of the shared claim and mailbox. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…te covers section_hubs.rs docs/sans-io.md names the section hubs' reads as a store job (StoreJob::BrowseHubs, one shared claim, one mailbox, one read in flight) and lists which Bridge entries drain Browse's outbox. docs/stores-as-machines.md and docs/poster-scheduler-design.md follow: the libhubs worker is started by the application's runner. The //! of section_hubs.rs and the hubs_kick doc say the step starts nothing. ci/check-deps.sh adds data/src/browse/section_hubs.rs to the wall gate (no clock read in it, so no ledger line). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…read The full hostsim pass found the one rig that needs a section-hubs request to reach the server: the_recommended_page_fetches_the_sections_hubs. A test Bridge's runner parks the read (as it parks every kind but Hubs), so the rig's wait now runs what the page's step left parked with run_held_store_jobs_of_for_test(StoreId::Browse), the way the Collections rig runs its jobs. held() keeps parking BrowseHubs; the docs name the rig. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…w field landgate.rs and browse_dump_tests.rs still called the section hubs' flag hubs.fetching; it is the store's one stores::Fetch, hubs.fetch, since the reads became store jobs. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Main carries the Metadata (#1013) and Search (#1015) store-job lanes. Both sides' additions are kept: StoreJob::Search, SaveRecents and BrowseHubs side by side in the enum, admission(), store(), take_jobs_of/has_jobs_of, the runner's start/admit_home/retire/run_held arms, and the wall list (search and section_hubs.rs). The Search and section-hubs bullets of docs/sans-io.md both stay (Browse's is the ninth store on the lane). PINNED_LEDGER_TOTALS is the real sum of the '# count:' headers at the merged tree: workers 14, globals 75, forks 58, fxlanes 11. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-ours landing is tested for a re-point and a sign-out N3: VIEWSTATE_FILLS and NOTIFY_FILLS are [Browse, Hubs], the order the design (S3) states and StoreId declares, and the fill-list test pins the order. N4: the landing compare was tested only for a re-token. Two cases join it, one whose answer comes from another client instance with the same token (built with from_client_for_test, so the builder is no longer unused) and one whose server holds no client at the landing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Six audit contradictions. sans-io.md: the Direct list of admission() names the section hubs' read, and the bypassed-drain list gains browse_run as bridge.rs's copy has it. section_hubs.rs: `owed` is cleared when the step emits the read (a refusal puts it back at the next step), not when a worker is claimed; the not-ours test docs no longer say the rejection arm is unreachable without a client; HubResult names its ClientKey gate, not DirectoryResult's shape. collection.rs: no StoreEv::Cmd sender exists now that Browse's commands go through Bridge::browse_run (also review note N1). The review's N2 clause (viewstate_run drains the same VIEWSTATE_FILLS list) rode in the main merge. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t_home pattern Resolving the main merge kept both sides' lines of the or-pattern, including the section hubs' own `)` that ends the arm. The pattern now lists BrowseHubs, Search and SaveRecents inside one arm. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ixes left long Comment layout only; no code, signature or assertion changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Oct 24, 2026
Brings in the Browse B-A section-hubs job and the other changes main gained since fba7a81 (#1017, #1021, #950). Five files conflicted and every one keeps both sides: the Direct arm of StoreJob::admission() lists BrowseHubs, MetaSeason and MetaEpisodes; the runner and the Held docs name both the Browse and the Metadata kinds; bridge.rs's late-job messages name every drain of both stores; docs/sans-io.md numbers Metadata as the tenth store; PINNED_LEDGER_TOTALS is the real sum of the # count: headers (the textual merge produced a wrong-looking pair). Co-Authored-By: Claude Sonnet 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 #1020
A library's section hubs (the Recommended page's list and the row windows under it) no longer start the Browse store's own worker or read the server registry from its step. Each read leaves as a typed
StoreJob::BrowseHubs:ClientKeys;StoreRunnerresolves that key at launch and hands the worker body the client.The store lanes merged so far work this way (#975, #987, #990, #996, #999, #1011, #1013, #1015). This one copies the Hubs lane (#1011) one store over. It is wave 4, lane B, PR B-A of the Sans-IO series (docs/sans-io.md, "The store job lane").
What changed
The job (
data/src/browse/section_hubs.rs,data/src/stores/{browse,mod}.rs):StoreJob::BrowseHubs(Job<BrowseHubsReq>, BrowseHubsPort)is one kind for both the list read and a row's window read. The request carries which read it is, the section, itsClientKeyand the epoch.Fetch<HubResult>), so one section-hubs read is in flight across all sections, as before.Direct. A controlled run never emits this work, becausebootstrap/effects.rs'swork_value()refuses everyStoreWorkbut Hubs and discovery. So no fixture records it, and the fixtures are unchanged.The claim and refusal (S2):
hubs_pump_spawnsthen puts back what a failed start left onmain: a list read is owed again, and a row read is no longer in flight. The pump after that asks again with the current key.The landing:
hubs_landcompares the answer'sClientKeywith the section's current row inClientKeys, instead of reading the registry (client_for,ptr::eq,token_gen). A re-token, a re-point (another client instance with the same token) and a sign-out each land as not ours, and the section stays owed. The harness linelibhubs: section N landed N shelves, N itemsis byte-identical (tests/mock_fps.pyreads it).The runner (
app/adapters/stores.rs):start_browse_hubs/launch_browse_hubsresolve the key at launch, or refuse.start,run_held_where,admit_homeandretire_parked_details.Drains (S3). Every Bridge call that can step the section hubs drains Browse in the same call:
Bridge::browse_run(and the dispatcher'sStoreCmd::Browsearm, which calls it)start_store_jobs_of(Browse)StoreWork::Browsearmstart_store_jobs_of(Browse)Bridge::reconcile_pump(its owed requery)start_store_jobs_of(Browse)Bridge::viewstate_pump/viewstate_run(a burst-endHubsInvalidateAll)VIEWSTATE_FILLSBridge::notify_pump(a library change,HubsInvalidateServer)NOTIFY_FILLSVIEWSTATE_FILLSandNOTIFY_FILLSare now[Browse, Hubs], inStoreIdorder as S3 says. A test asserts the order. Browse isDirect, so this changes no recorded admission.browse_runjoins the backstop's list of drains instart_late_store_jobs.Machine::steponBrowseStorepasses no keys, as Collection's and Person's do, so a key-less step decides no section-hubs read.Test runner:
StoreRunner::held()parksBrowseHubs; only Hubs stays live there.the_recommended_page_fetches_the_sections_hubs, now runs the parked read on each pass of its wait (run_held_store_jobs_of_for_test(StoreId::Browse)), the pattern the Collections rig uses.Call sites:
Stores::browse_runtakes the keys. Test-onlybrowse_run_for_test/BrowseStore::run_for_testkeep the screens and app tests' one-argument calls. That is why 14 files in screens and app change only at those test call sites.search/scope.rschanges one test call the same way.Gate list:
ci/check-deps.sh'swalllist gainsdata/src/browse/section_hubs.rs, which has no clock read.Ledgers
ci/allow/workers/data-browse.txthubs_spawn,hubs_spawn_rowspawn_smallgone)ci/allow/globals/data-browse.txthubs_land,hubs_spawn,hubs_spawn_rowclient_forgone)PINNED_LEDGER_TOTALS(workers/globals/forks/fxlanes)No ledger line was added or edited. The directory, page and source reads, discovery and the pins keep their
data-browselines for the next PRs.Tests
Fails-first:
a_section_hubs_step_emits_a_job_and_starts_no_worker_of_its_ownwas committed first (728e95c) and was red on the base.a_landing_whose_client_moved_is_not_ours_and_the_section_is_still_owedpins behaviourmainalready had.New tests:
section_hubs_job_tests.rs: emit, the list and row settles, a retired adapter, three not-ours landings (re-token, re-point, sign-out), a superseded read's late answer, and the pump waking to settle.Directadmission leaves the Home ledger untouched.app/browse_hubs_drain_tests.rs.Mutation checks, each reverted:
browse_run, theStoreWork::Browsearm, theVIEWSTATE_FILLSentry, theNOTIFY_FILLSentry, thereconcile_pumpdrain) fails its drain test.Targeted suites at 81228e7, which merges
mainat e87ca65:plx_data1218 passed, 0 failed;plx_screens1704 passed, 0 failed;plx_machine94 passed, 0 failed;ci/check-deps.shandci/check-module-layers.pyare green.Gates
This PR's CI is the gate for
make check,check-nodef, the replay fixtures and the ARM build. They were not run locally. The fixture files are unchanged frommain.Review. One review, verdict FIX FIRST, with one should-fix finding: the branch conflicted with
mainafter #1013 and #1015. That is fixed by the main merge, with the pins recomputed from the# count:headers. One stray)the merge left in the runner'sadmit_homepattern was found and fixed before the suites above ran. Five notes were handled:viewstate_run;StoreIdorder;Doc-claim audit. It found six sentences this change made false, and all six are fixed here:
docs/sans-io.md;owedandhubs_landdocs, which saidowedclears when a worker is claimed;section_hubs.rs;HubResultdoc;Machine::stepcomment.Live path
The section hubs were checked in the macOS simulator against
tests/mock_pms.py --section-hubs 6, with plex.tv and Discover pointed at the mock and a placeholder token. It was a mock-only run with no real account. Before any key, the log showed a synthetic server withowned=1.GET /hubs/sections/1. Eight seconds later there was still one.libhubs: section 0 landed 6 shelves, 68 items, with nostores: WARNand no panic.This is host-simulator evidence only, with no TV claim. No drawing code or FFI changed.
Not in this PR
browse/: the directory (B-B), the page and source reads (B-C), discovery (B-D), the roster and gate reads (B-E), and the pins (B-F).🤖 Generated with Claude Code