Skip to content

release: prepare v0.2.0 (release pipeline, notes, notebooks, bounded alternative search) - #82

Merged
bsbodden merged 13 commits into
mainfrom
release/v0.2.0-prep
Nov 15, 2026
Merged

bsbodden merged 13 commits into
mainfrom
release/v0.2.0-prep

Conversation

@bsbodden

@bsbodden bsbodden commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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 pipeline. release.yml and test-release.yml still read [project].version from pyproject, which dynamic = ["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 with KeyError. Both now parse langgoap/_version.py. Release Drafter runs its autolabeler on pull_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 and notes. __version__ is 0.2.0; the CHANGELOG entry is dated, opens with a Breaking changes summary and has a Removed section; it no longer claims LANGGOAP_ALLOWED_MSGPACK_TYPES warns on access. Stale "v0.1.0" wording, the Jupyter image's minimum version and the bug template placeholder are updated.
  • Claims vs code. GoapSubgraph.compile and add_goap_subgraph now reject unknown compile kwargs with the same two-set TypeError as create_goap_agent (create_goap_agent and GoapSubgraph cannot configure tracer, strategy, stuck handlers, termination policies, QoS, or human approval #19 said all three did).
  • Notebooks. Nineteen notebooks changed: eighteen re-executed with the provided keys and one narrative-only edit; every output cell was read against its prose. Narratives corrected for the strict defaults and the bounded alternative search.

Found while reading the notebooks

  • enumerate_alternatives excluded 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.
  • A can_rerun=False action that already ran was explained as a transient failure ("raise max_retries"). Spent actions get their own spent_actions list and advice.

Verification

  • Full non-API suite: 2008 passed, 1 skipped; black, isort, mypy and vulture clean. New tests: 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.
  • Notebooks: 18 re-executed with the provided keys; no error outputs; statuses and figures match the prose (cloud balancing $1,092; project scheduling budget 20 met with soft score -18; job shop $120 / $57; shopper no_plan explained).
  • The release workflows themselves run only on a published release; test-release.yml can be dispatched to exercise the version step before tagging.

After merge: tag v0.2.0 on 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_actions explanation 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 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). 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).

…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.
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

✅ Code Quality Report

Metric Score Status
MFCQI Score 0.8119005243014936 ✅ Good
Test Coverage 94% ✅ Good
Security Issues 0 ✅ Clean

Quality Gates

  • MFCQI Score: ✅ Minimum 0.75 (Current: 0.8119005243014936)
  • Test Coverage: ✅ Minimum 80% (Current: 94%)
  • Security: ✅ Zero vulnerabilities (Current: 0)

🎉 All quality gates passed! This PR maintains high code quality standards.

📊 View detailed MFCQI breakdown

Run uv run python -m mfcqi analyze langgoap locally to see detailed metrics breakdown.

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.
@bsbodden
bsbodden merged commit 01b8192 into main Nov 15, 2026
19 checks passed
@bsbodden
bsbodden deleted the release/v0.2.0-prep branch November 15, 2026 22:47
@bsbodden bsbodden added the maintenance CI/build/tooling maintenance label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance CI/build/tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant