Commit Graph

2 Commits

Author SHA1 Message Date
HAL9000 ac81ea2ceb fix: replace Scenario Outline with literal steps to fix Behave-parallel parameter substitution bug
The Behevare-parallel runner in this project does not support inline
parameter substitution for '{param}' or '<param>' markers within
Scenario Outline Examples. All 4 original Scenario Outlines were failing
because parameters were not being substituted, causing UndefinedStep and
ValueError failures.

Fix: Convert all Scenario Outline scenarios to regular Scenarios with
explicit literal step definitions. Each unique Gherkin line gets its own
@Given/@When/@Then step definition matching the exact string.

Also fix pre-existing bugs identified in PR review #8719:
- Fix undefined step by quoting {{seq}} in feature (line 46)
- Fix ctx.decision_result → ctx.validation_result context variable (line 184)
- Fix ctx.struct_result → ctx.validation_result context variable (line 210)
- Replace # type: ignore[arg-type] with proper Callable[[Any], dict] type
- Add missing literal step definitions for structured_output tests

ISSUES CLOSED: #11161
2026-05-14 06:46:27 +00:00
HAL9000 f8e4f4a579 feat: implement structural component output validation
Replace exact character matching with structural component checking
for output validation. Implements three validators covering plan tree
output, decision CLI dicts, and structured session snapshots.

- validate_plan_tree: validates node dicts for required keys (decision_id, type, sequence, question, children), ULID format, correct types, and sibling ordering
- validate_decision_dict: validates decision CLI output against Decision.as_cli_dict() schema with field presence, type, ULID, confidence range [0..1], bool fields
- validate_structured_output: validates StructuredOutput envelope for command, session_id (ULID), status membership, exit_code, elements integrity
- validate_structured_component_output: unified dispatcher by target_type

BDD tests in features/structural_validation.feature.

ISSUES CLOSED: #11147
2026-05-14 06:46:27 +00:00