Skip to content

fix: validate parser structure and report source locations - #120

Open
jaagut wants to merge 1 commit into
refactor/strict-python-typesfrom
fix/parser-structure-validation
Open

jaagut wants to merge 1 commit into
refactor/strict-python-typesfrom
fix/parser-structure-validation

Conversation

@jaagut

@jaagut jaagut commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Rejects malformed behavior trees before execution. Branch parents are tracked by indentation depth, so branches beneath actions, subtree calls, or completed sibling branches cannot silently attach to another decision. Errors include the source file/line, and parsed elements retain definition locations.

Validates entry points, roots, duplicate outcomes/subtrees/parameters, incomplete definitions, references, comments, and YAML errors. Keeps #114's action chains and decision/subtree tails, and fixes copied-root aliases and stale resolved parameter references. ROS parameter lookup without a node now raises ParseError rather than injecting None.

Validation: 137 tests, strict core/example typing, and pre-commit pass. Parsed all five DSD files in the local bitbots_main checkout and compared their complete serialized behavior trees against the preceding parser, excluding instance IDs; they are identical. ROS parameter values were supplied by a fake provider for that syntax comparison; it does not claim robot execution validation.

Addresses #23. Parameter-language expansion and schemas remain in #117.

Stack: based on #119 → #118 → #114. Runtime/debug fixes follow.

I am working on behalf of @jaagut.

Full stack, bottom to top: #114 → #118 → #119 → #120 → #122 → #123. Merge in that order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant