Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ body:
python -c "import ortools; print('ortools', ortools.__version__)"
```
placeholder: |
langgoap 0.1.0
langgoap 0.2.0
langgraph 1.x.x
python 3.12.x
platform ...
Expand Down
8 changes: 5 additions & 3 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
# Pre-1.0 policy: a breaking change bumps the minor version, features too;
# everything else is a patch. Revisit when 1.0 ships.
version-resolver:
major:
labels:
- 'breakingchange'
minor:
labels:
- 'breakingchange'
- 'feature'
- 'enhancement'
patch:
Expand Down Expand Up @@ -63,6 +63,8 @@ categories:
- 'bugfix'
- 'bug'
- 'BUG'
- title: '📚 Documentation'
label: 'documentation'
- title: '🧰 Maintenance'
label: 'maintenance'
change-template: '- $TITLE (#$NUMBER)'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- main
# The autolabeler only sees pull requests; pull_request_target keeps the
# write token for forks while running the action from the base branch.
pull_request_target:
types: [opened, reopened, synchronize, edited]

permissions: {}
jobs:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ jobs:
- name: Get package version
id: get-version
run: |
VERSION=$(python -c "
try:
import tomllib
except ModuleNotFoundError:
import tomli as tomllib
print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])
")
VERSION=$(python - <<'PY'
import pathlib
import re

text = pathlib.Path("langgoap/_version.py").read_text(encoding="utf-8")
print(re.search(r"__version__\s*=\s*['\"]([^'\"]+)['\"]", text).group(1))
PY
)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Package version: $VERSION"

Expand All @@ -47,7 +48,7 @@ jobs:

if [ "$VERSION" != "$RELEASE_VERSION" ]; then
echo "❌ Error: Package version ($VERSION) does not match release version ($RELEASE_VERSION)"
echo "Please update the version in pyproject.toml to match the release tag"
echo "Please update __version__ in langgoap/_version.py to match the release tag"
exit 1
fi

Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ jobs:
id: check-version
shell: bash
run: |
VERSION=$(python -c "
try:
import tomllib
except ModuleNotFoundError:
import tomli as tomllib
print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])
")
VERSION=$(python - <<'PY'
import pathlib
import re

text = pathlib.Path("langgoap/_version.py").read_text(encoding="utf-8")
print(re.search(r"__version__\s*=\s*['\"]([^'\"]+)['\"]", text).group(1))
PY
)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Package version: $VERSION"

Expand Down
73 changes: 62 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,36 @@ All notable changes to LangGOAP are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] — Unreleased

The first batch of fixes from the v0.2.0 audit (issues #10–#18). Several
default behaviours change; each has an explicit opt-in that restores the
0.1.x behaviour where that behaviour was ever useful.
## [0.2.0] — 2026-11-15

Resolves the 58 findings of the 2026-11-14 pre-release audit (#10–#67):
planner correctness, a JSON-native graph state that works with every
LangGraph checkpointer, stricter defaults, async parity, and a documentation
and catalog sweep. Several default behaviours change; each has an explicit
opt-in that restores the 0.1.x behaviour where that behaviour was ever
useful.

### Breaking changes

- **The graph state is JSON.** A compiled graph returns and checkpoints
plain dicts: `result["plan"]` and `execution_history` entries are dicts
(`GoapGraph.rehydrate` / `rehydrate_state` convert them back), and with a
checkpointer the input is `GoapGraph.initial_state(goal, world_state)` or
`goal.to_dict()`, never a `GoalSpec` object (#17, #18).
- **Defaults are strict.** A CSP-infeasible plan is not executed
(`GoalPolicy(on_infeasible="execute")` restores it, #13); the blacklist
fallback is off (`GoalPolicy(blacklist_fallback=True)`, #15); an
`execute()` dict must set every declared effect key (#31); a sequential
`MultiGoal` fails on an unreachable sub-goal
(`MultiGoal(on_infeasible="skip")`, #35); objectives, soft constraints
and soft goals change which plan runs (#12); `langgoap plan` only plans
(`--run` executes, #40).
- **Termination and reporting.** A run that reaches the goal on the step
that exhausts a cap reports `goal_achieved` (#47); a final `no_plan` is
reported as `no_plan` (#64); `ExecutionRecord.plan_actions` and
`actual_cost` describe executed steps (#51); `Plan` display is offline
Markdown unless `LANGGOAP_DISPLAY_PNG=1` (#58).
- **Removed and deprecated API:** see the sections at the end of this entry.

### Added

Expand Down Expand Up @@ -155,8 +180,14 @@ default behaviours change; each has an explicit opt-in that restores the
objectives never changed which plan ran. Plan-quality `metrics` still
only re-score the chosen plan (CP-SAT cannot express them). The
job-shop, project-scheduling and content-builder tutorial tests were
rewritten to the corrected semantics; their notebooks need
re-execution.
rewritten to the corrected semantics and their notebooks re-executed.
Alternatives are enumerated breadth-first over excluded actions (one
swap away from the A* plan, then two, ...) up to `max_alternatives`,
whose default rises from 5 to 8. Excluding one action at a time could
never reach a plan two swaps away: with uniform action costs the
objective settled on the $1,506 cloud-balancing 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.
- `pipeline.needs_csp` is the public name of the former `_needs_csp`
(kept as an alias) and includes soft goals; `pipeline.needs_selection`
is new.
Expand Down Expand Up @@ -192,6 +223,19 @@ default behaviours change; each has an explicit opt-in that restores the
(`{"goal": ..., "world_state": ...}`) left out, and `rehydrate_state`
fills them on the way out, so typed access is total in sync and async
runs and after a resume in a new process.
- **An operator's denial is explained as a denial.** 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 the things
that apply: an alternative action, a stuck handler that relaxes the
goal, or running again once the decision changes.
- The `no_plan` explanation distinguishes actions blacklisted after
failures from `can_rerun=False` actions that already ran: the latter are
listed under `spent_actions` with advice to add an alternative or allow a
rerun, instead of the retry and QoS advice that fits transient failures
(a `NirvanaGoal` run ends this way by design). The log line no longer
attributes every planning failure to A*.
- A typed-form answer survives the action it approved failing. The
pre-execution snapshot an executor keeps is taken after the
human-in-the-loop gate, so a failure's `world_state` (and the parallel
Expand Down Expand Up @@ -463,10 +507,17 @@ default behaviours change; each has an explicit opt-in that restores the
- `CSPRefinementStrategy` (call `refine_with_csp`) and
`ActionSpec.is_async_execute()` (the executors pick the async path
themselves) warn and will be removed in 0.3.0 (#63, #64).
- `langgoap.install_langgoap_serde`, `langgoap.LangGOAPSerializer` and
`langgoap.LANGGOAP_ALLOWED_MSGPACK_TYPES` are no-op shims that emit
`DeprecationWarning`; they will be removed in 0.3.0.
`LangGOAPRedisSerializer` is gone (it imported the Redis backend).
- `langgoap.install_langgoap_serde` and `langgoap.LangGOAPSerializer` are
no-op shims that emit `DeprecationWarning`;
`langgoap.LANGGOAP_ALLOWED_MSGPACK_TYPES` is an empty tuple kept for
import compatibility (a module constant cannot warn on access). All three
will be removed in 0.3.0.

### Removed

- `LangGOAPRedisSerializer`: the custom Redis serializer imported the Redis
backend into the core package; the JSON-native state (#17) makes every
stock checkpointer serializer sufficient.

## [0.1.2] — 2026-05-15

Expand Down
5 changes: 4 additions & 1 deletion docs/concepts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ A goal that states only hard limits is satisfied by the first feasible
A\* plan. A goal that states *preferences* — objectives, soft
constraints or soft goals (`pipeline.needs_selection`) — compares that
plan against alternative plans and lets CP-SAT pick the best one, with
total cost as a strict tie-breaker. Plan-quality `metrics` are arbitrary
total cost as a strict tie-breaker. Alternatives come from excluding
actions of the A\* plan breadth-first, one swap away, then two, up to
`max_alternatives` (8 by default), so that budget bounds how far the
comparison reaches. Plan-quality `metrics` are arbitrary
Python callables that CP-SAT cannot express; they re-score the chosen
plan but do not drive selection. When the only plan is `INFEASIBLE` the
run ends with `no_plan` and an explanation listing the plan and its
Expand Down
2 changes: 1 addition & 1 deletion examples/Dockerfile.jupyter
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if [ -d "/home/jupyter/workspace/langgoap" ]; then\n\
pip install -e /home/jupyter/workspace/langgoap\n\
else\n\
echo "Installing langgoap from PyPI..."\n\
pip install "langgoap>=0.1.0"\n\
pip install "langgoap>=0.2.0"\n\
fi\n\
exec jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --ServerApp.token="" --ServerApp.password="" --ServerApp.allow_root=True --NotebookApp.disable_check_xsrf=True --FileContentsManager.checkpoints_kwargs="{\"root_dir\":\"/tmp/checkpoints\"}"' > /home/jupyter/start-jupyter.sh && \
chmod +x /home/jupyter/start-jupyter.sh
Expand Down
Loading
Loading