Repository navigation
Fix MissionSpace validation with overlapping placeholders - #525
Merged
mwydmuch merged 1 commit intoOct 8, 2026
Merged
Conversation
Signed-off-by: Jaden Fix <jadenfix20@gmail.com>
Contributor
Author
|
@mwydmuch, could you approve the pending fork CI for this MissionSpace fix when convenient? It removes duplicate indices in reverse order so overlapping placeholders no longer raise IndexError. The full local suite and regression tests pass; validation is in the description. Thanks! |
jadenfix
marked this pull request as ready for review
October 7, 2026 22:34
Contributor
Author
|
@mwydmuch, upstream pre-commit and the old-dependency / Python 3.10–3.13 test jobs now pass. Only the Python 3.14 job was cancelled during tests; could you rerun that job when convenient? The full matrix on my fork also passes against this PR's exact commit, linked in the description. Thanks! |
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.
Description
MissionSpace.contains()can raiseIndexErroron a valid mission when placeholder words overlap. For example, a space withgreen,darkgreenandverydarkgreenraises onGet the verydarkgreen ball.. The overlap scan records some removal indices more than once, and deleting earlier entries shifts the remaining indices.Remove each index once, working backwards. Added regressions for three nested words and for overlaps in two separate placeholder groups, with valid and invalid missions. Both crash cases fail before the fix. No new dependencies are required.
Validation:
pytest(3,237 passed, 192 skipped),pytest --doctest-modules minigrid/(15 passed), andpre-commit run --all-filesall pass. The full Linux test matrix also passes on the exact PR commit: Python 3.10–3.14, plus Python 3.10 with Gymnasium 0.29.1 / NumPy 1.26.4 (3,237 passed, 192 skipped in each configuration). All latest-version doctests, pre-commit checks and package build pass.Type of change
Checklist:
pre-commitchecks withpre-commit run --all-filesNo documentation update is needed for this internal fix.
Upstream pre-commit and the old-dependency / Python 3.10–3.13 test jobs pass. The Python 3.14 job was cancelled during tests; a maintainer rerun has been requested. The full fork matrix above passes against the exact PR commit.
Prepared with OpenAI Codex assistance.