Repository navigation
Detail store: request_detail emits a job; the app's StoreRunner starts it - #975
Merged
Merged
Conversation
request_detail keeps begin_detail_request (the supersede, the generation, the tape's cancel record, the landing admission) and pushes a StoreJob::Detail(Job<DetailReq>, DetailPort) on the owner's outbox; the application's runner starts it. plx_machine::job adds Job, Port and assert_fx!. The held lane (held_detail, run_held_detail_fetches_for_test, and the inline answer of a superseded fetch) is deleted: a superseded request now keeps its landing reservation until its own answer arrives, as it does on the device. fetch_full and finish_detail_fetch become pub IO bodies, and finish_detail_fetch answers through the port. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Bridge owns a StoreRunner chosen at construction (Live in production, Held in test rigs, as ConsentAdapter::fixture() is). Live copies the old spawn's tape::admit request and worker; Held parks the job after its admission and answers a superseded one, and Bridge::run_held_store_jobs_for_test runs the parked ones on the test thread. Bridge::metadata_run takes the jobs the store step emitted in the same call, and the dispatcher's Metadata arm goes through it, so the tape's admission record follows the step's cancellation record with nothing between them; metadata_pump_detail drains leftovers first, for describe_movie, which holds only the store. The direct RequestDetail senders (input, playback, scenarios) call bridge.metadata_run. The test rigs' frame helpers assert that no store holds an unstarted job, so a sender that bypasses metadata_run is a red test. The eight run_held_detail_fetches_for_test callers use the Bridge helper and two stale comments are fixed. plx_machine::job is placed in the machine layer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… document the lane request_detail no longer starts a worker, reads the client registry or forks on cfg(test), so its three ledger lines are stale: workers 5->4 and 27->26, globals 17->16 and 105->104, forks 4->3 and 62->61 (fxlanes stays 11). docs/sans-io.md gains "The store job lane" (the shape, the two drains, why results still return through the landing, why the job is not an AppFx, the stranded-job test check and why the port holds the adapter Arc); docs/module-layers.md and one rustdoc stop naming the deleted held lane. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The store job lane is the template eight later store PRs copy, so the review's findings land before it does. - play_item_now_with drains right after describe_movie (Bridge::start_store_jobs), so no production path relies on the detail pump's backstop and the tape admission is written where the request is made, as on main. The extra pump in the content.rs rig goes away. - The backstop counts what it had to start late (Bridge::late_store_jobs) and logs one "stores: WARN" line. assert_no_store_jobs_left_for_test asserts the count is zero, so a sender that bypasses metadata_run is red in every rig that makes the check, the one that runs update()'s pump included. The route-test harness makes the check after each frame and each request pass. - Stores::take_jobs / has_jobs aggregate every store's outbox: the drain and the rig check are written once and a new store joins in one place. Bridge::metadata_pump (test-only now) goes through the same counted backstop. Stores::metadata_run, MetadataStore's Machine::step and docs/sans-io.md say that the owner drains. - request_detail no longer routes through request_detail_with_spawn, which is test-only now. - Tests: StoreRunner under tape replay (admitted false and true, byte-for-byte admission, one refusal, nothing launched) and Held's superseded answer; the drain/bypass checks on a Bridge; the contract test pins that a capacity refusal emits no job and that the job captures prefer. - Prose the lane made false: metadata.rs, bridge.rs, stores.rs, sans-io.md, job.rs (which now says what does and does not check "exactly one call per job"); controlled_home's rustdoc says it always runs Live. Co-Authored-By: Claude Opus 5.5 <[email protected]>
One conflict, in tests/test_harness.py: both sides lowered PINNED_LEDGER_TOTALS. The merged totals are the sums of the `# count:` headers under ci/allow/<rule>/ on the merged tree: workers 25, globals 101, forks 60, fxlanes 11. rust-modules/src/app/bridge.rs auto-merged: Bridge has one struct literal (with_publications_and_stores), which initialises P1's cache_refresh_begun and this branch's store_runner and late_store_jobs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 24, 2026
GLinnik21
added a commit
that referenced
this pull request
Oct 24, 2026
…input (#987) The Collection store no longer starts a worker or reads the server registry from inside its step. It emits a typed StoreJob::Collection that the app's StoreRunner starts, the lane the Detail store took in #975; wave 1, store 1 of the Sans-IO series (docs/sans-io.md, "The store job lane"). Store-agnostic pieces every later store reuses: ClientKey { instance, token } names a client and its credential, and ClientKeys maps servers to keys; the Bridge owns one buffer, refilled in place by adapters::stores::refill_client_keys right before a store step (the only loop over the registry). Fetch::release_for(gen) releases only that generation's claim. Stores::take_jobs_of and Bridge::start_store_jobs_of drain one store, and each Bridge entry point drains only its own store in the call that steps it, which keeps the tape's admission order. StoreRunner matches on the job, and a newer Detail request retires only parked Detail jobs. Collection: maybe_spawn claims the generation and pushes Job<CollectionReq> carrying the server and the ClientKey the step chose; without a key it holds off RETRY_FRAMES. run, pump and refresh_if_client_changed take &ClientKeys, so the three client_for reads are gone. The launch resolves the client and starts the job only if the registry still answers that exact client; otherwise it records "admitted":false and the port releases the claim. finish_collection_job runs the IO under catch_unwind and answers through CollectionPort; CollectionAnswer is opaque. Ledgers: data-collection's workers (1) and globals (3) files deleted; PINNED_LEDGER_TOTALS 25/101/60/11 -> 24/98/60/11. The wall gate scans data/src/collection.rs. Tests: 10 step tests in data/src/collection_job_tests.rs (emit, stamp, no request without a key, an observed hold-off); a registry-moved-on job is not started; store_admission_tests pins the recorded admission literals and a person-then-collection frame's cross-store order, byte-equal on main and on this branch. Fixture replays all SAME; the live runner loaded a Collection page's header and members against the mock server in the macOS simulator. Closes #984 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 24, 2026
GLinnik21
added a commit
that referenced
this pull request
Oct 24, 2026
#990) The Person store no longer starts workers or reads the server registry from inside its step. It emits one typed StoreJob::Person per fetch slot, which the app's StoreRunner starts, the lane Detail took in #975 and Collection in #987; wave 1, store 2 of the Sans-IO series, reusing #987's ClientKeys input and per-store drains unchanged. The step: maybe_spawn keeps the busy and retry_cd checks, the address, the plex.tv branch with its session early return, the claim and the synchronous refused landing, then pushes a Job<PersonReq>. A pump emits at most one job per wanted slot, in ascending slot order, up to the fan-out width. A server read carries the server and the ClientKey the step chose; with no key the step backs off RETRY_FRAMES without claiming. A plex.tv read (Profile, Credits) carries the identity the step decided on: Controlled, or the settled session. Addr.req is a per-state wrapping sequence; the slot and the person generation travel in PersonPort, and the tape's admission JSON takes its gen from the request, so the recorded bytes are unchanged. The runner: start_person admits through the tape. A server read starts only if ClientKey::of(c) still matches the job's key; otherwise it records "admitted":false and PersonPort::refused releases only that generation's claim. The Held lane re-resolves the client and refuses on a mismatch, and a newer Detail request leaves parked Person jobs alone. finish_person_job holds the old worker body: Controlled answers the failure value without a read, Settled runs fetch_profile/fetch_credits under catch_unwind, a server job runs the Resolve, Media or Roles read with its chunking kept, and a server job handed no client is refused. PersonAnswer is opaque. Bridge::person_pump refills the keys, steps and drains StoreId::Person in one call, still before Collection and the Detail reconciliation, so the cross-store admission order holds. Not pure yet: the step still reads tape::active(), session::peek_settled(), the session watch, the refused-discover landing, server_ids(), server_roster_gen() and, in dev-trigger builds, devtrig::read("personcredits"); docs/sans-io.md lists them and claims no purity for Person. Ledgers: data-person's workers (2) and globals (1) files deleted; PINNED_LEDGER_TOTALS 24/98/60/11 -> 22/97/60/11. Tests: 10 step tests in data/src/person.rs (slot order and width, the no-key back-off, plex.tv identity, unique addresses across a reset, a pre-reset port lands only into the old adapter, a refusal releases only its own claim, the admission record in fixture 12's shape, a controlled read without IO, a clientless server job refused); 7 runner tests in app/adapters/stores.rs; 2 Bridge admission-order tests that pass on the pre-change tree and on this branch. The controlled-session test now steps and pins the outbox empty. Fixture replays all SAME; the live runner loaded a Person page's Media, Profile, Credits and batched Roles reads once each against the mock server in the macOS simulator. Closes #989 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 24, 2026
Closed
GLinnik21
added a commit
that referenced
this pull request
Oct 24, 2026
…he step can observe (#996) The subtitle-search and view-reconcile stores no longer start workers or read the server registry from inside their step. Each emits a typed store job that the app's StoreRunner starts, the lane Detail (#975), Collection (#987) and Person (#990) took; wave 2, lane A of the Sans-IO series. A refusal the step can observe: Fetch::refuse_for(gen) releases that generation's claim and records the refusal, only when the claim is its own; Fetch::take_refused(gen) answers once, and a refusal for a superseded generation frees and records nothing. These stores back off RETRY_FRAMES after a refused start, and the backoff survives the start leaving the step. Subtitle search: maybe_spawn claims and pushes Job<SubSearchReq> with the server and the ClientKey the step chose; pump reads take_refused before maybe_spawn and backs off one pump later, with no respawn spin; the no-client branch is unchanged; finish_subsearch_job runs under catch_unwind. View reconcile: kick pushes Job<ReconcileReq> per server batch. A landing is Landing { id, outcome } with Outcome::{Read, NotStarted}; a refused or key-mismatched flight posts NotStarted, which requeues its leaves and parents (an item asked for again goes back as an item), drops the dirty marks it covered, backs off and settles nothing. reset() keeps a job still on the outbox, which answers into the retired adapter. The runner resolves the client inside the launch and starts a job only if ClientKey::of(c) still matches; both kinds are untaped and launch live under replay; Held parks them, run_held re-resolves or refuses, and a newer Detail request leaves them parked. Bridge::subsearch_pump and reconcile_pump refill the keys, step and drain their own store in one call. Ledgers: data-subsearch's and data-viewreconcile's workers and globals files deleted; PINNED_LEDGER_TOTALS 22/97/60/11 -> 20/95/60/11. The wall gate scans data/subsearch.rs. Tests: 36 new (Fetch refusal 4, subsearch job 8, view reconcile job 11 plus 1 parents test, runner 12), and the stop-after-identity-change regression test now sweeps the parked read-back. Fixture replays all SAME; in the macOS simulator against the mock server, a watched-state read-back and a player subtitle search were each sent to the runner, ran and landed. Closes #995 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.
Summary
Pilot P2 of the Sans-IO series (docs/sans-io.md). This is the first store to stop starting its own worker.
request_detail(data/src/metadata.rs) used to calltape::admit, readclient_forand runspawn_small("detail")itself, behind acfg(test)held lane that answered superseded fetches inline. It now hands the work out as a value, and the app runs it. The interface is the one the remaining stores will copy.The job:
plx_machine::job::{Job<R>{addr, req}, Port<T>, assert_fx!}, which names nothing abovebase;StoreJob::Detail(Job<DetailReq>, DetailPort)indata/src/stores, whereDetailReqis{ sid, rk, prefer };DetailPortholds the adapterArcthat was current when the job was emitted. A job emitted before aResetstill answers into the retired adapter, as the oldArc::clonedid. The store keeps no handle to a retired adapter, so an id would need a registry.The outbox:
MetadataStore::take_jobs/has_jobs, aggregated asStores::take_jobs/has_jobs. A store joins by giving itself an outbox.MetadataStore'sMachine::stepdoes not drain it; its owner does.The runner:
app/adapters/stores.rsStoreRunner { Live, Held }, chosen when the Bridge is built.Livedoes main's production path line for line: the sametape::admitJSON, keys and order, theclient_forread,spawn_small, andrefusedwhen not admitted.Heldis the test rigs' runner. It parks the job and answers a superseded parked job withNone.controlled_homealways runsLive, and its rustdoc says so.Drains:
Bridge::metadata_runis the store step followed bystart_store_jobs(), and the dispatcher'sStoreCmd::Metadataarm now calls it. So the tape admission is still recorded in the same call and position: aftercancel_all's record, before any other tape request.describe_moviedrains explicitly.metadata_pump_detailkeeps a backstop that counts late jobs (late_store_jobs) and logs one warning.metadata_runis a red test. On its first run the check caughtdescribe_movie(a movie's Play from the item menu), which had been relying on the backstop; it now drains explicitly.The result path is unchanged: landing, gate,
adapter_rankand both drain modes.Ledgers:
request_detail::spawn_small(workers),request_detail::client_for(globals) and therequest_detailfork leaveci/allow/*/data-metadata.txt.request_detail_with_spawnbecomes#[cfg(test)].ci/module-layers.iniplacesjobin[machine].Docs: a "store job lane" section in docs/sans-io.md covers:
Effects, Bridge-run stores throughtake_jobs;AppFxeffect: a new fxlanes site, controlled Home's fail-closed, and recorder churn;Arcport.Plus docs/module-layers.md (
held_detailis gone) and rustdoc.No Makefile, Cargo or workflow change, and no file moved, split or merged, so no build-bench table.
Verification
a_superseded_detail_request_keeps_its_reservation_until_answeredwas written first. It failed on ae611ee:a pump with no answer in hand does not free the superseded slot / left: 1 / right: 2. It passes now.assert_fx!), that a request refused for capacity emits no job, and that the job capturesprefer.Liveunder tape replay withadmitted:falseandadmitted:true,Heldsuperseding, and the frame check's two red cases. Three planted mutations (runner refusal removed, refuse everything, capacity early-return removed) each turned a test red.a_job_emitted_before_a_reset_answers_into_the_retired_adapterpins the port.make checkon the committed merge head 1326115 (with main's 088f6f7 merged in):check: 106 steps — all ok.test result: ok. 1136 passed; 0 failed.936 passed; 0 failed(hostsim pass1049 passed; 0 failed).Ran 539 tests/OK.check-deps: all gates green.# count:header.make check-nodef: clean.make check-replay:3 fixtures, 6 replays, 0 failures, all sixverdict=SAME. Fixture12-filmography-detail-returnholds four recorded metadata admissions, so the replay runs the new runner's admission JSON. No fixture was re-recorded.Closes #974
🤖 Generated with Claude Code