Write a Behave feature (features/tdd_exec_env_resolution_precedence.feature)
with three scenarios that capture bug #1080: the ExecutionEnvironmentResolver
does not honour the 6-level execution environment precedence chain defined in
the spec (§Execution Environment Routing).
The critical scenario ("Project-level override beats plan-level fallback")
demonstrates the bug by calling resolve() with plan_env="host" and
project_env="container", where the project has priority "override" and the
plan has priority "fallback". Per the spec, project override (level 2)
should beat plan fallback (level 4), but the current flat resolver chain
returns "host" (plan always wins). The @tdd_expected_fail tag inverts
this assertion failure to a CI pass.
Two regression-guard scenarios (without @tdd_expected_fail) verify:
(1) Plan-level override still beats project-level override (level 1 vs 2).
(2) Project-level override beats host default (level 2 vs 6).
Both pass both competing environments to the resolver to ensure the
resolver sees the full context and must choose correctly.
Files added:
- features/tdd_exec_env_resolution_precedence.feature — tagged with
@tdd_bug @tdd_bug_1080 @mock_only and one @tdd_expected_fail scenario
- features/steps/tdd_exec_env_resolution_precedence_steps.py — step
definitions with priority validation, TODO markers for #1080 cleanup,
and module-level imports
Robot test: N/A — ExecutionEnvironmentResolver is a pure domain service
with no I/O or integration boundaries.
ISSUES CLOSED: #1101