Parent
#46
What to build
Crawler::process_job constructs a concrete SessionContext per Job from the existing Crawler state — proxy router lease, antibot session state, render budgets, resolved policy profile, impersonate profile identity. This is the precursor to the runner cutover: the SessionContext exists at the right point in process_job but is not yet consumed by runner.run.
After this slice, Crawler::process_job builds let ctx = SessionContext { ... }; from self.proxy_router, self.session_states[session_id], self.render_budgets, self.config.policy_profile, and the ImpersonateClient identity. The context is held in a local variable, ready for C4 to thread into runner.run(&job, &ctx).await.
Acceptance criteria
Blocked by
Parent
#46
What to build
Crawler::process_jobconstructs a concreteSessionContextper Job from the existingCrawlerstate — proxy router lease, antibot session state, render budgets, resolved policy profile, impersonate profile identity. This is the precursor to the runner cutover: the SessionContext exists at the right point inprocess_jobbut is not yet consumed byrunner.run.After this slice,
Crawler::process_jobbuildslet ctx = SessionContext { ... };fromself.proxy_router,self.session_states[session_id],self.render_budgets,self.config.policy_profile, and theImpersonateClientidentity. The context is held in a local variable, ready for C4 to thread intorunner.run(&job, &ctx).await.Acceptance criteria
Crawler::process_jobconstructs a fully-populatedSessionContextper JobSessionContext.identitycarries the active profile name + locale + session idSessionContext.proxyisSome(ProxyLease)when a lease is acquired,NoneotherwiseSessionContext.session_statemirrorsself.session_states[session_id]SessionContext.budgetsreflectsself.render_budgetsremaining values +self.config.max_retries - job.attemptsSessionContext.policyreflects the resolvedPolicyProfilefrom configrunner.run(consumption lands in C4)Blocked by