Repository navigation
[wasm] Reload failed force-cache assets through existing retries - #136527
Open
pavelsavara wants to merge 10 commits into
Open
pavelsavara wants to merge 10 commits into
pavelsavara wants to merge 10 commits into
Conversation
Promote failed force-cache downloads to reload within the existing bounded retry policy, including cached terminal statuses. Preserve the remaining retry budget and the download-retry opt-out. Keep the main Wasm download runnable while assemblies await its memory, avoid retaining failed response bodies as asset buffers, and report Mono download progress once per resource across retries. Exercise real browser HTTP-cache recovery for assemblies, buffered ICU data, and the main Wasm module on both runtimes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pavelsavara
requested review from
ilonatommy,
lewing and
maraf
as code owners
October 27, 2026 17:19
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
3 of 4 tasks
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
This was referenced Oct 27, 2026
Select the client assembly extension from the existing UseWebcil setting for cache seeding and both healthy-cache request assertions. DLL-based CI lanes must exercise the assembly instead of searching for missing Webcil files or filtering out successful DLL requests. Document the no-Webcil and no-fingerprint validation switches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
maraf
reviewed
Oct 29, 2026
Move the HTTP cache seed page into a static HTML test asset and rely on the existing client-configuration helper for CoreCLR runtime selection. Use the extracted SDK loader as an expected source when independent, retaining package verification when the SDK pack is absent or resolves to the same file. Document that distinction and the cache-retention boundary for large native Wasm resources. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
maraf
reviewed
Oct 29, 2026
Keep the hosted Blazor client test asset unchanged and rely on the existing test configuration and constructed workload SDK. Validated the cache suite on CoreCLR Webcil and Mono DLLs, including runtime-pack identity, version and loader-byte checks, plus both non-fingerprinted healthy-cache controls. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve the cache-test publish-options conflict by preserving main's explicit Blazor template target framework together with the existing client configuration and cache-test publish flags. Apply that framework selection to the recovery test as well. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Configure the generated Mono client to resolve the current runtime and WebAssembly SDK packs even when the Blazor application targets the previous framework. Keep the shared test asset unchanged and preserve the runtime-pack identity, version and loader-byte checks. Reproduced all 16 CI pack-mismatch failures using a freshly constructed SDK before the fix. Validated 53 browser cases after the fix against fresh .NET 12 runtime packs and workload SDKs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
lewing
reviewed
Oct 30, 2026
Keep native symbols outside cache-recovery retries so startup cannot wait for the download-queue barrier before the other assets have been queued. Cover emitted fingerprinted symbols with required and optional HTTP/network failures and a healthy startup control. Move the generated Mono client's runtime-selection target into a shared targets file without changing the shared client asset or selected packs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recover from unusable browser HTTP-cache entries for fingerprinted boot resources by changing the existing download retries to
cache: "reload", rather than adding a second recovery/retry mechanism.This is an alternative to #135925. Server-side prevention for missing manifest assets is in dotnet/aspnetcore#70062.
force-cacherequests unchanged.force-cachedownloads toreloadbefore applying terminal-status handling. A cached 404 gets a network recovery attempt; a visible 404 from that recovery remains terminal.enableDownloadRetry=false.Browser coverage
The cache-recovery matrix uses the static
cache-seed.htmlpage and hosted test server to seed real, cacheable invalid responses. Chrome starts the application using the ordinary loader and HTTP cache; no Playwright routing substitutes those responses.The matrix covers empty responses, cached 404s, integrity mismatches, integrity checking disabled, transient and permanent reload failures, terminal reload 404s, disabled retries, ordinary
no-cacherequests, buffered ICU data, and main-Wasm recovery with default scheduling and one download slot. It checks exact fetch modes, attempt counts, server requests, startup outcome, and progress bounds. Assembly selection followsUseWebcil, covering Webcil and DLL resources.Small client-assembly cache reuse is asserted on the following boot. Large Debug native-Wasm cache retention is discretionary; those cases instead verify startup, retry modes/counts, scheduling, and one healthy
force-cacheattempt on the following boot with at most one network request. Earlier non-fingerprinted healthy-cache controls also verified conditional revalidation (304).The generated client explicitly selects the current built runtime and SDK packs, even when Blazor targets the previous framework. CoreCLR uses the existing client-configuration helper. Mono imports
UseCurrentMonoRuntime.targetsinto the copied client and setsWBTMonoRuntimePackVersion; the test no longer embeds the MSBuild target in C#. The shared client project remains unchanged.Every recovery case verifies resolved runtime-pack identity/version and loader bytes against an independent extracted SDK pack when available, or against the local nupkg if the pack is absent or would compare a file with itself. An extracted-pack comparison checks SDK agreement, not package freshness. Runtime packages and constructed SDKs were rebuilt after the .NET 12 transition to avoid an old manifest incorrectly mapping net11.0 to the current package.
Separate
ModuleConfigTests.NativeSymbolsDownloadDoesNotHangcases publish an actual fingerprinted native symbol map and require the diagnostics module. A fetch wrapper injects HTTP 404s and rejected network requests. The five cases check required/optional failures and healthy startup, assert exactly oneforce-cachesymbol attempt, and verify startup succeeds or fails rather than hanging. Optional HTTP failures permit startup; rejected fetches preserve their previous fatal-error behavior.Validation
Full Debug browser baselines were previously built for both runtimes. The following latest validation was run locally on November 2, 2026, from the corresponding CoreCLR or Mono worktree root, using:
Latest review follow-up
The native-symbol HTTP 404 and network-failure cases both reproduced the startup hang against the unfixed local CoreCLR runtime: one
force-cacheattempt, followed by a 10-second timeout waiting forWASM EXIT.Result before the loader fix: failed as expected: both required-symbol failure cases timed out. These reached the symbol fetch; they were not SDK/restore/setup failures.
Rebuilt the affected CoreCLR browser runtime/native outputs and packages:
Result: passed. Verified that the new runtime nupkg contains the fixed retry gate.
Recreated the constructed workload SDK from those artifacts:
Result: passed.
Ran the five symbol cases and full CoreCLR cache matrix together in real Chrome:
Result: 22 passed, 0 failed, 0 skipped, including all five symbol cases and all 17 cache cases. Native-Wasm cache recovery still works with default and one-slot scheduling.
Validated the extracted Mono runtime-selection target using the previously refreshed Mono workload SDK:
Result: 17 passed, 0 failed, 0 skipped (Mono, Webcil).
Initial result: 16 passed, 1 failed, 0 skipped (Mono, DLL). All recovery rows passed. The existing healthy-cache control timed out on its first cold load; its native-Wasm HTTP transfer took about 27 seconds against a 30-second startup deadline.
Reran that unchanged control in isolation:
Result: 1 passed, 0 failed, 0 skipped. No timeout increase, suppression, or test disabling was added. Across these runs, all 56 distinct selected cases passed, but the initial DLL matrix was not entirely green.
Loader ESLint, test-JavaScript syntax checking, shared-target XML parsing, and
git diff --checkalso passed.Local prerequisites and scope
EnableHotReloadInRuntimeConfigDevFile=falseis a command-line-only workaround for an unrelated SDK DotNetWatch static-assets endpoint mismatch.NuGetAudit=falsewas set only in the local test-command environment because the existing fixture's pinned dependencies produce audit warnings as errors. No package-version change or audit suppression is included.UseSharedCompilation=falseavoids compiler-server locks while refreshing the isolated SDKs.Resolves dotnet/aspnetcore#69488
Note
This PR and its description were implemented/updated with GitHub Copilot. The listed builds and tests were run locally.