feat(subplan): execute and merge subplans #444
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!444
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/m4-subplan-execution"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements subplan execution scheduling and merge strategy infrastructure for the plan lifecycle system.
Changes
docs/reference/subplans.mdMotivation
Subplan execution is a core capability for breaking down complex plans into manageable units of work. The scheduling infrastructure enables sequential, parallel, and dependency-aware execution while the merge system combines results safely using configurable strategies.
Key Design Decisions
Closes #184
cad1678bc54805e399afReview Summary (commit 4805e399af97b46f3350a05b)
Scoped to the subplan execution/merge commit. The core service design is clean and the docs/tests are thorough, but there are a few behavioral gaps that will surprise callers.
CI status isn’t visible via the API on my side. Please confirm required checks per
docs/development/ci-cd.mdare green (lint, typecheck, security, quality, unit_tests, integration_tests, coverage, build, docker).Findings
P1:must-fix —
timeout_per_subplan_secondsis defined inSubplanConfigand documented, but never enforced inSubplanExecutionService. There’s no per‑subplan timeout in sequential or parallel modes. Implement timeouts (e.g.,future.result(timeout=...)/ watchdog) or remove the field/docs.src/cleveragents/application/services/subplan_execution_service.pysrc/cleveragents/domain/models/core/plan.pydocs/reference/subplans.mdP2:should-fix —
sequential_applyis documented as “completion order,” but in parallel mode the outputs are merged in original subplan order because results are re-ordered by the input list. If completion order is intended, capture completion timestamps and sort outputs before merge.src/cleveragents/application/services/subplan_execution_service.py(_execute_parallel,execute_all)src/cleveragents/application/services/subplan_merge_service.pydocs/reference/subplans.mdP2:should-fix — In parallel
fail_fast, cancelled futures surface asCancelledErrorand are markedERROREDrather thanCANCELLED. This makes status reporting inconsistent with sequential mode and with the “stop others” semantics.src/cleveragents/application/services/subplan_execution_service.pyP3:should-fix — The commit message claims dependency‑ordered mode executes independent subplans concurrently, but the implementation runs them sequentially after topological sort. Either update the description/docs or implement concurrent execution for ready nodes.
src/cleveragents/application/services/subplan_execution_service.pyPositive Notes
4805e399af1bbec743baI (not an LLM) checked that the review comments were met. Great work!
1bbec743ba9f6fb667c2New commits pushed, approval review dismissed automatically according to repository settings