Repository navigation
fix: retain failed settings writes for retry and report the failure (#118) - #120
Merged
Merged
Conversation
Three consecutive rounds (2026-11-09, runs 42633360846 r1-3) had all four macOS legs cancelled simultaneously ~15 minutes in — no failure, logs expired with the cancellation, fail-fast is false, timeout is 30m. macos-latest is mid-roll and whatever it resolves to today kills these jobs; macos-15 is the known-good image (GTK's macos-latest matrix is unaffected, so this is image x job-shape specific — gcc-on-macOS legs are the usual suspect). Unpin after the image generation settles. Signed-off-by: will wade <willwade@gmail.com>
Signed-off-by: will wade <willwade@gmail.com>
…ll 13 required green on head) Signed-off-by: will wade <willwade@gmail.com>
…118) XmlSettingsStore::Save() cleared modified_ before doc.save_file(), so a failed write (unwritable destination, full disk) silently dropped every pending change: the next Save() returned success without retrying them, and neither SaveIfNeeded() nor dasher_save_settings() surfaced anything. - modified_ now clears only after a successful write; a failed write keeps the store dirty so any later save retries the changes - failures are reported once per failure episode through the existing message mechanism (non-modal FormatInfoMessage -> message callback + log callback); the store gets a SetMessageDisplay() because the C API builds it before the interface exists - the flag pair also reconciles after a successful dasher_reload_settings re-parse (reload chooses the file over memory; the episode is over) - detach-first at every interface delete site (create catch handlers, failed-Realize recovery, dasher_destroy) so the store never points at a dead interface - regression test follows the issue recipe: save -> make destination unwritable -> change parameter -> save (fails, reported, exactly once, non-modal) -> restore -> save with no further change persists the value; a second failure episode must report again Signed-off-by: will wade <willwade@gmail.com>
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.
Summary
XmlSettingsStore::Save()clearedmodified_beforedoc.save_file(), so a failed write (unwritable destination, full disk) silently dropped every pending change — a laterSave()returned success without ever retrying them, and neitherSaveIfNeeded()nordasher_save_settings()surfaced anything.modified_now clears only after a successful write; a failed write keeps the store dirty so any later save retries the changes — no parameter change needed to retry.FormatInfoMessage→ message callback + log callback), so frontends can explain why settings can't be saved. The store gets aSetMessageDisplay()because the C API builds it before the interface exists.dasher_reload_settingsre-parse (reload chooses the file over memory; the episode is over; the file is not normalized until the next real change — self-healing, documented in-code).dasher_createcatch handlers, failed-Realize recovery,dasher_destroy) so the store never points at a dead interface.dasher_save_settingsstaysvoid— no observable-return change, so noDASHER_CAPI_VERSIONbump per the header's own policy.Regression test
Follows the issue recipe exactly: save → make destination unwritable (file replaced by a directory — fails even as root) → change a persistent parameter → save fails and is reported exactly once, non-modal (
DASHER_MESSAGE_INFO) → restore → save with no further change persists the value → verified by reload. A second failure episode must report again (pins the latch reset — mutation-tested). Verified the test fails against the old behavior at both the message and the retry assertions.Validation
-WerrorFixes #118