FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix logical NOT for string-backed boolean values by fallenmi · Pull Request #1191 · BehaviorTree/BehaviorTree.CPP · GitHub

Fix logical NOT for string-backed boolean values - #1191

Open
fallenmi wants to merge 1 commit into
BehaviorTree:masterfrom
fallenmi:agent/fix-subtree-literal-booleans
Open

fallenmi wants to merge 1 commit into
BehaviorTree:masterfrom
fallenmi:agent/fix-subtree-literal-booleans

Conversation

Copy link
Copy Markdown

Fixes #1122.

Literal values passed to a SubTree remain strings in its blackboard. Script unary logical NOT rejected every string, including values that use the standard boolean spellings accepted by convertFromString<bool>.

Allow ! to interpret only true/True/TRUE/1 and false/False/FALSE/0. Other strings still raise the existing Invalid operator for std::string error, and the blackboard values remain unchanged for string consumers.

Regression coverage includes:

  • the reported _skipIf="!enabled" path;
  • lowercase, capitalized, uppercase, and remapped 1/0 values;
  • preservation of the original string values;
  • rejection of a numeric-prefix string that is not a boolean.

Validation

  • cmake --build build --target behaviortree_cpp_test --parallel 8
  • ./build/tests/behaviortree_cpp_test --gtest_filter='SubTree.*:Preconditions.*:ParserTest.*:PortTest.*:PortTypeRules.*' — 110 passed
  • uvx pre-commit run -a
  • git diff --check

AI assistance disclosure

OpenAI Codex reproduced the issue, drafted the code and tests, checked the visible upstream overlap surface, and ran the validation listed above. The account owner remains responsible for the contribution.

fallenmi marked this pull request as ready for review August 25, 2026 12:35
facontidavide self-assigned this Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Script error with boolean operator on subtree input

2 participants


Back | FazBrowse Home | New Git URL