feat: behavior-tree trace-testing pipeline (Phase 3)#73
Merged
Conversation
Co-authored-by: Erwin L. <[email protected]>
…fixture runner) Co-authored-by: Erwin L. <[email protected]>
…peline-2d56 # Conflicts: # CHANGELOG.md # src/btcpp/exec/tick.ts Co-authored-by: Erwin L. <[email protected]>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Phase 3 of the roadmap: a declarative trace-testing pipeline for the behavior trees under edit, built on the exec core (#72, now merged to
devel). This is the "pipeline for testing the behavior tree" from the review.What's included
src/btcpp/exec/trace.ts—TraceScenario/TraceAssertionDSL andrunScenario(doc, scenario):statusat apath,rootStatus, orblackboardsubset — at a specifictickor the final tick. Missing (never-ticked) nodes read asIDLE.*.trace.jsonfixtures:simple_sequence(happy + failing-branch),fallback_recovery(primary→backup recovery),subtree_running(two-tick RUNNING action through a SubTree).src/test/unit/trace.test.ts— unit tests for the runner plus a discovery runner that executes everyfixtures/**/*.trace.jsonagainst its sibling.xml, turning fixtures into a CI behavior gate.Included engine refinement
Improved the exec core to a Groot-like latched-status model: internal-state reset (for re-ticking) is separated from visible halt (IDLE), so a failed node keeps its
FAILUREstatus in the snapshot instead of being clobbered. Benefits both traces and the overlays. All exec-core and verifier tests still pass with this version.Testing
npm run test:unit— 77 passed (trace + exec + verifier together)npm run check-typesnpm run lintnpm run compile