Skip to content

awc_names: leave colliding exact dialogue waves unnamed - #5897

Open
kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:fix/awc-dialogue-name-collision
Open

kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:fix/awc-dialogue-name-collision

Conversation

@kacper-serewis

Copy link
Copy Markdown
Contributor

AWC-NAMES-DIALOGUE-COLLISION (claim). AI-assisted implementation and testing. Based on main, with no PR dependencies.

Two distinct exact dialogue words can have the same low 29 bits of joaat. awc_names kept the last word and emitted a single CSV row, so opus_tags could not detect the ambiguity. Omit that ID from both dialogue and family evidence. Repeated occurrences with one known name retain their existing behavior.

Tested on Windows, CPU only (GPU and driver unused).

@Kev-Ball

Copy link
Copy Markdown

Confirmed the collision case on retail Xbox 1.0.2.1 at 737ac969. I built the dialogue dictionary from four archives and compared the parent and PR name_source results for every bank/stream-ID pair in 64,514 parsed AWC banks.

138,104 eligible wave names mapped to 138,091 distinct low-29-bit IDs. All 13 colliding IDs appeared in the bank index. The parent assigned names to 122,479 bank/ID pairs, and the PR assigned 122,456. I compared the full assignment tuple for every pair. All 23 differences were removals for ambiguous IDs, and zero ambiguous assignments survived. The 23 removals comprised 22 in the story archive and one in the minigame archive.

AI-assisted independent verification. Only aggregate counts are included.

@leozinhoszg

Copy link
Copy Markdown
Contributor

Tested 737ac969 on Windows 11 Pro (26200), CPython 3.14.7, CPU only, no game files: pass with notes.

  • tests/test_awc_names.py passes 31/31. compileall and git diff --check are clean. tests/test_opus_tags.py passes 19/20: the one failure is the Windows path-repr test, which fails on main too.
  • Negative control: with main's tools/awc_names.py, the new test fails because the shared id gets named synthetic42901au_abcd_01. Removing only the deletion loop (tools/awc_names.py:242-244) also fails it, and so does removing only the family guard (:253). So the test covers both halves.
  • Optional: a dropped id leaves no trace in the tool's own output. The summary line and stats (tools/awc_names.py:302-312) don't count it. opus_tags then reports those files as without a name, not ambiguous name (tools/opus_tags.py:185-190). Kev-Ball's retail count above (13 colliding ids, 23 removed bank/id pairs) shows it is rare but real. A stats["ambiguous"] count in the summary line would let anyone see that number without a separate comparison.

AI-assisted.

@memorypressure

Copy link
Copy Markdown

Verified against main 561b65a: merges cleanly, test_awc_names 31/31 with 1 env skip (re-run), and the new test drives the real tool through name_source with a genuine joaat&M29 collision pair. The change strictly narrows naming, so false-name risk only goes down. One design point for a maintainer yes: ambiguous_ids is keyed by hash alone, so a collision discovered through one bank suppresses that id across every bank — conservative, but cross-bank. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

@ne1i

ne1i commented Nov 23, 2026

Copy link
Copy Markdown

Tested 737ac969 on Linux, CPython 3.14, CPU only, synthetic inputs, merged onto main 867d922f: pass

  • python -I tests/test_awc_names.py: Ran 35 tests, OK (skipped=1). With only the non-test files reverted to main: FAILED (failures=1, skipped=1), so the new tests exercise the change.
  • compileall and scripts/check_no_game_data.py on the changed files: clean.

The agent notes open #6003 touches the same ambiguity path in awc_names for a different purpose; worth checking the order.

Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants