brent.edwards
34dcf5226f
feat(autonomy): automation profile resolution precedence correct ( #1196 )
...
## 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: cleveragents/cleveragents-core#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
..
2026-03-16 12:11:08 +00:00
2026-03-16 22:50:27 +00:00
2026-03-30 13:18:07 +01:00
2026-04-01 00:40:46 +00:00
2026-03-26 11:52:52 +00:00
2026-04-01 04:27:09 +00:00
2026-03-27 05:58:35 +00:00
2026-03-22 03:23:42 +00:00
2026-03-12 14:38:57 +00:00
2026-03-31 21:47:12 +00:00
2026-03-18 17:33:30 +00:00
2026-03-12 14:38:57 +00:00
2026-03-20 21:22:10 +00:00
2026-03-12 14:38:57 +00:00
2026-03-22 01:07:20 +00:00
2026-03-09 13:01:58 -04:00
2026-03-03 03:29:31 +00:00
2026-03-10 15:09:03 +00:00
2026-03-26 06:19:14 +00:00
2026-03-05 10:27:36 -05:00
2026-03-07 14:53:18 +00:00
2026-03-26 06:19:14 +00:00
2026-03-09 13:01:58 -04:00
2026-03-31 21:47:12 +00:00
2026-03-15 19:33:11 -04:00
2026-03-09 13:01:58 -04:00
2026-03-19 09:30:35 +00:00
2026-02-24 19:12:01 +00:00
2026-03-09 13:01:58 -04:00
2026-03-30 19:35:23 +00:00
2026-03-31 21:47:12 +00:00
2026-03-19 22:42:15 +00:00
2026-03-27 05:58:35 +00:00
2026-03-19 09:30:35 +00:00
2026-03-26 13:41:31 +00:00
2026-03-18 06:58:39 +00:00
2026-03-20 21:22:10 +00:00
2026-02-26 09:10:35 +00:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-31 21:47:12 +00:00
2026-02-25 10:01:57 +00:00
2026-03-27 23:53:22 +00:00
2026-03-04 23:47:20 +00:00
2026-03-09 13:01:58 -04:00
2026-03-20 21:22:10 +00:00
2026-03-26 17:35:34 +00:00
2026-03-20 21:22:10 +00:00
2026-03-09 13:01:58 -04:00
2026-03-30 13:18:07 +01:00
2026-03-30 13:18:07 +01:00
2026-03-09 13:01:58 -04:00
2026-02-28 22:06:57 +00:00
2026-03-09 13:01:58 -04:00
2026-03-01 03:09:51 +00:00
2026-03-21 05:30:01 +00:00
2026-03-09 13:01:58 -04:00
2026-02-26 02:47:14 +00:00
2026-02-27 13:47:42 -05:00
2026-03-01 03:09:51 +00:00
2026-03-18 16:51:14 +00:00
2026-03-20 21:22:10 +00:00
2026-03-31 21:47:12 +00:00
2026-03-21 00:29:49 +00:00
2026-03-20 21:22:10 +00:00
2026-03-21 01:14:18 +00:00
2026-03-03 14:55:58 -05:00
2026-02-24 20:11:42 +00:00
2026-03-27 05:58:35 +00:00
2026-03-31 21:47:12 +00:00
2026-03-19 23:30:55 +00:00
2026-03-02 02:01:27 +00:00
2026-03-31 21:47:12 +00:00
2026-03-20 21:22:10 +00:00
2026-03-17 13:14:37 -04:00
2026-03-07 11:49:14 -05:00
2026-02-25 10:48:05 -05:00
2026-03-09 13:01:58 -04:00
2026-03-30 21:48:01 +00:00
2026-03-31 21:47:12 +00:00
2026-03-01 04:38:30 +00:00
2026-03-01 04:38:30 +00:00
2026-03-02 15:05:20 +00:00
2026-03-09 13:01:58 -04:00
2026-03-31 21:47:12 +00:00
2026-03-30 21:48:01 +00:00
2026-03-02 14:56:13 +00:00
2026-03-28 05:27:14 +00:00
2026-03-02 14:56:13 +00:00
2026-04-01 01:46:37 +00:00
2026-03-02 14:56:13 +00:00
2026-03-02 14:56:13 +00:00
2026-03-02 14:56:13 +00:00
2026-03-30 21:48:01 +00:00
2026-03-02 14:56:13 +00:00
2026-03-02 14:56:13 +00:00
2026-03-19 07:53:43 +00:00
2026-03-02 14:56:13 +00:00
2026-03-02 14:56:13 +00:00
2026-03-02 14:56:13 +00:00
2026-03-30 13:18:07 +01:00
2026-03-31 01:49:16 +00:00
2026-03-02 14:56:13 +00:00
2026-03-02 14:56:13 +00:00
2026-03-21 03:14:40 +00:00
2026-03-02 14:56:13 +00:00
2026-03-29 18:57:15 +01:00
2026-03-19 06:53:06 +00:00
2026-03-02 14:56:13 +00:00
2026-03-02 14:56:13 +00:00
2026-03-02 14:56:13 +00:00
2026-03-20 21:22:10 +00:00
2026-03-27 12:57:03 +00:00
2026-03-30 04:45:56 +00:00
2026-03-12 10:31:37 +00:00
2026-03-20 21:22:10 +00:00
2026-03-03 23:36:15 +00:00
2026-03-05 14:11:23 +00:00
2026-03-09 13:01:58 -04:00
2026-03-05 12:58:57 +00:00
2026-03-05 22:00:15 +00:00
2026-03-25 17:49:06 +00:00
2026-03-21 01:40:58 +00:00
2026-03-29 16:23:04 +01:00
2026-03-30 17:06:49 -04:00
2026-03-20 21:22:10 +00:00
2026-03-31 21:47:12 +00:00
2026-02-24 12:19:04 -05:00
2026-03-23 18:41:53 +00:00
2026-03-20 21:22:10 +00:00
2026-03-10 14:18:04 -04:00
2026-02-25 12:08:01 -05:00
2026-03-31 21:47:12 +00:00
2026-03-09 13:01:58 -04:00
2026-03-04 21:20:47 +00:00
2026-03-26 07:52:09 +00:00
2026-03-09 13:01:58 -04:00
2026-02-24 12:19:04 -05:00
2026-03-10 19:29:27 +00:00
2026-03-20 21:22:10 +00:00
2026-03-18 17:16:32 +00:00
2026-03-31 21:47:12 +00:00
2026-03-20 21:22:10 +00:00
2026-02-27 02:33:42 +00:00
2026-02-26 16:13:44 +00:00
2026-03-19 07:53:43 +00:00
2026-03-03 12:53:28 +00:00
2026-03-09 13:01:58 -04:00
2026-03-03 12:53:28 +00:00
2026-03-09 13:01:58 -04:00
2026-03-09 13:01:58 -04:00
2026-03-06 23:14:30 +00:00
2026-03-20 21:22:10 +00:00
2026-03-10 12:17:51 +00:00
2026-03-10 12:17:51 +00:00
2026-03-31 21:47:12 +00:00
2026-03-10 12:17:51 +00:00
2026-03-10 12:17:51 +00:00
2026-03-20 21:22:10 +00:00
2026-03-10 12:17:51 +00:00
2026-03-09 13:01:58 -04:00
2026-03-20 21:22:10 +00:00
2026-03-06 20:07:03 +00:00
2026-03-27 23:53:22 +00:00
2026-03-06 20:07:03 +00:00
2026-03-23 23:33:33 +00:00
2026-03-27 05:58:35 +00:00
2026-02-25 10:05:10 +00:00
2026-02-25 10:07:09 +00:00
2026-03-21 01:40:58 +00:00
2026-03-02 11:54:53 +00:00
2026-03-31 16:01:58 +00:00
2026-03-31 11:31:00 +00:00
2026-03-31 21:47:12 +00:00
2026-03-31 16:01:58 +00:00
2026-03-31 21:47:12 +00:00
2026-03-30 13:19:08 +00:00
2026-03-24 22:01:48 +00:00
2026-03-31 21:47:12 +00:00
2026-03-24 22:01:48 +00:00
2026-03-31 21:47:12 +00:00
2026-03-31 21:47:12 +00:00
2026-03-29 18:57:15 +01:00
2026-03-04 15:36:34 +00:00
2026-03-04 20:26:42 +00:00
2026-03-27 23:53:22 +00:00
2026-03-09 13:01:58 -04:00
2026-03-09 13:01:58 -04:00
2026-03-31 23:57:39 +00:00
2026-03-30 09:21:51 +00:00
2026-03-03 17:04:17 -05:00
2026-02-27 13:47:42 -05:00
2026-03-27 11:10:56 +00:00
2026-03-31 21:47:12 +00:00
2026-03-30 11:51:27 +00:00
2026-03-31 21:47:12 +00:00
2026-03-24 13:01:12 +00:00
2026-03-31 21:47:12 +00:00
2026-03-31 21:47:12 +00:00
2026-03-12 14:38:57 +00:00
2026-03-31 21:47:12 +00:00
2026-03-31 21:47:12 +00:00
2026-02-25 04:50:43 +00:00
2026-02-25 22:09:26 +00:00
2026-02-26 02:01:47 +00:00
2026-03-30 08:42:48 +00:00
2026-03-19 08:46:46 +00:00
2026-03-31 21:47:12 +00:00
2026-03-31 21:47:12 +00:00
2026-02-25 13:17:26 +00:00
2026-02-25 19:38:43 -05:00
2026-02-25 19:38:43 -05:00
2026-02-25 19:38:43 -05:00
2026-03-09 13:01:58 -04:00
2026-03-03 14:55:58 -05:00
2026-03-30 19:52:51 +00:00
2026-03-31 21:47:12 +00:00
2026-03-29 18:57:15 +01:00
2026-02-28 20:21:18 +00:00
2026-03-15 19:59:38 -04:00
2026-03-01 03:09:51 +00:00
2026-03-09 13:01:58 -04:00
2026-02-24 12:19:04 -05:00
2026-02-25 19:38:43 -05:00
2026-03-20 21:22:10 +00:00
2026-03-09 13:01:58 -04:00
2026-03-31 21:47:12 +00:00
2026-02-27 13:47:42 -05:00
2026-03-01 03:09:51 +00:00
2026-03-02 02:01:27 +00:00
2026-03-08 23:28:05 +00:00
2026-03-20 21:22:10 +00:00
2026-02-27 13:47:42 -05:00
2026-03-01 03:09:51 +00:00
2026-03-09 13:01:58 -04:00
2026-03-03 12:10:25 +00:00
2026-03-03 12:10:25 +00:00
2026-03-20 21:22:10 +00:00
2026-03-19 21:13:01 +00:00
2026-03-17 10:06:42 +00:00
2026-03-20 21:22:10 +00:00
2026-02-25 19:38:43 -05:00
2026-03-23 23:33:33 +00:00
2026-03-20 21:22:10 +00:00
2026-02-25 14:00:04 -05:00
2026-03-18 06:58:39 +00:00
2026-03-31 21:47:12 +00:00
2026-03-09 13:01:58 -04:00
2026-03-02 02:01:27 +00:00
2026-03-09 13:01:58 -04:00
2026-03-18 06:58:39 +00:00
2026-03-09 13:01:58 -04:00
2026-02-25 14:00:04 -05:00
2026-03-20 21:22:10 +00:00
2026-03-09 13:01:58 -04:00
2026-03-02 02:01:27 +00:00
2026-03-02 08:17:21 +00:00
2026-03-18 08:13:56 +00:00
2026-03-30 23:40:36 +01:00
2026-03-20 21:22:10 +00:00
2026-03-09 13:01:58 -04:00
2026-03-06 20:07:03 +00:00
2026-03-20 21:22:10 +00:00
2026-03-08 21:53:21 -04:00
2026-03-09 13:01:58 -04:00
2026-03-19 06:53:06 +00:00
2026-03-03 23:36:15 +00:00
2026-03-31 21:47:12 +00:00
2026-03-30 17:12:20 +00:00
2026-03-30 08:42:48 +00:00
2026-03-30 14:33:28 +00:00
2026-03-27 05:58:35 +00:00
2026-03-30 14:33:28 +00:00
2026-03-13 13:32:52 +08:00
2026-03-20 21:22:10 +00:00
2026-03-27 05:58:35 +00:00
2026-03-08 22:19:40 +00:00
2026-03-31 21:47:12 +00:00
2026-02-27 09:47:10 -05:00
2026-03-09 13:01:58 -04:00
2026-03-19 09:30:35 +00:00
2026-03-09 13:01:58 -04:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-18 10:09:06 +00:00
2026-03-31 21:47:12 +00:00
2026-03-20 22:28:32 +00:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-30 10:18:19 +00:00
2026-03-25 13:05:04 +00:00
2026-03-09 13:01:58 -04:00
2026-02-27 13:47:42 -05:00
2026-03-01 03:09:51 +00:00
2026-03-09 13:01:58 -04:00
2026-03-10 03:39:32 +00:00
2026-03-31 21:47:12 +00:00
2026-03-30 19:17:41 +08:00
2026-03-07 19:36:09 +00:00
2026-03-20 21:22:10 +00:00
2026-03-31 21:47:12 +00:00
2026-03-24 13:53:41 +00:00
2026-03-27 10:50:15 +00:00
2026-03-31 21:47:12 +00:00
2026-03-10 04:06:02 +00:00
2026-03-09 13:01:58 -04:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-19 14:03:17 +00:00
2026-03-30 13:44:54 +00:00
2026-03-23 18:41:53 +00:00
2026-03-18 02:30:00 +00:00
2026-03-19 14:03:17 +00:00
2026-03-10 03:39:32 +00:00
2026-03-24 13:21:12 +00:00
2026-03-20 21:22:10 +00:00
2026-03-31 21:47:12 +00:00
2026-03-18 01:45:25 +00:00
2026-03-09 13:01:58 -04:00
2026-03-11 17:42:13 +00:00
2026-03-11 17:42:13 +00:00
2026-03-20 21:22:10 +00:00
2026-03-11 17:42:13 +00:00
2026-03-11 17:42:13 +00:00
2026-03-20 21:22:10 +00:00
2026-03-28 00:57:51 +00:00
2026-03-03 22:21:14 +00:00
2026-03-03 22:21:14 +00:00
2026-03-04 15:59:15 +00:00
2026-03-29 18:57:15 +01:00
2026-03-31 21:47:12 +00:00
2026-03-29 18:57:15 +01:00
2026-03-09 13:01:58 -04:00
2026-03-20 21:22:10 +00:00
2026-03-21 04:46:45 +00:00
2026-03-06 00:49:33 +00:00
2026-03-12 14:38:57 +00:00
2026-02-25 10:06:59 +00:00
2026-03-30 13:18:07 +01:00
2026-03-02 22:05:53 +00:00
2026-02-28 17:46:54 +00:00
2026-03-27 23:53:22 +00:00
2026-03-12 14:38:57 +00:00
2026-03-20 21:22:10 +00:00
2026-03-31 21:47:12 +00:00
2026-03-20 21:22:10 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-20 21:22:10 +00:00
2026-03-24 08:46:58 +00:00
2026-03-20 21:22:10 +00:00
2026-03-05 21:38:55 +00:00
2026-03-08 02:57:44 +00:00
2026-03-19 09:30:35 +00:00
2026-02-25 19:38:43 -05:00
2026-02-27 13:47:42 -05:00
2026-02-24 12:19:04 -05:00
2026-02-26 10:57:07 +00:00
2026-03-02 14:56:13 +00:00
2026-02-27 20:09:26 +00:00
2026-03-20 21:22:10 +00:00
2026-03-09 13:01:58 -04:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-09 13:01:58 -04:00
2026-03-31 23:57:39 +00:00
2026-03-09 13:01:58 -04:00
2026-03-18 17:07:07 +00:00
2026-03-02 09:41:25 -05:00
2026-03-09 13:01:58 -04:00
2026-03-08 21:53:21 -04:00
2026-03-28 05:27:14 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 22:01:03 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-30 17:06:49 -04:00
2026-03-28 00:30:26 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 22:53:33 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-28 04:15:49 +00:00
2026-03-27 05:58:35 +00:00
2026-04-01 00:40:46 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-28 04:34:47 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-03-27 05:58:35 +00:00
2026-04-01 04:27:09 +00:00
2026-03-28 18:09:27 +00:00
2026-03-11 01:36:06 +00:00
2026-03-08 22:11:49 +00:00
2026-03-20 23:51:46 +00:00
2026-03-12 10:31:37 +00:00
2026-03-29 18:57:15 +01:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-18 10:09:06 +00:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-18 10:09:06 +00:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-20 21:22:10 +00:00
2026-03-05 19:20:39 +00:00
2026-03-11 00:40:07 +00:00
2026-03-09 13:01:58 -04:00
2026-03-06 23:14:30 +00:00
2026-03-13 18:21:50 +00:00
2026-03-05 21:38:55 +00:00
2026-03-09 13:01:58 -04:00
2026-02-25 10:03:57 +00:00
2026-03-31 21:47:12 +00:00
2026-04-01 03:30:00 +00:00
2026-03-30 13:18:07 +01:00
2026-03-30 11:47:37 +08:00
2026-03-09 13:01:58 -04:00