Skip to content

[step] Refactor around Runner - #335

Merged
jrapin merged 5 commits into
mainfrom
step-runner
Oct 1, 2026
Merged

jrapin merged 5 commits into
mainfrom
step-runner

Conversation

@jrapin

@jrapin jrapin commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Before this, each StepItems carried an upstream prefix and a mode, and every step re-derived its cache context from them. This PR moves that context into a frozen base.Runner(prefix, mode):

  • runner.dispatch(step, batch) runs a step: warm carrier, inline, or backend.
  • runner.advance(step) gives the context of the next step.
  • runner.paths(step) gives the step's cache layout.

StepItems is reduced to source + pending + uids.
Removed: StepItems(upstream=, mode=), StepItems.apply_step, select(mode=), Step._dispatch, Step._make_paths, Chain._walk_steps, ComputeBatch.cached_items, and two CoordinationInfo fields. Net is about -60 lines.

  • No public API change, and cache uids are unchanged (the existing uid pins pass).
  • Private hooks: _run_items(runner, batch), Backend._run/_prepare(runner, step, batch), lookup(_runner=) (replaces _upstream=).
  • Fix: force inside an uncached container (e.g. a Scatter body without infra) now also recomputes downstream steps.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 30, 2026
@jrapin
jrapin merged commit 7e33ebd into main Oct 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant