[PR #455] [MERGED] world_grid_atlas: diagnose one-cell shoreline grids #505

Closed
opened 2026-11-26 20:18:06 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/455
Author: @EdenBendheim
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: ubiq/world-grid-atlas-one-cell-mask


📝 Commits (1)

  • c33f9d6 world_grid_atlas: diagnose one-cell shoreline grids

📊 Changes

2 files changed (+55 additions, -7 deletions)

View changed files

📝 tests/test_world_grid_atlas.py (+53 -7)
📝 tools/world_grid_atlas.py (+2 -0)

📄 Description

Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123198649

What changed

  • tools/world_grid_atlas.py: Validate grid["rows"] * grid["columns"] < 2 at the top of match_mask() before reading the fallback or ranking a runner-up score, raising the same descriptive ValueError (a grid needs at least two cells to rank a match) used by match_content() so the CLI exits 2 cleanly instead of IndexError.
  • tests/test_world_grid_atlas.py: Synthetic tests covering 1×1, 0-row, and 0-column grids, a real CLI run on a synthetic BGRA fixture, and a valid two-cell match (plus LF fixture writes pinned).

Testing & Disclosure

  • AI-assisted: Implemented with Codex (gpt-6.2-sol) and reviewed with Codex (gpt-6.2-astra).
  • Environment: macOS 27.3, Apple M1 Max (CPU-only, synthetic fixtures, zero game data).
  • Verified on ubiquitarianism/leonida main (8f481cf16): test_world_grid_atlas.py (19 passed, 13 skipped without Pillow; previously verified 32/32 with NumPy 2.3.1 + Pillow 13.0.0), check_no_game_data.py, LF check — all passed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/455 **Author:** [@EdenBendheim](https://github.com/EdenBendheim) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `ubiq/world-grid-atlas-one-cell-mask` --- ### 📝 Commits (1) - [`c33f9d6`](https://github.com/ubiquitarianism/leonida/commit/c33f9d6e8d6b56af014c2cdaa65eebfc061273f4) world_grid_atlas: diagnose one-cell shoreline grids ### 📊 Changes **2 files changed** (+55 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_world_grid_atlas.py` (+53 -7) 📝 `tools/world_grid_atlas.py` (+2 -0) </details> ### 📄 Description Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123198649 ### What changed - **`tools/world_grid_atlas.py`**: Validate `grid["rows"] * grid["columns"] < 2` at the top of `match_mask()` before reading the fallback or ranking a runner-up score, raising the same descriptive `ValueError` (`a grid needs at least two cells to rank a match`) used by `match_content()` so the CLI exits `2` cleanly instead of `IndexError`. - **`tests/test_world_grid_atlas.py`**: Synthetic tests covering 1×1, 0-row, and 0-column grids, a real CLI run on a synthetic BGRA fixture, and a valid two-cell match (plus LF fixture writes pinned). ### Testing & Disclosure - **AI-assisted:** Implemented with Codex (`gpt-6.2-sol`) and reviewed with Codex (`gpt-6.2-astra`). - **Environment:** macOS 27.3, Apple M1 Max (CPU-only, synthetic fixtures, zero game data). - **Verified on `ubiquitarianism/leonida` `main` (`8f481cf16`):** `test_world_grid_atlas.py` (19 passed, 13 skipped without Pillow; previously verified 32/32 with NumPy 2.3.1 + Pillow 13.0.0), `check_no_game_data.py`, LF check — all passed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:06 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#505
No description provided.