Skip to content

fix: persist active account state after selection#6

Open
Emilvooo wants to merge 1 commit intodkraemerwork:mainfrom
Emilvooo:fix/persist-active-account-state
Open

fix: persist active account state after selection#6
Emilvooo wants to merge 1 commit intodkraemerwork:mainfrom
Emilvooo:fix/persist-active-account-state

Conversation

@Emilvooo
Copy link
Copy Markdown

Summary

  • persist activeAccountIndex and roundRobinCursor whenever account selection changes them
  • keep openai-accounts.json in sync during normal selection and exclusion-based failover
  • add coverage for live round-robin persistence and persisted failover state

Why

  • the plugin updated the active account in memory, but some selection paths did not write the new state to disk
  • that left openai-accounts.json behind the real runtime state and could make restarts resume from an outdated active account
  • keeping the persisted selection state live makes sticky, round-robin, and failover behavior easier to reason about

Testing

  • npm run typecheck
  • npm test
  • npm run build

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