Fix Preset Data Loss in Import and Load (#429)#436
Fix Preset Data Loss in Import and Load (#429)#436google-labs-jules[bot] wants to merge 1 commit intomainfrom
Conversation
- 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.
|
👋 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 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:
FinalizePresetinConfig.cppto unify the logic for finishing a preset parse (migration, validation, name collision handling, and pushing to the internal list).LoadPresetsandImportPresetto ensureFinalizePresetis called whenever a new section header is encountered or the end of the file is reached.tests/test_issue_429_repro.cppwhich covers multi-preset loading and importing scenarios.0.7.209and added detailed entry toCHANGELOG_DEV.md.Verification:
test_issue_429_repro_loadandtest_issue_429_repro_importpass.test_executable_metadatacorrectly identifies version0.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