From 9814b0d39eb8f3838cad1faaa2a61577233edff7 Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Fri, 27 Mar 2026 09:06:08 +0400 Subject: [PATCH] Add WASM self-test, bundle debug, /selftest and /bundleinfo commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /selftest — runs full Alice→Bob encrypt/decrypt cycle within WASM (tests X3DH + Double Ratchet + bincode serialize/deserialize) /bundleinfo — dumps bundle contents, verifies SPK secret matches SPK public key in the registered bundle These help isolate whether the bug is in WASM crypto (self-test fails) or in CLI↔WASM interop (self-test passes but cross-client fails). Co-Authored-By: Claude Opus 4.6 (1M context) --- .../crates/warzone-server/src/routes/web.rs | 16 +++- warzone/crates/warzone-wasm/src/lib.rs | 87 +++++++++++++++++++ 2 files changed, 102 insertions(+), 1 deletion(-) diff --git a/warzone/crates/warzone-server/src/routes/web.rs b/warzone/crates/warzone-server/src/routes/web.rs index 140e754..7692323 100644 --- a/warzone/crates/warzone-server/src/routes/web.rs +++ b/warzone/crates/warzone-server/src/routes/web.rs @@ -144,7 +144,7 @@ const WEB_HTML: &str = r##"