Repository navigation
add unit test for subtree with default values and autoremap enabled - #1272
Conversation
With _autoremap="true" the SubTree model was skipped entirely, so an
input_port default was never applied and reading the port failed with
"Variable not found".
Now, for a modelled input port that is not explicitly remapped, a parent
key of the same name still wins (autoremap); if no such entry exists when
the tree is created, the literal default is set in the SubTree blackboard,
as it is without autoremap. Output/inout ports and "{key}" defaults keep
the previous autoremap behavior.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ehaviorTree#1271) With _autoremap="true", a SubTree model input_port literal default is applied only if no entry with that name exists in the parent blackboard chain when the tree is created. Document this (including the workaround: set the key in the blackboard before createTree, or remap the port explicitly) and add a test that pins it: a key written later by a Script does not win over the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @ottojo for the failing test. I pushed the fix on top of your branch, so this PR now fixes #1271: a9e6ab4 is the fix and 7704b2f adds docs plus a test. Your two commits are kept. Root cause: with Creation-time rule (documented in I'll squash-merge once CI is green. |
This adds a failing unit test for #1271