fix(plan): use_action() does not propagate automation_profile from Action to Plan #1060

Closed
opened 2026-03-18 20:52:19 +00:00 by CoreRasurae · 1 comment
Member

Metadata

  • Commit Message: fix(plan): propagate automation_profile from Action to Plan in use_action()
  • Branch: bugfix/plan-automation-profile-propagation

Background

PlanLifecycleService.use_action() creates a Plan from an Action, but does not copy
the automation_profile field from the Action to the Plan. The Plan's automation_profile
remains None, so _resolve_profile_for_plan() falls back to the "manual" profile (all
thresholds at 1.0). As a result, auto_progress() will never automatically advance phases
even when the Action specifies the ci profile.

This gap was identified during code review of PR #806 (integration tests for Specification
Example 7: CI/CD Integration). The spec (line 39036) shows automation_profile: ci in the
action YAML, and the CI pipeline depends on full automation to run headlessly.

Current Behavior

When use_action() is called with an Action that has automation_profile="ci", the
resulting Plan has automation_profile=None. The ci profile's auto-progress thresholds
(auto_strategize, auto_execute, auto_apply all at 0.0) are never applied.

Expected Behavior

The Plan created by use_action() should inherit the automation_profile from the
Action, so that _resolve_profile_for_plan() resolves to the correct profile and
auto_progress() advances phases automatically per the CI profile's thresholds.

Acceptance Criteria

  • use_action() copies automation_profile from Action to Plan
  • _resolve_profile_for_plan() returns the ci profile when the Plan has automation_profile="ci"
  • auto_progress() advances phases automatically when the ci profile is active
  • Existing tests pass
  • WF07 integration tests (robot/helper_wf07_cicd.py) can remove manual phase guards

Subtasks

  • Update PlanLifecycleService.use_action() to propagate automation_profile
  • Add unit test verifying propagation
  • Update WF07 integration tests to remove manual phase guards
  • Run nox (all default sessions), fix any errors

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 about the implementation.
  • 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(plan): propagate automation_profile from Action to Plan in use_action()` - **Branch**: `bugfix/plan-automation-profile-propagation` ## Background `PlanLifecycleService.use_action()` creates a `Plan` from an `Action`, but does **not** copy the `automation_profile` field from the Action to the Plan. The Plan's `automation_profile` remains `None`, so `_resolve_profile_for_plan()` falls back to the `"manual"` profile (all thresholds at 1.0). As a result, `auto_progress()` will never automatically advance phases even when the Action specifies the `ci` profile. This gap was identified during code review of PR #806 (integration tests for Specification Example 7: CI/CD Integration). The spec (line 39036) shows `automation_profile: ci` in the action YAML, and the CI pipeline depends on full automation to run headlessly. ## Current Behavior When `use_action()` is called with an Action that has `automation_profile="ci"`, the resulting Plan has `automation_profile=None`. The `ci` profile's auto-progress thresholds (`auto_strategize`, `auto_execute`, `auto_apply` all at 0.0) are never applied. ## Expected Behavior The Plan created by `use_action()` should inherit the `automation_profile` from the Action, so that `_resolve_profile_for_plan()` resolves to the correct profile and `auto_progress()` advances phases automatically per the CI profile's thresholds. ## Acceptance Criteria - [ ] `use_action()` copies `automation_profile` from Action to Plan - [ ] `_resolve_profile_for_plan()` returns the `ci` profile when the Plan has `automation_profile="ci"` - [ ] `auto_progress()` advances phases automatically when the `ci` profile is active - [ ] Existing tests pass - [ ] WF07 integration tests (`robot/helper_wf07_cicd.py`) can remove manual phase guards ## Subtasks - [ ] Update `PlanLifecycleService.use_action()` to propagate `automation_profile` - [ ] Add unit test verifying propagation - [ ] Update WF07 integration tests to remove manual phase guards - [ ] Run `nox` (all default sessions), fix any errors ## 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 about the implementation. - 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 added this to the v3.3.0 milestone 2026-03-19 05:28:29 +00:00
Owner

Closed as Duplicate

This issue is a duplicate of #1076 (bug(plan): use_action() does not resolve or propagate automation_profile to created Plan).

Both issues describe the same root cause: PlanLifecycleService.use_action() does not propagate automation_profile from the Action to the Plan, causing fallback to the "manual" profile.

#1076 is the canonical issue — it is already triaged with milestone v3.3.0, assigned to @CoreRasurae, labelled as Priority/Critical + MoSCoW/Must have, and has a corresponding TDD issue (#1098). All further work should track against #1076.

Closing this issue to avoid duplicate effort.

## Closed as Duplicate This issue is a duplicate of #1076 (`bug(plan): use_action() does not resolve or propagate automation_profile to created Plan`). Both issues describe the same root cause: `PlanLifecycleService.use_action()` does not propagate `automation_profile` from the Action to the Plan, causing fallback to the `"manual"` profile. #1076 is the canonical issue — it is already triaged with milestone v3.3.0, assigned to @CoreRasurae, labelled as Priority/Critical + MoSCoW/Must have, and has a corresponding TDD issue (#1098). All further work should track against #1076. Closing this issue to avoid duplicate effort.
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.

Dependencies

No dependencies set.

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