fix(accounts): retire dynamic memory on removal - #455
Conversation
Obiente previewNC Native · Obiente updates this comment as the preview changes. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39af1ccc0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
bd62702 to
83f3347
Compare
df787cc to
e946520
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e946520e23
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02dc564d7b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6b0995a14
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 605b07b6ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } } | ||
| files.filter { cacheAccountId == null || it.name.startsWith("$cacheAccountId-") } | ||
| files.filter { | ||
| cacheAccountId == null || it.name.startsWith("$cacheAccountId-") || |
There was a problem hiding this comment.
Keep legacy recovery from clearing every account cache
When retryWithoutCredentials() handles a legacy removal journal whose previewCacheIdentity is null, it passes null here, making this predicate select every discovery file under the shared root. Removing one unavailable account therefore deletes persisted contracts for all other accounts, forcing unrelated accounts to rediscover them and potentially breaking their dynamic views while offline. Derive the removed account's current and legacy prefixes from the known account record instead of treating a missing prefix as a wildcard.
AGENTS.md reference: AGENTS.md:L410-L411
Useful? React with 👍 / 👎.
Removing an account fences its dynamic app reads and clears current and legacy discovery metadata before the same identity can be activated again. Android reopens reads before publishing new memory producers. Desktop credential-journal completion stays recoverable at every persisted clearing boundary.
Pending or unrecognized cleanup now has a separate recovery screen that preserves the saved sign-in and local files. It explains how to reopen the app for another cleanup attempt and contact support if cleanup remains blocked. Unreadable legacy Deck drafts remain preserved and keep cleanup pending until they can be safely attributed and removed.
Validation:
Stacked on #439. This changes Android and desktop account lifecycle/recovery behavior; server data and protocol contracts are unchanged. These are source and deterministic-test results, not a claim of released or live-device validation.