Stronghold native coverage prerequisite: offline repair
The published command11 failure remains a failure. No Custom Game DOWN, new
original attempt, readiness approval, accepted pixels or gameplay is supplied
by this work. The immutable original is documented in
stronghold-prompt-review-gameplay-20261105.md
and sealed under scratch/runs/20261105-stronghold-prompt-review-gameplay/.
Its first-failure SHA-256 remains
ee7426e75089303d14cc4799c46daf0561d584c45bb2537c65a6935cdafffe72;
the terminal seal remains
86d884d9594a468823e847e0f1883ed316e9b9b588305be8dbbac765f682f124.
Evidence for this repair is in
scratch/runs/20261105-stronghold-native-coverage-prerequisite/. Recovery uses
Git SHA, relevant binary diff and owned new-file patches. Existing media and
modules are identified by path and SHA only; no source archive, media copy or
module copy is made. This worker used no boxes or subworkers. Coordinator
shutdown ownership remains unchanged; box ID/state/expiry are N/A.
Preparation stayed source-only until D3D secondary-target queue cause's exact
FINAL (fbc8051625bca534bc8a8534cf8e641d9ada393e) and then Return Fire repaired-body
gameplay's exact FINAL (43525070f2c07f2f5ba8e016efa06f29b07d4ba1). The independent
10:25:58Z gate verified 32 absent process identities, four normal Chrome exits,
removed profiles, eight refused ports, free build/runtime locks and sufficient
disk. An accidental early board search during preparation is recorded in
preparation.md; it caused no shared edit or executable action.
The selected chain is stronghold-local-runtime.prepare through the owning
callback observer and the retained preset-driver composition. Its serialized
Worker installer arms native profile 2, image 0x400000 and the nonzero
full target/session-derived epoch before returning the original instantiation.
The native producer is intended to retain startup history; the JS observer's
command11 start does not start that history anew. The original reports retain
epoch 3444376305, zero observed native blocks, a baseline and begin annotation,
then the coverage error before DOWN. The host reports contain no publication
records. Zero observer blocks do not mean that startup never executed.
Two production boundaries broke this intended coverage. First,
lib/dll-loader.js executed DllMain through its real native run, then restored
ESP/EIP through public setters. Once native history had started, the first
restore setter permanently recorded reason 5. Second, $win32_dispatch treated
an ordinary native callback redirect as an unsupported gap, including
CreateWindowExA's WM_NCCREATE/WM_CREATE chain. These are the actual published
boundaries: published-boundary-identity.json proves that the complete loader
source and the dispatch boundary hash match code commit
8c55c7f215b1cc79ee3055acf283e7e9fdf4b479 and the pre-repair main source.
The immutable original console also records [CreateWindow] "Crusader Demo"
at 09:37:31.439Z, line 48; its hashed extraction is retained.
Before shared code edits, both existing modules reproduced the deficits through
production imports, PE/DLL loader, DllMain and native RegisterClassA/CreateWindowExA.
baseline-loader.json records valid coverage before the callback and reason 5
at the first post-DllMain ESP restore. baseline-window.json independently
records reason 5 at WndProc entry, despite normal window creation returning
65537. These generated programs never run the original entry. The historical
reports did not capture the native reason getter or the first startup
invalidation. This work therefore identifies and repairs causal missing
producer coverage in the published wiring without claiming which invalidator
occurred first in that original execution.
The repair retains bounded native shadow history rather than permitting an unexplained transition. Profile 2 now records native dispatch callback entries, exact RET PC/ESP, canonical unpatched native continuations, and the final API caller/ESP. A generated helper derives the stdcall cleanup from the same API metadata as dispatch. Unknown conventions and unsupported/nested invocation paths still fail closed. Each of the 64 shadow frames fits its existing instance lease; profile 1 keeps its distinct target set and conservative callback rule.
DllMain uses a native continuation only under this profile and callback ABI. Its one-use token binds the saved parent, exact DLL row index and mapping generation; a checked native RET to the sentinel, complete stack cleanup and normal native halt are required. Wrong, replayed, unfinished or stale-generation tokens cannot certify coverage. Failure retains native history and its latch. Existing loader register/control/yield/SEH restoration and callback gates remain. Rearm and foreign-epoch queries now preserve the first native reason. The consumer requires the callback ABI and retains actual identity/reason getters on its first coverage failure, without rewriting the historical failure seal.
test-stronghold-native-copy-publication.js now executes the unmodified
serialized owning Worker installer, with no nativeEpoch-disabling seam. After
mapping the original image without running its entry, synthetic callers use
its actual import slots and preserve every observer byte pin. A nonzero DLL
row, live WndProc shadow frame, checked returns and three callback entry/return
pairs reach the selected slot0/endpoint1/session consumer's command11 capture
before DOWN. The receipt remains unknown for whole-cycle readiness. Selecting
the old loader path still reproduces reason 5 and is rejected there.
Both modules pass wrong profile/image/epoch and absent ABI consumer negatives,
unsupported callback, replaced shared process/root with unchanged thread ID,
foreign native epoch, rearm, wrong RET, wrong token, changed DLL generation,
unfinished callback and token replay controls. The first failure reason and
consumer diagnostic remain unchanged afterward. Existing native target/cycle,
ordinary input, selected-copy, allocation lifetime, normal publication,
readiness, screenshot/pixel and complete memory/register parity checks pass.
The full owning-callback observer, natural dependency and observation-consumer
tests also pass. The full flock /tmp/wine-build.lock bash tools/build.sh passes.
The connected offline contract compiles the actual selected composition and verifies all 2,429 current dependency rows through filesystem and production HTTP serving, with normal server closure and zero process spawns. Its new explicit offline binding cannot mint an original launch release. Both old accepted/fresh original bindings remain rejected. Offline identity, incomplete provenance and image hashes alone still grant no pixels or input readiness.
The repaired build paths, with no retained module copies, are:
| Existing path | SHA-256 |
|---|---|
build/wine-assembly.wasm |
830486b689313fcbb15e5431a5d63000f34342235e296f06072aaa881c29cbc6 |
build/wine-assembly.compat.wasm |
d48873db2149c98a8cff8514025a4f8a6b626c716f6eb9d8d88eb9b08e1edebb |
The existing installed Stronghold Crusader multiplayer demo EXE remains at
test/binaries/candidates/stronghold-crusader-demo/installed/App_Executables/Stronghold Crusader multiplayer demo.exe,
SHA-256 9024c533095f2227b0105b7e8a9e4cf28ec4fb206b165629787b2c97cf99f13f.
These results qualify the bounded offline prerequisite repair, not full original startup or every callback family. COM/nested runs, detach/unwind and other unsupported coverage paths remain conservative stops. No deadline, input, readiness, publication or pixel guard was relaxed; no original guest writes or forced presentation/time/scheduling occurred. A future original would require separate authorization and a fresh runtime binding. This task ends after its own-path commit/publication and normal cleanup, with that limit intact.