Fall back to _F_PATH_REWRITE env var for actor tasks in rusty.run_task - #1384
Merged
Conversation
Regular tasks pick up accelerated-inputs path rewriting because the runtime entrypoint reads the _F_PATH_REWRITE pod env var. Actor tasks enter through rusty.run_task instead, which only honors the path_rewrite_cfg kwarg - and workers that don't forward it silently leave actors reading inputs from remote storage even when the local mirror is mounted. Default the kwarg from the pod env var, mirroring _bin/runtime.py. An explicitly passed kwarg still takes precedence, and the existing mount-existence check keeps every skew combination safe (missing mount or absent config degrades to remote reads, today's behavior). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsS7fjndEwkicFKLcguRpi
cosmicBboy
enabled auto-merge (squash)
August 7, 2026 17:03
cosmicBboy
approved these changes
Aug 7, 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.
TL;DR
_bin/runtime.py(regular tasks) reads_F_PATH_REWRITEfrom the pod env to enable accelerated-inputs path rewriting.rusty.py(actor tasks) never did — it only honored thepath_rewrite_cfgkwarg, which workers don't pass. This PR gives rusty the same env-var fallback runtime.py already has.Before / after
Regular task (
_bin/runtime.py, unchanged):Actor task (
rusty.run_task):One consistent decision tree for both entrypoints: explicit kwarg wins, else pod env, then the existing mount-existence check gates activation.
Why it matters
Actors are the workload that benefits most from local dataset reads — many short tasks on one warm worker, often re-reading the same shared data. Without this, enabling accelerated inputs sped up regular tasks but silently did nothing for actors.
Safety
Every missing piece degrades to today's behavior (remote reads): env var absent → no-op; mount not present → existing check falls back; old workers → this is the only path that activates the feature for them; workers that do forward the kwarg (worker-v2 change, separate) → kwarg takes precedence.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MsS7fjndEwkicFKLcguRpi