Skip to content

[codex] Add materializer execution overrides#47

Merged
mvallebr merged 1 commit into
mainfrom
codex/execution-overrides-materializers
Jun 20, 2026
Merged

[codex] Add materializer execution overrides#47
mvallebr merged 1 commit into
mainfrom
codex/execution-overrides-materializers

Conversation

@mvallebr

Copy link
Copy Markdown
Contributor

Summary

This is the first runtime-DI slice for Issue 45.0.

It introduces ExecutionOverrides focused on materializers only, while keeping the DAG as the compiled semantic contract.

What changed

  • added synaflow.execution.ExecutionOverrides
  • added PipelineRegistry and MaterializerRegistry with strict key validation against compiled materializer keys
  • threaded overrides through run(), async_run(), PipelineExecutor, and AsyncPipelineExecutor
  • resolved materializers at runtime from the registry without re-deriving DAG semantics
  • kept eager vs lazy materialization planning in the compiled Dag
  • added sync/async tests for override behavior and fail-fast validation
  • documented the new runtime-override boundary in README and build-vs-run docs

Why

PR #46 moved more materialization planning into the compiled Dag, which made the next design step cleaner: allow runtime replacement of concrete materializer callables without letting runtime mutate graph structure or execution semantics.

This PR keeps that boundary explicit:

  • the Dag still decides topology, dependency resolution, and materialization strategy
  • ExecutionOverrides only swaps the concrete callable associated with an already-compiled key

Impact

Tests can now replace compiled materializers without patching module globals or rebuilding alternative pipeline definitions.

This is intentionally scoped to materializers first. Observers/resources and richer scope helpers can build on the same contract later.

Validation

  • uv run pytest

@mvallebr mvallebr marked this pull request as ready for review June 20, 2026 00:42
@mvallebr mvallebr merged commit 4a5acc7 into main Jun 20, 2026
5 checks passed
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.

1 participant