awc_names: recognize BOM-prefixed and whitespace-prefixed word dictionaries #2449

Open
github-bot wants to merge 1 commit from github-bot/gh-2449 into main AGit
Owner

@⁠kirigayakazima on GitHub · 2026-11-27 10:34 UTC · original
kirigayakazima:codex/awc-names-word-dictionary-detection → main · +30 −12 · 2 files · 1 commits · open

Claimed in the coordination issue as: AWC-NAMES-WORD-DICTIONARY-DETECTION

What and why

An optional UTF-8 BOM could become part of the first plain-text word, cause a JSON file to fail parsing, or hide the opening brace of an extensionless hash dictionary. Skip a UTF-8 BOM in both input modes and detect the first non-whitespace character across read blocks. Explicit JSON inputs retain strict decoding. Tests cover a typed list, a plain word list and an extensionless hash dictionary with more than 8 KiB of leading whitespace.

Tested

Windows, Python 3.14.7. The regression reproduced on the parent and passed with the change.

  • python -I tests/test_awc_names.py
  • Changed-path no-game-data scan and git diff --check passed.

The integrated checkout passed 6,374 semantic tests across 500 files. CI's macOS job failed in the calibrated-texture replacement test, as it did on the unchanged main baseline.

GPUs tested: N/A (CPU-only synthetic tests).

AI-assisted: Yes.

Checklist

  • Based on current main and merges cleanly with the tested base.
  • One topic.
  • No game data, keys or decryption.
  • Translator contract table: N/A.
**@⁠kirigayakazima** on GitHub · 2026-11-27 10:34 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2449) `kirigayakazima:codex/awc-names-word-dictionary-detection` → `main` · +30 −12 · 2 files · 1 commits · open Claimed in the coordination issue as: [AWC-NAMES-WORD-DICTIONARY-DETECTION](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why An optional UTF-8 BOM could become part of the first plain-text word, cause a JSON file to fail parsing, or hide the opening brace of an extensionless hash dictionary. Skip a UTF-8 BOM in both input modes and detect the first non-whitespace character across read blocks. Explicit JSON inputs retain strict decoding. Tests cover a typed list, a plain word list and an extensionless hash dictionary with more than 8 KiB of leading whitespace. ### Tested Windows, Python 3.14.7. The regression reproduced on the parent and passed with the change. - `python -I tests/test_awc_names.py` - Changed-path no-game-data scan and `git diff --check` passed. The integrated checkout passed 6,374 semantic tests across 500 files. CI's macOS job failed in the calibrated-texture replacement test, as it did on the [unchanged main baseline](https://github.com/ubiquitarianism/leonida/actions/runs/45977772928/job/140433726198). GPUs tested: N/A (CPU-only synthetic tests). AI-assisted: Yes. ### Checklist - [x] Based on current main and merges cleanly with the tested base. - [x] One topic. - [x] No game data, keys or decryption. - Translator contract table: N/A.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 10:34:54 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2449/head:github-bot/gh-2449'
git switch 'github-bot/gh-2449'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2449'
git switch 'github-bot/gh-2449'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2449'
git switch 'github-bot/gh-2449'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2449'
git switch 'main'
git merge --squash 'github-bot/gh-2449'
git switch 'main'
git merge --ff-only 'github-bot/gh-2449'
git switch 'main'
git merge 'github-bot/gh-2449'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.