Summary
Make ParameterService instance-based and re-parseable, decoupled from the module-frozen argument source. Enables engine unit tests and reentrancy (re-running with different args in one process).
Findings (file:line)
EnvironmentInfo.Arguments.cs:11 — internal static ArgumentParser ArgumentParser = new(Environment.GetCommandLineArgs().Skip(1)); captured once at module load, never refreshed.
ParameterService.Statics.cs:11 — internal static ParameterService Instance = new(…) bound to that frozen parser → a second run can't override CLI parameters.
Scope
- Allow constructing
ParameterService with an explicit args/env source.
- Hold the instance on
BuildContext (FT-2); keep a static facade delegating to BuildContext.Current.Parameters for compatibility.
Acceptance criteria
- The engine can run with an injected args/env source — no dependency on
Environment.GetCommandLineArgs() in tests.
- Existing parameter-injection behavior unchanged for normal CLI runs.
Notes
- Non-breaking (internal plumbing; static facade preserved).
- Depends on: FT-2.
- Size: M.
Summary
Make
ParameterServiceinstance-based and re-parseable, decoupled from the module-frozen argument source. Enables engine unit tests and reentrancy (re-running with different args in one process).Findings (file:line)
EnvironmentInfo.Arguments.cs:11—internal static ArgumentParser ArgumentParser = new(Environment.GetCommandLineArgs().Skip(1));captured once at module load, never refreshed.ParameterService.Statics.cs:11—internal static ParameterService Instance = new(…)bound to that frozen parser → a second run can't override CLI parameters.Scope
ParameterServicewith an explicit args/env source.BuildContext(FT-2); keep a static facade delegating toBuildContext.Current.Parametersfor compatibility.Acceptance criteria
Environment.GetCommandLineArgs()in tests.Notes