Skip to content

Fall back to _F_PATH_REWRITE env var for actor tasks in rusty.run_task - #1384

Merged
cosmicBboy merged 3 commits into
mainfrom
pvditt/rusty-path-rewrite-env-fallback
Aug 7, 2026
Merged

Fall back to _F_PATH_REWRITE env var for actor tasks in rusty.run_task#1384
cosmicBboy merged 3 commits into
mainfrom
pvditt/rusty-path-rewrite-env-fallback

Conversation

@pvditt

@pvditt pvditt commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

TL;DR

_bin/runtime.py (regular tasks) reads _F_PATH_REWRITE from the pod env to enable accelerated-inputs path rewriting. rusty.py (actor tasks) never did — it only honored the path_rewrite_cfg kwarg, 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):

read _F_PATH_REWRITE env → verify local mount exists → rewrite input paths (else read remote)

Actor task (rusty.run_task):

before:  kwarg not passed → no rewrite → always reads remote storage, even with the local mirror mounted
after:   kwarg not passed → read _F_PATH_REWRITE env → same mount check → same rewrite

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

pvditt and others added 3 commits August 5, 2026 17:37
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
cosmicBboy enabled auto-merge (squash) August 7, 2026 17:03
@cosmicBboy
cosmicBboy merged commit 1b23390 into main Aug 7, 2026
58 checks passed
@cosmicBboy
cosmicBboy deleted the pvditt/rusty-path-rewrite-env-fallback branch August 7, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants