Skip to content

Don't report a vault backup as failed when another tab switched account - #1950

Closed
joepio wants to merge 1 commit into
developfrom
claude/project-thread-u8vgm0-vault-switch-quiet
Closed

joepio wants to merge 1 commit into
developfrom
claude/project-thread-u8vgm0-vault-switch-quiet

Conversation

@joepio

@joepio joepio commented Oct 1, 2026

Copy link
Copy Markdown
Member

Before: signing in as a different account in one tab, while another tab had a Cloud Vault backup running, logged "[cloud-vault] backup failed Error: Cloud Vault enrollment not found" in the old tab. This turned atomic-saas main red in onboarding-existing-tab.

After: when the signed-in account no longer matches the one the pass started for, the pass ends as "skipped: backup cancelled by account change", the same as the existing 401 case. Real failures still warn.

How: ensureVaultBackupOnce's catch now checks accountChangedSince (agent changed, no account session, or portal identity no longer matches) before warning. Two unit tests: the account-switch case is quiet (it fails without the change), and an unchanged account still reports the failure.


Generated by Claude Code

A second tab signing in as a different account takes over the shared portal
cookie. A backup pass the first tab already had in flight then reaches the
control plane as that account and is told the enrollment does not exist,
which was logged as a failed backup. When the signed-in account no longer
matches the one the pass started for, it is now skipped quietly, like the
401 case.
@joepio

joepio commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

Trekmeester: included in batch #1966 (run 36898843808). It lands when that run is green; if this PR breaks something there, I take it out and say why here.

@joepio

joepio commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

Landed through batch #1966 (squash 5e189e6, green run 36970563089). Fixes made while batching are listed in #1966.

@joepio joepio closed this Oct 2, 2026
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