fix(phone-api): forward-port manifest-scan skip + bounded getFiles (#10754, #10757) to develop#10778
Merged
Merged
Conversation
… getFiles Forward-port of #10754 and #10757 from master (2.7) into develop, so the develop->master 2.8 promotion (#10777) doesn't drop them. #10754: PhoneAPI no longer walks the filesystem to build the file manifest on node-info-only config requests (SPECIAL_NONCE_ONLY_NODES), which never consume it. getFiles() is now bounded (default 64 entries, depth 3) via collectFiles(), takes an optional wasLimited out-param, and reserves capacity with a bad_alloc/ length_error fallback. The manifest vector is freed via swap (releaseFilesManifest). #10757: getFiles()/collectFiles() now guard against empty file names returned by the Adafruit LittleFS nRF52 glue (issue 4395). Ported by hand rather than cherry-picked: master had reflowed FSCommon.cpp to a different brace style (every line conflicted), #10754 already subsumes #10757, and develop carries a MESHTASTIC_EXCLUDE_FILES_MANIFEST path (nRF54L15) that master lacks. The exclude path is preserved and now also short-circuits + frees the manifest. Verified: native Docker suite 448/448, clang-format clean.
Contributor
⚡ Try this PR in the Web FlasherNote Building this pull request… the flash button, badges and supported-board |
Contributor
Firmware Size Report22 targets | vs
Show 17 more target(s)
Updated for 17b0f7e |
raghumad
pushed a commit
to raghumad/mezulla-firmware
that referenced
this pull request
Jun 25, 2026
… getFiles (meshtastic#10778) Forward-port of meshtastic#10754 and meshtastic#10757 from master (2.7) into develop, so the develop->master 2.8 promotion (meshtastic#10777) doesn't drop them. meshtastic#10754: PhoneAPI no longer walks the filesystem to build the file manifest on node-info-only config requests (SPECIAL_NONCE_ONLY_NODES), which never consume it. getFiles() is now bounded (default 64 entries, depth 3) via collectFiles(), takes an optional wasLimited out-param, and reserves capacity with a bad_alloc/ length_error fallback. The manifest vector is freed via swap (releaseFilesManifest). meshtastic#10757: getFiles()/collectFiles() now guard against empty file names returned by the Adafruit LittleFS nRF52 glue (issue 4395). Ported by hand rather than cherry-picked: master had reflowed FSCommon.cpp to a different brace style (every line conflicted), meshtastic#10754 already subsumes meshtastic#10757, and develop carries a MESHTASTIC_EXCLUDE_FILES_MANIFEST path (nRF54L15) that master lacks. The exclude path is preserved and now also short-circuits + frees the manifest. Verified: native Docker suite 448/448, clang-format clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Forward-ports two master (2.7) maintenance fixes into
developso the develop → master 2.8 promotion (#10777) doesn't silently drop them. Both are absent from develop (no patch-equivalent), and a mechanical cherry-pick is impossible — master reflowedFSCommon.cppto a different brace style, so every line conflicts.#10754 — skip manifest scan for node-info-only config requests
PhoneAPI::handleStartConfig()no longer does the recursive FS walk forSPECIAL_NONCE_ONLY_NODESrequests, which short-circuit tosendConfigComplete()and never read the manifest.getFiles()is now bounded: default 64 entries / depth 3, via a new internalcollectFiles(), with an optionalwasLimitedout-param and abad_alloc/length_errorreserve fallback.releaseFilesManifest) instead ofclear()/shrink_to_fit().#10757 — nRF52 LittleFS empty-name guard
collectFiles()guards thewhile (file && file.name()[0])loop against empty names from the Adafruit LittleFS nRF52 glue (issue 4395). fix(phone-api): skip manifest scan for node-info-only config requests #10754 already subsumes this, so it lands as one change.Notes for reviewers
getFiles/collectFiles/helper bodies are taken verbatim from master's post-fix(phone-api): skip manifest scan for node-info-only config requests #10754 state (already CI-validated); only the surrounding integration is adapted to develop.MESHTASTIC_EXCLUDE_FILES_MANIFESTpath is preserved (nRF54L15 / no-OTA platforms). Master lacks it; a blind cherry-pick would have clobbered it. That path now also frees the manifest viareleaseFilesManifest.Verification
clang-format(trunk 16.0.3,.trunk/configs/.clang-format): clean.