fix(web): make first wasm load work on remote deployment
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

- Correct engine-manifest single wasm SHA and reuse cache for verification.
- Remove duplicate main-thread wasm fetch; raise init timeout to 300s.
- Record production deployment details and verification evidence.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-12 22:38:04 +08:00
parent d5dd647881
commit c92cd933c5
6 changed files with 45 additions and 12 deletions

View File

@@ -262,7 +262,9 @@ export async function loadWebEngineManifest(url = "/engine-manifest.json"): Prom
export async function verifyWasmResource(
resource: Pick<WasmResource, "url" | "sha256"> & Partial<Pick<WasmResource, "id">>,
): Promise<void> {
const response = await fetch(resource.url, { cache: "no-store" });
// Reuse the HTTP cache populated by the worker's module loader. A no-store
// verification fetch would download the multi-hundred-MB engine wasm twice.
const response = await fetch(resource.url, { cache: "force-cache" });
const resourceId = resource.id ?? resource.url;
if (!response.ok) throw new Error(`WASM resource request failed: ${resourceId}`);
const bytes = await response.arrayBuffer();