Skip to content

Detect async children reliably in ReactiveSequence XML validation - #1194

Open
yurekami wants to merge 1 commit into
BehaviorTree:masterfrom
yurekami:fix-1184-reactive-async-verification
Open

Detect async children reliably in ReactiveSequence XML validation#1194
yurekami wants to merge 1 commit into
BehaviorTree:masterfrom
yurekami:fix-1184-reactive-async-verification

Conversation

@yurekami

@yurekami yurekami commented Sep 1, 2026

Copy link
Copy Markdown

Summary

  • encode async-node state in reserved manifest metadata without changing TreeNodeManifest layout
  • infer async actions during typed registration and mark built-in async controls
  • make VerifyXML count async action and control children from manifest metadata
  • preserve the internal marker across metadata updates while omitting it from exported model XML
  • cover built-in, typed, manual, and plugin registration paths

Why

The validator compared normal user XML tags against base-class names, so multiple asynchronous children could pass under ReactiveSequence. It also missed combinations such as AsyncFallback plus AsyncSequence. This addresses #1184 without a public struct layout change.

Verification

  • VS2022/Conan Debug build of behaviortree_cpp_test
  • 47 focused tests across basic types, factory, reactive, and plugin suites
  • all 14 Reactive.* tests passed

Fixes #1184

ReactiveSequence XML validation needs registration-time async metadata, but TreeNodeManifest is a public installed struct and changing its layout would create avoidable ABI churn. Reuse the existing manifest metadata channel to track async actions and controls, hide the internal marker from exported TreeNodesModel XML, and mark built-in async controls explicitly while exposing helpers for manual-builder and plugin registrations.\n\nConstraint: TreeNodeManifest is public API in installed headers and the project guide explicitly calls out ABI/back-compat review\nConstraint: VerifyXML runs before node instantiation and can only rely on registration metadata\nRejected: Add a public bool field to TreeNodeManifest | changes public struct layout for an internal validation detail\nRejected: Infer async controls from XML tag names | misses AsyncFallback and custom async registrations\nConfidence: high\nScope-risk: narrow\nDirective: Keep async validation metadata-based and reserve __bt_async for internal manifest state only\nTested: Conan Debug configure/build with VS2022 toolchain; gtest filter Reactive.*:BehaviorTreeFactory.*:PluginIssue1184Test.*:BasicTypes.TreeNodeManifestAsyncMetadata\nNot-tested: Full ctest discovery run from this shell without extra PATH injection for behaviortree_cppd.dll

Signed-off-by: yurekami <yurekami@users.noreply.github.com>
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.

Check for async action nodes under ReactiveSequence in VerifyXML()

1 participant