[master] Make host file helpers report failure instead of silently patching - #4320
Merged
patrickelectric merged 6 commits intoAug 27, 2026
Conversation
load_file treated a failed cat as an empty file, locate_file never returned None, and save_file ignored a failed upload. A read-only boot partition or a missing file then looked like a successful patch.
…missing revert_update_dwc2 and clean_config_pi3 walked cmdline.txt / config.txt without the None guard the other boot patches already use.
load_file now raises, so a down SSH used to crash wifi can_work instead of selecting NetworkManager the way an empty os-release used to.
On Bullseye, find errors on /boot/firmware/config.txt then still prints /boot/config.txt. A returncode check would drop that path with green tests.
…r patch fails A HostFileError from cgroups aborted the listcomp, so a startup.json rewrite that already returned True never got its reboot.
…eye on read failure load_file now raises when /etc/os-release cannot be read over SSH. Treat that like the old empty string so serial enumeration keeps working.
joaoantoniocardoso
marked this pull request as ready for review
August 27, 2026 02:46
Automated PR Review0. Summary
Introduces 1. Correctness & Implementation Bugs
6. Code Quality & Style
7. Tests
Generated by PR Review Bot. This is advisory, a human reviewer must still approve. |
patrickelectric
approved these changes
Aug 27, 2026
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.
Port of #4242 into
master.Fix #4235.