Lords II Win16 DDEML shell connection
Evidence: scratch/runs/20261107-lords2-ddeml-shell/. Follows the USER.290 repair and retained 400A blocker. The predecessor terminated and explicitly released source/build/runtime before this task. Aranna subsequently released its source/build/runtime window at 04:04:53Z; implementation edits began after that release.
One fresh box, bx_qbvz3hcs, was created with a persisted UUID Idempotency-Key. It received 619 individually pinned inputs, recovered from Git 0c66fe75482d3a86bacdd9b971ee377abdb4dc34, relevant diffs, small run-specific observer inputs, and the existing media paths/hashes. No source/media archive or guest edit was made. Both inherited modules passed redraw, WinFlags, temporary-drive, LZCopy, and observer passivity controls before the original. The original used standard module SHA-256 2f9fd9f5fb1841afe68f47f61d9870ea617a73f2c45253cbf662c2479b723e55; actual observer instance identities are retained.
I inspected all nine 1000×800 original-resolution captures before further progression input. Seven ordinary clicks reached the installation-complete dialog and its assertion that all files were copied. The eighth ordinary click was its OK. After the DDE timeout the first blocker was again System Error: DdeConnect returned 400A. No further progression input, relaunch, or replay occurred; command 8 was normal Quit. Audible sound, installed launch, and gameplay were not established.
The added bounded observer selects built-in module 10, DDEML, and reads our imported API inputs. Two DDEML.21 calls create the exact text PROGMAN, with codepage 0 and instance 1, both returning HSZ 1. DDEML.7 then receives idInst=1, service=1, topic=1, context=NULL. These are demonstrated arguments, replacing the predecessor's unknown service/topic. dde-caller-proof.json also identifies the actual resumed caller at linear 0x187979: AX=0, DX=0, and SP increases from 2066370 to 2066390, exactly sixteen argument bytes plus the far return. The immediate API return marker is parking evidence, not the eventual result. DDEML.20 subsequently yields 400A. Observer errors and dropped API records are zero.
The defect is emulator-side shell routing. src/09f-win16-ddeml.wat previously sent every connect through the multiplayer room transport, including this local Program Manager request. Win32 already exposes a process-local PROGMAN service and a command engine that performs real Start Menu/shortcut writes. DdeConnect's contract selects a supported service/topic pair. Wine's Win16 adapter confirms DWORD instance/string/conversation handles, the context translation, and the distinction between a far data pointer and an HDDEDATA when byte count is -1.
The repair selects the built-in shell only for live, explicit, case-insensitive PROGMAN/PROGMAN strings. It allocates a real conversation marked separately from wire peers, checks its instance, and returns DX:AX with the correct Pascal cleanup. Synchronous XTYP_EXECUTE with item zero uses the existing progman_execute parser and VFS operations. Both far command bytes and valid HDDEDATA inputs work. Successful operations return a nonzero Boolean and DDE_FACK; unsupported operations, invalid handles, asynchronous shell transactions, and unknown commands remain explicit failures. Disconnect avoids emitting a wire packet for the shell, and uninitialization drops its owned shell conversations. Other service/topic pairs, wildcard room discovery, real server callbacks, and room errors retain their existing paths. This is the existing shell command subset, not complete DDEML, non-NULL-context, or shell parity.
test/test-win16-dde-progman.js generates a bounded ordinary NE application with real imported far calls. Thirteen cases cover the captured pair/codepage, mixed case, wrong service/topic/prefix, invalid instance, real folder/shortcut creation and parsed target/arguments, raw/data-handle commands, invalid data handles, unknown commands, unsupported request/async/item inputs, disconnect/uninitialize, DX:AX, stack restoration, and preserved BX/SI/DI/BP. The old published module fails the success assertion with the demonstrated 400A; both repaired shipped modules pass. A separate generated control proves identical full-memory hashes and architectural results with observation disabled/enabled. Early run-script syntax errors and an initially missing clear_yield in that control are retained; they did not replay or alter the original.
The mandatory locked full build passes. Focused existing room, connect-callback, execute, data-ownership, frame-validation, Win32 PROGMAN, and DDE-initialization tests all pass. Their real callback coverage is retained rather than replaced by the new shell test. Fixed modules, logs, source patches, and publication identity are retained in the run.
Unique original logs/captures and traces were retrieved and hash-checked. A collector initially found two deliberately different summary versions; both are preserved and the corrected collector verified existing variants without overwriting them. All 181 media hashes and 619 original staged pins passed post-run checks. Normal Chrome exit was code 0, with harness/server/deadline/Chrome PIDs gone, profile absent, and port 36933 closed before delegated shutdown. Stop stop_8bf7c354c495e623 completed at 04:08:23.043Z, forced=false, error=null. The box is archived, active expiry null; original expiry was 05:27:26.008Z.
The original ran before this repair and ended at its first blocker. Therefore this task proves the missing shell connection and its generated repair, not that the original now completes shell registration or launches. The retained installed inventory contains hashes, not a restorable installed-state image. The next authorized original must follow ordinary setup and shell completion on a fresh box; it must not fabricate shortcuts, skip setup, or infer gameplay from these tests.