fix(firmware): distinguish write rejection from session wedge - #116
Merged
Merged
Conversation
A storage_write that is rejected on every attempt never lands the data, yet _push_file exited via the generic wedge message advising a reconnect to clear it - wrong guidance, since the data never transferred. Track whether any write succeeded and raise a write-specific error when none did, pointing at free space / mount state instead of a reconnect. Closes #109 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closed
6 tasks
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.
Follow-up from review of #105.
In
_push_file, astorage_writethat returnsFalseon every attempt never lands the data, yet the function exited via the generic wedge message ("device RPC session stopped responding ... a transport reconnect clears the wedge"). For a pure write rejection that guidance is wrong — the data never reached the device, so reconnecting will not help.Track whether any write succeeded (
ever_written) and, when none did, raise a write-specific error pointing at free space / mount state. The corrupt-transfer (mismatch) and wedge (unreadable) paths are unchanged. Flash still fails closed before reboot in every case.Added
test_push_file_reports_write_rejection_distinctly_from_wedge; full installer suite 21 passed,ty+ruffclean.Closes #109
🤖 Generated with Claude Code
Supersedes #113 (rebased onto phase1; branch protection requires up-to-date branches and force-push is blocked locally).