Skip to content

Match recovery backups saved under the legacy did:ad: agent spelling - #1664

Merged
joepio merged 1 commit into
developfrom
claude/project-thread-s46c7u
Sep 23, 2026
Merged

joepio merged 1 commit into
developfrom
claude/project-thread-s46c7u

Conversation

@claude

@claude claude Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Before: an account whose encrypted recovery backup was saved before the did:ad: → atomic: rename could not add or unify a passkey. The app compared the backup's did:ad:agent:… subject to the signed-in atomic:agent:… agent as plain strings, decided the backup belonged to another account, and threw "Sign in to the account holding this backup". The offline cache lookup missed the entry the same way.

After: those comparisons go through canonicalIdentifier, so both spellings of one agent match.

How: a small sameAgent helper in helpers/managed/recovery.ts replaces the seven agent_subject string comparisons. A test in recovery-fetch.test.ts fetches a did:ad: backup and looks it up with the atomic: subject; it fails without the change.

The error new sign-ups see ("agent_subject must be a did:ad:agent subject") is the control plane's validator and is fixed separately in atomic-saas.


Generated by Claude Code

Backups written before the atomic: rename store agent_subject as
did:ad:agent:..., while the signed-in agent is now atomic:agent:....
The strict string comparisons made the server copy look like another
account's, so adding or unifying a passkey threw "Sign in to the account
holding this backup" and the cache fallback missed the entry.
@claude claude Bot assigned joepio Sep 23, 2026
@joepio
joepio merged commit 7602440 into develop Sep 23, 2026
1 check passed
@joepio
joepio deleted the claude/project-thread-s46c7u branch September 23, 2026 15:49
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