rbf0_encode: refuse invalid descriptor names during batch export #454
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!454
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/454/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@EdenBendheim on GitHub · 2026-11-24 05:40 UTC · original
EdenBendheim:ubiq/rbf0-encode-name-type→main· +64 −3 · 2 files · 1 commits · merged 2026-11-24 06:57 UTCClaim: #14
What changed
tools/rbf0_encode.py: Validate record and descriptor-tablenamevalues before encoding so non-string names raiseEncodeError("value", ...)and lone surrogates raiseEncodeError("utf8", ...)instead of escaping withAttributeError. 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
gpt-6.2-sol) and reviewed with Codex (gpt-6.2-astra).ubiquitarianism/leonidamain(8f481cf16): all 4tests/test_rbf0*.pysuites (105/105),check_no_game_data.py, LF check — all passed.@QemmHD on GitHub · 2026-11-24 06:57 UTC · original
Merging. Why merged: names that aren't strings now get a clean "value"/"utf8" refusal, and batch export moves on to the next resource instead of crashing.
Why it's good: security-reviewed; tested on Windows 11 merged onto main
c023a36: test_rbf0_encode 32 -> 37 tests, all OK (the new tests fail on main: 12 failures, 6 errors); rbf0_tree's 38 still pass.AI-assisted (Claude Code, Claude Opus 5.5).