Commit Graph

3 Commits

Author SHA1 Message Date
CoreRasurae b41f536da6 fix(automation): respect automation profile gates in lifecycle service and async jobs
CI / helm (push) Successful in 47s
CI / build (push) Successful in 1m11s
CI / push-validation (push) Successful in 40s
CI / benchmark-publish (push) Has started running
CI / lint (push) Successful in 1m26s
CI / typecheck (push) Successful in 1m55s
CI / e2e_tests (push) Successful in 1m12s
CI / quality (push) Successful in 2m6s
CI / security (push) Successful in 2m9s
CI / benchmark-regression (push) Failing after 1m28s
CI / integration_tests (push) Successful in 3m48s
CI / unit_tests (push) Successful in 7m31s
CI / coverage (push) Has started running
CI / docker (push) Successful in 1m35s
CI / helm (pull_request) Successful in 39s
CI / push-validation (pull_request) Successful in 39s
CI / build (pull_request) Successful in 1m13s
CI / lint (pull_request) Successful in 1m32s
CI / quality (pull_request) Successful in 1m49s
CI / typecheck (pull_request) Successful in 1m48s
CI / security (pull_request) Successful in 1m58s
CI / status-check (push) Has been cancelled
CI / integration_tests (pull_request) Successful in 4m48s
CI / unit_tests (pull_request) Successful in 5m11s
CI / coverage (pull_request) Has started running
CI / docker (pull_request) Successful in 1m44s
CI / status-check (pull_request) Has been cancelled
Add BDD regression tests for issue #4328 automation profile gates

Tests verify that complete_strategize() and complete_execute() respect
automation profile thresholds and do NOT unconditionally call auto_progress().

Covers 8 built-in profiles: manual, full-auto, supervised, auto,
review_before_apply, ci, trusted

ISSUES CLOSED: #4328
2026-05-14 22:57:11 +00:00
brent.edwards 34dcf5226f feat(autonomy): automation profile resolution precedence correct (#1196)
CI / build (push) Successful in 18s
CI / helm (push) Successful in 38s
CI / lint (push) Successful in 3m19s
CI / quality (push) Successful in 3m42s
CI / typecheck (push) Successful in 3m56s
CI / security (push) Successful in 4m7s
CI / unit_tests (push) Failing after 5m43s
CI / docker (push) Has been skipped
CI / coverage (push) Successful in 12m28s
CI / e2e_tests (push) Successful in 20m5s
CI / integration_tests (push) Failing after 39m29s
CI / status-check (push) Failing after 8m55s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Successful in 28m30s
## Summary
- Fix automation profile resolution precedence at plan-creation time to follow plan > action > project > global.
- Narrow exception handling in `_resolve_plan_profile_ref` to catch only `(KeyError, ValueError, OSError)` with warning-level structured logging, replacing bare `except Exception:` per CONTRIBUTING.md §Exception Propagation.
- Fix TDD feature file tag/title inconsistency: align to `@tdd_bug @tdd_bug_1076` / "TDD Bug #1076" referencing the original bug ticket.
- Add BDD scenarios for plan-level profile override and config service error fallback.
- Harden lifecycle and Robot/Behave test paths for auto-progression and parallel CI stability (including pre-seeded DB initialization for `tdd_plan_explain_plan_id` helper).
- Update Robot helper timing/session patterns to reduce false negatives in long-running integration/E2E validations.

## Approach
The automation profile resolution is implemented in `PlanLifecycleService._resolve_plan_profile_ref`, which evaluates the four-level precedence chain (plan > action > project > global) at `use_action()` time. The resolved profile is stored as an `AutomationProfileRef` on the Plan with provenance tracking. The `ConfigService` is used for project-scoped and global config lookups, with narrowed exception handling that logs warnings on failure and falls back to the settings default.

## Validation
- `nox -s lint` 
- `nox -s typecheck` 
- `nox -s unit_tests` 
- `nox -s coverage_report`  (97%)

## Review Fix Round (Review #2963)
1. **Bare `except Exception:` → narrowed to `(KeyError, ValueError, OSError)` with warning logging** — addresses CONTRIBUTING.md §Exception Propagation violation
2. **Tag inconsistency fixed** — `@tdd_bug @tdd_bug_1076` with title "TDD Bug #1076"
3. **Added 2 new BDD scenarios** — plan-level override and config error fallback
4. **Rebased onto latest master** (532ea100)

Closes #854

Reviewed-on: #1196
Co-authored-by: Brent Edwards <brent.edwards@cleverthis.com>
Co-committed-by: Brent Edwards <brent.edwards@cleverthis.com>
2026-04-01 04:27:09 +00:00
hamza.khyari 3f66221938 test(integration): workflow example 5 — database schema migration with safety nets (review profile)
CI / build (pull_request) Successful in 25s
CI / helm (pull_request) Successful in 29s
CI / lint (pull_request) Successful in 3m47s
CI / typecheck (pull_request) Successful in 4m20s
CI / quality (pull_request) Successful in 4m23s
CI / security (pull_request) Successful in 4m49s
CI / integration_tests (pull_request) Successful in 7m27s
CI / unit_tests (pull_request) Successful in 8m11s
CI / docker (pull_request) Successful in 1m31s
CI / coverage (pull_request) Successful in 12m17s
CI / e2e_tests (pull_request) Successful in 22m57s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 54m40s
Robot Framework integration test suite for Specification Workflow Example 5:
Database Schema Migration with Safety Nets.  Exercises the review automation
profile with custom resource types, custom skills with database tools,
phased child plan execution, checkpointing, and rollback.

- 7 test cases covering: custom resource type registration, review profile
  behavior, custom skill with 3 database tools, action creation with
  review profile, checkpoint/rollback via managers, 5-phase sequential
  SubplanService.spawn with fail-fast, and plan lifecycle through
  strategize-to-execute
- Uses mocked LLM providers (CLEVERAGENTS_TESTING_USE_MOCK_AI=true)
- All Run Process calls have timeout=60s on_timeout=kill
- Fix environment-dependent test failures: mock shutil.disk_usage in
  disk space and diagnostics --check Behave steps so tests pass
  regardless of CI runner disk space; Robot diagnostics test tolerates
  disk-space errors

ISSUES CLOSED: #769
2026-03-31 11:03:20 +00:00