Skip to content

Fix Wi-Fi startup rollback after clean USB installs - #57

Merged
EdwardChamberlain merged 1 commit into
mainfrom
fix/issue-56-boot-memory
Oct 29, 2026
Merged

EdwardChamberlain merged 1 commit into
mainfrom
fix/issue-56-boot-memory

Conversation

@EdwardChamberlain

Copy link
Copy Markdown
Owner

Clean USB installs can reset during Wi-Fi initialization because slot verification leaves temporary file buffers uncollected before importing app_main. Call gc.collect() immediately after successful verification to reclaim those allocations before application startup.

Regression coverage checks verification, collection, and application startup order for a clean bootstrap, an OTA candidate in slot B, and a confirmed slot. It also checks boot confirmation and rejection/rollback of a corrupt candidate.

Validation:

  • 159 tests passed; branch coverage is 77.8% and all per-file coverage gates pass.
  • Full flake8, Python syntax checks, and git diff --check pass.
  • Wheel and source distribution builds and installed-resource smoke tests pass; packaged loaders match the fixed source.
  • OTA bundle validates at 86,938 bytes, below the 96 KiB limit.

The loader is outside OTA application slots, so existing boards need a clean USB reinstall to receive this fix. ESP32-C3 hardware validation was not repeated.

Closes #56

@EdwardChamberlain
EdwardChamberlain merged commit a00c214 into main Oct 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Clean Install Rolls back after WiFi initialisation failure

1 participant