Fix user presets deletion on auto-save (Issue #371)#387
Fix user presets deletion on auto-save (Issue #371)#387google-labs-jules[bot] wants to merge 1 commit intomainfrom
Conversation
- Eliminate lazy loading of presets library - Ensure presets are loaded during application startup in Config::Load - Add g_engine_mutex protection to Config::LoadPresets for thread safety - Add regression test for early-save preset persistence - Update version to 0.7.192 and update changelog
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This submission resolves Issue #371 where imported or user-created profiles were being deleted from the configuration file if an auto-save event occurred before the Tuning GUI was opened.
The root cause was "lazy loading" of the presets library. Moving preset loading into the central
Config::Loadfunction ensures the in-memory library is always synchronized with the disk before any save operation.Key changes:
Config::LoadPresetsto accept an optional filename and added thread-safe protection usingg_engine_mutex.Config::Loadto triggerLoadPresetsduring initialization.tests/test_issue_371_repro.cpp.Safety Impact:
Improves configuration reliability and prevents data loss. Thread safety for the shared presets vector is now strictly enforced using recursive mutex protection.
Linux Verification:
Verified on Linux using the automated test suite (537 test cases, 2213 assertions passed).
PR created automatically by Jules for task 6219559773324596885 started by @coasting-nc