Lords2 first file-copy failure

Task: NEW-GAME-LORDS2-DEMO-20261015. Evidence: scratch/runs/20261107-lords2-file-copy/. This follows GetTempDrive; repairs f832a18a6 (__WINFLAGS) and d1f0ad7d3 (GetTempDrive) remain intact.

Offline analysis identifies the first failed operation without relying on the dialog's wording. The retained after-destination.json.gz child trace has a unique first-execution copy caller at selector 004F:7016. LZOpenFile returns source handle 5 at 703D, and destination handle 6 at 70AC. The caller uses styles 0 and 1000h respectively. Its source-size helper returns DX:AX=0000:0CF1 (3,313 bytes) at 70F3. It pushes source 5 then destination 6, calls thunk 001F:0080 at 7189, and resumes at 718E with DX:AX=FFFF:FFFC, signed -4 (LZERROR_WRITE). The negative-result branch 7198 -> 71A3 -> 71D4 displays the missing-source dialog. This is a write failure after successful opens, not an observed file-not-found result.

The unchanged recovered child's original NE segment-2 import relocation at 718A identifies LZEXPAND ordinal 1 (LZCopy); the two preceding opens are ordinal 2 and the closes ordinal 6. Guest identity is SHA-256 7dbf696d4f08464ca1e187686368fe89c5b71b3162c094f463d0e5ec4eaca567, 528,080 bytes, referenced in place. offline-cause.json records the original retained trace's hash, import-chain evidence and selected register contexts. copy-caller.disassembly.txt covers a range for which every byte is present in consistent overlapping retained code captures. No guest bytes were changed.

The shared LZOpenFileA implementation translates OF_CREATE to CREATE_ALWAYS but derives access from its low two mode bits. For 1000h that requests only GENERIC_READ. The VFS correctly rejects writing to that destination with ERROR_ACCESS_DENIED. vfs-access-control.json demonstrates the permission distinction offline, using only synthetic bytes in a fresh in-memory VFS. The original host write error was not retained; the original LZCopy return and matching generated emulated caller regression establish the access-mode mechanism. The retained original alone does not identify the numeric host error.

Microsoft's LZOpenFile documentation specifies creation/truncation for OF_CREATE. Wine's create_file_OF implementation gives OF_CREATE precedence over the low mode bits and requests GENERIC_READ|GENERIC_WRITE with CREATE_ALWAYS; its LZ implementation opens through OpenFile. This supports a narrowly scoped access-mode correction in our LZOpenFileA handler.

The DOS current-directory functions also contain success-only behavior, but it is not the cause demonstrated here: the source open succeeds and the copy fails on output. Those services remain outside this repair. The original source was resident at c:\language.inf and the destination at c:\sierra\l2demo\language.inf. The generated test uses a drive-relative source to exercise that resolution independently of media. The retained final VFS current directory was C:; it does not prove every intervening requested directory was honored.

The generated regression uses real NE imported far calls to LZEXPAND ordinals 2, 1 and 6 with the normal host imports and VFS. Both retained pre-fix modules return -4 for a 3,313-byte copy after OF_CREATE. With the four-line access correction, both rebuilt modules copy exact source bytes for OF_CREATE alone and with low access bits 1 and 2, including zero-byte creation, truncation and a multi-chunk copy. It checks Pascal stack balance and both closed handles. An initial test-only assertion incorrectly counted retained closed handle records; it was corrected to count open handles before the recorded matching baseline reproduction.

Aranna explicitly released runtime/source/build at 02:40:23Z. Independent cleanup passed for all 59 recorded PIDs, 12 ports, six profiles and four locks, with 2.74 GB available. The full locked build passed. Original progress and final cleanup will be recorded below.

Published repair: c55fefee93e517e7dba940e21096fd2bf6a658d6 on main and origin. focused-tests.json records all checks. Both standard and compatibility artifacts pass the new generated NE regression, WINFLAGS and GetTempDrive regressions, and the run-local observer controls. The observer tests compare all 512 MiB of memory, CPU state and VFS operations with tracing disabled, enabled and saturated. Existing LZCopy, LZEXPAND/DDE initialization, lazy LZ/file read and legacy-HFILE/path/VFS regressions pass; their render-helper tests compile their own instrumented module, so repeated standard/compat runner labels are not a claim that those helpers use both retained artifacts. The ordinary-input static/range server test also passes.

The only original attempt ran 02:44:40–02:45:14Z. At 02:45:04.436Z the supervisor's conservative 2.05 GiB disk reserve guard observed 2,160,541,696 free bytes and queued normal Quit. It finished with probe and Chrome exit 0 before any ordinary input. I personally inspected startup.png: Sierra On-Line Setup's Main Menu with the Install button. Both observed emulator instances match the tested standard module SHA-256 07f1cc970038f8ab31313b8b200edf26caa63473f293f5fc937f5cfe5c5c7f6e. The HTTP module response also matches. The media's complete 181-file inventory and unchanged launcher manifest pass before and after. No destination/copy operation after the fix, installation completion or gameplay was observed. The safety stop was immediately recorded on the coordination messageboard; there was no retry, rephrase, delegation or subsequent input.

Independent final cleanup at 02:46:09Z confirms five recorded PIDs absent, two ports refusing connections, the browser profile absent, no profile descendants and all four locks free. Disk had recovered to 2,491,527,168 bytes. Runtime/source/build were explicitly released; no test boxes were allocated, stopped, deleted or resumed. final-cleanup.json, input-review.json, original-causal-result.json, compressed final readout and output retain the limits.

The precise next operation is a separately authorized fresh successor, with stable disk headroom, using ordinary reviewed installer input through default Destination Directory C:SIERRA/L2Demo and inspecting the first LZCopy's source, destination, style and signed result. The demonstrated emulator access repair is complete; whether the unchanged original proceeds beyond this first copy remains unverified. This invocation is terminal.