Skip to content

fix(phone-api): forward-port manifest-scan skip + bounded getFiles (#10754, #10757) to develop#10778

Merged
thebentern merged 1 commit into
developfrom
forward-port/fscommon-phoneapi-hotfixes
Jun 24, 2026
Merged

fix(phone-api): forward-port manifest-scan skip + bounded getFiles (#10754, #10757) to develop#10778
thebentern merged 1 commit into
developfrom
forward-port/fscommon-phoneapi-hotfixes

Conversation

@thebentern

Copy link
Copy Markdown
Contributor

What

Forward-ports two master (2.7) maintenance fixes into develop so 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 reflowed FSCommon.cpp to 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 for SPECIAL_NONCE_ONLY_NODES requests, which short-circuit to sendConfigComplete() and never read the manifest.
  • getFiles() is now bounded: default 64 entries / depth 3, via a new internal collectFiles(), with an optional wasLimited out-param and a bad_alloc/length_error reserve fallback.
  • The manifest vector is freed via swap (releaseFilesManifest) instead of clear()/shrink_to_fit().

#10757 — nRF52 LittleFS empty-name guard

Notes for reviewers

  • Ported by hand, not cherry-picked. The 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.
  • develop-only MESHTASTIC_EXCLUDE_FILES_MANIFEST path is preserved (nRF54L15 / no-OTA platforms). Master lacks it; a blind cherry-pick would have clobbered it. That path now also frees the manifest via releaseFilesManifest.

Verification

  • Native Docker suite: 448/448 passed.
  • clang-format (trunk 16.0.3, .trunk/configs/.clang-format): clean.
  • Full hardware matrix left to CI.

… 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.
@github-actions

Copy link
Copy Markdown
Contributor

⚡ Try this PR in the Web Flasher

Note

Building this pull request… the flash button, badges and supported-board
list will appear here automatically once CI finishes.

@github-actions github-actions Bot added needs-review Needs human review bugfix Pull request that fixes bugs labels Jun 24, 2026
@thebentern thebentern merged commit b93239b into develop Jun 24, 2026
79 of 80 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Firmware Size Report

22 targets | vs develop: 8 increased, 13 decreased, net -940

Target Size vs develop
wio-e5 234,220 📉 -240
pico2 762,648 📉 -144
rak3172 181,968 📉 -140
seeed_xiao_rp2350 760,800 📉 -136
picow 1,237,112 📈 +112
Show 17 more target(s)
Target Size vs develop
station-g2 2,258,080 📉 -112
station-g3 2,258,096 📉 -112
pico 775,176 📉 -88
rak11310 798,080 📉 -88
seeed_xiao_rp2040 773,376 📉 -88
pico2w 1,213,148 📈 +80
t-deck-tft 3,803,088 📉 -80
elecrow-adv-35-tft 3,407,056 📉 -32
heltec-ht62-esp32c3-sx1262 2,126,176 📈 +32
heltec-v4 2,267,648 📈 +32
heltec-vision-master-e213-inkhud 2,216,160 📈 +32
rak3312 2,263,936 📈 +32
heltec-v3 2,255,232 📈 +16
rak11200 1,851,968 📉 -16
seeed-xiao-s3 2,267,728 📉 -16
tlora-c6 2,359,568 📈 +16
t-eth-elite 2,481,888 0

Updated for 17b0f7e

@thebentern thebentern deleted the forward-port/fscommon-phoneapi-hotfixes branch June 24, 2026 20:58
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant