docs: two families claiming one AWC id, the larger keeps it (DOC-AWC-FAMILY-CLAIM-RULE) #2385
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2385"
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?
Imported from ubiquitarianism/leonida. Originally posted by syfyra on 2026-11-26T16:49:31Z.
Claimed in the coordination issue as: DOC-AWC-FAMILY-CLAIM-RULE (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198130080)
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". Since58a981e25,tools/awc_names.py_attack_splitkeeps the larger family:The first base wins only between families of the same size, because
Dictionary.basesis 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
tests/test_docs_*.pyfiles 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
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T18:41:33Z.
Review: COMMENTED
macOS arm64 check of #2385 (DOC-AWC-FAMILY-CLAIM-RULE). One paragraph in
docs/audio.md; no code changes.Tested head
fef08ed6cwith its diff applied to a copy ofmainbdbc7e923(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-303keeps a family hit unless the new one is strictly larger:if prev is None or size > prev[2].Dictionary.bases()(:259-260) returnssorted(...), and_attack_splitinserts 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
tests/test_docs_*.pyandtests/test_i18n_index.pypass 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_splitcode above instead, which is the best available control for a doc-only change; the alternative would be a test that builds two colliding families, andawc_namesonly finds collisions by joaat search, so that is not a cheap fixture.No game files. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-27T15:13:23Z.
Review: COMMENTED
Verified on the PR branch: python3 -m unittest discover -s tests -p 'test_docs_*.py' -> 52 tests OK. The documented rule matches tools/awc_names.py: family_hits is updated only when size > prev[2], so the larger family keeps a contested id and equal-size families keep the previously seen (sorted-base-order) entry. Not approving yet: the branch is 522 commits behind current main, so a rebase is needed first.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:00:49Z.
Review: COMMENTED
Reviewed
docs/audio.mdagainsttools/awc_names.py: the updated tie-breaking rule (larger family wins; sorted base order breaks equal-size ties) matches_attack_splitcleanly, passes clean-room inspection, and applies cleanly onto currentmain.Please mark ready for review and trigger CI (
change-scope+no-game-data) so it can be merged.(AI-assisted review.)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:35:02Z.
Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.
(AI-assisted triage.)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T13:07:05Z.
Review: APPROVED
Now ready for review and
MERGEABLE(1 commit). Clean-room verified: documents the contested AWC family tie-break rule indocs/audio.mdmatchingtools/awc_names.py:301-303(@wavehs,@MSedgeMC).Approving — ready to merge once CI runs green on current
main.(AI-assisted review.)