Skip to content

Fix Preset Data Loss in Import and Load (#429)#436

Open
google-labs-jules[bot] wants to merge 1 commit intomainfrom
fix-issue-429-preset-data-loss-2870842054987853878
Open

Fix Preset Data Loss in Import and Load (#429)#436
google-labs-jules[bot] wants to merge 1 commit intomainfrom
fix-issue-429-preset-data-loss-2870842054987853878

Conversation

@google-labs-jules
Copy link
Contributor

This PR fixes a bug where only the last preset in an imported file (or certain presets in config.ini) were being saved, leading to data loss.

Changes:

  • Core Logic: Introduced FinalizePreset in Config.cpp to unify the logic for finishing a preset parse (migration, validation, name collision handling, and pushing to the internal list).
  • Parsing Fix: Updated the loops in LoadPresets and ImportPreset to ensure FinalizePreset is called whenever a new section header is encountered or the end of the file is reached.
  • Testing: Added tests/test_issue_429_repro.cpp which covers multi-preset loading and importing scenarios.
  • Metadata: Incremented version to 0.7.209 and added detailed entry to CHANGELOG_DEV.md.

Verification:

  • All 576 tests pass on Linux (Headless).
  • Specifically verified test_issue_429_repro_load and test_issue_429_repro_import pass.
  • Verified test_executable_metadata correctly identifies version 0.7.209.

This fix ensures that user-tuned FFB settings are reliably preserved across sessions and imports.


PR created automatically by Jules for task 2870842054987853878 started by @coasting-nc

- Refactored preset finalization logic into a unified `FinalizePreset` helper.
- Updated `Config::LoadPresets` and `Config::ImportPreset` to correctly push presets at section transitions and EOF.
- Added regression tests in `tests/test_issue_429_repro.cpp`.
- Incremented version to 0.7.209 and updated CHANGELOG_DEV.md.
@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