Skip to content

Roadmap 3.11.4: complete OrthoConfig precedence-ladder regression tests #385

Description

@coderabbitai

Context

Roadmap item 3.11.4 (Add OrthoConfig precedence-ladder regression tests) has three sub-items that remain open after PR #327 (closes #291) delivered exhaustive rstest and proptest coverage of the explicit config-path selector precedence (--config > NETSUKE_CONFIG).

The following sub-items are still unaddressed:

  • Depend on OrthoConfig 5.2.3 for consumer boundary guidance.
  • Preserve Netsuke-specific precedence expectations for manifest path, display policies, locale, and profile selection.
  • Verify that CLI flags override environment, profile, project, user, system, and default configuration layers.

Required constraint for any PR closing this issue

Important

The environment selector set is closed at one variable. Any regression tests added here must not introduce, assert, or assume NETSUKE_CONFIG_PATH or any second environment selector.

  • Precedence tests assert the two-selector ladder only: --config > NETSUKE_CONFIG > automatic discovery.
  • No test sets NETSUKE_CONFIG_PATH expecting it to select a configuration file.
  • The existing legacy_config_path_variable_is_not_a_selector test (in src/cli/config_path_precedence_tests.rs) still passes unmodified.

Rationale: ADR-004 (Accepted 2026-05-31) records NETSUKE_CONFIG as the only environment selector, and the legacy NETSUKE_CONFIG_PATH alias was removed in #427. Reintroducing it would require superseding ADR-004 and updating docs/users-guide.md, docs/developers-guide.md, and docs/netsuke-design.md together — that is a separate, deliberate decision, not something to add incidentally while writing regression tests.

Out of scope for PR #327

These items require changes beyond the explicit config-path selector subset and are tracked here for a future PR.

Note: selector ladder narrowed (2026-07-30)

This issue was originally filed describing a three-selector ladder, --config > NETSUKE_CONFIG > NETSUKE_CONFIG_PATH. That is no longer accurate. The current ladder is:

--config             (CLI flag)
NETSUKE_CONFIG       (env var)
automatic discovery  (fallback)

The three open sub-items above are unaffected — none of them depend on the legacy alias — so this issue remains valid work. Only the precedence framing needed correcting.

References

/cc @leynos

Aggregation (2026-08-12)

This issue now also absorbs #317 (closed), whose property-based scope substantially overlapped the sub-items above — both demand invariant coverage of the same merge pipeline, and keeping them separate risked two people writing the same tests. Additional sub-items carried over from #317:

  • Generate arbitrary CliConfig layer values with proptest strategies and verify merge ordering is consistently respected (a CLI value always beats a file value for the same field; defaults → file → environment → CLI).
  • Verify list-appending semantics (cmds.build.targets appended in discovery order) under arbitrary target lists.
  • Verify cross-field validation rules (theme/no_emoji, spinner_mode/progress, output_format restriction) fire correctly across the full domain of enum combinations.

The closed-selector constraint above applies to these carried-over items equally: no property strategy may introduce or assume a second environment selector. The stale June draft PR #368 (filed against #317) predates the env-seam series and should be treated as reference material only.

Metadata

Metadata

Assignees

Labels

lowBacklog work, hygiene, or technical debt planned opportunistically, without a strict deadline.testingTest coverage, test infrastructure, and verification tooling work.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions