feat(automation): fix automation profile resolution precedence and schema alignment with spec #5014

Open
opened 2026-04-09 00:48:17 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: feat(automation): fix automation profile resolution precedence and schema alignment with spec
  • Branch: feat/m6/automation-profile-fix
  • Milestone: v3.5.0
  • Parent Epic: #4951

Background and Context

The automation profile system has several spec deviations:

  1. AutomationProfileService._DEFAULT_PROFILE is manual but spec says it should be supervised
  2. Automation profile YAML schema has fields nested under safety: but spec defines them at top level
  3. Profile resolution precedence (plan > action > global) may not be correctly implemented

Expected Behavior

  • AutomationProfileService._DEFAULT_PROFILE is supervised (not manual)
  • Automation profile YAML fields are at top level: require_sandbox, require_checkpoints, allow_unsafe_tools
  • Profile resolution follows precedence: plan-level > action-level > global
  • require_sandbox and require_checkpoints are enforced during execution

Acceptance Criteria

  • AutomationProfileService._DEFAULT_PROFILE changed to supervised
  • Automation profile YAML schema updated to match spec (top-level fields)
  • Profile resolution precedence: plan > action > global implemented correctly
  • require_sandbox enforcement: plan fails if sandbox not available
  • require_checkpoints enforcement: checkpoints created as required
  • allow_unsafe_tools enforcement: unsafe tools blocked when false
  • Unit tests (Behave) cover profile resolution scenarios
  • Integration test (Robot) verifies precedence end-to-end

Subtasks

  • Fix AutomationProfileService._DEFAULT_PROFILE to supervised
  • Update automation profile YAML schema to top-level fields
  • Implement correct profile resolution precedence
  • Implement require_sandbox enforcement
  • Implement require_checkpoints enforcement
  • Implement allow_unsafe_tools enforcement
  • Tests (Behave): Add scenarios for profile resolution
  • Tests (Robot): Add integration test
  • Verify coverage >=97% via nox -s coverage_report
  • 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.
  • 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.

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

## Metadata - **Commit Message**: `feat(automation): fix automation profile resolution precedence and schema alignment with spec` - **Branch**: `feat/m6/automation-profile-fix` - **Milestone**: v3.5.0 - **Parent Epic**: #4951 ## Background and Context The automation profile system has several spec deviations: 1. `AutomationProfileService._DEFAULT_PROFILE` is `manual` but spec says it should be `supervised` 2. Automation profile YAML schema has fields nested under `safety:` but spec defines them at top level 3. Profile resolution precedence (plan > action > global) may not be correctly implemented ## Expected Behavior - `AutomationProfileService._DEFAULT_PROFILE` is `supervised` (not `manual`) - Automation profile YAML fields are at top level: `require_sandbox`, `require_checkpoints`, `allow_unsafe_tools` - Profile resolution follows precedence: plan-level > action-level > global - `require_sandbox` and `require_checkpoints` are enforced during execution ## Acceptance Criteria - [ ] `AutomationProfileService._DEFAULT_PROFILE` changed to `supervised` - [ ] Automation profile YAML schema updated to match spec (top-level fields) - [ ] Profile resolution precedence: plan > action > global implemented correctly - [ ] `require_sandbox` enforcement: plan fails if sandbox not available - [ ] `require_checkpoints` enforcement: checkpoints created as required - [ ] `allow_unsafe_tools` enforcement: unsafe tools blocked when false - [ ] Unit tests (Behave) cover profile resolution scenarios - [ ] Integration test (Robot) verifies precedence end-to-end ## Subtasks - [ ] Fix `AutomationProfileService._DEFAULT_PROFILE` to `supervised` - [ ] Update automation profile YAML schema to top-level fields - [ ] Implement correct profile resolution precedence - [ ] Implement `require_sandbox` enforcement - [ ] Implement `require_checkpoints` enforcement - [ ] Implement `allow_unsafe_tools` enforcement - [ ] Tests (Behave): Add scenarios for profile resolution - [ ] Tests (Robot): Add integration test - [ ] Verify coverage >=97% via `nox -s coverage_report` - [ ] 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. - 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. --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.5.0 milestone 2026-04-09 00:48:27 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — Automation profile resolution precedence and schema alignment are required for correct autonomous execution behavior
  • Milestone: v3.5.0
  • Story Points: 8 — XL — Fixing default profile, schema alignment, and precedence logic with tests
  • MoSCoW: Must Have — Correct automation profile resolution is required for the Autonomy Hardening milestone acceptance criteria
  • Parent Epic: #4951

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

Issue triaged by project owner: - **State**: Verified - **Priority**: High — Automation profile resolution precedence and schema alignment are required for correct autonomous execution behavior - **Milestone**: v3.5.0 - **Story Points**: 8 — XL — Fixing default profile, schema alignment, and precedence logic with tests - **MoSCoW**: Must Have — Correct automation profile resolution is required for the Autonomy Hardening milestone acceptance criteria - **Parent Epic**: #4951 --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
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#5014
No description provided.