⚠ ネタバレ注意: 本サイトはSFアニメ「SOLAR LINE」の内容を詳細に分析しています。未視聴の方はご注意ください。
📝 AI生成コンテンツ: 本考証の大部分は AI(Claude Code 等)によって生成されています。内容の正確性については原作および引用元をご確認ください。

Task 414: Harden WASM Bindings Error Handling

未着手 ← タスク一覧

Task 414: Harden WASM Bindings Error Handling

Status: DONE

Summary

The WASM binding layer (solar-line-wasm/src/lib.rs) has 3 serde_wasm_bindgen::to_value().unwrap() calls that would cause WASM panics instead of graceful JsErrors on serialization failure. Additionally, lorentz_factor() wraps a core function that uses assert!() (panic) for v >= c, with no input validation in the WASM layer.

Rationale

Plan

  1. Convert 3 to_value().unwrap() to Result<JsValue, JsError> returns
  2. Add input validation to lorentz_factor WASM wrapper
  3. Add tests for the error paths