fix(cli): make plan explain accept plan_id for plan-level explanation #1057
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
#968 bug(cli): plan explain expects decision_id but M3 acceptance test passes plan_id — command fails with exit code 1
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!1057
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/m3-plan-explain-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
Fixes
plan explainto accept both decision IDs and plan IDs as the positional argument, matching the M3 acceptance test usage patternplan explain <plan_id>.Problem
explain_decision_cmdonly accepted a decision ULID. When the M3 acceptance test passed a plan ID,svc.get_decision(plan_id)returnedNone, causing "Decision not found" error with exit code 1.Fix
decision_id→identifiersvc.get_decision(identifier)first (backward compat)svc.list_decisions(identifier)treating it as a plan_id, explaining the root decisionQuality Gates
nox -s lintnox -s typechecknox -s unit_tests(explain features)Closes #968
Code Review — PR #1057
fix(cli): make plan explain accept plan_id for plan-level explanationClean fix. The fallback chain (try
get_decision(identifier)→ fall back tolist_decisions(identifier)as plan_id → pick root decision) is well-designed with proper error handling viacontextlib.suppress(DecisionNotFoundError). Clear error message when neither lookup resolves. Test mock updated to cover the new fallback path.Approved. No issues found.
e9e40ecd715b1c19f942New commits pushed, approval review dismissed automatically according to repository settings
0fef703b67eeadb0ca61hurui200320 referenced this pull request2026-03-24 08:38:48 +00:00