fix(automation): implement correct automation profile resolution precedence — plan > action > global #8949

Open
opened 2026-04-14 04:06:07 +00:00 by HAL9000 · 1 comment
Owner

Background and Context

The v3.5.0 milestone (M6: Autonomy Hardening) requires that automation profile resolution precedence is correct: plan-level settings override action-level settings, which override global settings. The Automation Profile Resolution & Precedence Epic (#8231) requires that this precedence chain is implemented and verified.

Currently, PlanLifecycleService._resolve_profile_for_plan() silently falls back to manual when a custom profile is specified (see #4007), and agents plan use --automation-profile rejects custom profile names (see #4008). Without correct precedence, plans may execute with unintended automation levels.

Parent Epic: #8231 (Epic: Automation Profile Resolution & Precedence (M6))

Expected Behavior

When this issue is complete:

  • Automation profile resolution follows plan > action > global precedence
  • Custom automation profiles are resolved correctly (no silent fallback to 'manual')
  • agents plan use --automation-profile <name> accepts custom profile names
  • Profile resolution chain is logged at debug level for transparency
  • AutomationProfileService._DEFAULT_PROFILE is supervised (not manual)

Acceptance Criteria

  • PlanLifecycleService._resolve_profile_for_plan() correctly resolves plan-level profile (no silent fallback)
  • agents plan use --automation-profile <name> accepts custom (namespaced) profile names
  • Plan-level profile overrides action-level profile, which overrides global default
  • Unknown automation profile names raise ValidationError (not silent fallback to manual)
  • AutomationProfileService._DEFAULT_PROFILE is supervised (not manual, see #4012)
  • Profile resolution chain is logged at debug level
  • nox passes with coverage >= 97%

Subtasks

  • Fix PlanLifecycleService._resolve_profile_for_plan() to not silently fall back to manual (see #4007)
  • Fix agents plan use --automation-profile to accept custom profile names (see #4008)
  • Implement plan > action > global precedence chain in _resolve_profile_for_plan()
  • Fix AutomationProfileService._DEFAULT_PROFILE to be supervised (see #4012)
  • Add debug logging for profile resolution chain
  • Write unit tests for all precedence combinations
  • Verify nox passes with coverage >= 97%

Definition of Done

  • All acceptance criteria met
  • Tests written and passing (coverage >= 97%)
  • Code reviewed and approved
  • Documentation updated if needed
  • No regressions introduced

Metadata

  • Commit message: fix(automation): implement correct automation profile resolution precedence — plan > action > global
  • Branch name: fix/automation-profile-resolution-precedence

Automated by CleverAgents Bot
Agent: new-issue-creator

## Background and Context The v3.5.0 milestone (M6: Autonomy Hardening) requires that automation profile resolution precedence is correct: plan-level settings override action-level settings, which override global settings. The Automation Profile Resolution & Precedence Epic (#8231) requires that this precedence chain is implemented and verified. Currently, `PlanLifecycleService._resolve_profile_for_plan()` silently falls back to `manual` when a custom profile is specified (see #4007), and `agents plan use --automation-profile` rejects custom profile names (see #4008). Without correct precedence, plans may execute with unintended automation levels. Parent Epic: #8231 (Epic: Automation Profile Resolution & Precedence (M6)) ## Expected Behavior When this issue is complete: - Automation profile resolution follows plan > action > global precedence - Custom automation profiles are resolved correctly (no silent fallback to 'manual') - `agents plan use --automation-profile <name>` accepts custom profile names - Profile resolution chain is logged at debug level for transparency - `AutomationProfileService._DEFAULT_PROFILE` is `supervised` (not `manual`) ## Acceptance Criteria - [ ] `PlanLifecycleService._resolve_profile_for_plan()` correctly resolves plan-level profile (no silent fallback) - [ ] `agents plan use --automation-profile <name>` accepts custom (namespaced) profile names - [ ] Plan-level profile overrides action-level profile, which overrides global default - [ ] Unknown automation profile names raise `ValidationError` (not silent fallback to `manual`) - [ ] `AutomationProfileService._DEFAULT_PROFILE` is `supervised` (not `manual`, see #4012) - [ ] Profile resolution chain is logged at debug level - [ ] `nox` passes with coverage >= 97% ## Subtasks - [ ] Fix `PlanLifecycleService._resolve_profile_for_plan()` to not silently fall back to `manual` (see #4007) - [ ] Fix `agents plan use --automation-profile` to accept custom profile names (see #4008) - [ ] Implement plan > action > global precedence chain in `_resolve_profile_for_plan()` - [ ] Fix `AutomationProfileService._DEFAULT_PROFILE` to be `supervised` (see #4012) - [ ] Add debug logging for profile resolution chain - [ ] Write unit tests for all precedence combinations - [ ] Verify `nox` passes with coverage >= 97% ## Definition of Done - [ ] All acceptance criteria met - [ ] Tests written and passing (coverage >= 97%) - [ ] Code reviewed and approved - [ ] Documentation updated if needed - [ ] No regressions introduced ## Metadata - **Commit message:** `fix(automation): implement correct automation profile resolution precedence — plan > action > global` - **Branch name:** `fix/automation-profile-resolution-precedence` --- **Automated by CleverAgents Bot** Agent: new-issue-creator
HAL9000 added this to the v3.5.0 milestone 2026-04-14 04:10:50 +00:00
Author
Owner

Triage Decision [AUTO-OWNR-1]

Verified

Implementing correct automation profile resolution precedence is explicitly listed in v3.5.0 acceptance criteria: 'Automation profile resolution precedence correct (plan > action > global)'.

  • Type: Feature
  • MoSCoW: Must Have — explicitly in v3.5.0 acceptance criteria
  • Priority: High
  • Milestone: v3.5.0

Automated by CleverAgents Bot
Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor

## Triage Decision [AUTO-OWNR-1] **Verified** ✅ Implementing correct automation profile resolution precedence is explicitly listed in v3.5.0 acceptance criteria: 'Automation profile resolution precedence correct (plan > action > global)'. - **Type:** Feature - **MoSCoW:** Must Have — explicitly in v3.5.0 acceptance criteria - **Priority:** High - **Milestone:** v3.5.0 --- **Automated by CleverAgents Bot** Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#8949
No description provided.