Commit Graph

8 Commits

Author SHA1 Message Date
8f2c0e3512 psin_names: publish --refs atomically and match .JSON case-insensitively 2026-11-25 19:37:15 +08:00
d083a2cc37 Make main's tests green: 12 test files that drifted from the code (#9896)
Twelve test files failed on main at 2d53a8055 (CI's check and semantic-tests steps, run locally): most are a test
and the code it checks changed by different pull requests in the same merge round. Each fix below is either taken
from a closed pull request that already had it, or restores what an earlier merged change intended.

From closed pull requests:
- test_make_game_resume: FakeProc gets poll(), which translate() now calls (#7018)
- test_make_game_empty_translation: the Exited stub gets poll() and the failed-shard path is checked (#7214)
- test_shader_checks: stub table_fetch_test in the Wave64Checks harness and count it (#7433)
- test_runtime_paths: runtime.yml's path filter lists tools/replace_retry.py, which rdna2spirv.py imports (#7029)
- test_psin_names: patch the same_report_path helpers that report_paths now calls (#8719)
- test_report_source_collision: the fixture is a real Bink 2 header; bink_index refuses other files (#7408)
- test_missing_input_exit_codes: tile_probe checks its inputs before it asks for numpy (#4771)

Restored:
- merge_check: a failed `git show` is an error again (5b88d58); 21016cf brought back the lenient read that
  treated it as a new file, while new files are already left out when the diff is read
- rpf_probe: a symlinked --out updates its target again (44d3595); 55d21cc's staged write replaced the link

Updated to the code:
- test_shader_stage_resume: TRANSLATION_SOURCES lists fssm_unpack.py and shader_stage_manifest.py, which the
  translator imports; existing work folders translate once more after this
- test_tool_stdout_encoding: the 15 programs merged without the stdout guard get the same block as the others
- test_rdna2spirv_decode: drop the test of decode_any_format, which SHADER-849 replaced with the table decode
  that tests/semantic/test_format_decode_table.py checks

Co-authored-by: jewmaster1337 <102986566+jewmaster1337@users.noreply.github.com>
Co-authored-by: TanmaySatyam <248538550+TanmaySatyam@users.noreply.github.com>
Co-authored-by: evilclanker9000 <45567075+evilclanker9000@users.noreply.github.com>
Co-authored-by: slint6614-dev <359954236+slint6614-dev@users.noreply.github.com>
Co-authored-by: BlackNife <108077267+Poussistar@users.noreply.github.com>
Co-authored-by: fiestorra <65175643+fiestorra@users.noreply.github.com>
Co-authored-by: fearkov <289226582+fearkov@users.noreply.github.com>
Co-authored-by: DoubleD17 <48109637+DoubleD17@users.noreply.github.com>
2026-11-24 00:21:26 +01:00
b763516e8c psin_names: use shared same_report_path for all --refs input and carve-index checks (#6531)
Squash-merged after diff review of PR #6531
2026-11-23 12:51:53 -06:00
7e177f6897 Protect carved PSIN inputs from aliased refs reports 2026-11-22 23:38:35 +01:00
3f4e414579 fix(tools): guard --refs against directories and files inside src in psin_names 2026-11-22 20:15:03 +02:00
51ac2a6957 psin_names: a --names JSON of the wrong shape is one ERROR line, not a traceback
load_names called .get() on whatever a --names x.json held, so a top-level
array, a 'files' value or row that is not what rpf9_names.py writes, or a
name that is not a string ended in AttributeError or TypeError. Only OSError
and ValueError are reported as a line by main.

load_names now checks the shape and raises ValueError naming the file, which
main already prints as "ERROR: ..." with exit 2, before --refs is opened. A
file that is not JSON is named too (the message used to be the parser's
alone, and --names is repeatable). An object without 'files', and a row
without 'names', load as before.

tests/test_psin_names.py: three new tests; the two that cover the error
paths fail on the tool as it was (12 failing cases).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:10:14 -05:00
2e425c1708 psin_names: protect source files from the refs writer 2026-11-22 11:24:43 -03:00
58919a9faa tools: resolve PSIN name-hash members against known resource names
psin_names.py walks PSIN instance data with psin_data.py and looks up every
u32 hash member (joaat of the lower-cased name) and u64 hash member
(MurmurHash3 x64 low 64 bits) in a dictionary from rpf9_names.py or name
lists, with a salted control. docs/psin.md no longer says PSIN has no model
names. Synthetic tests only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:46:28 +01:00