Fix case-sensitive full-name parser disambiguation - #379
Merged
Marc-Alexandre Côté (MarcCote) merged 1 commit intoSep 29, 2026
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Author
|
@microsoft-github-policy-service agree company="LawZero" |
Contributor
|
Good catch. Thanks for the fix. |
Marc-Alexandre Côté (MarcCote)
approved these changes
Sep 29, 2026
Marc-Alexandre Côté (MarcCote)
merged commit Sep 29, 2026
6d88a08
into
microsoft:main
9 checks passed
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 generated full-name preference rule can ask for clarification even when a command includes the exact object names. Inform's parser lowercases the command, but the rule compares it against printed names case-sensitively. With open containers named
boxandred box, and an object namedRubyinsidebox,take Ruby from boxasks which box the player means.Make all four printed-name comparisons in the generated
Does the player meanrule explicitly case-insensitive. This preserves the existing preference logic while allowing capitalized printed names.Add native parser regressions for one- and two-object commands, mixed-case names in either argument, and original/lowercase/uppercase command input. The tests check tracked moves and the resulting object facts, including that the other container stays closed in the one-object case.
Validation:
textworld/generator/inform7/tests/test_world2inform7.pyandtextworld/envs/wrappers/tests/test_tw_inform7.py, using Python 3.13 on macOS arm64 with Inform 7 6M62.git diff --checkpasses.This change does not alter the planner or address separate ambiguities caused by overlapping object names across command arguments.