Commit Graph

30 Commits

Author SHA1 Message Date
4128da7fba Merge pull request #2384 from syfyra/fix/awc-names-family-suffix-number
awc_names: number family members by their suffix (AWC-NAMES-FAMILY-SUFFIX-NUMBER)
2026-12-01 16:21:47 +01:00
b7cadf0503 Merge pull request #2450 from kirigayakazima/codex/awc-names-incomplete-bank-walk
awc_names: fail on incomplete bank directory scans
2026-11-28 20:42:43 +01:00
f2ea56e333 Merge pull request #2449 from kirigayakazima/codex/awc-names-word-dictionary-detection
awc_names: recognize BOM-prefixed and whitespace-prefixed word dictionaries
2026-11-28 16:14:30 +01:00
9671df1ea9 awc_names: fail on incomplete bank directory scans 2026-11-27 18:30:34 +08:00
484d1e7179 awc_names: recognize BOM-prefixed and whitespace-prefixed word dictionaries 2026-11-27 18:30:20 +08:00
762b141795 awc_names: number family members by their suffix (AWC-NAMES-FAMILY-SUFFIX-NUMBER)
A family is a base whose numbered suffixes hit ids in one bank: at
least 3 members, or 2 with adjacent numbers (docs/audio.md, the module
docstring). family_ok took each member's trailing number from the whole
name, so when the base itself ends in a digit its unsuffixed member got
a number too: amb_1 + amb_1_02 counted as the adjacent pair 1/2 and was
accepted, while the same shape on a base without a digit (horn +
horn_02) is rejected. Dictionary bases can end in a digit token.

Pass family_ok the members' suffixes, so the base's own digits never
count.

Tested: new test_a_digit_that_ends_the_base_is_not_a_member_number
(fails before for amb_1; two adjacent suffixes and three members on the
same base are still families).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:44:53 +01:00
e006e1f4c5 awc_names: restore write mode before unlink on replace failure and publish mode on Windows (AWC-NAMES-STAGE-CLEANUP)
agent: yes
AI-assisted: yes
2026-11-24 16:44:35 +03:00
7d2e7e4b33 awc_names: stage --out so a write failure keeps the previous report
Publish CSV and JSON name reports through a temp file + replace so a mid-write OSError leaves any prior complete report intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-23 20:52:36 +01:00
25e425a16a awc_names: reject stream tables outside the declared header (#6646)
Squash-merged after diff review of PR #6646
2026-11-23 11:07:22 -06:00
1f7c259477 awc_names: match conversation pairs across a carved continuation stream (#6693)
Squash-merged after diff review of PR #6693
2026-11-23 10:56:05 -06:00
f6c275d9e1 awc_names: label distinct bank/ID pairs in the naming summary (#6286)
Squash-merged after diff review of PR #6286 - awc_names: label distinct bank/ID pairs in the naming summary
2026-11-23 08:24:24 -06:00
a360946010 Merge pull request #4254 from Silent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:49 -05:00
0af07f09b1 Merge pull request #4217 from Alpaca-exe
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:27 -05:00
1a17204ca0 Merge pull request #3906 from João Ramos
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:27 -05:00
224b50c2b6 awc_names: reject a --min-token below 1 instead of silently disabling the token filter 2026-11-22 21:22:20 -03:00
5948c690b8 tests: skip the hard-link cases where hard links are unavailable
Guard the remaining unguarded os.link() calls in test_awc_names.py, test_gamedata_graph.py, test_navmesh_decode.py, test_restofworld_index.py, test_rtti_scan.py, test_save_keys.py, test_swizzle_search.py, and test_tex_headers_report_paths.py with try/except (OSError, NotImplementedError) so only the hard-link subtest/check is skipped when hard links are unavailable and the rest of each test still runs.
2026-11-23 01:01:33 +01:00
41bd816571 awc_names: reject a --words JSON that is not an object or a list
A --words .json file holding a JSON scalar (42, null, true) raised a
TypeError traceback from read_words and exited 1, because main() only
turns OSError/ValueError into the one-line exit-2 error. A JSON string
was read as one word per character. read_words now raises ValueError
for anything but an object or a list, so all of them take the existing
error path.
2026-11-22 22:14:50 +00:00
d7d621ac65 Merge pull request #3801 from Tomgamer 2026-11-22 17:03:53 -05:00
a5c0861cd3 Merge pull request #3523 from Leo Leahy 2026-11-22 17:02:29 -05:00
e76cb3fb13 awc_names: report a malformed banks JSON in one line instead of a traceback
load_banks() now raises ValueError when the banks JSON is not a list of
objects, so main() prints one error line and exits 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:42:57 +01:00
58a981e25c awc_names: keep accepted family hits when dialogue hits are rejected by the control 2026-11-22 17:47:00 -03:00
924b6d56ba Merge pull request #3278 from jaybeebabageyus 2026-11-22 15:16:25 -05:00
df08d1aa9c Merge pull request #3050 from Victor 2026-11-22 15:14:22 -05:00
9ff3024c92 awc_names/fspx_unpack: one-line error instead of a PermissionError traceback for unreadable inputs 2026-11-22 20:58:05 +01:00
e30922bc78 fix(audio): preserve recursively discovered awc_names inputs 2026-11-22 20:12:32 +01:00
861325b7fd Merge pull request #2450 from bbareth 2026-11-22 13:15:24 -05:00
e1f3339f77 awc_names: check the stream table bounds before reading it 2026-11-22 18:05:29 +01:00
59987c6799 Audio: distinguish bank sources that share a basename 2026-11-22 13:37:48 -03:00
b6313dc645 awc_names: protect conversation inputs from report output 2026-11-22 11:24:35 -03:00
d344fcb275 tools: name AWC streams from dictionary hits on their joaat ids
AWC stream tables keep only joaat(lowercase name) & 0x1FFFFFFF. With ~1.8M
distinct ids in a 2^29 space, ~0.3% of arbitrary words collide, so
awc_names.py accepts a hit only as an exact dialogue-wave word
(<root>au_<4 letters>_<NN>) or as a numbered family in one bank (3+
members or 2 adjacent, common-token base, one member a dictionary word).
A salted control run estimates the false names and sets each rule's
threshold per source.

The dictionary takes word lists or a hashdict.py JSON, and builds dialogue
wave names from conversation key/label pairs (<key>_01.._N per label).
Banks come from .awc files, directories or rpf9dump's audio_manifest.json.

On 1.0.2.1: 266,781 of 1.85M ids named (story000 73.7%, audio 5.7%),
with 417 control hits. Standard library only; tests are synthetic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:16:06 +01:00