Repository navigation
test: close the v0.2.0 audit gaps; fix the anytime strategy's dropped tracer - #88
Merged
Merged
Conversation
AnytimePlanningStrategy's fast path called astar_plan directly and dropped the tracer rebind_inner_tracer had bound into the inner strategy, so a tracer given to GoapGraph saw no search expansions from an anytime run while the lazy, repair and two-phase wrappers reported theirs (#63). Found by the new wrapper-forwarding tests, which also pin that the pipeline, repair and utility planners see non-planning context keys (#30).
…round-trips) A run resumed by a new process on the same checkpointer and thread keeps its plan, history, replan count, failure counts and blacklist, sub-goal index and skipped sub-goals, wall-clock anchor, no-plan explanation and reflections, and a finished thread stays finished. ainvoke matches invoke for termination policies, the three MultiGoal modes and the strict sequential default, stuck recovery, failure counts, handled tool errors, the parallel wave merge and the blacklist fallback; the goal-object-with- checkpointer error, the compile-option TypeError wording and the report key cap are pinned. Every codec round-trips every field through the checkpointer serializer.
✅ Code Quality Report
Quality Gates
🎉 All quality gates passed! This PR maintains high code quality standards. 📊 View detailed MFCQI breakdownRun |
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.
The test gaps the release audit listed and that should have been closed before 0.2.0 shipped. 48 new tests, one library bug found and fixed.
Bug (fix(planner)).
AnytimePlanningStrategy's fast path calledastar_plandirectly and dropped the tracer thatrebind_inner_tracerhad bound into its inner strategy, so a tracer given toGoapGraphsaw no search expansions from an anytime run while the lazy, repair and two-phase wrappers reported theirs (#63). Caught by the new wrapper-forwarding tests.Crash-resume (
tests/integration/test_crash_resume.py): every round builds a newGoapGraphagainst the same checkpointer and thread. Asserted across the crash: plan identity, execution history, replan count and reason, failure counts and blacklist (including a denial answered by the new process), sub-goal index and skipped sub-goals, the wall-clock anchor (not re-anchored), the no-plan explanation, reflections not blanked by a fresh tracer, and that finished and no-plan threads stay at END. Sync and async.Async parity (
tests/test_async_parity.py): the same scenario oninvokeandainvoke, compared minus timing:MaxActionsPolicy,MaxCostPolicy,OnStuckPolicy;MultiGoalany / best_value / strict sequential (#35) / skip; stuck-handler goal relaxation; retried failure plus denial counts; handled tool errors (#37); the parallel executor's per-action delta merge (#16);GoalPolicy(blacklist_fallback=True)(#15). Also pinned: a goal object with a checkpointer raisesTypeErrornamingGoalSpecon both paths andinitial_stateis the way (#17); the compile-optionTypeErrornames the bad key and both option sets for all three on-ramps (#19);format_goap_resultcaps at 40 keys (#57).Codec round-trips (
tests/test_codec_roundtrips.py), throughJsonPlusSerializer:ActionResult.cost,MultiGoal.mode/on_infeasibleand the legacy dict defaults, everyGoalPolicyfield,NirvanaGoalviagoal_from_dict, everyPlanMetadataandCSPMetadatafield includingResourceUsage,ScheduleEntry,makespanandInfeasibilityExplanation, everyActionQosfield (exception classes recorded by name and reset on load, as documented), and a typed-formActionSpecsurviving as a boolean gate.Tracer forwarding and context (
tests/test_tracer_forwarding_and_context.py): lazy, anytime, repair and two-phase wrappers forward the planner tracer; a wrapper built with its own inner tracer keeps it; the pipeline, repair, utility, lazy and anytime planners see non-planning context keys (#30).Full non-API suite: 2129 passed;
make lint(black, isort, mypy, ruff) green.