feat(core): add v3 lifecycle models, automation levels, subplan support, and security hardening #307

Closed
opened 2026-02-22 23:41:08 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit: feat(core): add v3 lifecycle models, automation levels, subplan support, and security hardening
  • Branch: feature/m5-subplan-domain

Subtasks

  • Align ExecutionMode enum to spec (sequential, parallel, dependency_ordered) with validation guards.
  • Add SubplanMergeStrategy enum (git_three_way, sequential_apply, fail_on_conflict, last_wins).
  • Define SubplanConfig with execution_mode, merge_strategy, max_parallel, fail_fast, timeout_per_subplan_seconds, retry_failed, max_retries.
  • Add SubplanStatus and SubplanAttempt models (status, timing, error, changeset_summary, files_changed, retries).
  • Add SubplanFailureHandler plus retriable/non-retriable failure constants.
  • Extend Plan with subplan_config, subplan_statuses, spawn_decision_id, and helpers (is_subplan, has_subplans, child_count).
  • Add DecisionType constants for subplan_spawn and subplan_parallel_spawn and reference them in models.
  • Add dependency validation helper to reject cycles and missing dependency references.
  • Add serialization ordering rules so subplan configs render with stable field ordering (for snapshot tests).
  • Add docs/reference/subplan_model.md.
  • Include field-by-field table with defaults + example JSON payloads for decision emission.
  • Tests (Behave): Add features/subplan_model.feature scenarios for config validation, dependency cycles, and parent/root helpers.
  • Tests (Robot): Add robot/subplan_model.robot smoke tests.
  • Tests (ASV): Add benchmarks/subplan_model_bench.py for model validation.
  • Run nox (all default sessions, including benchmark).
  • Verify coverage >=97% via nox -s coverage_report. If coverage is <97% then review the current unit test coverage report at build/coverage.xml and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun nox -s coverage_report to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.

Section: ### Section 7: Subplans & Parallelism [M5]
Status: Completed

## Metadata - **Commit**: `feat(core): add v3 lifecycle models, automation levels, subplan support, and security hardening` - **Branch**: `feature/m5-subplan-domain` ## Subtasks - [x] Align `ExecutionMode` enum to spec (sequential, parallel, dependency_ordered) with validation guards. - [x] Add `SubplanMergeStrategy` enum (git_three_way, sequential_apply, fail_on_conflict, last_wins). - [x] Define `SubplanConfig` with execution_mode, merge_strategy, max_parallel, fail_fast, timeout_per_subplan_seconds, retry_failed, max_retries. - [x] Add `SubplanStatus` and `SubplanAttempt` models (status, timing, error, changeset_summary, files_changed, retries). - [x] Add `SubplanFailureHandler` plus retriable/non-retriable failure constants. - [x] Extend `Plan` with `subplan_config`, `subplan_statuses`, `spawn_decision_id`, and helpers (`is_subplan`, `has_subplans`, `child_count`). - [x] Add DecisionType constants for `subplan_spawn` and `subplan_parallel_spawn` and reference them in models. - [x] Add dependency validation helper to reject cycles and missing dependency references. - [x] Add serialization ordering rules so subplan configs render with stable field ordering (for snapshot tests). - [x] Add `docs/reference/subplan_model.md`. - [x] Include field-by-field table with defaults + example JSON payloads for decision emission. - [x] Tests (Behave): Add `features/subplan_model.feature` scenarios for config validation, dependency cycles, and parent/root helpers. - [x] Tests (Robot): Add `robot/subplan_model.robot` smoke tests. - [x] Tests (ASV): Add `benchmarks/subplan_model_bench.py` for model validation. - [x] Run `nox` (all default sessions, including benchmark). - [x] Verify coverage >=97% via `nox -s coverage_report`. If coverage is <97% then review the current unit test coverage report at `build/coverage.xml` and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `nox -s coverage_report` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. **Section**: ### Section 7: Subplans & Parallelism [M5] **Status**: Completed
freemo added this to the v3.3.0 milestone 2026-02-22 23:41:08 +00:00
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#307
No description provided.