Expand description
Compatibility Mode resolution.
Per plan.md AD-004 and spec.md FR-021..FR-023:
Resolves the CompatibilityMode for an invocation once at startup at
zero per-line cost. Precedence (highest first):
- Explicit
--no-strict/--no-moreutils-compatflag →Default - Explicit
--strict/--moreutils-compatflag →Strict RUSTY_TS_STRICTenv var (1/true/yes= on; anything else = off)- argv[0] basename auto-detect:
ts(orts.exestripped on Windows) →Strict - Default
Encoded as a single pure function resolve(...) so the precedence is
testable in isolation (HINT-002 — the precedence ladder lives in exactly
one place).
Enums§
- Compatibility
Mode - The resolved compatibility-mode posture for the invocation.
- Explicit
Choice - Explicit user choice from the CLI flag layer.
Functions§
- argv0_
basename - Extract the argv[0] basename, stripping a
.exeextension on Windows. - resolve
- Resolve the compatibility mode from the three inputs.