Fallout-build / Fallout-build/Fallout
[Foundation] FT-4: Make ParameterService instance-based and re-parseable
- Dominant language
- C#
- Stars
- 154
- Forks
- 19
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 15
Description
## 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**.
Contributor guide
Assessment
This issue has not been assessed yet.