feat: implement structural component output validation #11161

Merged
HAL9000 merged 9 commits from feat/structural-output-validation into master 2026-05-14 18:38:08 +00:00

9 Commits

Author SHA1 Message Date
HAL9000 2f29f8352f chore: resolve merge conflicts and apply cosmetic fixes
CI / push-validation (push) Successful in 29s
CI / helm (push) Successful in 39s
CI / build (push) Successful in 1m9s
CI / lint (push) Successful in 1m23s
CI / typecheck (push) Successful in 1m34s
CI / quality (push) Successful in 1m39s
CI / security (push) Successful in 1m46s
CI / e2e_tests (push) Successful in 52s
CI / benchmark-regression (push) Failing after 40s
CI / integration_tests (push) Successful in 5m6s
CI / unit_tests (push) Successful in 6m7s
CI / docker (push) Successful in 1m28s
CI / coverage (push) Successful in 10m46s
CI / status-check (push) Successful in 7s
CI / benchmark-publish (push) Failing after 45m49s
CI / helm (pull_request) Successful in 45s
CI / build (pull_request) Successful in 1m8s
CI / lint (pull_request) Successful in 1m45s
CI / quality (pull_request) Successful in 1m39s
CI / security (pull_request) Successful in 2m11s
CI / typecheck (pull_request) Successful in 2m21s
CI / push-validation (pull_request) Successful in 22s
CI / integration_tests (pull_request) Successful in 4m19s
CI / unit_tests (pull_request) Successful in 5m5s
CI / docker (pull_request) Successful in 1m47s
CI / coverage (pull_request) Successful in 11m53s
CI / status-check (pull_request) Successful in 3s
- Resolve CHANGELOG.md conflict to include both entries, referencing issue #8164 instead of PR #11161
- Resolve CONTRIBUTORS.md conflict, fix leading space in new entry
- Remove duplicate create_sequence_node function (dead code)
Merges master into feat/structural-output-validation branch
2026-05-14 18:14:48 +00:00
HAL9000 6d46baf552 fix: apply ruff format to step definitions file
CI / push-validation (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 1m13s
CI / lint (pull_request) Successful in 1m17s
CI / quality (pull_request) Successful in 1m42s
CI / typecheck (pull_request) Successful in 1m49s
CI / security (pull_request) Successful in 2m4s
CI / integration_tests (pull_request) Successful in 3m38s
CI / unit_tests (pull_request) Successful in 4m57s
CI / docker (pull_request) Successful in 1m32s
CI / coverage (pull_request) Failing after 10m46s
CI / status-check (pull_request) Failing after 3s
2026-05-14 06:46:27 +00:00
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
freemo 80d27df9cc fix(changelog): correct PR #11161 references in CHANGELOG.md and CONTRIBUTORS.md
ISSUES CLOSED: #11147
2026-05-14 06:46:27 +00:00
freemo b092ccac49 fix(ci): apply ruff formatting to validation.py and step definitions
ISSUES CLOSED: #11147
2026-05-14 06:46:27 +00:00
freemo cdafcf73cf fix: detect duplicate sibling sequences in validate_plan_tree
ISSUES CLOSED: #11147
2026-05-14 06:46:27 +00:00
freemo b59b2508af fix(ci): resolve remaining lint errors in __init__.py and step definitions
ISSUES CLOSED: #11147
2026-05-14 06:46:27 +00:00
CleverAgents Bot dce30e85a2 fix(ci): resolve lint and typecheck failures in structural validation module
ISSUES CLOSED: #11147
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