527c5903a0
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 16s
CI / build (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 33s
CI / lint (pull_request) Successful in 39s
CI / quality (pull_request) Successful in 43s
CI / security (pull_request) Successful in 51s
CI / typecheck (pull_request) Successful in 58s
CI / e2e_tests (pull_request) Successful in 3m21s
CI / integration_tests (pull_request) Successful in 4m12s
CI / unit_tests (pull_request) Successful in 5m3s
CI / docker (pull_request) Successful in 1m18s
CI / coverage (pull_request) Successful in 11m40s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 22s
CI / helm (push) Successful in 27s
CI / push-validation (push) Successful in 27s
CI / quality (push) Successful in 31s
CI / lint (push) Successful in 40s
CI / typecheck (push) Successful in 47s
CI / security (push) Successful in 1m17s
CI / benchmark-regression (push) Has been skipped
CI / e2e_tests (push) Successful in 3m8s
CI / integration_tests (push) Successful in 3m54s
CI / unit_tests (push) Successful in 4m53s
CI / docker (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / status-check (push) Has been cancelled
CI / benchmark-regression (pull_request) Successful in 58m47s
Modified the agents plan tree command to display full 26-character ULIDs instead of truncating them to 8 characters. This enables users to copy decision IDs directly from the tree output and use them in follow-up CLI commands without manual ID reconstruction. Key changes: - Removed [:8] truncation from all decision ID displays (table, tree) - Updated table column width from 8 to 26 characters for full ULID display - Removed [...] truncation from plan ID in tree title - Added 'Decision IDs (for correction)' section listing all decision ULIDs with human-readable labels for easy reference - Supports both rich (with panel) and plain text formatting - Helper function _get_decision_label() generates appropriate labels based on decision type - Updated CHANGELOG.md per CONTRIBUTING.md requirements ISSUES CLOSED: #5825
173 lines
7.6 KiB
Gherkin
173 lines
7.6 KiB
Gherkin
Feature: Plan explain and decision tree CLI commands
|
|
Validates the plan explain and plan tree commands including
|
|
formatting, filtering, and flag-controlled detail views.
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan explain - default format
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Explain a decision with default format
|
|
Given a test decision for explain
|
|
When I build the explain dict with default options
|
|
Then the explain dict should contain key "decision_id"
|
|
And the explain dict should contain key "question"
|
|
And the explain dict should contain key "chosen"
|
|
And the explain dict should contain key "type"
|
|
And the explain dict should contain key "alternatives_considered"
|
|
And the explain dict should not contain key "rationale"
|
|
And the explain dict should not contain key "context_snapshot"
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan explain - show-context
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Explain with show-context flag
|
|
Given a test decision with context snapshot for explain
|
|
When I build the explain dict with show-context enabled
|
|
Then the explain dict should contain key "context_snapshot"
|
|
And the context snapshot should contain key "hot_context_hash"
|
|
And the context snapshot should contain key "relevant_resources"
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan explain - show-reasoning
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Explain with show-reasoning flag
|
|
Given a test decision with reasoning for explain
|
|
When I build the explain dict with show-reasoning enabled
|
|
Then the explain dict should contain key "rationale"
|
|
And the explain dict should contain key "actor_reasoning"
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan explain - alternatives always included
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Explain includes alternatives by default
|
|
Given a test decision with alternatives for explain
|
|
When I build the explain dict with default options
|
|
Then the explain dict should contain key "alternatives_considered"
|
|
And the alternatives list should have 2 items
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan explain - json format
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Explain with json format
|
|
Given a test decision for explain
|
|
When I format the explain dict as json
|
|
Then the json output should contain "decision_id"
|
|
And the json output should be valid json
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan explain - yaml format
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Explain with yaml format
|
|
Given a test decision for explain
|
|
When I format the explain dict as yaml
|
|
Then the yaml output should contain "decision_id"
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan explain - non-existent decision
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Explain for non-existent decision returns error marker
|
|
Given a non-existent decision id
|
|
Then the explain lookup should indicate not found
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan tree - default format
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Tree with default format builds tree structure
|
|
Given a set of test decisions forming a tree
|
|
When I build the decision tree with default options
|
|
Then the tree should have at least 1 root node
|
|
And the first root node should have children
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan tree - show-superseded
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Tree with show-superseded includes superseded decisions
|
|
Given a set of test decisions with superseded entries
|
|
When I build the decision tree with show-superseded enabled
|
|
Then the tree should include superseded decision nodes
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan tree - depth limit
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Tree with depth limit restricts tree depth
|
|
Given a set of test decisions forming a deep tree
|
|
When I build the decision tree with depth 1
|
|
Then the root nodes should have no children
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan tree - json format
|
|
# ------------------------------------------------------------------
|
|
|
|
# @tdd_issue @tdd_issue_4254 @tdd_expected_fail @skip
|
|
@skip
|
|
Scenario: Tree with json format
|
|
Given a set of test decisions forming a tree
|
|
When I format the tree as json
|
|
Then the json tree output should be valid json
|
|
And the json tree output should contain "decision_id"
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan tree - yaml format
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Tree with yaml format
|
|
Given a set of test decisions forming a tree
|
|
When I format the tree as yaml
|
|
Then the yaml tree output should contain "decision_id"
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan tree - no decisions
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Tree for plan with no decisions
|
|
Given an empty list of decisions
|
|
When I build the decision tree with default options from empty list
|
|
Then the tree should be empty
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan tree - filters superseded by default
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Tree filters out superseded decisions by default
|
|
Given a set of test decisions with superseded entries
|
|
When I build the decision tree with default options
|
|
Then the tree should not include superseded decision nodes
|
|
|
|
# ------------------------------------------------------------------
|
|
# plan tree - per-type ordinals in decision labels
|
|
# ------------------------------------------------------------------
|
|
|
|
Scenario: Decision labels use per-type ordinals
|
|
Given a set of test decisions with multiple types for ordinal testing
|
|
When I generate decision labels with per-type ordinals
|
|
Then the first invariant should be labeled "Invariant 1"
|
|
And the second invariant should be labeled "Invariant 2"
|
|
And the first strategy should be labeled "Strategy"
|
|
And the first parallel should be labeled "Parallel 1"
|
|
|
|
Scenario: Decision labels restart counting per decision type
|
|
Given a set of test decisions with mixed types
|
|
When I generate decision labels with per-type ordinals
|
|
Then each decision type should start counting from 1
|
|
And invariants should have sequential numbers
|
|
And parallel spawns should have sequential numbers
|
|
And spawn decisions should have sequential numbers
|
|
|
|
Scenario: Full tree output includes per-type ordinal labels
|
|
Given a set of test decisions forming a tree with multiple types
|
|
When I build the plain format tree output with decision labels
|
|
Then the decision tree output should contain "Invariant 1"
|
|
And the decision tree output should contain "Invariant 2"
|
|
And the decision tree output should contain "Strategy"
|
|
And the decision tree output should not contain "Invariant 6"
|
|
And the decision tree output should not contain "Strategy 7"
|