aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/daemon.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-13 15:01:27 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-13 15:01:27 +0200
commit600b698ab0cb9733dabf66f9528a6a868122c4f7 (patch)
treec824c94d237062dd1bdfe950d96b7db573df6161 /packages/meshbay-node/src/meshbay_node/daemon.py
parentd7576a578d1cdf0a342660385083982dfca033a6 (diff)
downloadmeshbay-600b698ab0cb9733dabf66f9528a6a868122c4f7.tar.gz
test: JS/Python transcript parity across the language boundary
The handshake proof and admin signature transcripts are built independently in crypto.js and in meshbay_common, and compared by producing identical bytes. Nothing on the wire carries the transcript — that is the design — but it means a one-byte disagreement between the two implementations is invisible to every other test while causing a total outage: no browser could complete a handshake with any node, and every file deletion would be rejected. Nothing else in the suite crosses this boundary. The 278 Python tests would all still pass. Drives the real crypto.js under node (stubbing window and crypto, which the module body touches but these functions do not) and compares against the real Python for the same vectors: both roles, short and empty group ids, non-ASCII group names and filenames — TextEncoder and str.encode must agree on UTF-8 — and field splits that would collide under naive concatenation. Verified to actually catch a mismatch rather than trusted for passing: removing one length prefix from the JS fails 6 vectors, and changing a single byte of the domain-separation prefix fails 6. crypto.js restored byte-identical afterwards. Skips when node is absent, which is a coverage gap rather than a pass — worth making a hard failure in CI (18.4). Tests: 168 hub+common. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/daemon.py')
0 files changed, 0 insertions, 0 deletions