Repository navigation
release: prepare v0.2.0 (release pipeline, notes, notebooks, bounded alternative search) - #82
Merged
Merged
Conversation
…rafter policy The version moved to langgoap/_version.py with ``dynamic = ["version"]`` (#44), but release.yml and test-release.yml still read ``[project].version`` from pyproject.toml, so the first job of a release would fail with KeyError. Both now parse the version file; the mismatch hint names the right file. Release Drafter: the autolabeler only sees pull-request events, so the workflow also runs on pull_request_target; a breaking change bumps the minor version while the project is pre-1.0 (it resolved to major, which would have drafted v1.0.0); docs PRs get their own category instead of landing uncategorised.
…dd_goap_subgraph (#19) The 0.2.0 notes say every on-ramp rejects an unknown compile keyword with a TypeError naming the compile options and the GoapGraph options, but only create_goap_agent did; GoapSubgraph.compile and add_goap_subgraph forwarded the kwargs raw and surfaced Python's generic message. The check now lives in integrations/_compile_options.py and all three call it; prebuilt re-exports the names for existing importers.
Bump __version__ to 0.2.0 and date the CHANGELOG entry. The entry opens with a "Breaking changes" summary (JSON-native state, the strict defaults, termination and reporting changes) and gains a "Removed" section for LangGOAPRedisSerializer; the Deprecated section no longer claims that LANGGOAP_ALLOWED_MSGPACK_TYPES warns on access, which a module constant cannot do. Stale "v0.1.0" wording in an error message and three docstrings, the Jupyter image's minimum version and the bug template placeholder are updated. tests/test_release_pipeline.py pins the release mechanics: the workflows read the version file, the version file matches the top CHANGELOG entry, a dated release with breaking changes says so, the Jupyter image installs the current minor, no package text names a stale release, and the release drafter follows the pre-1.0 policy.
A can_rerun=False action that already ran is blacklisted like a failed one, so the no_plan explanation told users to raise max_retries or attach an ActionQos "for transient failures" when nothing had failed; the personal-shopper NirvanaGoal run ended with exactly that advice. The suggestion now separates actions blacklisted after failures from spent ones (listed under spent_actions) and gives each its own advice, noting that a NirvanaGoal run ends this way by design. The log line no longer credits A* for every planning failure.
…ult budget to 8 (#12) Reading the re-executed tutorial outputs showed the objective-driven selection of #12 could not reach plans two swaps away: alternatives were produced by excluding one action of the A* plan at a time, so at most len(plan) candidates existed whatever max_alternatives said. With uniform action costs the cloud-balancing objective settled on a $1,506 placement while a feasible $1,092 one existed, and the project-scheduling soft budget of $20 looked unattainable although a two-swap plan meets it exactly. enumerate_alternatives now widens breadth-first over exclusion sets (one swap away, then two, ...) and deduplicates by action sequence; max_alternatives bounds how far it reaches and its default rises from 5 to 8. The job-shop tutorial constants and tests follow the plan the wider search selects ($120, two standard prepares, 7 h makespan) and also pin the limits honestly: the all-standard $57 minimum lies six swaps away and is reached by widening the budget to 63 or by encoding cost_usd as the A* cost. The CHANGELOG and concepts page describe the bounded neighbourhood.
…and correct their narratives Twenty notebooks were re-executed against main: the objective tutorials (cloud balancing, nurse rostering, task assigning, vehicle routing, temporal match cellar, project scheduling, flexible job shop, content builder), the sequential MultiGoal launch, the NirvanaGoal shopper, and the partially executed primers and comparisons. Every output cell was read against its prose. Narratives that the 0.2.0 defaults made false are corrected: infeasible plans are reported and not executed by default (GoalPolicy(on_infeasible="execute") opts in), objectives compare the A* plan against alternatives enumerated breadth-first within max_alternatives rather than "picking the cheapest", the job-shop and project-scheduling tables show the plans the wider search selects, the shopper explains that no_plan is the normal end of a NirvanaGoal run, and the remaining "v0.1.0" wording is version-neutral. The job-shop notebook gains a section showing that the $57 global minimum lies beyond the default budget and how to reach it.
✅ Code Quality Report
Quality Gates
🎉 All quality gates passed! This PR maintains high code quality standards. 📊 View detailed MFCQI breakdownRun |
A resume payload rejected by the Pydantic model (or of the wrong shape) was
recorded as a human_form_invalid failure with the count pre-set past
max_retries, so a typo blacklisted the action and, with no alternative,
ended the run in no_plan. It is an input error, not a decision: the gate
now raises the interrupt again with attempt, validation_errors and
rejected_payload in the payload. A form can be declined explicitly with
False or {"approved": False, "reason": ...}, recorded and blacklisted like
a denied boolean gate; the form gate had no way to say no before.
LangGraph returns only the channels a run wrote to, so result["blacklisted_actions"] and result["action_failure_counts"] raised KeyError precisely when nothing had gone wrong. The defaults now live in one table, STATE_DEFAULTS: GoapGraph.initial_state seeds them, the planner fills any that a hand-built input left out, and rehydrate_state fills them on the way out.
A boolean gate asks a yes/no question, but any non-empty string, non-zero
number, dict without approved or with a non-boolean approved counted as
approval, so Command(resume="no") approved the action. Only True / False
and {"approved": <bool>, "reason": ...} are decisions now; anything else
re-raises the interrupt with attempt, validation_errors and
rejected_payload, exactly like the typed-form gate. Both gate payloads
carry attempt and effects. _is_approved is replaced by
_approval_decision, which returns approved / denied / invalid.
GoalSpec.conditions, SoftGoal.conditions and GoalSpec.objectives were
annotated as MappingProxyType although every caller passes a dict and
__post_init__ converts it, so GoalSpec(conditions={...}) was a mypy error
in user code. The fields are annotated as Mapping (what a caller writes)
and still converted to an immutable MappingProxyType at construction.
…nt failure When every remaining path to the goal needs an action a human declined, the no-plan explanation advised raising max_retries or attaching an ActionQos for transient failures. It now lists the action under denied_actions with the operator's reason and points at what applies: an alternative action, a stuck handler that relaxes the goal, or running again once the decision changes.
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
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.
Prepares the v0.2.0 tag by fixing the blockers found in the audit of the audit, and two defects that surfaced when every re-executed notebook's output cells were read against their prose.
Release blockers
release.ymlandtest-release.ymlstill read[project].versionfrom pyproject, whichdynamic = ["version"](Packaging: declare directly imported dependencies, ship py.typed, trim the sdist, remove the phantom cli extra, single-source the version #44) removed; the first job would have failed withKeyError. Both now parselanggoap/_version.py. Release Drafter runs its autolabeler onpull_request_target, treats a breaking change as a minor bump while pre-1.0 (it would have drafted v1.0.0), and gives docs PRs a category.__version__is 0.2.0; the CHANGELOG entry is dated, opens with a Breaking changes summary and has a Removed section; it no longer claimsLANGGOAP_ALLOWED_MSGPACK_TYPESwarns on access. Stale "v0.1.0" wording, the Jupyter image's minimum version and the bug template placeholder are updated.GoapSubgraph.compileandadd_goap_subgraphnow reject unknown compile kwargs with the same two-setTypeErrorascreate_goap_agent(create_goap_agent and GoapSubgraph cannot configure tracer, strategy, stuck handlers, termination policies, QoS, or human approval #19 said all three did).Found while reading the notebooks
enumerate_alternativesexcluded one action at a time, so objective-driven selection (GoalSpec.objectives are ignored whenever the primary A* plan passes hard constraints #12) could never reach a plan two swaps away: cloud balancing ran a $1,506 placement with a feasible $1,092 one available, and the project-scheduling soft budget looked unattainable. Enumeration is now breadth-first over exclusion sets with a default budget of 8. The job-shop tutorial pins both the plan this selects ($120) and the fact that the $57 all-standard minimum lies six swaps away, reached by widening the budget or encoding the objective as A* cost.can_rerun=Falseaction that already ran was explained as a transient failure ("raise max_retries"). Spent actions get their ownspent_actionslist and advice.Verification
tests/test_release_pipeline.py, compile-kwargs parity, serde-constant behaviour, breadth-first enumeration, cloud-balancing optimum, spent-action explanation, job-shop budget and global-minimum tests.no_planexplained).test-release.ymlcan be dispatched to exercise the version step before tagging.After merge: tag
v0.2.0on main (the drafter's existing draft predates the config fix, so set its tag by hand).Least-surprise fixes carried by this PR (added 2026-11-15). This branch now contains #84 (merged in, CHANGELOG conflict resolved by keeping both sides) plus one fix that could only live here because it touches the
spent_actionsexplanation this PR introduced:fix(planner): when every remaining path to the goal needs an action a human declined, the no-plan explanation used to advise raisingmax_retriesor attaching anActionQos"for transient failures". It now lists the action underdenied_actionswith the operator's reason and points at what applies (an alternative action, a stuck handler that relaxes the goal, or running again once the decision changes). Test:tests/test_graph_runtime_hygiene.py::TestSpentActionsAreExplainedAsSpent::test_denied_action_is_explained_as_a_decision.Merge order: #84 → #82 → #83 (each later PR carries the earlier ones, so every merge applies cleanly).