[PR #1299] OLD-9807: buffer_bounds_probe non-numeric --waves exits 2 instead of a traceback (carries #80) #1329

Open
opened 2026-11-26 20:20:52 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1299
Author: @muhammadumairmustafa
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-9807


📝 Commits (3)

  • b306f1b buffer_bounds_probe: exit 2 on non-numeric --waves (OLD-9807, carries #80 by nino-exe)
  • 0a5a8ad tests: add test_waves_that_are_not_numbers for buffer_bounds_probe (OLD-9807, carries #80 by nino-exe)
  • cfc9913 style: restore blank lines around test_waves_that_are_not_numbers

📊 Changes

2 files changed (+10 additions, -1 deletions)

View changed files

📝 tests/test_buffer_bounds_probe.py (+6 -0)
📝 tools/buffer_bounds_probe.py (+4 -1)

📄 Description

Claimed in the coordination issue as: OLD-9807 (in #14)

What and why

Carries forward old-pr/9807 (draft #80, originally by nino-exe).

A non-numeric --waves argument (e.g. --waves 32,abc) in tools/buffer_bounds_probe.py raised an uncaught ValueError traceback and exited 1, whereas the docstring specifies bad arguments exit 2. Wrapping the integer parse in try / except ValueError lets invalid values fall through to the existing validation check that prints the error and returns 2. Adds test_waves_that_are_not_numbers in tests/test_buffer_bounds_probe.py.

Tested

Ran python -I tests/test_buffer_bounds_probe.py locally on Windows (CPU-only, synthetic tests only, no game files): 6 tests run in 0.830s, OK.

AI-assisted: yes

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.

🔄 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/1299 **Author:** [@muhammadumairmustafa](https://github.com/muhammadumairmustafa) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-9807` --- ### 📝 Commits (3) - [`b306f1b`](https://github.com/ubiquitarianism/leonida/commit/b306f1bb5d859954058f42c41ca323aeb8ff231b) buffer_bounds_probe: exit 2 on non-numeric --waves (OLD-9807, carries #80 by nino-exe) - [`0a5a8ad`](https://github.com/ubiquitarianism/leonida/commit/0a5a8ad3183bd2da1a357333892a1eeb831745e1) tests: add test_waves_that_are_not_numbers for buffer_bounds_probe (OLD-9807, carries #80 by nino-exe) - [`cfc9913`](https://github.com/ubiquitarianism/leonida/commit/cfc9913c887d8fd992f3f27ea711f438b7da27de) style: restore blank lines around test_waves_that_are_not_numbers ### 📊 Changes **2 files changed** (+10 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_buffer_bounds_probe.py` (+6 -0) 📝 `tools/buffer_bounds_probe.py` (+4 -1) </details> ### 📄 Description Claimed in the coordination issue as: OLD-9807 (in #14) ### What and why Carries forward `old-pr/9807` (draft #80, originally by `nino-exe`). A non-numeric `--waves` argument (e.g. `--waves 32,abc`) in `tools/buffer_bounds_probe.py` raised an uncaught `ValueError` traceback and exited `1`, whereas the docstring specifies bad arguments exit `2`. Wrapping the integer parse in `try / except ValueError` lets invalid values fall through to the existing validation check that prints the error and returns `2`. Adds `test_waves_that_are_not_numbers` in `tests/test_buffer_bounds_probe.py`. ### Tested Ran `python -I tests/test_buffer_bounds_probe.py` locally on Windows (CPU-only, synthetic tests only, no game files): 6 tests run in 0.830s, OK. AI-assisted: yes ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of docs/design.md, with how it was confirmed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1329
No description provided.