test: add TDD bug-capture test for #1080 — execution env resolution precedence #1115

Merged
brent.edwards merged 2 commits from tdd/m5-exec-env-resolution into master 2026-03-27 23:09:24 +00:00

2 Commits

Author SHA1 Message Date
brent.edwards 3fa07fb772 test: align #1080 expected-fail tags with TDD schema
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 41s
CI / lint (pull_request) Successful in 3m19s
CI / quality (pull_request) Successful in 3m45s
CI / typecheck (pull_request) Successful in 3m56s
CI / security (pull_request) Successful in 4m6s
CI / integration_tests (pull_request) Successful in 5m50s
CI / unit_tests (pull_request) Successful in 6m7s
CI / docker (pull_request) Successful in 1m40s
CI / e2e_tests (pull_request) Successful in 8m16s
CI / coverage (pull_request) Successful in 11m48s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 13s
CI / lint (push) Successful in 3m17s
CI / quality (push) Successful in 3m48s
CI / typecheck (push) Successful in 3m53s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m1s
CI / integration_tests (push) Successful in 5m55s
CI / unit_tests (push) Successful in 6m0s
CI / docker (push) Failing after 51s
CI / e2e_tests (push) Successful in 8m48s
CI / coverage (push) Successful in 12m36s
CI / status-check (push) Successful in 6s
CI / benchmark-publish (push) Successful in 34m54s
CI / benchmark-regression (pull_request) Successful in 1h1m15s
Add @tdd_issue and @tdd_issue_1080 so the expected-fail scenario passes the global tag validator during unit_tests.
2026-03-27 22:53:33 +00:00
brent.edwards 5ac1e4eeb3 test: add TDD bug-capture test for #1080 — execution env resolution precedence
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
2026-03-27 22:53:33 +00:00