aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_upload_seal_client.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-10 17:29:50 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-10 17:29:50 +0200
commit4753c67816c774323e3ab4efc76d3259e8ded40d (patch)
tree0ac0b8a3013aa483111ea249e3aa37ff49988891 /packages/meshbay-hub/tests/test_upload_seal_client.py
parent1dcedc77083b908b7b3b431bad679a4813884355 (diff)
downloadmeshbay-4753c67816c774323e3ab4efc76d3259e8ded40d.tar.gz
refactor(spa): stop asking a node what version it is
`MNP_MIN_SUPPORTED` is the version this build speaks, so `check_version` refuses everything below it at the handshake. Every capability the client was gating on the node's version is therefore true of every peer it can reach: * `supportsSealedUpload` — an upload is sealed or it is not sent; * `supportsAppOps` — one `app_directories` op, and no `setVideoRoot` / `setAudioRoot` / `setPhotoRoots` wrappers behind it; * `supportsTransferSlots` and `Lease._skip()` — a lease is always real, so there is no branch where a transfer runs without one; * `legacyNode`, the read-only shared-directories table, and the two hints telling an operator their node is too old to configure an app. The version the node declares is still recorded, for diagnostics. Nothing branches on it, and the comment says so, because a field kept "just in case" is how the branches came back last time. `test_mnp_1_0_node_compat.py` goes with them: it existed to hold the fallbacks in place, and holding a fallback that cannot execute is how a suite starts lying. The two locale strings for those hints are removed from all ten catalogues. Hub suite 872 passed (test_sticky_header deselected — failing before this). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AsoWC3GmhNdwVFomW3QjH3
Diffstat (limited to 'packages/meshbay-hub/tests/test_upload_seal_client.py')
-rw-r--r--packages/meshbay-hub/tests/test_upload_seal_client.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/packages/meshbay-hub/tests/test_upload_seal_client.py b/packages/meshbay-hub/tests/test_upload_seal_client.py
index 2e4bfb5..d233ccd 100644
--- a/packages/meshbay-hub/tests/test_upload_seal_client.py
+++ b/packages/meshbay-hub/tests/test_upload_seal_client.py
@@ -80,7 +80,7 @@ def _node_session(tmp_path: Path, gek: bytes) -> WebRTCPeerSession:
def _probe_input(gek: bytes, mode: str, **extra) -> dict:
return {
"mode": mode, "gek": gek.hex(), "group_id": GROUP,
- "node_version": "2.0", "chunk_size": CHUNK, "dir": "library",
+ "chunk_size": CHUNK, "dir": "library",
"root": "library",
"file": {"name": "holiday.jpg", "data": BODY.hex()},
**extra,
@@ -156,19 +156,6 @@ def test_the_caller_is_told_the_name_the_node_chose(tmp_path, _gek, _sent):
assert result["stored"]["dir"] == "library"
-def test_the_client_refuses_an_older_node_before_sending_a_chunk(_gek):
- """
- A 1.x node would answer "Missing filename or data" — an error about the
- wrong thing, naming no upload, which fails every upload in flight. Asked
- first instead, and nothing goes on the wire.
- """
- result = _run_probe(_probe_input(_gek, "receive", acks=[],
- node_version="1.1"))
- assert result["state"] == "rejected"
- assert "older MeshBay" in result["message"]
- assert result["frames"] == [], "a chunk was sent to a node that cannot open it"
-
-
def test_an_interrupted_upload_resumes_where_the_node_stopped(tmp_path, _gek):
"""
The browser asks, the node answers, and the second attempt sends only what