Skip to content

[Foundation] FT-4: Make ParameterService instance-based and re-parseable #309

Description

@ChrisonSimtian

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:11internal static ArgumentParser ArgumentParser = new(Environment.GetCommandLineArgs().Skip(1)); captured once at module load, never refreshed.
  • ParameterService.Statics.cs:11internal 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions