Refactor: carry host callbacks and launch identity per native run - #1685
Conversation
|
Warning Review limit reached
Next review available in: 3 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (49)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6ea6f15 to
2b6aabe
Compare
CI status — two red checks are self-hosted-runner infra, not this changeEverything that actually executes this change's code is green:
|
2b6aabe to
5358f81
Compare
Replace ambient runner, slot, bank, identity, and acceptance setters with one placement-owned native-run context. The context copies the run descriptor during prepare and binds a complete HostApiOps table to the selected runner resources. Use run_epoch as the authoritative identity after lease admission, publish acceptance only at the real launch marker, and preserve the existing enqueue, poll, and drain behavior. All eight host-runtime DSOs expose the same required contract while simpler_init remains unchanged.
5358f81 to
fd8c500
Compare
Summary
Make each prepared native run self-contained instead of recovering mutable runner selection from thread-local state.
HostApivalue backed by one completeHostApiOpstable.NativeRunContextin caller-owned storage. It owns the copied descriptor, boundHostApi, runtime implementation, launch signal, and compatibility executor through finalize.run_epochas the authoritative phase-token identity.This removes thread identity from native-run resource selection while preserving Worker-visible execution behavior.
Contract decisions
simpler_initis unchanged.PTO_PIPELINE_CONTRACT_ABI_VERSIONremains1.Scope
This PR does not add the direct-L2 asynchronous lane or remove the compatibility executor. It also does not perform the later HBG process-global ownership redesign; the HBG change here is limited to making the existing temporary binding lifetime-safe.
Validation
.venv/bin/pre-commit run --files ...: all hooks passed..venv/bin/python -m pip install --no-build-isolation -e .: rebuilt successfully.HostApi, launch signal, TRB retained buffer, HBG tensor access).