test: add TDD bug-capture test for #1080 — execution env resolution precedence #1115
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!1115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tdd/m5-exec-env-resolution"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR adds a TDD bug-capture test for bug #1080 (execution environment resolution does not honour project-level override at precedence level 2).
Changes:
features/tdd_exec_env_resolution_precedence.featurewith 3 Behave scenariosfeatures/steps/tdd_exec_env_resolution_precedence_steps.pywith step definitionsThe feature contains one
@tdd_expected_failscenario that captures the exact bug: callingExecutionEnvironmentResolver.resolve()withplan_env="host"(priority: fallback) andproject_env="container"(priority: override) incorrectly returns"host". Per the spec's 6-level precedence chain, project override (level 2) should beat plan fallback (level 4), so the correct result is"container".Two additional regression guard scenarios (without
@tdd_expected_fail) verify that:Review Fix Summary (PR review round 1)
docs/timeline.mdrevertplan_envandproject_envto resolverproject_priorityagainst_VALID_PRIORITIESTODO(#1080):marker for manual precedence chain@tdd_expected_fail_VALID_PRIORITIESfrozenset and validation assertionsExecutionEnvironmentResolverimport to module level@mock_onlydocumentation comment in feature file@mock_onlytag documentation is out of scopeBug Analysis
The
ExecutionEnvironmentResolver.resolve()method uses a flat priority chain (tool > plan > project > default) that always returns the first non-None value. The specification (§Execution Environment Routing) defines a 6-level chain that interleaves "override" and "fallback" priority modes:Quality Gates
nox -s lintnox -s typechecknox -s unit_testsnox -s integration_testsnox -s e2e_testsnox -s coverage_report@tdd_bug,@tdd_bug_1080,@tdd_expected_fail,@mock_onlyRobot Test
N/A —
ExecutionEnvironmentResolveris a pure domain service with no I/O or integration boundaries. All behavior is testable at the unit level with Behave.Closes #1101
TDD Bug-Capture Review: PR #1115 — Bug #1080 (execution env resolution precedence)
Overall Assessment: REQUEST CHANGES
One issue found: branch naming mismatch with the milestone number.
1. Tag Compliance ✅
@tdd_bug @tdd_bug_1080 @mock_only—@tdd_bugand@tdd_bug_1080present.@tdd_expected_failat scenario level, which is correct since only one of three scenarios should be expected-fail. The two regression guard scenarios correctly omit@tdd_expected_failbecause they test currently-working behavior.@tdd_bug,@tdd_bug_1080,@tdd_expected_fail) are inherited/applied to the bug-capturing scenario.2. Branch Naming ❌ ISSUE
tdd/m5-exec-env-resolutiontdd/m6-exec-env-resolution, nottdd/m5-exec-env-resolution.The milestone numbering is v3.2.0=M3, v3.3.0=M4, v3.5.0=M6 (there is no v3.4.0=M5 in the visible milestones, suggesting M5 is v3.4.0). The branch prefix must match the milestone number from the milestone description.
Action required: Rename the branch from
tdd/m5-exec-env-resolutiontotdd/m6-exec-env-resolution.3. File Organization ✅
features/tdd_exec_env_resolution_precedence.featurefeatures/steps/tdd_exec_env_resolution_precedence_steps.py4. Step File Naming ✅
tdd_exec_env_resolution_precedence.feature→ steps intdd_exec_env_resolution_precedence_steps.py— naming convention followed.5. No Production Code Changes ✅
features/. Zero modifications tosrc/.6. Issue References ✅
Closes #1101(the TDD tracking issue for bug #1080).7. PR Description Quality ✅
Summary
One fix required before approval:
tdd/m5-exec-env-resolution→tdd/m6-exec-env-resolutionto match the v3.5.0 milestone (which is M6, not M5).Review: REQUEST CHANGES (minor)
Issue Found:
tdd/m5-exec-env-resolutionbut milestone v3.5.0 corresponds to M6 (Autonomy Hardening). Per thetdd/mN-naming convention, this should betdd/m6-exec-env-resolution.Everything else checks out:
@tdd_expected_fail @tdd_bug @tdd_bug_1080all correctfeatures/, steps infeatures/steps/The test content is well-structured. Only the branch naming needs correction.
Day 43 Review — PR #1115
test: TDD for #1080 — execution env resolution precedenceVerdict: APPROVED
TDD Verification
This is a TDD PR capturing bug #1080. Standard TDD review checklist:
@tdd_bug,@tdd_bug_1080,@tdd_expected_fail)test:prefixThe PR is mergeable with no conflicts. Once merged, the corresponding bug fix branch can be created from
master.@hamza.khyari — Please review and approve for second approval.
5132460e57235ceb76fbNew commits pushed, approval review dismissed automatically according to repository settings
Review: APPROVED
TDD tags correct. Smart approach — applies
@tdd_expected_failonly to the bug-demonstrating scenario while leaving regression guard scenarios without it. Behave steps fully implemented. CHANGELOG present.Note
Missing Robot Framework integration tests. Consider adding in a follow-up for consistency.
New commits pushed, approval review dismissed automatically according to repository settings
bca9cf2ff324b991f59bReview: test: add TDD bug-capture test for #1080 — execution env resolution precedence
Approved. Exemplary TDD PR. Particularly good
@tdd_expected_failscoping — applied only to the actual bug scenario while leaving regression guards untagged. This is the ideal pattern for other TDD PRs to follow.24b991f59b0449e3ee6cNew commits pushed, approval review dismissed automatically according to repository settings
0449e3ee6c9e01b12e8e9e01b12e8e3fa07fb772