Local AI connect rollback: commit on success so overlapping attempts restore the last verified settings (follow-up to #8205)
Follow-up from #8205 (CodeRabbit thread on overlapping connect attempts).
With #8205, a local AI connect that fails its check rolls back to the settings saved before the attempt. One case it doesn't cover: the user leaves the panel mid-check, starts a second attempt, and both checks fail. The rollback then restores the first attempt's settings, which were never verified, instead of the last verified ones.
The core can't tell those cases apart today, because a successful check never reports back to it. Chaining the older prior through instead would undo a verified save whenever the first attempt succeeds and the second fails.
Proposal: a "commit on success" step.
- After a connection check passes, the screen calls the core to mark the checkpoint verified.
- Rollback restores the last verified state.
Out of scope on purpose: keeping the checkpoint across a core restart. That would mean storing a second copy of the previous key outside the encrypted secrets.
Rollback after overlapping failed local AI connect attempts restores the first attempt's unverified settings instead of the last verified ones; proposal adds a commit-on-success step to mark the checkpoint verified. Narrow edge case with a specific fix path, so p2.
Labelled priority: p2.