Developer Guide: Extending Hybrid Execution
This page is for contributors working on netherframe's hybrid execution internals.
Main Entry Points
nf.core.execution.hybrid.HybridExecutionModeApp.enable_hybrid_execution()nf.core.providers.provider_protocol.ProviderProtocolClientnf.core.orchestration.unified_orchestratornf.core.backends.state_engine
Where Responsibilities Live
Execution API
nf.core.execution.hybrid is the top-level integration layer. It owns:
- app-facing helper methods
- state engine initialization
- provider loading and registration
- orchestration entry points
- supplemental hybrid operations such as data-source reads and provider function calls
Provider RPC Layer
nf.core.providers.provider_protocol.ProviderProtocolClient is the primary provider-facing client. It is split by responsibility across helper modules for:
- provider session startup and shutdown
- schema loading
- resource lifecycle RPCs
- supplemental RPCs such as data sources, functions, metadata, and ephemeral resources
State Management
nf.core.backends.state_engine and the backend factory own:
- local and remote backend selection
- locking
- state persistence
- feature-sensitive state engine construction
Common Extension Areas
New Provider-Level RPC Support
If Terraform adds a useful provider RPC:
- add the provider-facing method in the supplemental operations layer
- expose it through
ProviderProtocolClient - expose a higher-level helper on
HybridExecutionModeif needed - document and test it from the top-level API
New State Backends
New backends should integrate through the state engine abstractions rather than bypassing them. Keep locking, persistence, and feature negotiation in the backend/state-engine path.
Orchestration Changes
When changing execution order, dependency handling, or circular-dependency behavior, treat nf.core.phases.* as the source of truth for phase planning semantics.
Current Guidance
- Prefer updating the current hybrid execution modules rather than reintroducing parallel legacy execution variants.
- Prefer short, test-backed docs over speculative implementation design notes.
- If you change public behavior, update the curated user-facing docs as part of the same change.