Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to improve production observability for the Wasm builds by preserving symbol names (for readable stack traces) and making JS boundary failures easier to diagnose via safer casts and clearer expect messages.
Changes:
- Preserve Wasm function names in release builds by adjusting per-package
stripsettings for Wasm crates. - Improve runtime diagnostics by replacing
unchecked_intowith fallibledyn_intoat several JS/Wasm boundaries and upgradingexpectmessages. - Move
console_error_panic_hookinstallation to module instantiation via a wasm-bindgen start function and enable the feature by default forsubduction_wasm.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
subduction_wasm/src/subduction.rs |
Switch hash metric override casting from unchecked to fallible with clearer panic text. |
subduction_wasm/src/signer/webcrypto.rs |
Improve expect messages around IDB upgrade flow and key parsing; clarify WebCrypto sign failure text. |
subduction_wasm/src/signer.rs |
Make JS signer return-type handling fail loudly with explicit dyn_into diagnostics. |
subduction_wasm/src/lib.rs |
Add #[wasm_bindgen(start)] to install the panic hook at module instantiation time. |
subduction_wasm/src/connection.rs |
Replace unchecked JS casts with dyn_into and add an error variant for unexpected JS types. |
subduction_wasm/Cargo.toml |
Enable console_error_panic_hook by default. |
sedimentree_wasm/src/storage.rs |
Make digest parsing fallible and convert several unchecked casts into typed errors. |
Cargo.toml |
Override release profile stripping for Wasm crates to keep names while stripping DWARF debuginfo. |
flake.lock |
Update pinned Nix inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Don't strip symbols & improve a few
expectmessages