Skip to content

Comments

fix(sync): stabilize token refresh and account merge#26

Closed
kfiramar wants to merge 1 commit intotickernelz:masterfrom
kfiramar:split11/sync-token-health
Closed

fix(sync): stabilize token refresh and account merge#26
kfiramar wants to merge 1 commit intotickernelz:masterfrom
kfiramar:split11/sync-token-health

Conversation

@kfiramar
Copy link
Contributor

@kfiramar kfiramar commented Feb 3, 2026

Context

Account rotation depends on durable token persistence and correct merging of account state between runtime and sqlite.

Problem

Sync and persistence issues can keep the plugin stuck with stale/invalid tokens and prevent recovery after tokens change.

Scope

  • Sync/token/storage/merge behavior only.
  • No request payload shape changes.
  • No region validation changes.

Changes

  • src/plugin/storage/sqlite.ts: allow updating tokens by changing upsert conflict behavior.
  • src/plugin/storage/locked-operations.ts: allow recovery when token/credentials change.
  • src/plugin/token.ts: improve refresh behavior.
  • src/plugin/sync/kiro-cli.ts + src/plugin/sync/idc-region.ts: better sync support for IDC.
  • src/core/request/*: align retry/error behavior with the improved token lifecycle.

How To Verify

  • bun install
  • bun run typecheck
  • bun run build

Risk / Rollback

  • Moderate (persistence semantics). Revert commit to rollback.

@kfiramar kfiramar force-pushed the split11/sync-token-health branch from 4a3462e to 08da21a Compare February 3, 2026 19:48
@kfiramar kfiramar force-pushed the split11/sync-token-health branch from 08da21a to 19364ae Compare February 3, 2026 19:58
@tickernelz tickernelz closed this Feb 4, 2026
@kfiramar
Copy link
Contributor Author

kfiramar commented Feb 4, 2026

Damn, you have "open source" project, you ASK to break down PRs (like you're interested in improving your code).
And then just close what you asked for without a comment.

Very cool of you.

@tickernelz
Copy link
Owner

already did in #39

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.

2 participants