test(plan-tree): add failing BDD scenario proving corrected nodes not visually marked #8671

Merged
HAL9000 merged 3 commits from test/plan-tree-correction-visual-tdd into master 2026-06-02 22:56:04 +00:00

3 Commits

Author SHA1 Message Date
HAL9000 42c83d149c fix(test): rename ambiguous step to avoid conflict with plan_explain_steps
CI / push-validation (pull_request) Successful in 27s
CI / lint (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 38s
CI / quality (pull_request) Successful in 1m3s
CI / typecheck (pull_request) Successful in 1m6s
CI / security (pull_request) Successful in 1m9s
CI / unit_tests (pull_request) Successful in 4m11s
CI / docker (pull_request) Successful in 1m30s
CI / integration_tests (pull_request) Successful in 8m2s
CI / coverage (pull_request) Successful in 8m41s
CI / status-check (pull_request) Successful in 4s
The step "I build the decision tree with default options" was already
defined in features/steps/plan_explain_steps.py:268. This caused
behave.step_registry.AmbiguousStep during step loading, which crashed
all 31 parallel workers before any scenario could run (0 scenarios,
31 errored at feature level).

Rename the When step in the TDD feature and its step definition to
"I build the correction TDD test decision tree" — unique across the
entire features/steps/ directory.

ISSUES CLOSED: #8576
2026-06-02 18:42:43 -04:00
HAL9000 7149f1b077 test(plan-tree): add failing BDD scenario proving corrected nodes not visually marked
This TDD scenario documents the gap in Spec Requirement #7: the current
implementation of 'agents plan tree' does not visually distinguish corrected
nodes (decisions with is_correction=True).

The scenario creates a plan with a corrected decision and asserts that the
tree output contains a visual marker such as [corrected] or ✎. The scenario
is tagged @tdd_expected_fail to allow CI to pass while the bug exists.

The Rich tree renderer in tree_decisions_cmd builds node labels without
checking decision.is_correction, proving the gap exists.

- Revert production code change: remove label key and [corrected] marker
  from _node_dict in build_decision_tree (the TDD scenario must prove the
  bug exists, not fix it; the fix belongs in a separate PR)
- Update CONTRIBUTORS.md with TDD scenario contribution entry
- Add CHANGELOG.md entry for TDD scenario (#8576)
- Remove dead _make_decision() helper (was already removed by prior attempt)
- Remove # type: ignore[import-untyped] (was already removed by prior attempt)

ISSUES CLOSED: #8576
2026-06-02 18:42:43 -04:00
HAL9000 9e184dae9b fix(plan-tree): visually mark corrected nodes in build_decision_tree
- Add label key to node dicts in _node_dict
- Append [corrected] marker when decision.is_correction is True
- Add TDD BDD scenario proving corrected nodes are visually marked
2026-06-02 18:42:43 -04:00