From a78fdeae66287fa51f2888440d0f5abc0e70364b Mon Sep 17 00:00:00 2001 From: DCCONSTRUCTIONS Date: Thu, 1 Oct 2026 09:13:14 +0300 Subject: [PATCH] Accept qualified ARNavi VPS 0.2.4 client contract --- src/k1link/fleet/equipment_bootstrap.py | 1 + src/k1link/fleet/equipment_command_runtime.py | 1 + src/k1link/fleet/equipment_network.py | 9 +++++++++ tests/fixtures/arnavi_vps/client-v1.json | 2 +- tests/test_equipment_bootstrap.py | 2 +- tests/test_equipment_command_runtime.py | 2 +- 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/k1link/fleet/equipment_bootstrap.py b/src/k1link/fleet/equipment_bootstrap.py index 1e101e77..a1299996 100644 --- a/src/k1link/fleet/equipment_bootstrap.py +++ b/src/k1link/fleet/equipment_bootstrap.py @@ -67,6 +67,7 @@ def apply(hosts, identifier, revision): "0.2.1", "0.2.2", "0.2.3", + "0.2.4", ) or time.time() - host["last_sync_at"] > 30 ): diff --git a/src/k1link/fleet/equipment_command_runtime.py b/src/k1link/fleet/equipment_command_runtime.py index 1f19dccd..3c041151 100644 --- a/src/k1link/fleet/equipment_command_runtime.py +++ b/src/k1link/fleet/equipment_command_runtime.py @@ -82,6 +82,7 @@ def enqueue(hosts, identifier, request_id, preset_id): "0.2.1", "0.2.2", "0.2.3", + "0.2.4", }: raise EquipmentError("Подключите проверенную версию VPS Host с поддержкой очереди.") count = db.execute( diff --git a/src/k1link/fleet/equipment_network.py b/src/k1link/fleet/equipment_network.py index 29fe1350..dea72b45 100644 --- a/src/k1link/fleet/equipment_network.py +++ b/src/k1link/fleet/equipment_network.py @@ -253,6 +253,7 @@ def start( "0.2.1", "0.2.2", "0.2.3", + "0.2.4", ) ) automatic_access = None @@ -333,6 +334,7 @@ def start( "0.2.1", "0.2.2", "0.2.3", + "0.2.4", }: raise EquipmentError("Для разрешения обеих SIM установите актуальный VPS Host.") if body["kind"] == "select-sim" and source.get("status", {}).get("version") not in { @@ -363,6 +365,7 @@ def start( "0.2.1", "0.2.2", "0.2.3", + "0.2.4", }: raise EquipmentError("Для смены SIM установите актуальный VPS Host.") else: @@ -418,6 +421,7 @@ def start( "0.2.1", "0.2.2", "0.2.3", + "0.2.4", ), "request-position": ( "0.1.8", @@ -463,6 +467,7 @@ def start( "0.2.1", "0.2.2", "0.2.3", + "0.2.4", ), "pulse-output": ( "0.1.9", @@ -507,6 +512,7 @@ def start( "0.2.1", "0.2.2", "0.2.3", + "0.2.4", ), "set-output": ( "0.1.10", @@ -550,6 +556,7 @@ def start( "0.2.1", "0.2.2", "0.2.3", + "0.2.4", ), } if source.get("status", {}).get("version") not in versions[command["kind"]]: @@ -603,6 +610,7 @@ def start( "0.2.1", "0.2.2", "0.2.3", + "0.2.4", ) for h in (source, target) ): @@ -694,6 +702,7 @@ def start( "0.2.1", "0.2.2", "0.2.3", + "0.2.4", } if durable_delivery: lifetime = ( diff --git a/tests/fixtures/arnavi_vps/client-v1.json b/tests/fixtures/arnavi_vps/client-v1.json index 3106c1cf..80c26e02 100644 --- a/tests/fixtures/arnavi_vps/client-v1.json +++ b/tests/fixtures/arnavi_vps/client-v1.json @@ -322,6 +322,6 @@ "web_protocol.py": "f9c3eba194144e6cc839e80997917967b8075bdbc866fdbefa6929b55cd27c86" }, "schema": "nodedc.arnavi-client-contract/v1", - "server_version": "0.2.3", + "server_version": "0.2.4", "synthetic_only": true } diff --git a/tests/test_equipment_bootstrap.py b/tests/test_equipment_bootstrap.py index 85a497c0..a4d3ffef 100644 --- a/tests/test_equipment_bootstrap.py +++ b/tests/test_equipment_bootstrap.py @@ -76,6 +76,6 @@ def test_initial_usb_apply_accepts_current_shipped_host(): def test_initial_apply_accepts_shared_host_without_changing_legacy_pairing(): hosts, _, host = context() - host["status"]["version"] = "0.2.3" + host["status"]["version"] = "0.2.4" assert apply(hosts, "device", 1) == {"ok": True} hosts.equipment.apply.assert_called_once_with("device", 1) diff --git a/tests/test_equipment_command_runtime.py b/tests/test_equipment_command_runtime.py index 869eaf73..7a27fd22 100644 --- a/tests/test_equipment_command_runtime.py +++ b/tests/test_equipment_command_runtime.py @@ -41,7 +41,7 @@ def sender(monkeypatch): @pytest.mark.parametrize( - "version", ["0.1.26", "0.1.27", "0.1.28", "0.1.29", "0.1.30", "0.1.31", "0.2.0", "0.2.3"] + "version", ["0.1.26", "0.1.27", "0.1.28", "0.1.29", "0.1.30", "0.1.31", "0.2.0", "0.2.3", "0.2.4"] ) def test_queue_survives_restart_and_idempotent_submit(ready, monkeypatch, version): equipment, hosts, row = ready