Netherframe Roadmap
This page retains implementation plans and dated measurements, including older descriptions of runtime gaps. For current user-facing behavior, use hybrid semantics, release notes and the compatibility policy. The full-release assessment is a historical snapshot.
This document consolidates the current implementation plans into a single, actionable roadmap. It is based on the internal plans in:
- docs/contributing/internals/historical/phases/PHASE_IMPLEMENTATION_PLAN.md
- docs/contributing/internals/INTEGRATION_PLAN_ENHANCED_ORCHESTRATOR.md
- docs/contributing/internals/historical/S3_BACKEND_UNIFICATION_PLAN.md
- docs/contributing/internals/implementation/SYNTHESIS_OPTIMIZATION_PLAN.md
- docs/contributing/internals/analyses/dead_code_report.md
Related strategic RFCs:
- Netherframe As A Universal Convergence Runtime
- Graph State Backend
- Typed Runtime Bindings and App-Config Export
- Graph State Backend: Model-Checking Results
- Graph State Backend: Progress And How To Resume
Priority Track: Hybrid Runtime Correctness and Parity
The current hybrid runtime is fast for two different reasons:
- It avoids Terraform Core's full graph/config/runtime engine and talks to providers directly.
- It currently skips some behaviors that Terraform treats as correctness or operator-safety features.
This section is the implementation plan to preserve the legitimate performance advantages while closing the most important semantic gaps.
Goals
- Keep direct provider RPC execution as the performance foundation
- Restore the most important Terraform-equivalent safety checks in hybrid mode
- Make plan and apply behavior reproducible and easier to reason about
- Define which Terraform semantics hybrid mode fully supports, partially supports, or intentionally does not support
- Add benchmarks so parity work can be measured against the current fast path
Non-Goals
- Re-implement Terraform Core wholesale inside Netherframe
- Match every Terraform edge case before shipping improvements
- Introduce a second large execution engine fork inside nf.core
Current Gaps To Close
- Plan-time refresh and drift detection are implemented as helper code but are
not part of the active hybrid
plan()path. - Apply re-builds plans at execution time instead of applying an immutable plan artifact.
- Lifecycle semantics such as
prevent_destroy,create_before_destroy, andreplace_triggered_byare not enforced in the active hybrid path. - Native runtime checks and provisioner behavior are not executed with Terraform-like semantics in hybrid mode.
- Provider/state compatibility handling exists at the protocol layer but is not wired into the active planning and apply flow.
- Hybrid semantics are not documented clearly enough for users to know what is guaranteed today.
Design Principles
- Prefer explicit capability modeling over implicit partial support
- Keep planning and apply data structures serializable and inspectable
- Preserve the current provider protocol client split and orchestrator model
- Add correctness features in layers so performance regressions can be isolated
- Fail closed when a requested feature is not yet supported in hybrid mode
- Make parity improvements the default hybrid behavior rather than shipping a long-lived opt-in matrix of environment flags
Implementation Phases
Phase 0: Baseline and Safety Rails
Objective: establish the current behavior precisely before changing it.
- [x] Add a
docs/advanced/hybrid-execution/SEMANTICS.mdmatrix that lists: - supported
- partially supported
- unsupported
- planned
- [x] Add benchmark fixtures for representative hybrid workloads:
- create-only
- update-only
- no-op plan
- drifted remote state
- replacement-heavy workloads
- [x] Record baseline timings for current hybrid plan/apply on at least:
- 100 resources
- 1k resources
- one FakeCloud-backed AWS scenario
- Current recorded baselines on
2026-04-13:- harness-local
hybrid-plan-create,100resources:0.0907stotal,0.907 ms/resource - harness-local
hybrid-apply-replace,100resources:0.0960stotal,0.960 ms/resource - harness-local
hybrid-plan-create,1000resources:2.4236stotal,2.424 ms/resource - harness-local
hybrid-apply-replace,1000resources:2.2326stotal,2.233 ms/resource - FakeCloud-backed six-resource Terraform-vs-hybrid scenario:
11.2shybrid average versus30.6sTerraform average across 3 runs
- harness-local
- [x] Define the rollout rule for parity work:
- new parity behavior ships enabled by default in hybrid mode
- unsupported features fail explicitly rather than being silently ignored
- temporary internal escape hatches, if any are needed during development, are not treated as public compatibility contracts
- [x] Add plan/apply trace logging that reports which parity features were active for a run
- [x] ~~Break Phase 0 and Phase 1 into implementation tickets with owners, benchmark requirements, and acceptance tests~~ (obsolete: both phases are implemented)
Acceptance criteria:
- A benchmark command exists and is repeatable in CI/local development
- Hybrid mode emits enough diagnostics to explain which safety features were active
- The docs state current limitations unambiguously
- The roadmap does not depend on a public env-var gate per parity feature
Phase 1: Refresh and Drift Become Part of Plan
Objective: make hybrid plan() reflect reality rather than only saved state.
- [x] Refactor
HybridExecutionMode.plan()to load current state, refresh managed resources, and diff against the refreshed state before generating the plan summary - [x] Reuse the existing
_refresh_resources()implementation instead of keeping it detached from the active path - [x] Persist refreshed state separately from desired-state planning inputs so drift can be reported without mutating durable state prematurely
- [x] Extend plan output to distinguish:
- config-driven changes
- drift-only changes
- refresh failures
- refresh timeouts / unknown state
- [x] Decide and document refresh failure policy:
- default policy is permissive planning with explicit refresh diagnostics
- resources with unknown refreshed state block auto-approved apply
- interactive apply requires explicit operator approval when refresh was incomplete
- [x] Add provider capability handling where refresh is unsupported or semantically restricted
Acceptance criteria:
- Hybrid
plan()reports drift for out-of-band changes - No-op plans remain no-op only when refreshed remote state matches saved state
- Refresh timeout/error behavior is deterministic and covered by tests
Phase 2: Immutable Plan Artifacts
Objective: remove the current time-of-check/time-of-use gap.
- [x] Introduce a serializable hybrid plan artifact type under
nf.corecontaining at minimum: - plan id
- generation timestamp
- current/refreshed prior state snapshot
- desired state snapshot
- per-resource planned actions
- replacement requirements
- lifecycle/conditions/provisioner decisions
- provider versions and configuration fingerprints
- runtime feature flags used during planning
- [x] Change
HybridExecutionMode.apply()to consume a previously generated hybrid plan artifact instead of silently rebuilding plans - [x] If
apply()is called without an explicit plan, make it: - create a plan artifact
- present it
- then apply that same artifact
- [x] Reject apply if provider versions/config fingerprints no longer match the plan, unless an explicit override mode is chosen
- [x] Add CLI support for:
- saving a hybrid plan
- inspecting a hybrid plan
- applying a saved hybrid plan
Acceptance criteria:
- Plan and apply operate on the same serialized resource actions
nf planfollowed bynf applydoes not rebuild the logical plan silently- Plan invalidation reasons are surfaced clearly
Phase 3: Lifecycle Semantics
Objective: close the highest-value Terraform lifecycle gaps without copying all of Terraform Core.
- [x] Enforce
prevent_destroyduring hybrid planning and again at apply - [x] Carry
requires_replaceexplicitly into execution node metadata during planning, instead of discovering it only inside apply - [x] Implement hybrid handling for
replace_triggered_byusing the existing dependency analyzer and state diff information - [x] Design a hybrid-safe policy for
create_before_destroy: - current default policy is fail-closed for hybrid replacements
- future support requires explicit dependency- and provider-safety analysis
- [x] Support
ignore_changesin hybrid mode as Terraform does: ignored paths take their prior-state values in the configuration before the provider plans - [x] Add lifecycle parity tests for:
- delete blocked by
prevent_destroy - replacement forced by trigger changes
- unsupported CBD cases
ignore_changesand unsupported provisioner metadata
Acceptance criteria:
- Lifecycle behavior is either enforced or explicitly rejected
- Plan summaries expose replacement reasons and lifecycle blockers
- No lifecycle feature remains silently ignored
Phase 4: Native Runtime Checks
Objective: add explicit correctness guards without adopting Terraform's block syntax as the public surface.
- [x] Define hybrid semantics for
runtime_check/runtime_checks - [x] Implement native runtime-check phases:
pre_planchecks run before provider-backed planningpost_planchecks run after the plan is computedpre_applychecks run before provider mutationpost_applychecks run after provider result materialization- [x] Ensure runtime-check evaluation can reference:
- resolved config values
- known prior state
- new state returned by provider
- cross-stack values where supported through persisted stack outputs
- [x] Decide behavior for unknown values:
- default policy is defer during planning
- apply reevaluates deferred checks and fails closed if values are still unknown
- non-importable callables are rejected in hybrid mode
- [x] Explicitly reject Terraform
precondition/postconditionblocks in hybrid mode - [x] Store runtime-check outcomes in state or execution reports so failed checks can be inspected after partial runs
Acceptance criteria:
- Failed runtime checks stop the relevant resource with actionable context
- Deferred runtime checks surface clearly in plan summaries and apply reports
- Native runtime-check behavior is documented for unknown and deferred values
Phase 5: Provisioners and Connection Semantics
Objective: stop silently accepting Terraform-style provisioner metadata that the hybrid engine does not execute.
- [x] Decide whether hybrid mode will:
- current default policy is to reject all provisioners and connection blocks
- [x] Fail planning when provisioners or connection blocks are present in hybrid-executed resources
- [x] Fail saved-plan apply when provisioners or connection metadata is present, so older artifacts cannot bypass the planning rejection path
- [x] Decide not to run provisioners in hybrid mode. Running them as Terraform does
(
local-exec, andfile/remote-execover SSH) was built and set aside: Terraform itself calls provisioners a last resort, they act outside the plan (not shown, not idempotent, no drift detection), andfile/remote-execneed SSH reachability and credentials in the configuration. Configure machines with user data / cloud-init or baked images instead, and use Terraform synthesis, which emits provisioners for Terraform to run, where one is needed - [x] Add explicit tests for provisioner acceptance or rejection
Acceptance criteria:
- Provisioners are never silently ignored in hybrid mode
- Current supported subset is empty by design; unsupported metadata fails closed
Phase 6: Provider and State Compatibility
Objective: handle provider schema evolution and state compatibility deliberately.
- [x] Wire
upgrade_resource_stateinto state reads before refresh/plan/apply when the stored schema version is stale - [x] Extend stored state metadata to include at minimum:
- provider source/name
- provider version
- schema version
- private state/version metadata where required
- [x] Define how hybrid mode handles provider private data:
- preserve when available
- detect when unavailable
- reject operations that would be unsafe without it
- [x] Add compatibility checks when loading legacy or migrated state
- [x] Add migration tests covering provider upgrades and imported resources
Acceptance criteria:
- Provider schema/version mismatches are detected before destructive actions
- State upgrades happen explicitly and are tested
- Hybrid state format documents which provider data is persisted
Cross-Cutting Work
Test Plan
- [x] Add unit tests for each parity feature in the orchestration and hybrid packages
- [x] Add FakeCloud-backed integration tests for refresh, drift, replacement, and delete safety
- [x] Add golden-plan tests for serialized hybrid plans
- [x] Add regression tests that compare hybrid and Terraform outcomes for a curated subset of scenarios
- [x] Add failure-injection tests:
- refresh timeout
- provider returns unknown state unexpectedly
- plan/apply provider version mismatch
- post-apply runtime check failure after partial apply
Performance Guardrails
- [x] Keep a benchmark dashboard for each phase above
- Current dashboard page:
docs/advanced/performance/hybrid-benchmark-dashboard.md - Regeneration task:
uv run poe bench-dashboard - [x] Require benchmark capture on pull requests that alter hybrid plan/apply
- Capture task:
uv run poe bench-capture-hybrid - Verification task:
uv run poe bench-require-hybrid-capture - CI guidance is documented in
docs/operations/ci-cd.md - [x] Measure:
- cold provider startup
- warm provider reuse
- refresh cost
- plan serialization cost
- lifecycle/condition overhead
- Current supplementary measurements on
2026-04-13at1000resources from the current checkout:- cold provider load path: below
0.0001sin the harness-local fake-provider loader - warm provider reuse path: below
0.0001sin the harness-local fake-provider loader - refresh-only drift path:
0.2441s,0.244 ms/resource - plan serialization round-trip:
0.1317s,0.132 ms/resource - guarded plan overhead (
prevent_destroy+pre_planruntime checks):2.4402s,2.440 ms/resource - baseline create-only plan for comparison:
2.4236s,2.424 ms/resource - measured guarded-plan overhead: about
+0.7%
- cold provider load path: below
- Capture task:
uv run poe bench-capture-hybrid-overheads - [x] Set an explicit target that parity work should preserve a material speed advantage over Terraform CLI on the same scenarios unless a feature requires equivalent work
- Current end-to-end baseline on
2026-04-13fortest_terraform_vs_hybrid_simple_resources:- scenario: 6 AWS resources against FakeCloud, including hybrid
plan/apply/destroyversus legacy Terraforminit/plan/apply/destroy - runs: 3
- hybrid average:
11.2s - Terraform average:
30.6s - observed speedup range:
2.6xto2.8x - average speedup:
2.7x
- scenario: 6 AWS resources against FakeCloud, including hybrid
- Guardrail target: keep hybrid at or above
2.0xend-to-end speedup on this benchmark unless a parity feature necessarily requires equivalent Terraform work, in which case the benchmark note and target should be updated together.
Product/UX Decisions
Current default policy is strict-by-default hybrid execution: core hybrid plan/apply parity features are enabled by default, unsupported Terraform-only features fail closed, and operators rely on concrete diagnostics rather than a compatibility badge.
- [x] Record the compatibility policy in structured semantics metadata and operator docs
- [x] Decide whether unsupported features should:
- hard fail
- auto-fallback to Terraform synthesis/native mode
- require an explicit
--allow-unsupported-hybridflag - [x] Add clear diagnostics for fallback or rejection paths
Recommended Execution Order
- Phase 0 baseline and feature flags
- Phase 1 refresh and drift in active plan path
- Phase 2 immutable hybrid plans
- Phase 3 lifecycle semantics
- Phase 6 provider/state compatibility
- Phase 4 conditions and checks
- Phase 5 provisioners and connection semantics
Rationale:
- Refresh/drift and immutable plans address the biggest correctness gaps first
- Lifecycle and state compatibility affect destructive safety directly
- Conditions and provisioners are important, but they should build on a stable planning model and explicit feature support policy
Exit Criteria For "Hybrid Production-Grade"
- Hybrid plan performs refresh and drift detection by default
- Hybrid apply consumes an immutable plan artifact
- Unsupported Terraform features fail explicitly instead of being ignored
- Supported lifecycle semantics are enforced and tested
- State/provider compatibility checks run before mutation
- Docs clearly define semantic coverage and fallback behavior
- Benchmarks show which parity work costs time and where the remaining speedup comes from
Near-Term (Execution + Planning)
- Enhanced orchestration as the default path (hybrid execution)
- [x] Use EnhancedCircularAwareStrategy in hybrid execution when circular resolution is enabled (enhanced flag defaults to on)
- [x] Add recovery strategies (checkpoint/rollback) and progress callbacks
- [x] ~~Wire transactional state engine features via state_engine_factory~~ (obsolete: the factory and the transaction machinery were removed on 2026-09-25,
aad166cb; oneStateEngineremains) - [x] Remove the enhanced/basic orchestrator fork and keep a single parallel execution path
- [x] Standard legacy CLI execution for non-hybrid apps now uses the unified orchestrator for the normal
plan/apply/destroy/deployflows- April 13, 2026: first slice landed.
nf plan/apply/destroy/deploy --app <legacy-app>now routes through the direct orchestration path when no raw Terraform/OpenTofu passthrough args are used - April 13, 2026: second slice landed. configured legacy stack selectors now route through direct execution for
nf plan/apply/destroy/deploy --stack app/stackand--app <legacy-app> --stack <stack>; synthesized stack roots and raw Terraform/OpenTofu passthrough args still stay on the legacy subprocess path - April 14, 2026: remaining subprocess usage is now the explicit legacy passthrough surface only (
init,output,state,show,import,diff, raw passthrough args, and synthesized stack-root execution); the normal configured legacy execution flows are direct
- April 13, 2026: first slice landed.
-
[x] Configured local execution no longer depends on phased Terraform export artifacts to handle circular dependencies
- April 13, 2026: phased synthesis now writes an explicit export contract (
export-manifest.json+README.md) for external Terraform/OpenTofu consumers; local CLI execution no longer treats those stack roots as normal runnable Terraform directories - April 14, 2026: direct stack planning now has explicit regression coverage showing that configured execution reuses phase-layer cycle breaking in the orchestrator instead of requiring phased Terraform artifacts at runtime
- April 13, 2026: phased synthesis now writes an explicit export contract (
-
Unified phase system under nf.core.phases
- [x] Consolidate planning logic, strategies, and planning models under
nf.core.phases - [x] Remove the fake
nf.core.phases.executor.PhaseExecutor/ JSON execution-plan compatibility shim - [x] Standardize runtime execution on
nf.core.orchestration.execution_models+nf.core.orchestration.unified_orchestrator - [x] Retire CLI/output-tree assumptions about legacy phased Terraform directories and scripts
- April 13, 2026: standard CLI stack commands now fail closed on phased Terraform stack roots instead of treating them as runnable Terraform directories
- April 13, 2026:
nf list-stacksnow marks phased stack roots asphased-export/export-onlyinstead of presenting them as normal runnable stack targets - April 14, 2026: remaining CLI helper discovery now keys off the explicit phased export contract (
export-manifest.json/PHASED_EXECUTION.md) instead of a separate local-runtime command path, and the old unregisteredsynth_commandphased-runtime surface was removed
-
[x] Add deprecations and a removal plan for legacy phased local-runtime assumptions while preserving explicit export artifacts for external Terraform/OpenTofu consumers
- April 14, 2026: synthesis and inventory surfaces now describe phased output as export-only (
nf synthwarns,nf list-appsmarks affected legacy apps,nf list-stacksmarks phased roots) instead of implying it is part of the normal local CLI runtime - April 14, 2026: explicit phased export artifacts remain the supported external handoff format (
export-manifest.json, generatedREADME.md, stack scripts), while local CLI runtime paths reject those stack roots and route users toward configured direct execution
- April 14, 2026: synthesis and inventory surfaces now describe phased output as export-only (
-
Parallel execution and phase planning improvements
- [x] ~~Use parallel phase executor where safe~~ (obsolete: there is no phase executor since
b8328d1d; execution is one resource-level graph run byParallelStrategyinorchestration/execution_strategies.py, the default ofUnifiedOrchestratorand hybrid planning; phases plan synthesis and export only) - [x] Improve dependency analysis and phase assignment (done: one planning path under
nf.core.phases,DependencyAnalyzer,dependency_extraction,cycle_breakingandstack_dependency_plan; see the checked items under 8) - [x] Extend integration tests for parallel and recovery modes (
test_hybrid_recovery_fakecloud.pyverifies concurrent entry into real provider RPCs, provider-side partial-apply failure under CHECKPOINT/ROLLBACK/NONE, preserved updates, rolled-back creates and checkpoint restoration)
Mid-Term (State + Backends)
- Consolidate state engine variants
- [x] ~~Clarify the default state engine (base vs transactional vs enhanced)~~ (obsolete: the enhanced and transactional engines were removed in
e760a1ceand the factory inaad166cb;StateEngineinbackends/state_engine_runtime.pyis the only one) - [x] Prefer composition over parallel implementations (done: one
StateEnginecomposing a pluggableStateBackendfromBackendRegistry) -
[x] Document configuration knobs and expected guarantees (done:
state_persist_interval, batched saves, serial/lineage writes anderrored.tfstateindocs/guides/backends/state-backend-api.md,docs/concepts/backends-and-state.md, the hybrid semantics page and AGENTS.md) -
Unify S3 backend API
- [x] Merge S3Backend and S3StateBackend into a single class
- [x] Provide explicit constructors for synthesis/native modes
- [x] Update internal usage + docs + migration notes
Performance Track (Ongoing)
- Synthesis performance optimization
- [x] Reduce runtime type checks in hot paths (done: type flags such as
Resource._is_resourceand_is_stack, andtype()dispatch tables inconstructs/resources.pyandvalues/compiled.py) - [x] Optimize serialization and config building (done: orjson throughout;
construct_configandcompiled_configinvalues/compiled.pybuild a construct's configuration once per configuration version) - [ ] Parallelize CPU-bound synthesis work where safe (open: synthesis, constructs and phases run serially; under the GIL only processes would help, which means pickling constructs, so it needs a feasibility study first)
- [x] Track progress with repeatable 10k-resource benchmarks (done:
poe bench(10k),poe bench-simple(1k) and the hybridpoe bench-*tasks append each run toperf_history.jsonl, andscripts/check_benchmark_regression.pyfails a run more than 15% slower than the previous runs on the same machine;poe bench-checkchecks them all) - [x] Reduce logger gate overhead in hot resource creation paths (done: the module-level hot-path logging gate in
constructs/resources.py,0639e630; nowlogging_state.verbose, on when logging is configured at DEBUG or below) - [x] Cache stack/provider lookups to avoid repeated scope traversal (done: a resource's stack is cached at creation,
_get_stack_cached,bc188b53; the provider lookup ends at the first scope, which must be a stack, so its scope loop can go) - [x] ~~Add an opt-in fast Resource path that skips autoscope when nf_scope is explicit~~ (obsolete: with
nf_scopegiven, autoscope costs one key check and a call frame, andResource.__init__already falls back to the current scope itself; dropping@autoscopefromResourcewould be simpler than an opt-in path) - [x] Collapse recursive runtime/dependency pre-scan into a single-pass analyzer for nested resource values
- Audited 2026-11-03: superseded on 2026-09-24 (
cbeff5f9, "Take dependency edges from the holes of compiled configurations"): there is no per-value analyzer any more; a construct's configuration is compiled once per version into holes (values/compiled.py), and dependency edges are read from them (phases/dependency_extraction.py). The notes and implementation order below describe the removed design: the single-pass analyzer is done and superseded, bottom-up summaries on tracked containers are obsolete (a mutation recompiles; tracking is opt-in), paths are carried as tuples and joined only for display, and reference strings are parsed by one precompiled regex behind a${check, so a specialized scanner is worth it only if profiling shows it hot - March 27, 2026 benchmark on the current checkout:
uv run poe benchmeasured explicit 10k resource creation at0.4426sand synthesis at0.1012s; creation is the dominant phase in this scenario - Current hot path is the triple-walk over nested values in
Resource._value_may_need_runtime_processing,scan_value_for_cross_stack_refs, and_update_recorded_dependency_edges/DependencyExtractor.extract_dependencies - Small isolated microbench on the same checkout showed
scalar_only=0.0777s,baseline_nested=0.1281s,nested_no_scan=0.0900s,nested_no_wrap=0.1083s, andnested_no_wrap_no_scan=0.0770sfor 10k resources; most of the nested-value overhead comes from scanning, with tracked-container wrapping as a secondary cost - April 14, 2026 closeout: the first single-pass analyzer landed and removed the old triple-walk hot path from default resource creation; a follow-up tracked-container summary / branch-refresh pass regressed
uv run poe bench-simpleon the default explicit-resource path and was reverted - April 14, 2026 closeout: the retained change is a narrow mutable-container correctness fix in
Resource._analyze_value()/_on_tracked_mutation()so tracked nested mutation analysis stays correct without broadening the default immutable hot path - Recommended implementation order:
- Add a single-pass iterative
analyze_value(...)path that returnshas_runtime,cross_stack_refs, and dependency-edge data so creation does not walk the same subtree multiple times - Store bottom-up summary metadata on
_TrackedDict/_TrackedListso tracked mutations can refresh parent state from the changed branch instead of rescanning the full top-level attribute - Carry path segments during analysis and join only when emitting a cross-stack registration or final edge to avoid repeated string concatenation on deep trees
- If string reference parsing still shows up hot after the structural fixes, replace the current multi-regex string checks with a single specialized scanner; the
jsongrepDFA idea is a better fit for dependency-string scanning than for walking the tracked Python object tree itself
- Audited 2026-11-03: superseded on 2026-09-24 (
Platform + Async
- AnyIO-first runtime and tests
- [x] Core runtime/orchestration migrated to AnyIO with its bundled pytest plugin
- [x] Remove remaining asyncio-specific terminology from public APIs/docs where not required
- April 14, 2026: public docs now refer to AnyIO-first runtime entrypoints;
asynciois only called out where theanyio_backendsetting (nf --anyio-backend) needs concrete backend values
- April 14, 2026: public docs now refer to AnyIO-first runtime entrypoints;
- [x] Make AnyIO backend selection consistent across CLI + runtime entrypoints
- April 14, 2026: product code now routes CLI async entrypoints through
nf.core.orchestration.event_loop.run_sync; directanyio.run(...)calls remain only inside the shared event-loop helper
- April 14, 2026: product code now routes CLI async entrypoints through
- [x] Add cancellation/timeouts coverage for orchestration + provider protocol paths
- April 14, 2026: added focused tests for orchestration cancellation (
ExecutionProgressReporter.stop) and provider startup timeout propagation (ProviderSessionStartuphandshake + channel readiness failures)
- April 14, 2026: added focused tests for orchestration cancellation (
Cleanup + Quality
- Remove or deprecate dead/duplicate code
- [x] Remove unused backups/debug scripts (done: no backup, debug or scratch files are tracked)
- [x] Consolidate duplicate orchestrators/state engines (done: one
UnifiedOrchestrator, oneStateEngine;backends/state_engine.pyre-exports it, andnf/holds generated alias shims, not copies) - [x] Resolve TODOs (outputs handling, provider config lookup, circular attr detection) (done: no TODO, FIXME or XXX remains in non-test code)
- nf.core simplification track, ordered least disruptive to most:
- [x] Remove obvious low-risk bloat and abandoned scaffolding
- Dropped tracked benchmark/result artifacts that did not need to live in the main package tree
- Removed stale duplicate test helpers and abandoned benchmark scaffolding
- [x] Remove or quarantine placeholder compatibility paths that are not real execution engines
- Removed the fake
nf.core.phases.executor.PhaseExecutorand JSON execution-plan compatibility shim - Dropped duplicate CLI JSON-plan execution paths while keeping real phase-directory synthesis and deployment
- [x] Deduplicate cross-stack synthesis logic in
nf.core.constructs.app_stack - Merged
_process_registered_cross_refsand the late-discovery branch in_synthesize_regularinto a single implementation - Centralized export creation, remote-state wiring, and circular-dependency registration behind one stack helper
- [x] Split
ProviderProtocolClientby responsibility - Separate process lifecycle/handshake, schema loading, protocol-version adaptation, and resource RPC operations
- Remove unfinished pooling/reuse paths and compatibility parameters that no longer affect behavior
- Provider config logging/redaction policy is intentionally deferred to a future decision; keep behavior stable until that choice is made
- [x] Collapse overlapping dependency planning/orchestration systems into one primary model
- Retired
infrastructure.circular_dependency_handlerand the duplicate circular-orchestrator strategy fork - Kept
nf.core.phases.*as the default planning model and preserved the public execution API around a single parallel executor
-
nf.core structural cleanup follow-up:
- [x] Unify script-generation ownership
- Problem: operational shell-script generation was split between orchestration helpers and
nf.core.constructs.app_stack, so constructs, synthesis, and deployment artifacts were coupled together - Split orchestration artifact generation into
nf.core.orchestration.phased_artifactsandnf.core.orchestration.app_script_generation, leavingApp/Stackresponsible only for synthesis coordination and phase selection - [x] Consolidate dependency planning into one graph/analyzer path
- Moved dependency extraction, shared graph algorithms, cycle-breaking policy, and stack dependency planning into
nf.core.phases.* - Removed the orchestrator's graph-first planning path so
nf.core.orchestration.unified_orchestratornow plans execution from the phase-owned stack dependency plan instead of rebuilding dependency semantics - [x] Resolve the function subsystem split
- Removed the dead in-tree
nf.core.functions.functions_generatedcatalog fromnf.core nf.core.functions.functionsremains the sole core entrypoint, backed by the external legacy function packages selected through the legacy registry
-
Test hygiene
- [x] Keep repo tests in package test directories (done: every committed test is under
libs/*/tests,backends/*/tests,discovery/*/testsortools/*/tests; the top-leveltests/holds only shared helpers) - [x] Keep ad-hoc test files in /tmp (not committed) (done: none are committed)
- [x] Expand coverage for phase planning and recovery paths (done: about 20 test files cover
nf.core.phases, property-based planner and parallel-group tests among them, andTestRecoveryStrategycovers CHECKPOINT, ROLLBACK and NONE; progress reporting has a single test,test_progress_reporting.py) - [x] Add property-based tests for core invariants (runtime resolver, state engine, config normalization) (done:
test_property_based_runtime_resolver.py,test_property_based_state_engine.pyandtest_property_based_config_normalization.py, among 15 property-based test files) - [x] Unify FakeCloud/testcontainers helpers across packages with consistent env flags
- April 14, 2026: shared env-flag and FakeCloud helpers now live under
nf.testing.*; AWS discovery, nf.core AWS integration, and container-backed test trees use the same FakeCloud and container switches (now the pytest options--nf-use-fakecloud,--nf-fakecloud-autostartand--nf-use-containers) instead of carrying separate copies
- April 14, 2026: shared env-flag and FakeCloud helpers now live under
- [x] Standardize test helpers directory layout across packages
- [x] Add FakeCloud-backed AWS discovery tests
Docs + UX
- Documentation updates
- [x] Update CLI docs for the unified phase system (done:
docs/reference/cli/plan.mdand the other command pages describe cycle breaking in the orchestrator and phased output as export-only) - [ ] Publish migration guides for orchestration + S3 backend changes (open: the backend migration guide is
docs/tutorials/backend-migration.md; there is no guide for moving from phased Terraform output to the orchestrator and hybrid execution) - [x] Add operational guidance for recovery strategies and progress reporting (
docs/operations/rollback-and-recovery.mdcovers strategy selection, partial failure and checkpoint restoration;docs/operations/logging-debugging-performance.mdexplains elapsed time and progress counts)
Future
- Developer-friendly component layer (optional DX package)
- Add a first-class "link" concept that auto-wires permissions + env vars between resources
- Generate runtime resource access stubs for linked resources (IDE-friendly accessors)
- Provide high-level components with smart defaults + strict config validation
- Keep escape hatches to underlying provider resources for advanced use cases
-
Standardize safe naming helpers to respect provider limits
-
Unify phase execution engines
- [x] ~~Move CLI phased execution onto
nf.core.phases.executoronce the core Terraform runner is complete~~ (obsolete:nf.core.phases.executorwas removed inb8328d1d, and the CLI no longer runs phased output: phased stack roots are export-only and local commands refuse them)
- [x] ~~Move CLI phased execution onto
Success Markers
- [x] Unified phase system with compatibility layer and deprecations (met, without a compatibility layer: the shim was removed rather than kept; phased output is export-only)
- [x] Enhanced orchestrator enabled by default with recovery + progress (met:
UnifiedOrchestratorwithParallelStrategy, recovery defaulting toCHECKPOINT, progress reporting on by default) - [x] S3 backend unified with one public import path
- [x] Clear default state engine strategy (met: one
StateEngine) - [x] Measurable synthesis performance improvements (met as a measure: benchmark runs are recorded and checked for regressions; see 6)