Skip to content

Conversation

@maraf
Copy link
Member

@maraf maraf commented Dec 8, 2025

Assets generated by boot config generator contains field integrity, but internal assets structure contains field hash. This PR copies the value from integrity to hash to minimize the diff. It is a regression from boot config structure change from #116300.

Fixes #121876

@maraf maraf added this to the 11.0.0 milestone Dec 8, 2025
@maraf maraf self-assigned this Dec 8, 2025
@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Dec 8, 2025
@maraf maraf marked this pull request as ready for review December 9, 2025 16:48
@maraf maraf requested a review from ilonatommy as a code owner December 9, 2025 16:48
Copilot AI review requested due to automatic review settings December 9, 2025 16:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #121876 by mapping the integrity property from boot config to the internal hash property used by asset loading. The changes rename the public-facing hash field to integrity in asset type definitions while maintaining backward compatibility by internally mapping integrity to hash in the loader.

Key Changes

  • Renamed hash to integrity in public asset type definitions (WasmAsset, AssemblyAsset, PdbAsset, VfsAsset, IcuAsset)
  • Added runtime mapping logic to convert integrity to hash for internal use in asset loading
  • Added test case to verify assets have integrity values

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/mono/browser/runtime/types/index.ts Renamed hash property to integrity in asset type definitions
src/mono/browser/runtime/dotnet.d.ts Updated TypeScript declarations to reflect integrity property rename
src/mono/browser/runtime/loader/assets.ts Added logic to map integrity to internal hash property in two places
src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs Added test to verify assets have integrity values
src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js Added test case handler and exit condition for AssetIntegrity test

maraf and others added 3 commits December 9, 2025 18:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@maraf

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@maraf
Copy link
Member Author

maraf commented Dec 9, 2025

/backport to release/10.0

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Started backporting to release/10.0 (link to workflow run)

@maraf
Copy link
Member Author

maraf commented Dec 9, 2025

Based on offline discussion, we might want to fix the problem differently

@maraf maraf added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Build-mono NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[browser] Integrity passed to withResourceLoader is always empty

1 participant