diff --git a/lib/tdeck_ui/UI/LXMF/NomadNetProtocol.h b/lib/tdeck_ui/UI/LXMF/NomadNetProtocol.h index 2e9381e9..7bb2bdee 100644 --- a/lib/tdeck_ui/UI/LXMF/NomadNetProtocol.h +++ b/lib/tdeck_ui/UI/LXMF/NomadNetProtocol.h @@ -53,7 +53,7 @@ inline bool normalize_response(const uint8_t* data, std::size_t size, ResponseBu (static_cast(data[2]) << 16) | (static_cast(data[3]) << 8) | data[4]; } else { - // Pinned microReticulum 1bbd422 exposes packet responses as decoded + // Pinned microReticulum 6ac0d32 exposes packet responses as decoded // raw bytes, while Resource responses retain the encoded MessagePack // value. Valid UTF-8 Micron cannot begin with the bin markers above, // so the representations are unambiguous here. diff --git a/lib/tdeck_ui/UI/LXMF/UIManager.cpp b/lib/tdeck_ui/UI/LXMF/UIManager.cpp index b24c4a3a..68884c00 100644 --- a/lib/tdeck_ui/UI/LXMF/UIManager.cpp +++ b/lib/tdeck_ui/UI/LXMF/UIManager.cpp @@ -1394,7 +1394,7 @@ void UIManager::nomad_release_request() { if (!_nomad_request) return; RequestReceipt receipt = _nomad_request; _nomad_request = RequestReceipt(Type::NONE); - // Pinned 1bbd422 does not erase successful packet receipts or pending + // Pinned 6ac0d32 does not erase successful packet receipts or pending // receipts on Link close. request_timed_out() is the only public erasure // path. The sealed mailbox rejects the synthetic failed callback generated // by this compatibility cleanup. @@ -1503,7 +1503,7 @@ void UIManager::nomad_send_request() { _nomad_request = _nomad_link.request( Bytes(reinterpret_cast(_nomad_url.path.data()), _nomad_url.path.size()), Bytes(nil.data(), nil.size()), on_nomad_response, on_nomad_failed, - on_nomad_progress, 30.0); + on_nomad_progress, 30.0, NomadNet::AsyncMailbox::MAX_WIRE_BYTES); if (!_nomad_request) { _nomad_state = NomadState::IDLE; _nomad_mailbox.seal(); @@ -1646,15 +1646,19 @@ void UIManager::on_nomad_response(const RequestReceipt& receipt) { } void UIManager::on_nomad_failed(const RequestReceipt& receipt) { - if (s_nomad_instance) s_nomad_instance->_nomad_mailbox.publish_failed(token(receipt.request_id())); + if (!s_nomad_instance) return; + if (receipt.response_size() > NomadNet::AsyncMailbox::MAX_WIRE_BYTES) { + s_nomad_instance->_nomad_mailbox.publish_progress( + token(receipt.request_id()), NomadNet::AsyncMailbox::MAX_WIRE_BYTES + 1); + return; + } + s_nomad_instance->_nomad_mailbox.publish_failed(token(receipt.request_id())); } void UIManager::on_nomad_progress(const RequestReceipt& receipt) { if (!s_nomad_instance) return; - // DEPENDENCY HARDENING GAP: pinned microReticulum accepts/accumulates a - // Resource before this application progress callback. We reject as soon as - // response_transfer_size() is exposed, but true pre-allocation admission - // control remains dependency-level; physical large-Resource validation is pending. + // Retain an aggregate transfer guard for split responses in addition to + // microReticulum's pre-allocation advertised decompressed-size limit. const std::size_t transfer = receipt.response_transfer_size(); s_nomad_instance->_nomad_mailbox.publish_progress(token(receipt.request_id()), transfer); if (transfer > NomadNet::AsyncMailbox::MAX_WIRE_BYTES) { diff --git a/platformio.ini b/platformio.ini index 0e110445..177af3ed 100644 --- a/platformio.ini +++ b/platformio.ini @@ -95,9 +95,9 @@ lib_deps = ; (_path_table) unpopulated. When bumping past upstream finishing that migration ; (_path_table removed / a for_each API added), DELETE the mirror — see the long ; comment at the _path_table mirror in Transport::inbound for details. - ; 1bbd422: initializes persistent path storage for endpoint-only clients too. - ; Path discovery therefore remains usable without enabling transport forwarding. - https://github.com/torlando-tech/microReticulum.git#1bbd422a3b25b4a710642fc5cd01039e5774a4a7 + ; 6ac0d32: initializes endpoint path storage and bounds request responses, + ; including Resource advertisements and streaming bzip2 decompression. + https://github.com/torlando-tech/microReticulum.git#6ac0d3232cf705d538f9c556f0f82d2d2cc753bc ; microLXMF: chore/microreticulum-0.4.1-layout — includes namespaced to ; for the 0.4.x src/microReticulum/ layout. ; 3cdde79: faster load_message_metadata — single LittleFS open (read_file diff --git a/tests/build_scripts/test_release_build_contract.py b/tests/build_scripts/test_release_build_contract.py index 09bea38c..de740d82 100644 --- a/tests/build_scripts/test_release_build_contract.py +++ b/tests/build_scripts/test_release_build_contract.py @@ -3,7 +3,7 @@ from pathlib import Path ROOT = Path(__file__).resolve().parents[2] MICROSTORE_PIN = "https://github.com/attermann/microStore.git#c5fb69d68229e684c7fbd17692a67ae8193b84e2" -MICRORETICULUM_PIN = "https://github.com/torlando-tech/microReticulum.git#1bbd422a3b25b4a710642fc5cd01039e5774a4a7" +MICRORETICULUM_PIN = "https://github.com/torlando-tech/microReticulum.git#6ac0d3232cf705d538f9c556f0f82d2d2cc753bc" def test_microstore_pin_resolves_before_transitive_registry_requirement(): diff --git a/tests/native/test_app_launcher_nomadnet.py b/tests/native/test_app_launcher_nomadnet.py index b695be6d..bfd90d7c 100644 --- a/tests/native/test_app_launcher_nomadnet.py +++ b/tests/native/test_app_launcher_nomadnet.py @@ -74,8 +74,16 @@ def test_ui_wiring_contract(): assert "Identity::recall" in manager_cpp assert "Transport::request_path" in manager_cpp assert "no_form_request_data" in manager_cpp + request_start = manager_cpp.index("void UIManager::nomad_send_request()") + request = manager_cpp[request_start:manager_cpp.index("void UIManager::nomad_update()", request_start)] + assert "30.0, NomadNet::AsyncMailbox::MAX_WIRE_BYTES" in request + failed = manager_cpp[manager_cpp.index("void UIManager::on_nomad_failed"): + manager_cpp.index("void UIManager::on_nomad_progress")] + assert "receipt.response_size()" in failed + assert "NomadNet::AsyncMailbox::MAX_WIRE_BYTES + 1" in failed + assert "publish_progress" in failed assert "response_transfer_size()" in manager_cpp - assert "DEPENDENCY HARDENING GAP" in manager_cpp + assert "DEPENDENCY HARDENING GAP" not in manager_cpp assert "lv_obj_set_scroll_dir" in browser_cpp assert "lv_textarea_set_max_length" in browser_cpp assert "set_link_callback" in manager_cpp diff --git a/tools/audit_release_build.py b/tools/audit_release_build.py index 50bf9e3b..8659cf34 100644 --- a/tools/audit_release_build.py +++ b/tools/audit_release_build.py @@ -40,7 +40,7 @@ EXCLUDED_SYMBOLS = ( "BootProfiler::", ) PINNED_DEPENDENCIES = { - "microReticulum": "1bbd422a3b25b4a710642fc5cd01039e5774a4a7", + "microReticulum": "6ac0d3232cf705d538f9c556f0f82d2d2cc753bc", "microLXMF": "d9bbc04cf69bfa9b555c3f293b89b440b4820518", "microStore": "c5fb69d68229e684c7fbd17692a67ae8193b84e2", }