Skip to content

v0.1.6: case-insensitive plan name lookup (ISS-027) - #3

Merged
omereliy merged 1 commit into
mainfrom
fix/case-insensitive-plan-names
Nov 9, 2026
Merged

omereliy merged 1 commit into
mainfrom
fix/case-insensitive-plan-names

Conversation

@omereliy

@omereliy omereliy commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • PDDL names are case-insensitive. UPF's PDDLReader lower-cases domain and problem text (unified_planning/io/pddl_reader.py, parse_problem_string), but _validate_plan_structure looked plan tokens up exactly as written. _name_candidates only retried - as _.
  • So a plan that used the capitalisation the files declare, e.g. (turn_to satellite0 Star0 GroundStation1) (IPC satellite p02–p05) or (CRAFT_PLANK ...) (pogo_stick), failed with Action ... is not declared in domain / object ... is not declared in problem. VAL accepts these plans. get_state_transition goes through the same validate() path, so it failed the same way.
  • Fix: _name_candidates now also tries name.lower() and name.lower().replace("-", "_"), after the existing candidates. Any name that already resolved picks the same schema or object as before. Error messages and step display still show the name as written in the plan.
  • Version bump to 0.1.6 and CHANGELOG entry.

Found in pddl-copilot-experiments OPEN_ISSUES.md ISS-027.

Not changed

_ → - (plan go_back against domain go-back) was never resolved and still isn't. Only the existing - → _ retry is kept. Adding the reverse direction would make non-case plans pass and is out of scope here.

Test plan

  • pytest: 67 passed, 8 skipped (58 before + 9 new)
  • 7 of the 9 new tests fail on main (the unknown-action error test and the lower-case hyphen test already passed there)
  • Old vs new verdict check over ../pddl-copilot-experiments/domains and domains-anon: 12,880 runs per version, compared on status + failed_step
    • As-is corpus (every .plan against domain.pddl and domain_neg.pddl with its problem, 4,000 runs) and syntax-only on every domain and domain+problem pair (880 runs): 0 differences, 0 exceptions. The corpus plans are all lower-case, so the bug doesn't show up there.
    • Every plan re-cased to the PDDL's declared capitalisation (4,000 runs): 232 change, all STRUCTURE_ERROR → VALID/INVALID (satellite, tpp, counters, gardening, pogo_stick).
    • Every plan in UPPER case (4,000 runs): 1,898 change, all STRUCTURE_ERROR → VALID/INVALID.
    • With 0.1.6, every re-cased plan gets exactly the same status and failed_step as its lower-case original.

New tests (tests/test_case_insensitivity.py)

  • Upper-case object, upper-case action, mixed case
  • -/_ with lower case (still works) and with upper case
  • Error messages and step display keep the case as written
  • IPC satellite p02 with its declared capitalisation (tests/fixtures/satellite/)

Follow-up (after release, pddl-copilot repo)

plugins/pddl-validator/requirements.txt → pddl-pyvalidator>=0.1.6, then run bash plugins/pddl-validator/tests/verify.sh. No frozen corpus in pddl-copilot-experiments gets re-graded.

PDDL names are case-insensitive and UPF's PDDLReader lower-cases domain
and problem text, but plan tokens were looked up exactly as written. A
plan using the declared capitalisation (satellite p02-p05 objects such as
Star0/GroundStation1, pogo_stick actions such as CRAFT_PLANK) failed the
structure phase with "not declared" errors. VAL accepts these plans.

_name_candidates now also tries the lower-case form (and lower-case with
"-" as "_") after the existing candidates, so names that already resolved
pick the same schema/object as before. Error messages and step display
keep the name as written in the plan.

Adds tests/test_case_insensitivity.py and a satellite p02 fixture.
@omereliy
omereliy merged commit 18dcfdd into main Nov 9, 2026
3 checks passed
@omereliy
omereliy deleted the fix/case-insensitive-plan-names branch November 9, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant