You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce an internal BuildContext that owns per-run state, and activate it ambiently for the duration of a build. Foundation for de-statifying the engine (testability, reentrancy, parallel execution, and the plugin architecture in this milestone). No behavior change in this ticket — just stand up the context and make it active.
Why
The engine currently bootstraps per-run state into process-global statics in the FalloutBuild static ctor (FalloutBuild.Statics.cs:16-30), read directly throughout Execution/. That blocks isolation, safe parallelism, and a scoped plugin model.
Sketch
internalsealedclassBuildContext{publicrequiredFalloutBuildBuild{get;init;}publicrequiredDirectoryConfigDirectories{get;init;}// Root, Temp, BuildAssembly…publicrequiredParameterServiceParameters{get;init;}publicrequiredToolPathConfigTools{get;init;}publicrequiredLoggingScopeLogging{get;init;}publicrequiredHostInfoHost{get;init;}publicIReadOnlyCollection<IBuildExtension>Extensions{get;init;}privatestaticreadonlyAsyncLocal<BuildContext>s_current=new();publicstaticBuildContextCurrent=>s_current.Value??throw …;publicstaticIDisposableActivate(BuildContextctx);// set + restore}
BuildManager.Execute builds the context and wraps the run in using (BuildContext.Activate(ctx)).
Acceptance criteria
BuildContext is constructed in BuildManager.Execute and active for the whole run.
All existing tests still pass (public statics untouched in this ticket).
Notes
Non-breaking. Internal only (stays internal per milestone policy).
Activity
[-]FT-2: Introduce internal BuildContext + ambient activation[/-][+][Foundation] FT-2: Introduce internal BuildContext + ambient activation[/+]Introduce the per-run BuildContext foundation (FT-2)
Introduce the per-run BuildContext foundation (FT-2)
Introduce the per-run BuildContext foundation (FT-2)