Skip to content

Fix user presets deletion on auto-save (Issue #371)#387

Open
google-labs-jules[bot] wants to merge 1 commit intomainfrom
fix-issue-371-presets-deletion-6219559773324596885
Open

Fix user presets deletion on auto-save (Issue #371)#387
google-labs-jules[bot] wants to merge 1 commit intomainfrom
fix-issue-371-presets-deletion-6219559773324596885

Conversation

@google-labs-jules
Copy link
Contributor

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::Load function ensures the in-memory library is always synchronized with the disk before any save operation.

Key changes:

  • Modified Config::LoadPresets to accept an optional filename and added thread-safe protection using g_engine_mutex.
  • Updated Config::Load to trigger LoadPresets during initialization.
  • Added a regression test tests/test_issue_371_repro.cpp.
  • Updated VERSION to 0.7.192 and updated CHANGELOG_DEV.md.

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

- 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
@google-labs-jules
Copy link
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions
Copy link
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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.

1 participant