fix(cli): make plan correct accept plan_id as primary identifier #1055
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.
Blocks
#969 bug(cli): plan correct expects decision_id as first positional but M3 acceptance test passes plan_id
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!1055
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/m3-plan-correct-plan-id"
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
plan correctnow accepts a plan_id as its positional argument (in addition to decision_id). When a plan_id is given, the root decision is automatically selected as the correction target.decision_idtoidentifierwith updated help text reflecting dual use.How it works
container.plan_lifecycle_service().get_plan(identifier)to check if the identifier is a plan_idPlanobject, use it asresolved_plan_idand auto-select the root decision (parent_decision_id is None)ResourceNotFoundError) or the result is not aPlaninstance, fall back to treating the identifier as a decision_id (original behavior)Verification
nox -s lint— All checks passednox -s typecheck— 0 errors, 1 pre-existing warningnox -s unit_tests(correction features) — 150 scenarios passed, 683 steps passed, 0 failuresISSUES CLOSED: #969
Code Review — PR #1055
fix(cli): make plan correct accept plan_id as primary identifierWell-scoped fix. The resolution logic (try
get_plan(identifier)→ auto-select root decision → fall back to decision_id) is clean and backward-compatible. The parameter rename fromdecision_idtoidentifierwith updated help text accurately reflects the dual-use behavior. The docstring and examples are properly updated.Approved. No issues found.
ed2f6ee63af5eda6f846New commits pushed, approval review dismissed automatically according to repository settings
f5eda6f84614a7cdc2db14a7cdc2dba4499897306767fadfdd9db59c3965Fixed all CI failures. Single root cause: a leftover duplicate code block in
plan.py(lines 2809-2818) that referenced the olddecision_idvariable after it was renamed toidentifier. This duplicate block was from an earlier iteration of the plan_id resolution logic that already exists above (lines 2778-2804). Removed the duplicate.Locally verified all nox quality gates:
nox -s lint— PASS (0 errors)nox -s typecheck— PASS (0 errors, 1 pre-existing warning)nox -s unit_tests— PASS (12,214 scenarios, 0 failures)nox -s integration_tests— PASS (1,672 tests, 0 failures)nox -s e2e_tests— PASS (37 tests, 0 failures)nox -s coverage_report— PASS (98% >= 97%)hurui200320 referenced this pull request2026-03-24 08:38:48 +00:00