[PR #454] [MERGED] rbf0_encode: refuse invalid descriptor names during batch export #506

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/454
Author: @EdenBendheim
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: ubiq/rbf0-encode-name-type


📝 Commits (1)

  • bbf2cf1 rbf0_encode: refuse invalid descriptor names

📊 Changes

2 files changed (+64 additions, -3 deletions)

View changed files

📝 tests/test_rbf0_encode.py (+48 -0)
📝 tools/rbf0_encode.py (+16 -3)

📄 Description

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

What changed

  • tools/rbf0_encode.py: Validate record and descriptor-table name values before encoding so non-string names raise EncodeError("value", ...) and lone surrogates raise EncodeError("utf8", ...) instead of escaping with AttributeError. Omitted descriptor-table names continue falling back to the record name.
  • tests/test_rbf0_encode.py: Synthetic tests covering non-string names, lone surrogates, descriptor reuse, omitted-name fallback, and batch refusal leaving subsequent valid resources written byte-for-byte.

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): all 4 tests/test_rbf0*.py suites (105/105), 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/454 **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/rbf0-encode-name-type` --- ### 📝 Commits (1) - [`bbf2cf1`](https://github.com/ubiquitarianism/leonida/commit/bbf2cf111924d5dcddcabb6dfdf77835dea12276) rbf0_encode: refuse invalid descriptor names ### 📊 Changes **2 files changed** (+64 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_rbf0_encode.py` (+48 -0) 📝 `tools/rbf0_encode.py` (+16 -3) </details> ### 📄 Description Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123164705 ### What changed - **`tools/rbf0_encode.py`**: Validate record and descriptor-table `name` values before encoding so non-string names raise `EncodeError("value", ...)` and lone surrogates raise `EncodeError("utf8", ...)` instead of escaping with `AttributeError`. Omitted descriptor-table names continue falling back to the record name. - **`tests/test_rbf0_encode.py`**: Synthetic tests covering non-string names, lone surrogates, descriptor reuse, omitted-name fallback, and batch refusal leaving subsequent valid resources written byte-for-byte. ### 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`):** all 4 `tests/test_rbf0*.py` suites (105/105), `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#506
No description provided.