docs: two families claiming one AWC id, the larger keeps it (DOC-AWC-FAMILY-CLAIM-RULE) #2385

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

@⁠syfyra on GitHub · 2026-11-26 16:49 UTC · original
syfyra:docs/awc-family-claim-rule → main · +2 −1 · 1 files · 1 commits · draft

Claimed in the coordination issue as: DOC-AWC-FAMILY-CLAIM-RULE (#1608)

What and why

docs/audio.md (AWC names section) said: when two accepted families claim the same id in one bank, "the first family in sorted base order keeps it". Since 58a981e25, tools/awc_names.py _attack_split keeps the larger family:

prev = family_hits.get((b, i))
if prev is None or size > prev[2]:
    family_hits[(b, i)] = (name, "family", size)

The first base wins only between families of the same size, because Dictionary.bases is sorted and an equal-size later claim does not replace the first. The sentence now says that. The measured count (3 rows) is about which ids are contested, not who keeps them, so it stays.

Doc only; found while fixing #2384 (AWC-NAMES-FAMILY-SUFFIX-NUMBER), kept separate as its own topic. Merges cleanly with #1072, the only open PR that changes docs/audio.md.

Tested

  • The tests/test_docs_*.py files all pass.
  • scripts/check_no_game_data.py docs/audio.md.

GPUs tested: n/a (documentation)

AI-assisted: yes (Claude Code, Claude Opus 5.5)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • 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. (n/a: no translator change)

🤖 Generated with Claude Code

**@⁠syfyra** on GitHub · 2026-11-26 16:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2385) `syfyra:docs/awc-family-claim-rule` → `main` · +2 −1 · 1 files · 1 commits · draft Claimed in the coordination issue as: DOC-AWC-FAMILY-CLAIM-RULE (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why `docs/audio.md` (AWC names section) said: when two accepted families claim the same id in one bank, "the first family in sorted base order keeps it". Since 58a981e25, `tools/awc_names.py` `_attack_split` keeps the **larger** family: ```python prev = family_hits.get((b, i)) if prev is None or size > prev[2]: family_hits[(b, i)] = (name, "family", size) ``` The first base wins only between families of the same size, because `Dictionary.bases` is sorted and an equal-size later claim does not replace the first. The sentence now says that. The measured count (3 rows) is about which ids are contested, not who keeps them, so it stays. Doc only; found while fixing #2384 (AWC-NAMES-FAMILY-SUFFIX-NUMBER), kept separate as its own topic. Merges cleanly with #1072, the only open PR that changes `docs/audio.md`. ### Tested - The `tests/test_docs_*.py` files all pass. - `scripts/check_no_game_data.py docs/audio.md`. GPUs tested: n/a (documentation) AI-assisted: yes (Claude Code, Claude Opus 5.5) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [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. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
docs/audio.md said that when two accepted families claim the same id in
one bank, the first family in sorted base order keeps it. Since
58a981e25 tools/awc_names.py _attack_split keeps the larger family
(`size > prev[2]`); only between families of the same size does the
first base win, because bases are sorted and the first claim is kept.
Say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 16:52:21 +00:00
Author
Owner

@⁠wavehs on GitHub · 2026-11-26 18:41 UTC · original · reviewed

macOS arm64 check of #2385 (DOC-AWC-FAMILY-CLAIM-RULE). One paragraph in docs/audio.md; no code changes.

Tested head fef08ed6c with its diff applied to a copy of main bdbc7e923 (branch 10 commits behind; clean).

Environment: Apple M3 Pro, arm64, macOS 27.2.1, CPython 3.15.2.

The claim matches the code
tools/awc_names.py:301-303 keeps a family hit unless the new one is strictly larger: if prev is None or size > prev[2]. Dictionary.bases() (:259-260) returns sorted(...), and _attack_split inserts the families in that order, so an equal size does not overwrite the first (sorted-base) family. That is exactly the new sentence: larger keeps the id, ties go to the first in sorted base order.

Checks run

  • All tests/test_docs_*.py and tests/test_i18n_index.py pass on the applied tree (the CI documentation set for a Markdown change); no file failed.
  • python -I scripts/check_no_game_data.py docs/audio.md: clean.

Negative control
There is none to run: reverting the sentence leaves every documentation test green, because no test pins this prose. I checked the statement against the _attack_split code above instead, which is the best available control for a doc-only change; the alternative would be a test that builds two colliding families, and awc_names only finds collisions by joaat search, so that is not a cheap fixture.

No game files. AI-assisted.

**@⁠wavehs** on GitHub · 2026-11-26 18:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2385#pullrequestreview-6079101177) · **reviewed** **macOS arm64 check of #2385** (DOC-AWC-FAMILY-CLAIM-RULE). One paragraph in `docs/audio.md`; no code changes. Tested head `fef08ed6c` with its diff applied to a copy of `main` `bdbc7e923` (branch 10 commits behind; clean). Environment: Apple M3 Pro, arm64, macOS 27.2.1, CPython 3.15.2. **The claim matches the code** `tools/awc_names.py:301-303` keeps a family hit unless the new one is strictly larger: `if prev is None or size > prev[2]`. `Dictionary.bases()` (`:259-260`) returns `sorted(...)`, and `_attack_split` inserts the families in that order, so an equal size does not overwrite the first (sorted-base) family. That is exactly the new sentence: larger keeps the id, ties go to the first in sorted base order. **Checks run** - All `tests/test_docs_*.py` and `tests/test_i18n_index.py` pass on the applied tree (the CI documentation set for a Markdown change); no file failed. - `python -I scripts/check_no_game_data.py docs/audio.md`: clean. **Negative control** There is none to run: reverting the sentence leaves every documentation test green, because no test pins this prose. I checked the statement against the `_attack_split` code above instead, which is the best available control for a doc-only change; the alternative would be a test that builds two colliding families, and `awc_names` only finds collisions by joaat search, so that is not a cheap fixture. No game files. AI-assisted.
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/2385/head:github-bot/gh-2385'
git switch 'github-bot/gh-2385'

Merge

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