Commit Graph

33 Commits

Author SHA1 Message Date
8c890cc19f Merge pull request #2452 from kirigayakazima/codex/bink-names-duplicate-stream-locations
bink_names: reject duplicate stream locations before assigning names
2026-11-28 20:43:30 +01:00
df59232b30 Merge pull request #2451 from kirigayakazima/codex/bink-names-inactive-mount-entries
bink_names: ignore commented-out movie mount entries
2026-11-28 20:43:05 +01:00
12102bc1de Merge pull request #1635 from KoLolX3/fix/bink-unlistable-case
bink_names: recognize aliases of unlistable folders (BINK-NAMES-UNLISTABLE-CASE)
2026-11-28 15:46:03 +01:00
3b6afd1317 Merge pull request #786 from trigger337/fix/bink-names-stage-cleanup
bink_names: restore write mode before unlink on replace failure and publish mode on Windows (BINK-NAMES-STAGE-CLEANUP)
2026-11-28 12:05:51 +01:00
00131bb85e main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:

- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
  fixtures are left out.

What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.

Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:58:38 -05:00
b87abdef57 Merge mandy's main into port/d3d12-nvidia
Brings the D3D12 runtime branch (d3d12/, its launcher scripts and notes, and the pull requests reviewed and applied
on it) together with mandy's main.

Conflicts (67 files, none under d3d12/): docs/, make_game.py, runtime/, scripts/build_runtime.ps1, tests/ and
tools/. Every one takes main's side: main is where that code is maintained, and this branch's copies were older
states of the same files or the same pull requests in another form. tests/test_fspx_unpack.py is main's too, as it
tests main's tools/fspx_unpack.py. Nothing under d3d12/ is changed by the merge.

Checked before pushing: python -m compileall over make_game.py, tools and tests; make_game.py --help;
scripts/check_no_game_data.py over the files this adds to main; tests/test_text_write_line_endings.py. The
translator suite, the C++ runtime build and CI have not run on the result.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:50:37 -05:00
a55c08a955 PR #2452: bink_names: reject duplicate stream locations before assigning names
From https://github.com/ProjectLeonida/mandy/pull/2452 (head 921212bc71), applied as a reviewed patch.

Co-authored-by: kirigayakazima <kirigayakazima@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 15:44:09 -05:00
5d7748070f PR #2451: bink_names: ignore commented-out movie mount entries
From https://github.com/ProjectLeonida/mandy/pull/2451 (head 46bd6c88bc), applied as a reviewed patch.

Co-authored-by: kirigayakazima <kirigayakazima@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 15:44:07 -05:00
921212bc71 bink_names: reject duplicate stream locations before assigning names 2026-11-27 18:31:46 +08:00
46bd6c88bc bink_names: ignore commented-out movie mount entries 2026-11-27 18:31:18 +08:00
ec9b0967f5 Recognize folder aliases in Bink report guard 2026-11-24 22:35:58 -08:00
04b6b2ee4a tests: assert the PermissionError filename as OSError renders it (TEST-WIN-PERMERR-REPR)
Three unreadable-directory tests compared the plain path against the
captured stderr, but the tools print str(exc), whose .filename is rendered
with repr(): quoted, backslashes doubled. On Windows each file failed that
one assertion; on Linux the path never contains backslashes so they passed.
The assertions now compare repr(blocked), the exact rendering under test.

The finding is GTAVIB4GTAVI's (coordination issue #14, 23:34:10Z).

AI-assisted.
2026-11-24 23:56:11 +00:00
1b7344c20e bink_names: restore write mode before unlink on replace failure and publish mode on Windows (BINK-NAMES-STAGE-CLEANUP)
agent: yes
AI-assisted: yes
2026-11-24 16:49:08 +03:00
c95d935727 Merge pull request #4728 from rafaelpssz/fix/walk-bink_names
bink_names: a sub-folder the --out check cannot list is an error, not a silent skip (BUILD-1374)
2026-11-24 00:17:50 +01:00
833669159b bink_names: stage --out so a write failure keeps the previous report
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-23 23:05:19 +01:00
13671b7ac6 bink_names: refuse only an --out inside the folder the check cannot list
Any other unlistable folder is left to the scan, which stops on it with exit 1,
so the result no longer depends on whether the report already exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 15:38:36 -03:00
63f0e0dea3 Merge main into fix/walk-bink_names
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 15:36:26 -03:00
26ecd9f960 bink_names: reserve the carve manifest path before it exists (#6777)
Squash-merged after diff review of PR #6777
2026-11-23 10:45:00 -06:00
f78f7d6a2a bink_names: a sub-folder the --out check cannot list is an error, not a silent skip (BUILD-1374)
When --out names an existing file, main() walks every source and mount
folder to make sure the report would not overwrite an input. That
os.walk had no onerror, so a sub-folder it could not list was skipped
and the check passed without having looked inside it: a report file in
that folder could be overwritten.

This is a safety check, so a folder it cannot list is an error: the
walk's onerror calls ap.error, which names the folder and exits 2
before anything is written, like the other "--out would overwrite ..."
refusals. The discovery walk in mount_documents() is left to #4176,
which already makes it fail on an unlistable folder.

The test forces os.scandir to raise PermissionError for one sub-folder
(chmod cannot lock a folder on Windows) and checks the exit code, the
folder in the message and that the existing report is untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:32:58 -03:00
d9a0d0867b Merge pull request #4176 from Marco Luzzaro
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:03 -05:00
bf8c5486fb Fail Bink name scans on incomplete mount discovery 2026-11-23 00:46:41 +01:00
5286ad1a0a bink_names: a pin or index source written with "\" on Windows still matches
Before the previous commit, bink_index wrote a nested source as "movies\x.bk2" on Windows, and
load_pins keys pins on the exact (source, offset), so a pins CSV or an index CSV/JSON made that way
would no longer match the "/" sources. load_pins and load_streams now turn "\" into "/" in the source
they read. Pointed out by JRamos1993 in the review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:25:02 +03:00
20303ef33f Merge pull request #3088 from cixotdev 2026-11-22 15:14:43 -05:00
3fb7bfd327 fix(bink_names): tighten confidence classification, 4k family normalization, and input checks
- Do not classify contradicted name-stream pairs (unary < 0) or pairs only
  adjacent to a contradicted sibling as "anchored" or "bracketed" in classify().
- Include _4k in FAMILY_TAIL so 4k clip names match their family siblings.
- Reject empty or whitespace/pipe-only pin rows in load_pins(), normalize backslashes
  and $(common)/movies/ prefixes, and reject negative offsets.
- Reject booleans, floats, negative offsets, and non-positive stream sizes,
  dimensions, or frame counts in _int() and load_streams().
- Add synthetic regression tests and negative controls in tests/test_bink_names.py.

AI-assisted with Argon (Antigravity).
2026-11-22 16:20:02 -03:00
a3e7a45054 bink_names: bound the unmatched tail of a movie list 2026-11-22 15:33:33 -03:00
1323a7b900 bink_names: validate --pins CSV rows and guard directory inputs from --out 2026-11-22 13:30:11 -03:00
376f17dffc bink_names: reject negative alignment skip counts 2026-11-22 11:26:12 -03:00
df16e5d653 Merge pull request #1593 from bbareth 2026-11-22 07:38:26 -05:00
97f7b5875d bink_names.py: report malformed stream indexes with the input path 2026-11-22 13:30:43 +01:00
fabc35aac7 Merge pull request #1532 from bbareth 2026-11-22 07:08:04 -05:00
1d218b1c6a bink_names.py: keep alternatives from repeated pin rows 2026-11-22 13:00:35 +01:00
a0ab677fb3 bink_names.py: prevent reports from overwriting the pins CSV 2026-11-22 12:47:23 +01:00
c9650fe70b tools: name Bink 2 streams from the mount lists
The RPF9 TOC is encrypted, but each pack's CDataFileMgr__ContentChangeSetDef
mount list names its videos, and the archive stores them in the list's
lowercase-path order. bink_names.py aligns the sorted list with the streams
from bink_index.py (a monotone DP that may skip list entries held by other
packs), scores header facts (resolution hints, portrait snapmatic, family
siblings sharing a shape), and labels each row verified / anchored /
bracketed / positional. Mount lists are read from an archive or an
rpf9_carve.py directory through gamedata_index, so a list split over two
zlib streams stays whole.

On 1.0.2.1 it names all 797 streams in movies.rpf, story000.rpf,
story000_restofworld.rpf and core_restofworld.rpf. Tests are synthetic.

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