openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Local AI connect rollback: commit on success so overlapping attempts restore the last verified settings (follow-up to #8205)

Open M3gA-Mind opened this issue 3 weeks ago • 2 comments

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.

M3gA-Mind avatar Nov 09 '26 14:11 M3gA-Mind

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.

tinysweeper avatar Nov 09 '26 14:11 tinysweeper