bug(cli): execution environment resolution does not honour project-level override (precedence level 2) #1080

Closed
opened 2026-03-20 08:22:39 +00:00 by hurui200320 · 5 comments
Member

Metadata

  • Commit Message: fix(cli): honour project-level execution-env-priority in resolution
  • Branch: bugfix/m8-exec-env-precedence-level2

Background

The specification defines execution environment resolution with a three-level precedence model:

  1. Plan-level override (highest)
  2. Project-level override
  3. Global default (lowest)

Currently, only plan-level override (precedence level 1) is testable because project context set --execution-env-priority is not implemented (see sibling issue). Even once that flag exists, the resolution logic must correctly evaluate project-level priority (precedence level 2) when no plan-level override is present. This prevents WF17 AC #5 from being satisfied.

Discovered during E2E testing in #763.

Expected Behavior

When a project has --execution-env-priority override set at the project level and no plan-level override exists, the execution environment should resolve via the project-level setting (precedence level 2).

Acceptance Criteria

  • Execution environment resolution evaluates project-level priority when no plan-level override exists
  • Project-level override (precedence level 2) takes effect correctly
  • Plan-level override (precedence level 1) still wins when both are present
  • E2E test in WF17 suite verifies precedence level 2 resolution

Subtasks

  • Verify/implement precedence level 2 resolution logic
  • Add/update E2E test for project-level override without plan-level override
  • Remove @tdd_expected_fail from WF17 precedence level 2 test case
  • Verify via nox -s e2e_tests

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
## Metadata - **Commit Message**: `fix(cli): honour project-level execution-env-priority in resolution` - **Branch**: `bugfix/m8-exec-env-precedence-level2` ## Background The specification defines execution environment resolution with a three-level precedence model: 1. Plan-level override (highest) 2. Project-level override 3. Global default (lowest) Currently, only plan-level override (precedence level 1) is testable because `project context set --execution-env-priority` is not implemented (see sibling issue). Even once that flag exists, the resolution logic must correctly evaluate project-level priority (precedence level 2) when no plan-level override is present. This prevents WF17 AC #5 from being satisfied. Discovered during E2E testing in #763. ## Expected Behavior When a project has `--execution-env-priority override` set at the project level and no plan-level override exists, the execution environment should resolve via the project-level setting (precedence level 2). ## Acceptance Criteria - [ ] Execution environment resolution evaluates project-level priority when no plan-level override exists - [ ] Project-level override (precedence level 2) takes effect correctly - [ ] Plan-level override (precedence level 1) still wins when both are present - [ ] E2E test in WF17 suite verifies precedence level 2 resolution ## Subtasks - [ ] Verify/implement precedence level 2 resolution logic - [ ] Add/update E2E test for project-level override without plan-level override - [ ] Remove `@tdd_expected_fail` from WF17 precedence level 2 test case - [ ] Verify via `nox -s e2e_tests` ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done.
freemo self-assigned this 2026-03-22 16:31:11 +00:00
freemo added this to the v3.5.0 milestone 2026-03-22 16:31:11 +00:00
Owner

Assigned to @freemo for bug fix based on developer expertise (architecture-level execution environment resolution logic — Jeff). Milestone set to v3.5.0. State changed from Unverified to Verified. This bug is top priority per project policy — bugs always take precedence over feature work.

Assigned to @freemo for bug fix based on developer expertise (architecture-level execution environment resolution logic — Jeff). Milestone set to v3.5.0. State changed from Unverified to Verified. This bug is top priority per project policy — bugs always take precedence over feature work.
Owner

TDD workflow initiated for this bug:

  • Created TDD issue #1101 to write a tagged test that captures this bug.
  • Dependency link added: this issue is blocked by #1101.
  • Once #1101 is merged to master, the bug fix assignee should create the bugfix branch and implement the fix.
  • The fix must remove the @tdd_expected_fail tag from the test so it runs normally.
TDD workflow initiated for this bug: - Created TDD issue #1101 to write a tagged test that captures this bug. - Dependency link added: this issue is blocked by #1101. - Once #1101 is merged to `master`, the bug fix assignee should create the bugfix branch and implement the fix. - The fix must remove the `@tdd_expected_fail` tag from the test so it runs normally.
Owner

Planning Agent — Discussion Review

TDD workflow confirmed and correct for this issue.

Stage Issue Assignee Status
TDD test #1101 @brent.edwards Open
Bug fix #1080 (this) @freemo Blocked by #1101

The assignment to @freemo is appropriate — execution environment resolution and precedence logic is architecture-level work. The bug (project-level override at precedence level 2 being ignored) likely requires changes to the config resolution chain.

Estimate note: No points assigned yet. Given this involves precedence resolution logic with multiple override levels, I would estimate 3–5 points. @freemo — please confirm or propose an estimate.

No disputes. Workflow proceeding correctly.

## Planning Agent — Discussion Review TDD workflow confirmed and correct for this issue. | Stage | Issue | Assignee | Status | |-------|-------|----------|--------| | TDD test | #1101 | @brent.edwards | Open | | Bug fix | #1080 (this) | @freemo | Blocked by #1101 | The assignment to @freemo is appropriate — execution environment resolution and precedence logic is architecture-level work. The bug (project-level override at precedence level 2 being ignored) likely requires changes to the config resolution chain. **Estimate note:** No points assigned yet. Given this involves precedence resolution logic with multiple override levels, I would estimate 3–5 points. @freemo — please confirm or propose an estimate. No disputes. Workflow proceeding correctly.
Owner

Planning review (Day 42): Added Points/5 estimate based on specification complexity analysis. Execution-environment resolution touches multiple layers (path resolution, env validation, fallback logic), and the bug requires careful regression testing across OS variants.

**Planning review (Day 42):** Added Points/5 estimate based on specification complexity analysis. Execution-environment resolution touches multiple layers (path resolution, env validation, fallback logic), and the bug requires careful regression testing across OS variants.
Owner

Status Update (2026-03-22): This bug fix is currently blocked by TDD issue #1101 (assigned to @brent.edwards, In Progress with active analysis posted today). Per CONTRIBUTING.md TDD workflow, the failing test must be merged to master before the bug fix branch can be created.

Brent has posted detailed analysis of the 6-level precedence chain bug today. The TDD test appears to be actively progressing.

**Status Update (2026-03-22):** This bug fix is currently blocked by TDD issue #1101 (assigned to @brent.edwards, In Progress with active analysis posted today). Per CONTRIBUTING.md TDD workflow, the failing test must be merged to master before the bug fix branch can be created. Brent has posted detailed analysis of the 6-level precedence chain bug today. The TDD test appears to be actively progressing.
freemo removed their assignment 2026-03-23 03:30:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#1080
No description provided.