Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update terminology (#2159)
Leendert de Borst2abf86111c53
diff --git a/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts b/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.tsindex 69609e721..c804b0edd 100644--- a/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts+++ b/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts@@ -60,7 +60,7 @@ import { storage } from '#imports';* Cache Strategy:* - Local mutations (createCredential, etc.): Work directly on cachedSqliteClient, no cache clearing* - New vault from remote (login, sync): Clear cache by setting both to null, WITHOUT closing: an in-flight- * flow (e.g. a push holding the client across an HTTP await, or persistLocalVaultMutation re-adopting the+ * flow (e.g. a push holding the client across an HTTP await, or persistLocalVaultMutation reusing the* client it just stored) may legitimately still use the detached instance.* - Lock/logout/clear vault: clearInMemoryVaultState().*/diff --git a/apps/browser-extension/src/entrypoints/popup/context/NavigationContext.tsx b/apps/browser-extension/src/entrypoints/popup/context/NavigationContext.tsxindex edf704595..82088a9c7 100644--- a/apps/browser-extension/src/entrypoints/popup/context/NavigationContext.tsx+++ b/apps/browser-extension/src/entrypoints/popup/context/NavigationContext.tsx@@ -39,7 +39,7 @@ export const NavigationProvider: React.FC<{ children: React.ReactNode }> = ({ chconst requiresAuth = isFullyInitialized && (!isLoggedIn || !dbAvailable);/**- * Adopt a restored navigation stack so it keeps growing from where the previous popup left off.+ * Restore a navigation stack so it keeps growing from where the previous popup left off.* @param entries - The restored entries, oldest first*/const seedStack = useCallback((entries: NavigationHistoryEntry[]): void => {diff --git a/apps/browser-extension/src/utils/NavigationStack.ts b/apps/browser-extension/src/utils/NavigationStack.tsindex c429f4bf4..e9d495dca 100644--- a/apps/browser-extension/src/utils/NavigationStack.ts+++ b/apps/browser-extension/src/utils/NavigationStack.ts@@ -34,7 +34,7 @@ const isSamePage = (a: NavigationHistoryEntry | null | undefined, b: NavigationHexport const createNavigationStack = (): NavigationStackState => ({ stack: [], replay: null, replayCursor: 0 });/**- * Adopt a restored trail so the stack keeps growing from where the previous popup left off.+ * Restore a trail so the stack keeps growing from where the previous popup left off.* @param entries - The restored entries, oldest first*/export const seedNavigationStack = (entries: NavigationHistoryEntry[]): NavigationStackState => {diff --git a/apps/browser-extension/src/utils/formDetector/__tests__/FormDetector.clickjacking.test.ts b/apps/browser-extension/src/utils/formDetector/__tests__/FormDetector.clickjacking.test.tsindex 4fdd54060..b3924eb2e 100644--- a/apps/browser-extension/src/utils/formDetector/__tests__/FormDetector.clickjacking.test.ts+++ b/apps/browser-extension/src/utils/formDetector/__tests__/FormDetector.clickjacking.test.ts@@ -34,7 +34,7 @@ describe('FormDetector - Clickjacking Protection', () => {// User clicks, but actually focuses the hidden field (clickjacking)const formDetector = new FormDetector(document, hiddenEmailField);- // Should NOT detect form because clicked element is invisible+ // Should not detect form because clicked element is invisibleexpect(formDetector.containsLoginForm()).toBe(false);});@@ -119,7 +119,7 @@ describe('FormDetector - Clickjacking Protection', () => {// Email field is visible (opacity: 1) when clickedconst formDetector = new FormDetector(document, emailField);- // Should detect form because clicked element IS visible+ // Should detect form because clicked element is visibleexpect(formDetector.containsLoginForm()).toBe(true);});@@ -151,7 +151,7 @@ describe('FormDetector - Clickjacking Protection', () => {});it('should REJECT opacity:0 field WITHOUT transition (pure clickjacking)', () => {- // Attacker's form: opacity:0 but NO transition (permanent invisibility)+ // Attacker's form: opacity:0 but no transition (permanent invisibility)const document = createDocument(`<form><inputdiff --git a/apps/browser-extension/src/utils/formDetector/__tests__/FormDetector.totp.test.ts b/apps/browser-extension/src/utils/formDetector/__tests__/FormDetector.totp.test.tsindex 031d38e00..d580ec34b 100644--- a/apps/browser-extension/src/utils/formDetector/__tests__/FormDetector.totp.test.ts+++ b/apps/browser-extension/src/utils/formDetector/__tests__/FormDetector.totp.test.ts@@ -278,7 +278,7 @@ describe('FormDetector TOTP tests', () => {const formDetector = new FormDetector(document, focusedElement);const result = formDetector.getForm();- // The form should NOT be detected as TOTP because it's a Dutch email verification form+ // The form should not be detected as TOTP because it's a Dutch email verification formexpect(result?.totpField).toBeNull();});diff --git a/apps/browser-extension/src/utils/passkey/__tests__/AliasVaultPasskeyProvider.test.ts b/apps/browser-extension/src/utils/passkey/__tests__/AliasVaultPasskeyProvider.test.tsindex f0def723b..828ba324e 100644--- a/apps/browser-extension/src/utils/passkey/__tests__/AliasVaultPasskeyProvider.test.ts+++ b/apps/browser-extension/src/utils/passkey/__tests__/AliasVaultPasskeyProvider.test.ts@@ -496,7 +496,7 @@ describe('PasskeyAuthenticator', () => {expect(flags & 0x08).toBe(0x08); // Backup Eligibleexpect(flags & 0x10).toBe(0x10); // Backup State- // Should NOT have AT (0x40) set (attested credential data only in creation)+ // Should not have AT (0x40) set (attested credential data only in creation)expect(flags & 0x40).toBe(0x00);// Sign count should be 0 (bytes 33-36)@@ -713,7 +713,7 @@ describe('PasskeyAuthenticator', () => {const authDataBytes = Uint8Array.from(fromBase64url(assertion.authenticatorData), c => c.charCodeAt(0));const flags = authDataBytes[32];- // Should NOT have BE (0x08) or BS (0x10) set+ // Should not have BE (0x08) or BS (0x10) setexpect(flags & 0x08).toBe(0x00);expect(flags & 0x10).toBe(0x00);diff --git a/apps/browser-extension/tests/e2e/05-vault-merge.spec.ts b/apps/browser-extension/tests/e2e/05-vault-merge.spec.tsindex 05348ff9a..ad64ae626 100644--- a/apps/browser-extension/tests/e2e/05-vault-merge.spec.ts+++ b/apps/browser-extension/tests/e2e/05-vault-merge.spec.ts@@ -31,7 +31,7 @@ test.describe.serial('5. Vault Merge', () => {clientB = await TestClient.create();await clientB.login(apiUrl, testUser.username, testUser.password);- // Navigate BOTH clients to the add credential form NOW, before either makes changes.+ // Navigate both clients to the add credential form now, before either makes changes.// This ensures both have the same vault revision (empty vault, revision 1).await clientA.goToVault().then((c) => c.openAddCredentialForm());await clientB.goToVault().then((c) => c.openAddCredentialForm());diff --git a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSync.kt b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSync.ktindex 4b7bad5b3..f3cccce9c 100644--- a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSync.kt+++ b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSync.kt@@ -8,7 +8,7 @@ import org.json.JSONArrayimport org.json.JSONObject/**- * The vault sync wrapper: one method per engine operation, adoption of what the engine reported, and the mapping of+ * The vault sync wrapper: one method per engine operation, persisting what the engine reported, and the mapping of* its failures into the native error. The driver below it is VaultSyncEngine, which turns the Rust engine's* commands into host actions.*@@ -168,7 +168,7 @@ class VaultSync(}/**- * Run one engine operation and adopt what it reported. A driver failure surfaces as the native error.+ * Run one engine operation and persist what it reported. A driver failure surfaces as the native error.*/@Suppress("TooGenericExceptionCaught")private suspend fun run(operation: String, webApiService: WebApiService, encryptionKey: String? = null, sharing: JSONObject? = null): JSONObject {@@ -177,7 +177,7 @@ class VaultSync(} catch (e: Exception) {throw driverError(e)}- adoptSyncResult(result)+ persistSyncResult(result)return result}@@ -185,7 +185,7 @@ class VaultSync(* Persist what the engine reported: server version and capabilities, offline mode, session values it changed,* and the email routing a pulled vault came with.*/- private fun adoptSyncResult(result: JSONObject) {+ private fun persistSyncResult(result: JSONObject) {result.optString("serverVersion").takeIf { it.isNotEmpty() }?.let { vaultStore.metadata.setServerVersion(it) }result.optJSONObject("capabilities")?.let { vaultStore.metadata.setCapabilities(it.toString()) }if (result.has("isOfflineMode")) {diff --git a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/repositories/PasskeyRepository.kt b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/repositories/PasskeyRepository.ktindex 558284b63..a388556b5 100644--- a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/repositories/PasskeyRepository.kt+++ b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/repositories/PasskeyRepository.kt@@ -448,14 +448,14 @@ class PasskeyRepository(database: VaultDatabase) : BaseRepository(database) {* The logo an item should point at, following ItemRepository.ts resolveLogoId without an explicit selection:* a logo the user chose earlier (built-in or uploaded) is kept; a favicon the item already has for this* domain is kept; fresh bytes create or refresh this domain's favicon row in the item's manifest; otherwise- * the favicon this domain already has anywhere in the vault is adopted, or none at all.+ * the favicon this domain already has anywhere in the vault is reused, or none at all.** @return The logo id, or null when the item should keep what it has (update) or get none (create)*/private fun resolveLogoId(scope: String, existingLogoId: String?, url: String, logo: ByteArray?, timestamp: String): String? {val existing = existingLogoId?.let { getLogoById(it) }if (existing != null && existing.kind != LOGO_KIND_FAVICON) {- return adoptIntoScope(scope, existing.kind, existing.source, timestamp)+ return ensureInScope(scope, existing.kind, existing.source, timestamp)}// Without a domain there is no natural key to store a favicon under.@@ -465,14 +465,14 @@ class PasskeyRepository(database: VaultDatabase) : BaseRepository(database) {}if (existing != null && existing.source == source) {- return adoptIntoScope(scope, LOGO_KIND_FAVICON, source, timestamp)+ return ensureInScope(scope, LOGO_KIND_FAVICON, source, timestamp)}if (logo != null && logo.isNotEmpty()) {return upsertLogo(scope, LOGO_KIND_FAVICON, source, logo, FAVICON_MIME_TYPE, null, timestamp)}- return adoptIntoScope(scope, LOGO_KIND_FAVICON, source, timestamp)+ return ensureInScope(scope, LOGO_KIND_FAVICON, source, timestamp)}/**@@ -488,7 +488,7 @@ class PasskeyRepository(database: VaultDatabase) : BaseRepository(database) {* The id this logo has inside the manifest, copying it in from another manifest when it is not there yet.* Null when the vault holds no such logo at all.*/- private fun adoptIntoScope(manifestId: String, kind: String, source: String, timestamp: String): String? {+ private fun ensureInScope(manifestId: String, kind: String, source: String, timestamp: String): String? {val inScope = executeQuery(LogoQueries.GET_ID_FOR_KEY, arrayOf(manifestId, kind, source)).firstOrNull()?.get("Id") as? Stringif (inScope != null) {return inScopediff --git a/apps/mobile-app/context/AuthContext.tsx b/apps/mobile-app/context/AuthContext.tsxindex 079a5ebd0..12f04c991 100644--- a/apps/mobile-app/context/AuthContext.tsx+++ b/apps/mobile-app/context/AuthContext.tsx@@ -192,7 +192,7 @@ export const AuthProvider: React.FC<{await NativeVaultManager.clearUsername();await AsyncStorage.removeItem('username'); // TODO: Remove in 0.25.0+- // Clear ALL vault data - user explicitly chose to logout+ // Clear all vault data - user explicitly chose to logoutdbContext?.clearDatabase();setUsername(null);diff --git a/apps/mobile-app/hooks/useVaultMutate.ts b/apps/mobile-app/hooks/useVaultMutate.tsindex c26cee85a..d7bcaaf8e 100644--- a/apps/mobile-app/hooks/useVaultMutate.ts+++ b/apps/mobile-app/hooks/useVaultMutate.ts@@ -163,7 +163,7 @@ export function useVaultMutate() : {): Promise<void> => {await operation();- // Set uploading state BEFORE refreshing sync state to prevent "pending" flash+ // Set uploading state before refreshing sync state to prevent "pending" flashdbContext.setIsUploading(true);// Refresh sync state to update isDirty flagdiff --git a/apps/mobile-app/ios/AliasVaultUITests/AliasVaultUITests.swift b/apps/mobile-app/ios/AliasVaultUITests/AliasVaultUITests.swiftindex 225012bdd..8c1c76de8 100644--- a/apps/mobile-app/ios/AliasVaultUITests/AliasVaultUITests.swift+++ b/apps/mobile-app/ios/AliasVaultUITests/AliasVaultUITests.swift@@ -816,7 +816,7 @@ final class AliasVaultUITests: XCTestCase {/// Unlocks the vault if the unlock screen is displayed./// Use this after deep links or other actions that may lock the vault.- /// Unlike loginWithTestUser, this does NOT logout - it just enters the password.+ /// Unlike loginWithTestUser, this does not logout - it just enters the password./// - Parameter testUser: The test user whose password to use for unlock@MainActorprivate func unlockVaultIfNeeded(with testUser: TestUser) {diff --git a/apps/mobile-app/ios/VaultStoreKit/Database/Queries/PasskeyQueries.swift b/apps/mobile-app/ios/VaultStoreKit/Database/Queries/PasskeyQueries.swiftindex 16de67caf..727b3c236 100644--- a/apps/mobile-app/ios/VaultStoreKit/Database/Queries/PasskeyQueries.swift+++ b/apps/mobile-app/ios/VaultStoreKit/Database/Queries/PasskeyQueries.swift@@ -97,7 +97,7 @@ public struct PasskeyQueries {WHERE Id = ? AND ManifestId = ? AND IsDeleted = 0"""- /// Get ALL active Login items that don't have a passkey yet (no URL filtering).+ /// Get all active Login items that don't have a passkey yet (no URL filtering)./// Used with Rust credential matcher for intelligent filtering./// Returns items with their URLs aggregated using GROUP_CONCAT for multi-URL support.public static let getAllItemsWithoutPasskey = """diff --git a/apps/mobile-app/ios/VaultStoreKit/Database/Repositories/PasskeyRepository.swift b/apps/mobile-app/ios/VaultStoreKit/Database/Repositories/PasskeyRepository.swiftindex 54744fa41..271c22dc9 100644--- a/apps/mobile-app/ios/VaultStoreKit/Database/Repositories/PasskeyRepository.swift+++ b/apps/mobile-app/ios/VaultStoreKit/Database/Repositories/PasskeyRepository.swift@@ -73,7 +73,7 @@ public class PasskeyRepository: BaseRepository {return mappedResults}- /// Get ALL Login items that don't have a passkey yet (no URL filtering).+ /// Get all Login items that don't have a passkey yet (no URL filtering)./// Used with RustItemMatcher for intelligent, cross-platform consistent filtering./// - Returns: Array of ItemWithCredentialInfoData objects with all URLspublic func getAllItemsWithoutPasskey() throws -> [ItemWithCredentialInfoData] {@@ -291,7 +291,7 @@ public class PasskeyRepository: BaseRepository {private func resolveLogoId(existingLogoId: String?, manifestId: String, rpId: String, logo: Data?, now: String) throws -> String? {let existing = try existingLogoId.flatMap { try getLogo(byId: $0) }if let existing = existing, existing.kind != "favicon" {- return try adoptIntoScope(LogoKey(manifestId: manifestId, kind: existing.kind, source: existing.source), now: now)+ return try ensureInScope(LogoKey(manifestId: manifestId, kind: existing.kind, source: existing.source), now: now)}// The same URL string the item's login.url field is written with, which is what the TypeScript side derives the favicon target from.@@ -302,12 +302,12 @@ public class PasskeyRepository: BaseRepository {let key = LogoKey(manifestId: manifestId, kind: "favicon", source: source)if let existing = existing, existing.source == source {- return try adoptIntoScope(key, now: now)+ return try ensureInScope(key, now: now)}if let logo = logo, !logo.isEmpty {return try getOrCreateLogo(key, image: LogoImage(data: logo, mimeType: "image/x-icon", name: nil), now: now)}- return try adoptIntoScope(key, now: now)+ return try ensureInScope(key, now: now)}/// Get or create the logo for a key inside one manifest, refreshing its image data.@@ -321,7 +321,7 @@ public class PasskeyRepository: BaseRepository {/// The id this logo has inside the key's manifest, copying it in from another manifest when it is not there yet./// - Returns: The logo id inside this manifest, or nil when the vault holds no such logo at all- private func adoptIntoScope(_ key: LogoKey, now: String) throws -> String? {+ private func ensureInScope(_ key: LogoKey, now: String) throws -> String? {let inScope = try client.executeQuery(LogoQueries.getIdForKey, params: [key.manifestId, key.kind, key.source])if let logoId = inScope.first?["Id"] as? String {return logoIddiff --git a/apps/mobile-app/ios/VaultStoreKit/Services/VaultSync.swift b/apps/mobile-app/ios/VaultStoreKit/Services/VaultSync.swiftindex c04fd48ee..af60b3285 100644--- a/apps/mobile-app/ios/VaultStoreKit/Services/VaultSync.swift+++ b/apps/mobile-app/ios/VaultStoreKit/Services/VaultSync.swift@@ -2,7 +2,7 @@ import Foundationimport VaultModelsimport VaultUtils-/// The vault sync wrapper: one method per engine operation, adoption of what the engine reported, and the mapping of+/// The vault sync wrapper: one method per engine operation, persisting what the engine reported, and the mapping of/// its failures into the native error. The driver below it is VaultSyncEngine, which turns the Rust engine's/// commands into host actions.///@@ -140,7 +140,7 @@ internal final class VaultSync {}}- /// Run one engine operation and adopt what it reported. A driver failure surfaces as the native error.+ /// Run one engine operation and persist what it reported. A driver failure surfaces as the native error.private func run(_ operation: String, using webApiService: WebApiService, encryptionKey: String? = nil, sharing: [String: Any]? = nil) async throws -> [String: Any] {let result: [String: Any]do {@@ -148,13 +148,13 @@ internal final class VaultSync {} catch {throw Self.driverError(error)}- adoptSyncResult(result)+ persistSyncResult(result)return result}/// Persist what the engine reported: server version and capabilities, offline mode, session values it changed,/// and the email routing a pulled vault came with.- private func adoptSyncResult(_ result: [String: Any]) {+ private func persistSyncResult(_ result: [String: Any]) {if let serverVersion = result["serverVersion"] as? String, !serverVersion.isEmpty {vaultStore.setServerVersion(serverVersion)}diff --git a/apps/mobile-app/ios/VaultStoreKit/VaultStore+Crypto.swift b/apps/mobile-app/ios/VaultStoreKit/VaultStore+Crypto.swiftindex a954c3de3..f7215b5f5 100644--- a/apps/mobile-app/ios/VaultStoreKit/VaultStore+Crypto.swift+++ b/apps/mobile-app/ios/VaultStoreKit/VaultStore+Crypto.swift@@ -246,7 +246,7 @@ extension VaultStore {} catch {print("Decryption failed: \(error)")- // Note: We intentionally do NOT clear the encryption key here.+ // Note: We intentionally do not clear the encryption key here.// The key may be valid for a different vault (e.g., after password change// during login, the new key is stored but the old vault can't be decrypted).// Clearing it would break the subsequent sync that downloads the new vault.diff --git a/apps/mobile-app/ios/VaultUI/Selection/PasskeyProviderView.swift b/apps/mobile-app/ios/VaultUI/Selection/PasskeyProviderView.swiftindex 70c4dd49c..43b0bfd04 100644--- a/apps/mobile-app/ios/VaultUI/Selection/PasskeyProviderView.swift+++ b/apps/mobile-app/ios/VaultUI/Selection/PasskeyProviderView.swift@@ -247,7 +247,7 @@ public class PasskeyProviderViewModel: ObservableObject {return}- // Filter credentials where ALL search words match (each in at least one field)+ // Filter credentials where all search words match (each in at least one field)filteredCredentials = credentials.filter { credential in// Prepare searchable fields including passkey rpIdsvar searchableFields = [diff --git a/apps/mobile-app/utils/AppUnlockUtility.ts b/apps/mobile-app/utils/AppUnlockUtility.tsindex 8fccdda64..dc2ad295c 100644--- a/apps/mobile-app/utils/AppUnlockUtility.ts+++ b/apps/mobile-app/utils/AppUnlockUtility.ts@@ -135,7 +135,7 @@ export class AppUnlockUtility {// This checks auth methods AND validates the encryption keyconst isAvailable = await NativeVaultManager.isBiometricUnlockAvailable();- // If biometric unlock is NOT available but 'faceid' is still in auth methods,+ // If biometric unlock is not available but 'faceid' is still in auth methods,// automatically remove it to keep state consistentif (!isAvailable) {const currentMethods = await this.getEnabledAuthMethods();diff --git a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Index.razor b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Index.razorindex 1a053976d..c564e2b26 100644--- a/apps/server/AliasVault.Admin/Main/Pages/Users/View/Index.razor+++ b/apps/server/AliasVault.Admin/Main/Pages/Users/View/Index.razor@@ -468,7 +468,7 @@ else}/// <summary>- /// This method disables two-factor authentication for the user. This will NOT remove the authenticator keys.+ /// This method disables two-factor authentication for the user. This will not remove the authenticator keys./// This means the admin can re-enable 2FA for the user without the user having to set up a new authenticator/// keys./// </summary>diff --git a/apps/server/AliasVault.Client/Services/Auth/UserRegistrationService.cs b/apps/server/AliasVault.Client/Services/Auth/UserRegistrationService.csindex e172a17b2..fe0428dd9 100644--- a/apps/server/AliasVault.Client/Services/Auth/UserRegistrationService.cs+++ b/apps/server/AliasVault.Client/Services/Auth/UserRegistrationService.cs@@ -90,7 +90,7 @@ public class UserRegistrationService(HttpClient httpClient, AuthenticationStatePawait authService.StoreAccessTokenAsync(tokenObject.Token);await authService.StoreRefreshTokenAsync(tokenObject.RefreshToken);- // Cache the chain the server just stored and adopt the VEK as the session key.+ // Cache the chain the server just stored and use the VEK as the session key.await vaultKeyService.CacheVaultKeyBlobsAsync(new VaultKeyResponse{Type = UnlockMethodTypes.ToToken(UnlockMethodType.Password),diff --git a/apps/server/AliasVault.Client/Services/Database/DbService.cs b/apps/server/AliasVault.Client/Services/Database/DbService.csindex 705b2d445..7063ef5e5 100644--- a/apps/server/AliasVault.Client/Services/Database/DbService.cs+++ b/apps/server/AliasVault.Client/Services/Database/DbService.cs@@ -337,7 +337,7 @@ public sealed class DbService : IDisposable}// Rebuild on the complete schema via the codec; this stamps every row with the personal manifest.- AdoptDatabase(await _vaultSync.MigrateVaultToCurrentSchemaAsync(_sqlConnection!));+ ReplaceDatabase(await _vaultSync.MigrateVaultToCurrentSchemaAsync(_sqlConnection!));// The server holds no manifest-v1 state for this vault yet, so the next push must write everything._forceFullWriteOnNextPush = true;@@ -695,7 +695,7 @@ public sealed class DbService : IDisposablefor (var attempt = 1; attempt <= MaxPushAttempts; attempt++){// LEGACY: an account without a key chain creates one on its first manifest-v1 push, unless another device already did.- var createVaultKey = !await _vaultKeyService.HasLocalVaultKeyAsync() && !await TryAdoptRemoteVaultKeyAsync();+ var createVaultKey = !await _vaultKeyService.HasLocalVaultKeyAsync() && !await TryAcceptRemoteVaultKeyAsync();PushResult result;try@@ -764,25 +764,25 @@ public sealed class DbService : IDisposable_logger.LogWarning("Canonical merge fell back to the server's rows for manifest {ManifestId}; local changes to it were dropped.", manifestId);}- AdoptDatabase(result.Database!);+ ReplaceDatabase(result.Database!);await _settingsService.ReloadAsync(this);}/// <summary>- /// Adopt a key chain the server holds but this device does not: the account was migrated on another device while+ /// Accept a key chain the server holds but this device does not: the account was migrated on another device while/// this session still holds the old password-derived key, which opens the chain as its KEK./// </summary>- /// <returns>True when a chain was adopted, false when the server holds none.</returns>+ /// <returns>True when a chain was accepted, false when the server holds none.</returns>/// <exception cref="VaultKeyDecryptException">Thrown when the server's chain does not open with the session key.</exception>- private async Task<bool> TryAdoptRemoteVaultKeyAsync()+ private async Task<bool> TryAcceptRemoteVaultKeyAsync(){- var resolved = await _vaultKeyService.AdoptRemoteVaultKeyAsync(_authService.GetEncryptionKeyAsBase64Async());+ var resolved = await _vaultKeyService.AcceptRemoteVaultKeyAsync(_authService.GetEncryptionKeyAsBase64Async());if (resolved is null){return false;}- _logger.LogInformation("Adopted the account key chain another device created; the session key is now the VEK.");+ _logger.LogInformation("Accepted the account key chain another device created; the session key is now the VEK.");await _authService.StoreSessionKeysAsync(resolved);return true;}@@ -922,8 +922,8 @@ public sealed class DbService : IDisposable/// Copy another database into the live connection and refresh the context over it. The connection object stays/// the same, so a context handed out earlier keeps working and simply sees the new content./// </summary>- /// <param name="source">The open in-memory database to adopt; disposed afterwards.</param>- private void AdoptDatabase(SqliteConnection source)+ /// <param name="source">The in-memory database that replaces the live one; disposed afterwards.</param>+ private void ReplaceDatabase(SqliteConnection source){source.BackupDatabase(_sqlConnection!);source.Dispose();diff --git a/apps/server/AliasVault.Client/Services/VaultSync/Models/AccountKeyHierarchy.cs b/apps/server/AliasVault.Client/Services/VaultSync/Models/AccountKeyHierarchy.csindex 792c6530d..b293f7dae 100644--- a/apps/server/AliasVault.Client/Services/VaultSync/Models/AccountKeyHierarchy.cs+++ b/apps/server/AliasVault.Client/Services/VaultSync/Models/AccountKeyHierarchy.cs@@ -10,7 +10,7 @@ namespace AliasVault.Client.Services.VaultSync.Models;using AliasVault.Shared.Models.WebApi.V2.Vault;/// <summary>-/// A newly created account key hierarchy: the plaintext keys this session adopts and the wrapped chain the server stores.+/// A newly created account key hierarchy: the plaintext keys this session uses and the wrapped chain the server stores./// </summary>/// <param name="VaultEncryptionKey">The new VEK (base64), which becomes the session key.</param>/// <param name="AccountPrivateKey">The private half of the new account keypair as a JWK JSON string.</param>diff --git a/apps/server/AliasVault.Client/Services/VaultSync/VaultKeyService.cs b/apps/server/AliasVault.Client/Services/VaultSync/VaultKeyService.csindex 2e12f9678..a291e068e 100644--- a/apps/server/AliasVault.Client/Services/VaultSync/VaultKeyService.cs+++ b/apps/server/AliasVault.Client/Services/VaultSync/VaultKeyService.cs@@ -168,7 +168,7 @@ public sealed class VaultKeyService(HttpClient httpClient, ILocalStorageService/// keypair both wrapped by the Account Key. Used on registration and on the one-time legacy migration push./// </summary>/// <param name="kekBase64">The password-derived key that becomes the KEK.</param>- /// <returns>The plaintext keys to adopt and the wrapped chain to upload.</returns>+ /// <returns>The plaintext keys to use and the wrapped chain to upload.</returns>public async Task<AccountKeyHierarchy> CreateAccountKeyHierarchyAsync(string kekBase64){var vek = RandomNumberGenerator.GetBytes(32);@@ -187,12 +187,12 @@ public sealed class VaultKeyService(HttpClient httpClient, ILocalStorageService}/// <summary>- /// Adopt a hierarchy the server just committed: cache the wrapped chain for offline unlock and mark the cached+ /// Store a hierarchy the server just committed: cache the wrapped chain for offline unlock and mark the cached/// derivation parameters as belonging to an account-key account./// </summary>/// <param name="hierarchy">The hierarchy that was uploaded.</param>/// <returns>Task.</returns>- public async Task AdoptLocalAccountKeysAsync(AccountKeyHierarchy hierarchy)+ public async Task StoreLocalAccountKeysAsync(AccountKeyHierarchy hierarchy){await localStorage.SetItemAsStringAsync(StorageKeys.EncryptedAccountKey, hierarchy.Keys.EncryptedAccountKey!);await localStorage.SetItemAsStringAsync(StorageKeys.EncryptedVek, hierarchy.Keys.EncryptedVek!);@@ -207,12 +207,12 @@ public sealed class VaultKeyService(HttpClient httpClient, ILocalStorageService}/// <summary>- /// Adopt a chain the server holds but this device does not (the account was migrated on another device while+ /// Accept a chain the server holds but this device does not (the account was migrated on another device while/// this session still holds the old password-derived key): open it with the session key, which then is the KEK./// </summary>/// <param name="sessionKeyBase64">The session's current key.</param>- /// <returns>The resolved keys when a chain was adopted, null when the server holds none. Throws when the chain does not open.</returns>- public async Task<ResolvedVaultKey?> AdoptRemoteVaultKeyAsync(string sessionKeyBase64)+ /// <returns>The resolved keys when a chain was accepted, null when the server holds none. Throws when the chain does not open.</returns>+ public async Task<ResolvedVaultKey?> AcceptRemoteVaultKeyAsync(string sessionKeyBase64){var vaultKey = await FetchVaultKeyAsync();if (vaultKey is null)diff --git a/apps/server/AliasVault.Client/Services/VaultSync/VaultSyncService.cs b/apps/server/AliasVault.Client/Services/VaultSync/VaultSyncService.csindex c97c77221..2f96e7cb6 100644--- a/apps/server/AliasVault.Client/Services/VaultSync/VaultSyncService.cs+++ b/apps/server/AliasVault.Client/Services/VaultSync/VaultSyncService.cs@@ -164,7 +164,7 @@ public sealed class VaultSyncService(HttpClient httpClient, AuthService authServ/// <summary>/// Migrate the local vault onto the current full schema canonicalize the database into- /// manifest-v1 form (adopting rows that predate the manifest stamp into the personal manifest) and materialize+ /// manifest-v1 form (stamping rows that predate the manifest stamp with the personal manifest) and materialize/// it straight back out again. This is the permanent delivery path for client schema changes./// </summary>/// <param name="connection">The local vault to migrate.</param>@@ -439,10 +439,10 @@ public sealed class VaultSyncService(HttpClient httpClient, AuthService authServstate.LastSnapshotWasLegacySqliteBlob = false;- // Adopt the newly created account keys if this push included the one-time sqlite-blob to manifest-v1 migration.+ // Store the newly created account keys if this push included the one-time sqlite-blob to manifest-v1 migration.if (migration is not null){- await vaultKeyService.AdoptLocalAccountKeysAsync(migration);+ await vaultKeyService.StoreLocalAccountKeysAsync(migration);await authService.StoreSessionKeysAsync(Convert.FromBase64String(migration.VaultEncryptionKey), migration.AccountPrivateKey);logger.LogInformation("[V2Push] Account-key migration complete: hierarchy created server-side, chain cached locally.");}@@ -1286,9 +1286,9 @@ public sealed class VaultSyncService(HttpClient httpClient, AuthService authServ/// </summary>/// <param name="connection">The local vault.</param>/// <param name="personalVek">The key the personal manifest encrypts with.</param>- /// <param name="adoptUnstampedInto">One-time migration only: the manifest rows without a stamp are adopted into.</param>+ /// <param name="stampUnstampedInto">One-time migration only: the manifest that rows without a stamp are stamped with.</param>/// <returns>The canonicalized vault, personal manifest first.</returns>- private async Task<CanonicalizedVault> CanonicalizeAsync(SqliteConnection connection, string personalVek, Guid? adoptUnstampedInto)+ private async Task<CanonicalizedVault> CanonicalizeAsync(SqliteConnection connection, string personalVek, Guid? stampUnstampedInto){var records = await ResolveManifestRecordsAsync(connection, personalVek);var tablesJson = await VaultTableReader.ReadTablesAsCodecJsonAsync(connection);@@ -1317,9 +1317,9 @@ public sealed class VaultSyncService(HttpClient httpClient, AuthService authServ}writer.WriteEndArray();- if (adoptUnstampedInto is { } adoptInto)+ if (stampUnstampedInto is { } stampInto){- writer.WriteString("adoptUnstampedInto", adoptInto.ToString());+ writer.WriteString("stampUnstampedInto", stampInto.ToString());}writer.WriteEndObject();diff --git a/apps/server/Databases/AliasClientDb/FieldDefinition.cs b/apps/server/Databases/AliasClientDb/FieldDefinition.csindex 7cd5ad104..84a2ec6fd 100644--- a/apps/server/Databases/AliasClientDb/FieldDefinition.cs+++ b/apps/server/Databases/AliasClientDb/FieldDefinition.cs@@ -12,9 +12,9 @@ using AliasClientDb.Abstracts;/// <summary>/// FieldDefinition entity that defines the schema for custom (user-defined) fields.-/// NOTE: System fields (login.username, login.email, etc.) do NOT have FieldDefinition rows.+/// NOTE: System fields (login.username, login.email, etc.) do not have FieldDefinition rows./// System field metadata is defined in code (SystemFieldRegistry) and is immutable.-/// This table is ONLY for custom fields that users create themselves.+/// This table is only for custom fields that users create themselves./// Custom fields are always referenced by their GUID (Id), never by FieldKey./// </summary>public class FieldDefinition : ManifestScopedEntitydiff --git a/apps/server/Databases/AliasClientDb/Models/SystemFieldRegistry.cs b/apps/server/Databases/AliasClientDb/Models/SystemFieldRegistry.csindex beac993d9..7aa60a714 100644--- a/apps/server/Databases/AliasClientDb/Models/SystemFieldRegistry.cs+++ b/apps/server/Databases/AliasClientDb/Models/SystemFieldRegistry.cs@@ -261,7 +261,7 @@ public static class SystemFieldRegistry}/// <summary>- /// Get system fields that are NOT shown by default for a specific item type.+ /// Get system fields that are not shown by default for a specific item type./// These are the fields that can be added via an "add field" button./// Results are sorted by DefaultDisplayOrder./// </summary>diff --git a/apps/server/Utilities/AliasVault.Auth/IpAddress/IpAddressUtility.cs b/apps/server/Utilities/AliasVault.Auth/IpAddress/IpAddressUtility.csindex 8b14dd106..8bf5ab99a 100644--- a/apps/server/Utilities/AliasVault.Auth/IpAddress/IpAddressUtility.cs+++ b/apps/server/Utilities/AliasVault.Auth/IpAddress/IpAddressUtility.cs@@ -64,7 +64,7 @@ public static class IpAddressUtility/// <summary>/// Extracts the raw, non-anonymized IP address from the HttpContext for transient, request-time use only- /// (e.g. matching against the IP blocklist). The returned value is intentionally NOT anonymized and must+ /// (e.g. matching against the IP blocklist). The returned value is intentionally not anonymized and must/// never be persisted. Use GetAnonymizedIpFromContext for persistence/logging instead./// </summary>/// <param name="httpContext">HttpContext to extract the IP address from.</param>diff --git a/core/client/src/auth/VaultKeyService.ts b/core/client/src/auth/VaultKeyService.tsindex 651727611..767a27ec2 100644--- a/core/client/src/auth/VaultKeyService.ts+++ b/core/client/src/auth/VaultKeyService.ts@@ -92,7 +92,7 @@ export class VaultKeyService {* Whether this device holds a key chain, i.e. whether the account is on the account-key model rather than a* legacy account whose unlock key encrypts the vault directly. The cache is written on every login and cleared* when the server reports no vault key, so it needs no server round-trip. A false answer is only ever stale in- * one direction (another device migrated since the last login), which the sync resolves by adopting the remote chain.+ * one direction (another device migrated since the last login), which the sync resolves by accepting the remote chain.*/public static async hasLocalVaultKey(): Promise<boolean> {return (await getPlatform().storage.get(StorageKeys.ENCRYPTED_ACCOUNT_KEY) as string | null) !== null;diff --git a/core/client/src/database/repositories/ItemRepository.ts b/core/client/src/database/repositories/ItemRepository.tsindex 8962b7a71..169e02984 100644--- a/core/client/src/database/repositories/ItemRepository.ts+++ b/core/client/src/database/repositories/ItemRepository.ts@@ -756,7 +756,7 @@ export class ItemRepository extends BaseRepository {const existing = existingLogoId ? await this.run(this.logoRepository.getById(existingLogoId, storedManifestId)) : null;if (!selection && existing && existing.Kind !== LogoKinds.Favicon) {- return this.logoRepository.adoptIntoScope(scope, existing.Kind, existing.Source, currentDateTime);+ return this.logoRepository.ensureInScope(scope, existing.Kind, existing.Source, currentDateTime);}const urlField = item.Fields?.find(f => f.FieldKey === 'login.url');@@ -784,7 +784,7 @@ export class ItemRepository extends BaseRepository {// Keep the current favicon when it is already this domain's, whatever scope it lives in.if (existing && existing.Kind === LogoKinds.Favicon && existing.Source === source) {- return this.logoRepository.adoptIntoScope(scope, LogoKinds.Favicon, source, currentDateTime);+ return this.logoRepository.ensureInScope(scope, LogoKinds.Favicon, source, currentDateTime);}/*@@ -798,10 +798,10 @@ export class ItemRepository extends BaseRepository {}/*- * Otherwise adopt the favicon this domain already has, or none at all. Falling back to the item's+ * Otherwise reuse the favicon this domain already has, or none at all. Falling back to the item's* previous logo here is what made an item keep the old site's logo after its URL was changed.*/- return this.logoRepository.adoptIntoScope(scope, LogoKinds.Favicon, source, currentDateTime);+ return this.logoRepository.ensureInScope(scope, LogoKinds.Favicon, source, currentDateTime);}/**@@ -826,7 +826,7 @@ export class ItemRepository extends BaseRepository {/** No new bytes: the user picked an image from their library, addressed by its hash.*/- return selection.Source ? this.logoRepository.adoptIntoScope(scope, LogoKinds.Custom, selection.Source, currentDateTime) : null;+ return selection.Source ? this.logoRepository.ensureInScope(scope, LogoKinds.Custom, selection.Source, currentDateTime) : null;}/**diff --git a/core/client/src/database/repositories/LogoRepository.ts b/core/client/src/database/repositories/LogoRepository.tsindex 9e4fa2173..2386baf53 100644--- a/core/client/src/database/repositories/LogoRepository.ts+++ b/core/client/src/database/repositories/LogoRepository.ts@@ -58,7 +58,7 @@ export class LogoRepository extends BaseRepository {* @param currentDateTime The current date/time string for timestamps* @returns The logo id inside this manifest, or null when the vault holds no such logo at all*/- public async adoptIntoScope(manifestId: string, kind: LogoKind, source: string, currentDateTime: string): Promise<string | null> {+ public async ensureInScope(manifestId: string, kind: LogoKind, source: string, currentDateTime: string): Promise<string | null> {const inScope = await this.run(this.getIdForKey(manifestId, kind, source));if (inScope) {return inScope;diff --git a/core/client/src/rust/RustCoreTypes.ts b/core/client/src/rust/RustCoreTypes.tsindex 4b6ef06f8..85bbf6cdf 100644--- a/core/client/src/rust/RustCoreTypes.ts+++ b/core/client/src/rust/RustCoreTypes.ts@@ -139,6 +139,6 @@ export type CodecCanonicalizeInput = {tables: CodecTableData[];canonicalizedAt: string;manifests: CodecManifestSpec[];- /** For legacy sqlite-blob migration: the manifest that unstamped rows are adopted into. TODO: delete this field once the migration is complete. */- adoptUnstampedInto?: string | null;+ /** For legacy sqlite-blob migration: the manifest that unstamped rows are stamped with. TODO: delete this field once the migration is complete. */+ stampUnstampedInto?: string | null;};diff --git a/core/client/src/sync/VaultSync.ts b/core/client/src/sync/VaultSync.tsindex f48304609..1909187b6 100644--- a/core/client/src/sync/VaultSync.ts+++ b/core/client/src/sync/VaultSync.ts@@ -1,5 +1,5 @@/**- * The vault sync wrapper: one method per engine operation, adoption of what the engine reported, and the mapping of+ * The vault sync wrapper: one method per engine operation, persisting what the engine reported, and the mapping of* its failures into the result the UI reads. The driver below it is VaultSyncEngine, which turns the Rust engine's* commands into host actions.*@@ -73,7 +73,7 @@ export type SharingOperationResult = SyncErrorDetail & {};/** What every engine result may report for the host to persist. */-type AdoptableSyncResult = VaultSyncEngineResultBase & {+type PersistableSyncResult = VaultSyncEngineResultBase & {serverVersion?: string;capabilities?: Record<string, string>;isOfflineMode?: boolean;@@ -111,7 +111,7 @@ export function syncResult(overrides: Partial<FullVaultSyncResult> = {}): FullVa}/**- * Runs the sync engine's operations for one host and adopts what each one reported.+ * Runs the sync engine's operations for one host and persists what each one reported.*/export class VaultSync {/**@@ -239,7 +239,7 @@ export class VaultSync {}/**- * Run one engine operation and adopt what it reported.+ * Run one engine operation and persist what it reported.* @param operation - the operation* @param options - what the caller asks beyond what the engine decides* @param overrides - what one operation sets on the request itself: the unlock key resolveVaultKey runs on, or the target of a sharing operation@@ -247,7 +247,7 @@ export class VaultSync {private async run<T extends VaultSyncEngineResultBase>(operation: VaultSyncOperation, options: VaultSyncOptions = {}, overrides: Partial<Pick<VaultSyncEngineRequest, 'encryptionKey' | 'sharing'>> = {}): Promise<T> {const request = { ...await buildVaultSyncRequest(operation, options), ...overrides };const result = await runVaultSyncEngine<T>(this.host, request, this.webApi);- await this.adoptSyncResult(result);+ await this.persistSyncResult(result);return result;}@@ -256,7 +256,7 @@ export class VaultSync {* the email routing a pulled vault came with.* @param result - the engine's outcome*/- private async adoptSyncResult(result: AdoptableSyncResult): Promise<void> {+ private async persistSyncResult(result: PersistableSyncResult): Promise<void> {const storage = getPlatform().storage;if (result.serverVersion && result.serverVersion !== '0.0.0') {await storage.set(StorageKeys.SERVER_VERSION, result.serverVersion);diff --git a/core/rust/src/credential_matcher/domain.rs b/core/rust/src/credential_matcher/domain.rsindex 9ea5868ad..d53251f90 100644--- a/core/rust/src/credential_matcher/domain.rs+++ b/core/rust/src/credential_matcher/domain.rs@@ -245,7 +245,7 @@ pub fn domains_match(domain1: &str, domain2: &str) -> bool {// Check subdomain relationship (must end with ".domain" not just contain it)// e.g., "sub.example.com" is a subdomain of "example.com"- // but "another-example.com" is NOT related to "example.com"+ // but "another-example.com" is not related to "example.com"if is_subdomain_of(domain1, domain2) || is_subdomain_of(domain2, domain1) {return true;}@@ -259,7 +259,7 @@ pub fn domains_match(domain1: &str, domain2: &str) -> bool {/// Check if domain1 is a subdomain of domain2./// e.g., "sub.example.com" is a subdomain of "example.com"-/// but "another-example.com" is NOT a subdomain of "example.com"+/// but "another-example.com" is not a subdomain of "example.com"fn is_subdomain_of(domain1: &str, domain2: &str) -> bool {// domain1 must be longer and end with ".domain2"if domain1.len() <= domain2.len() {@@ -314,7 +314,7 @@ mod tests {assert_eq!(extract_domain("http://homeassistant"), "homeassistant");assert_eq!(extract_domain("http://pihole/admin"), "pihole");- // Single-word hostnames WITHOUT protocol should NOT be accepted+ // Single-word hostnames without protocol should not be accepted// (to avoid matching random text as domains)assert_eq!(extract_domain("localhost"), "");assert_eq!(extract_domain("plex"), "");@@ -331,7 +331,7 @@ mod tests {assert_eq!(extract_domain("https://nas:5001"), "nas");assert_eq!(extract_domain("http://router:8080/admin"), "router");- // Without protocol - should NOT work (could be ambiguous)+ // Without protocol - should not work (could be ambiguous)assert_eq!(extract_domain("localhost:8080"), "");assert_eq!(extract_domain("plex:32400"), "");@@ -419,7 +419,7 @@ mod tests {// Same IP matchesassert!(domains_match("192.168.1.5", "192.168.1.5"));- // Distinct IPs sharing trailing octets must NOT match+ // Distinct IPs sharing trailing octets must not match// (previously both reduced to root "1.5" and matched)assert!(!domains_match("192.168.1.5", "10.0.1.5"));@@ -453,8 +453,8 @@ mod tests {assert!(!domains_match("example.com", "different.com"));assert!(!domains_match("coolblue.nl", "coolblue.be"));- // CRITICAL: Substring match should NOT work (anti-phishing protection)- // "another-example.com" contains "example.com" but is NOT a subdomain+ // Critical: Substring match should not work (anti-phishing protection)+ // "another-example.com" contains "example.com" but is not a subdomainassert!(!domains_match("another-example.com", "example.com"));assert!(!domains_match("example.com", "another-example.com"));assert!(!domains_match("myexample.com", "example.com"));diff --git a/core/rust/src/credential_matcher/mod.rs b/core/rust/src/credential_matcher/mod.rsindex 10d3c2520..9ed4ca812 100644--- a/core/rust/src/credential_matcher/mod.rs+++ b/core/rust/src/credential_matcher/mod.rs@@ -113,7 +113,7 @@ pub fn filter_credentials(input: CredentialMatcherInput) -> CredentialMatcherOutreturn CredentialMatcherOutput::matched(2, ids);}- // Priority 3b: words from ONLY the root domain (no subdomains, no path/query) against item+ // Priority 3b: words from only the root domain (no subdomains, no path/query) against item// names, e.g. outlook.office.com contributes "office" but not "outlook". Same anti-phishing// rule as Priority 3: only credentials with no URLs are eligible. This wildcard is what the// Default mode adds on top of URL matching, so the URL-only modes must not fall back to it.@@ -131,7 +131,7 @@ pub fn filter_credentials(input: CredentialMatcherInput) -> CredentialMatcherOut}// Priority 3: page title against item names when domain extraction failed (desktop apps, malformed- // URLs). Anti-phishing: only credentials with NO URLs are eligible.+ // URLs). Anti-phishing: only credentials with no URLs are eligible.let title_words = extract_words(&page_title);let ids = match_item_names(&credentials, &title_words, true, max_results);if !ids.is_empty() {diff --git a/core/rust/src/vault_codec/canonicalize.rs b/core/rust/src/vault_codec/canonicalize.rsindex b85940a39..7cc0cb08e 100644--- a/core/rust/src/vault_codec/canonicalize.rs+++ b/core/rust/src/vault_codec/canonicalize.rs@@ -70,10 +70,10 @@ pub fn canonicalize_from_sqlite(input: CanonicalizeInput) -> VaultResult<Canonicnormalize_id_spelling(bucket_tables);}- // Legacy migration: adopt unstamped rows into the manifest if specified by the caller.+ // Legacy migration: stamp unstamped rows with the manifest if specified by the caller.// TODO: delete this once the migration is complete.- if let Some(adopt_into) = input.adopt_unstamped_into.as_deref() {- adopt_unstamped_rows(&mut all_tables, adopt_into);+ if let Some(stamp_into) = input.stamp_unstamped_into.as_deref() {+ stamp_unstamped_rows(&mut all_tables, stamp_into);}reject_unstamped_rows(&all_tables)?;for bucket_tables in overflow.bucket_tables.values() {@@ -230,12 +230,12 @@ fn owning_manifest(row: &CodecRecord, manifest_ids: &[String]) -> Option<String>manifest_ids.iter().find(|id| ids_equal(id, stamp)).cloned()}-/// For legacy sqlite-blob migration: the manifest that unstamped rows are adopted into.+/// For legacy sqlite-blob migration: the manifest that unstamped rows are stamped with./// TODO: delete this function once the migration is complete.////// Stamp every unstamped row of a manifest-scoped table with `manifest_id`. A row that already names a/// manifest keeps it, so a vault that has been converted once pays nothing on later runs.-fn adopt_unstamped_rows(tables: &mut HashMap<String, Vec<CodecRecord>>, manifest_id: &str) {+fn stamp_unstamped_rows(tables: &mut HashMap<String, Vec<CodecRecord>>, manifest_id: &str) {for name in manifest_scoped_tables() {let Some(rows) = tables.get_mut(name) else { continue };for row in rows.iter_mut().filter(|row| is_unstamped(row)) {diff --git a/core/rust/src/vault_codec/manifest.rs b/core/rust/src/vault_codec/manifest.rsindex 352f30c43..4f41b22c1 100644--- a/core/rust/src/vault_codec/manifest.rs+++ b/core/rust/src/vault_codec/manifest.rs@@ -229,10 +229,10 @@ pub struct CanonicalizeInput {pub tables: Vec<CodecTableData>,pub canonicalized_at: String,pub manifests: Vec<ManifestSpec>,- /// For legacy sqlite-blob migration: the manifest that unstamped rows are adopted into.+ /// For legacy sqlite-blob migration: the manifest that unstamped rows are stamped with./// TODO: delete this field once the migration is complete.#[serde(default)]- pub adopt_unstamped_into: Option<String>,+ pub stamp_unstamped_into: Option<String>,}/// Input for [`crate::vault_codec::materialize_as_sqlite`].diff --git a/core/rust/src/vault_codec/scoped_assets.rs b/core/rust/src/vault_codec/scoped_assets.rsindex 00558d60e..57135e6a9 100644--- a/core/rust/src/vault_codec/scoped_assets.rs+++ b/core/rust/src/vault_codec/scoped_assets.rs@@ -172,7 +172,7 @@ pub(super) fn reconcile_logo_references(tables: &mut HashMap<String, Vec<CodecRereturn;}- // (kind, source) -> id of the row already in this scope, so an incoming item adopts it rather than+ // (kind, source) -> id of the row already in this scope, so an incoming item reuses it rather than// cloning a second row onto the same natural key.let mut id_by_key: HashMap<(String, String), String> = tables.get(LOGOS_TABLE)diff --git a/core/rust/src/vault_codec/sharing.rs b/core/rust/src/vault_codec/sharing.rsindex e45bbe6f6..2f022e537 100644--- a/core/rust/src/vault_codec/sharing.rs+++ b/core/rust/src/vault_codec/sharing.rs@@ -491,9 +491,9 @@ fn claim_manifest_scope(tables: &mut HashMap<String, Vec<CodecRecord>>, manifest/// Keep only the `EncryptionKeys` rows a manifest may legitimately publish: the ones stamped with its/// own id. Applied to every manifest alike, so each namespace is protected from the others.///-/// Unstamped rows are dropped here rather than adopted. Adoption is a *local* migration concern handled+/// Unstamped rows are dropped here rather than stamped. Stamping them is a *local* migration concern handled/// on the canonicalize side, so an unstamped row in a manifest coming back through combine is not a-/// legacy row: it is a manifest asking to have key material adopted into a scope it never proved it+/// legacy row: it is a manifest asking to have key material moved into a scope it never proved it/// owns.fn retain_own_encryption_keys(tables: &mut HashMap<String, Vec<CodecRecord>>, manifest_id: &str) {if let Some(rows) = tables.get_mut(ENCRYPTION_KEYS_TABLE) {diff --git a/core/rust/src/vault_codec/sharing_tests.rs b/core/rust/src/vault_codec/sharing_tests.rsindex cacbdd084..da830fc37 100644--- a/core/rust/src/vault_codec/sharing_tests.rs+++ b/core/rust/src/vault_codec/sharing_tests.rs@@ -43,7 +43,7 @@ fn raw_input_with_shares(tables: Vec<CodecTableData>, shared_manifests: Vec<Manitables,canonicalized_at: "2026-01-01T00:00:00.000Z".to_string(),manifests: std::iter::once(personal).chain(shared_manifests).collect(),- adopt_unstamped_into: None,+ stamp_unstamped_into: None,}}@@ -365,25 +365,25 @@ fn split_reads_the_all_zero_guid_as_naming_no_manifest() {assert!(err.contains("Tags"), "the sentinel is refused like any other unstamped row: {err}");let mut input = raw_input_with_shares(tables, vec![spec("f-shared")]);- input.adopt_unstamped_into = Some(PERSONAL_M.to_string());+ input.stamp_unstamped_into = Some(PERSONAL_M.to_string());let out = canonicalize_from_sqlite(input).unwrap();- assert_eq!(ids(rows(&out.first().manifest, "Tags")), vec!["tag-both", "tag-shared-only", "tag-unused"], "and adopted, never dropped");+ assert_eq!(ids(rows(&out.first().manifest, "Tags")), vec!["tag-both", "tag-shared-only", "tag-unused"], "and stamped, never dropped");}#[test]-fn split_adopts_unstamped_rows_only_when_the_client_asks() {+fn split_stamps_unstamped_rows_only_when_the_client_asks() {// The sqlite-blob conversion is the one caller allowed to hand over unstamped rows, and it has to- // say so: `adoptUnstampedInto` names the manifest they join. Rows that already name one keep it.+ // say so: `stampUnstampedInto` names the manifest they join. Rows that already name one keep it.let tables = stamp_subtree(owner_tables_unstamped(), "f-shared", "m-f-shared");let mut input = raw_input_with_shares(tables, vec![spec("f-shared")]);- input.adopt_unstamped_into = Some(PERSONAL_M.to_string());+ input.stamp_unstamped_into = Some(PERSONAL_M.to_string());let out = canonicalize_from_sqlite(input).unwrap();let base = &out.first().manifest;assert_eq!(ids(rows(base, "Items")), vec!["i-nofolder", "i-personal"], "no row was dropped");assert_eq!(ids(rows(base, "Tags")), vec!["tag-both", "tag-shared-only", "tag-unused"]);for row in rows(base, "Tags") {- assert_eq!(row["ManifestId"], json!(PERSONAL_M), "adopted rows carry a real manifest id on the way out");+ assert_eq!(row["ManifestId"], json!(PERSONAL_M), "stamped rows carry a real manifest id on the way out");}assert_eq!(ids(rows(&out.rest()[0].manifest, "Items")), vec!["i-shared", "i-sub"], "explicit stamps still route");}@@ -394,12 +394,12 @@ fn sqlite_blob_migration_stamps_every_row_of_a_vault_that_has_no_manifest_id_col* The sqlite-blob > manifest-v1 migration, end to end: a vault whose schema stops short of the* `ManifestId` column (so no row carries the key at all) is canonicalized and materialized straight* back out, with no share in sight. Nothing stamps those rows beforehand, the column they would be- * stamped in does not exist yet, so canonicalize adopting them into the manifest being written from+ * stamped in does not exist yet, so canonicalize stamping them with the manifest being written from* is the conversion. Every row must come out carrying a real manifest id: the materialized schema* declares the column NOT NULL, so a single unstamped row fails the whole migration.*/let mut input = raw_input_with_shares(owner_tables_unstamped(), vec![]);- input.adopt_unstamped_into = Some(PERSONAL_M.to_string());+ input.stamp_unstamped_into = Some(PERSONAL_M.to_string());let out = canonicalize_from_sqlite(input).unwrap();assert_eq!(out.rest().len(), 0, "no shares in this push");@@ -1068,8 +1068,8 @@ fn item_moved_into_shared_manifest_brings_its_logo_along() {}#[test]-fn item_moved_into_shared_manifest_adopts_its_existing_logo() {- // Same move, but the folder already shows a logo for that domain. The item adopts it rather than+fn item_moved_into_shared_manifest_reuses_its_existing_logo() {+ // Same move, but the folder already shows a logo for that domain. The item reuses it rather than// dragging a second row onto the same (scope, domain), the folder's members keep seeing one logo.let mut tables = owner_tables();let items = tables.iter_mut().find(|t| t.name == "Items").unwrap();@@ -1747,7 +1747,7 @@ fn split_routes_folder_keypair_into_its_manifest_and_never_the_personal_one() {assert_eq!(ids(rows(&out.rest()[0].manifest, "EncryptionKeys")), vec!["sfk-1"]);assert_eq!(ids(rows(&out.first().manifest, "EncryptionKeys")), vec!["ek-1"], "the personal manifest keeps exactly its personal keys");- // The unstamped legacy personal row was adopted: stamped with the personal manifest's id.+ // The unstamped legacy personal row was stamped with the personal manifest's id.assert_eq!(rows(&out.first().manifest, "EncryptionKeys")[0]["ManifestId"], json!(PERSONAL_M));}@@ -2081,7 +2081,7 @@ fn split_keeps_child_rows_when_a_manifest_this_vault_lost_shares_their_item_id()let personal = &out.first().manifest;assert_eq!(ids(rows(personal, "Items")), vec!["i-dup"], "the revoked manifest's item is dropped, the live one kept");assert_eq!(values(rows(personal, "FieldValues")), vec!["personal_secret"], "the live item keeps its own child rows");- assert!(!manifest_mentions(personal, "gone"), "the revoked manifest's rows are not adopted into the personal one");+ assert!(!manifest_mentions(personal, "gone"), "the revoked manifest's rows are not moved into the personal one");}#[test]diff --git a/core/rust/src/vault_codec/tests.rs b/core/rust/src/vault_codec/tests.rsindex 793d797a1..e0cf5f883 100644--- a/core/rust/src/vault_codec/tests.rs+++ b/core/rust/src/vault_codec/tests.rs@@ -31,7 +31,7 @@ fn basic_input(tables: Vec<CodecTableData>) -> CanonicalizeInput {manifest_salt: "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff".to_string(),name: None,}],- adopt_unstamped_into: None,+ stamp_unstamped_into: None,}}@@ -606,7 +606,7 @@ fn item_stats_route_into_the_stats_bucket_of_the_manifest_that_owns_the_item() {name: Some("Shared".to_string()),},],- adopt_unstamped_into: None,+ stamp_unstamped_into: None,};let out = canonicalize_from_sqlite(input).unwrap();diff --git a/core/rust/src/vault_pruner/tests.rs b/core/rust/src/vault_pruner/tests.rsindex deeafd9a2..87484d63e 100644--- a/core/rust/src/vault_pruner/tests.rs+++ b/core/rust/src/vault_pruner/tests.rs@@ -487,7 +487,7 @@ fn test_trash_purge_clears_attachment_blobs() {.expect("expected an UPDATE Attachments statement");assert!(attachment_update.sql.contains("Blob = NULL"),"attachment trash purge must drop the blob: {}", attachment_update.sql);- // The pass-3 sweeper should NOT also fire for the same row in this call.+ // The pass-3 sweeper should not also fire for the same row in this call.assert_eq!(count(&output.stats.blobs_cleared, ATTACHMENTS_TABLE), 0);}diff --git a/core/rust/src/vault_sync/engine.rs b/core/rust/src/vault_sync/engine.rsindex 22dcf4af4..d211734d8 100644--- a/core/rust/src/vault_sync/engine.rs+++ b/core/rust/src/vault_sync/engine.rs@@ -218,7 +218,7 @@ async fn run_sync_preflight(ctx: &mut Ctx) -> SyncResult<Preflight> {// case the sync has to catch itself: this device holds no chain because the account was still legacy when it// logged in, and another device created the hierarchy since. That shows up as a revision change, so a pull// (or a push about to hit the server) is where it is checked.- if (needs_pull || ctx.is_dirty) && !keys::has_local_vault_key(&ctx.host).await? && !keys::adopt_hierarchy_created_elsewhere(ctx).await? {+ if (needs_pull || ctx.is_dirty) && !keys::has_local_vault_key(&ctx.host).await? && !keys::accept_hierarchy_created_elsewhere(ctx).await? {return Ok(Preflight::Finish(logout(LogoutReason::PasswordChanged)));}@@ -455,7 +455,7 @@ async fn commit_pulled_vault(ctx: &mut Ctx, pulled: &PulledVault) -> SyncResult<}/// Store the server's vault as the local vault, replacing whatever was there, and report it.-async fn adopt_server_vault(ctx: &mut Ctx, pulled: &PulledVault) -> SyncResult<Flow> {+async fn store_server_vault(ctx: &mut Ctx, pulled: &PulledVault) -> SyncResult<Flow> {if let Some(resync) = commit_pulled_vault(ctx, pulled).await? {return Ok(resync);}@@ -465,21 +465,21 @@ async fn adopt_server_vault(ctx: &mut Ctx, pulled: &PulledVault) -> SyncResult<F/// Pull the server's latest vault and merge it with what is stored locally when needed.async fn pull_and_materialize_server_vault(ctx: &mut Ctx, grant_sync_changed_vault: bool) -> SyncResult<Flow> {if !ctx.is_dirty || !ctx.has_local_vault().await? {- return adopt_pulled_vault(ctx).await;+ return store_pulled_vault(ctx).await;}// A dirty vault the codec cannot canonicalize is not merged.if vault_predates_current_schema(ctx).await? {ctx.warn("[VaultSync] The local vault predates the current storage model, so its pending changes can be neither merged nor uploaded; taking the server's vault.").await;- return adopt_pulled_vault(ctx).await;+ return store_pulled_vault(ctx).await;}canonical_pull_and_merge(ctx, grant_sync_changed_vault).await}/// Pull the server's vault and store it as the local one.-async fn adopt_pulled_vault(ctx: &mut Ctx) -> SyncResult<Flow> {+async fn store_pulled_vault(ctx: &mut Ctx) -> SyncResult<Flow> {let pulled = pull::pull(ctx).await?;- adopt_server_vault(ctx, &pulled).await+ store_server_vault(ctx, &pulled).await}/// Canonical-merge path of a dirty pull.@@ -492,7 +492,7 @@ async fn canonical_pull_and_merge(ctx: &mut Ctx, grant_sync_changed_vault: bool)}Ok(Flow::Done(FullSyncResult { success: true, has_new_vault: grant_sync_changed_vault, ..Default::default() }))}- PullAndMergeOutcome::ServerOnly(pulled) => adopt_server_vault(ctx, &pulled).await,+ PullAndMergeOutcome::ServerOnly(pulled) => store_server_vault(ctx, &pulled).await,PullAndMergeOutcome::Merged { pulled, stats, fallback_manifest_ids, dropped_local_manifest_ids, push_canonical } => {if let Some(resync) = commit_pulled_vault(ctx, &pulled).await? {return Ok(resync);@@ -553,7 +553,7 @@ async fn migration_status(ctx: &mut Ctx) -> MigrationStatusResult {}if !keys::has_local_vault_key(&ctx.host).await? {// A hierarchy another device created since this device logged in classifies as no migration at all.- keys::adopt_hierarchy_created_elsewhere(ctx).await?;+ keys::accept_hierarchy_created_elsewhere(ctx).await?;}if !keys::has_local_vault_key(&ctx.host).await? {return Ok(MigrationKind::StorageFormatUpgrade);@@ -604,11 +604,11 @@ pub(crate) async fn migrate_schema(ctx: &mut Ctx) -> SyncResult<bool> {}/// Rebuild the local vault onto the current schema (a local round-trip through the codec, no server involved) and-/// store it as a pending change. `adopt_unstamped_into` stamps rows that carry no manifest yet, which only a+/// store it as a pending change. `stamp_unstamped_into` stamps rows that carry no manifest yet, which only a/// sqlite-blob vault has.-pub(crate) async fn rebuild_local_schema(ctx: &mut Ctx, adopt_unstamped_into: Option<String>) -> SyncResult<()> {+pub(crate) async fn rebuild_local_schema(ctx: &mut Ctx, stamp_unstamped_into: Option<String>) -> SyncResult<()> {ctx.log("[ManifestMigration] Migrating local vault onto the current schema (local round-trip, no server involved)...").await;- let set = push::canonicalize_vault(ctx, adopt_unstamped_into).await?;+ let set = push::canonicalize_vault(ctx, stamp_unstamped_into).await?;let mut blob_map = HashMap::new();for entry in &set.canonicalized.manifests {for (hash, blob) in &entry.blobs {diff --git a/core/rust/src/vault_sync/keys.rs b/core/rust/src/vault_sync/keys.rsindex 5c46656b3..98569b84a 100644--- a/core/rust/src/vault_sync/keys.rs+++ b/core/rust/src/vault_sync/keys.rs@@ -187,12 +187,12 @@ pub(crate) async fn resolve_vault_key(ctx: &mut Ctx) -> SyncResult<bool> {/// The cross-device race: this device holds no key chain (it logged in while the account was still a legacy/// vault), and another device may have created the hierarchy since. Probes the server once per run; when the-/// hierarchy exists, the stored vault is brought under the VEK and the session key swapped, which the host adopts+/// hierarchy exists, the stored vault is brought under the VEK and the session key swapped, which the host picks up/// through the store command. Callers gate this on the absence of a cached chain and on a sync that pulls or/// pushes: another device's migration shows up as a revision change, so that is when it becomes visible./// False only when the session key does not open the server's chain, which requires a re-login; any other failure/// is returned as itself.-pub(crate) async fn adopt_hierarchy_created_elsewhere(ctx: &mut Ctx) -> SyncResult<bool> {+pub(crate) async fn accept_hierarchy_created_elsewhere(ctx: &mut Ctx) -> SyncResult<bool> {if ctx.vault_key_probed {return Ok(true);}@@ -201,7 +201,7 @@ pub(crate) async fn adopt_hierarchy_created_elsewhere(ctx: &mut Ctx) -> SyncResulet vault_key = match fetch_vault_key(&ctx.host).await {Ok(result) => result,Err(error) => {- ctx.warn(format!("[VaultSync] Vault key probe failed, deferring vault key adoption: {}", error)).await;+ ctx.warn(format!("[VaultSync] Vault key probe failed, deferring the vault key check: {}", error)).await;return Ok(true);}};@@ -209,18 +209,18 @@ pub(crate) async fn adopt_hierarchy_created_elsewhere(ctx: &mut Ctx) -> SyncResulet Some(encrypted_vek) = vault_key.encrypted_vek.clone() else { return Ok(true) };// Hosts hold the unlock key and derive the vault key from the cached chain.- let adopted: SyncResult<()> = async {+ let accepted: SyncResult<()> = async {let (vek, account_key) = walk_chain(&vault_key.encrypted_account_key, &encrypted_vek, &session_key)?;cache_vault_key_blobs(&ctx.host, &vault_key).await?;- adopt_vek(ctx, &session_key, &vek).await?;+ switch_to_vek(ctx, &session_key, &vek).await?;stage_account_private_key(ctx, &account_key, vault_key.encrypted_account_private_key.as_deref()).await;Ok(())}.await;- match adopted {+ match accepted {Ok(()) => {- ctx.log("[VaultSync] Another device created the account's key hierarchy; adopted it and swapped the session key to the VEK.").await;+ ctx.log("[VaultSync] Another device created the account's key hierarchy; accepted it and swapped the session key to the VEK.").await;Ok(true)}Err(SyncError::UnlockKeyRejected) => {@@ -234,7 +234,7 @@ pub(crate) async fn adopt_hierarchy_created_elsewhere(ctx: &mut Ctx) -> SyncResu/// Swap the session key for the VEK: re-encrypt the stored vault and the shared-manifest records under it, then/// report it to the host.-async fn adopt_vek(ctx: &mut Ctx, old_key: &str, vek: &str) -> SyncResult<()> {+async fn switch_to_vek(ctx: &mut Ctx, old_key: &str, vek: &str) -> SyncResult<()> {if let Some(encrypted_vault) = state::load_vault(&ctx.host).await? {let plaintext = state::decrypt_vault_blob(&encrypted_vault, old_key)?;let re_encrypted = crypto::symmetric_encrypt_bytes(&plaintext, vek)?;diff --git a/core/rust/src/vault_sync/legacy.rs b/core/rust/src/vault_sync/legacy.rsindex 9e3b16017..23397fa81 100644--- a/core/rust/src/vault_sync/legacy.rs+++ b/core/rust/src/vault_sync/legacy.rs@@ -36,23 +36,23 @@ pub(crate) async fn open_legacy_snapshot(ctx: &Ctx, snapshot: &GetResponse) -> S}/// The one-way move of a sqlite-blob account onto the manifest storage format: the local vault is rebuilt onto the-/// current schema with its unstamped rows adopted into the personal manifest, and the push that carries it creates the+/// current schema with its unstamped rows stamped with the personal manifest, and the push that carries it creates the/// account key hierarchy. Returns whether that push reached the server.pub(crate) async fn migrate_sqlite_blob(ctx: &mut Ctx) -> SyncResult<bool> {if engine::schema_state(ctx).await? == SchemaState::LegacyChain {return Err(SyncError::LegacyUpgradePending);}- // Another device may have created the hierarchy since this one logged in. Adopting it swaps the session key to the VEK, which the baseline pull below needs.- if !keys::adopt_hierarchy_created_elsewhere(ctx).await? {+ // Another device may have created the hierarchy since this one logged in. Accepting it swaps the session key to the VEK, which the baseline pull below needs.+ if !keys::accept_hierarchy_created_elsewhere(ctx).await? {return Err(SyncError::KeyOutOfSync);}record_server_baseline_if_missing(ctx).await?;if keys::has_local_vault_key(&ctx.host).await? {- // The account turned out to be migrated already (adopted above, or pulled with the baseline); a schema rebuild is all that can remain.+ // The account turned out to be migrated already (accepted above, or pulled with the baseline); a schema rebuild is all that can remain.return engine::migrate_schema(ctx).await;}if engine::schema_state(ctx).await? == SchemaState::LegacyChain {- // The baseline pull adopted a server vault that is still on the chain.+ // The baseline pull stored a server vault that is still on the chain.return Err(SyncError::LegacyUpgradePending);}let personal = resolve_personal_manifest_id(ctx).await?;diff --git a/core/rust/src/vault_sync/push.rs b/core/rust/src/vault_sync/push.rsindex a46322fc0..de0f66953 100644--- a/core/rust/src/vault_sync/push.rs+++ b/core/rust/src/vault_sync/push.rs@@ -66,11 +66,11 @@ pub(crate) struct UploadOutcome {*//// Canonicalize the local vault against every manifest this vault writes.-pub(crate) async fn canonicalize_vault(ctx: &Ctx, adopt_unstamped_into: Option<String>) -> SyncResult<CanonicalizedSet> {+pub(crate) async fn canonicalize_vault(ctx: &Ctx, stamp_unstamped_into: Option<String>) -> SyncResult<CanonicalizedSet> {let tables = db::read_tables(&ctx.host, Db::Local).await?;let manifest_records = resolve_manifest_records(ctx).await?;let manifests: Vec<ManifestSpec> = manifest_records.iter().map(|r| ManifestSpec { manifest_id: r.manifest_id.clone(), manifest_salt: r.salt.clone(), name: None }).collect();- let canonicalized = vault_codec::canonicalize_from_sqlite(CanonicalizeInput { tables, canonicalized_at: crate::timestamp::now_iso_utc(), manifests, adopt_unstamped_into })?;+ let canonicalized = vault_codec::canonicalize_from_sqlite(CanonicalizeInput { tables, canonicalized_at: crate::timestamp::now_iso_utc(), manifests, stamp_unstamped_into })?;Ok(CanonicalizedSet { canonicalized, manifest_records })}@@ -180,7 +180,7 @@ async fn resolve_bucket_write_keys(ctx: &Ctx, personal_vek: &str) -> SyncResult</// with `KeyOutOfSync` when the session key does not open a hierarchy another device created meanwhile.pub(crate) async fn upload_vault(ctx: &mut Ctx, cache: Option<(u64, CanonicalizedSet)>, force_full_write: bool, create_vault_key: bool) -> SyncResult<UploadOutcome> {let mutation_seq_at_start = ctx.mutation_sequence;- if !keys::has_local_vault_key(&ctx.host).await? && !keys::adopt_hierarchy_created_elsewhere(ctx).await? {+ if !keys::has_local_vault_key(&ctx.host).await? && !keys::accept_hierarchy_created_elsewhere(ctx).await? {return Err(SyncError::KeyOutOfSync);}@@ -410,7 +410,7 @@ async fn encrypt_payload(ctx: &Ctx, label: &str, plaintext: &str, key: &str) ->}/// Canonicalize, gate by content fingerprint, encrypt and `POST v2/Vault`. Returns the outcome and, on a KEK/VEK-/// migration push, the new content key the session adopts.+/// migration push, the new content key the session switches to.pub(crate) async fn push(ctx: &mut Ctx, cached: Option<CanonicalizedSet>, create_vault_key: bool, force_full_write: bool) -> SyncResult<(PushStatus, Option<String>)> {http::with_outdated_server_guard(push_internal(ctx, cached, create_vault_key, force_full_write).await)}@@ -688,7 +688,7 @@ async fn commit_blob_baselines(ctx: &Ctx, blobs: &UploadBlobs, uploaded: &HashMastate::set(&ctx.host, state::VAULT_BLOB_CIPHER_CACHE, &new_cache).await}-/// Adopt the hierarchy a migration push just committed: cache the encrypted chain and stage the private key.+/// Store the hierarchy a migration push just committed: cache the encrypted chain and stage the private key.async fn complete_account_key_migration(ctx: &mut Ctx, migration: &LegacyAccountKeyMigration) -> SyncResult<()> {let blobs = &migration.account_keys;state::set(&ctx.host, state::ENCRYPTED_ACCOUNT_KEY, &blobs.encrypted_account_key).await?;diff --git a/core/rust/src/vault_sync/state.rs b/core/rust/src/vault_sync/state.rsindex 517c040cb..7fc35cfc2 100644--- a/core/rust/src/vault_sync/state.rs+++ b/core/rust/src/vault_sync/state.rs@@ -69,7 +69,7 @@ impl Ctx {self.encryption_key.clone().ok_or(SyncError::VaultLocked)}- /// Adopt a new session encryption key; the next vault store hands it to the host.+ /// Set a new session encryption key; the next vault store hands it to the host.pub fn set_encryption_key(&mut self, key: String) {self.new_encryption_key = Some(key.clone());self.encryption_key = Some(key);diff --git a/core/rust/src/vault_sync/tests/mod.rs b/core/rust/src/vault_sync/tests/mod.rsindex ba3a3ae2d..ea438312b 100644--- a/core/rust/src/vault_sync/tests/mod.rs+++ b/core/rust/src/vault_sync/tests/mod.rs@@ -56,7 +56,7 @@ fn snapshot_of(conn: &rusqlite::Connection, vek: &str, revision: i64, salt: &strtables: read_tables(conn),canonicalized_at: "2026-09-11T00:00:00.000Z".to_string(),manifests: vec![ManifestSpec { manifest_id: PERSONAL_MANIFEST_ID.to_string(), manifest_salt: salt.to_string(), name: None }],- adopt_unstamped_into: None,+ stamp_unstamped_into: None,}).unwrap();let manifest_json = serde_json::to_string(&canonicalized.manifests[0].manifest).unwrap();@@ -459,7 +459,7 @@ fn manifest_migration_generates_the_key_hierarchy_and_pushes() {assert_eq!(result["success"], true, "{}", result);assert_eq!(result["pushed"], true);let new_key = host.vault_key.clone();- assert_ne!(new_key, kek, "the host adopts the new VEK through the store command");+ assert_ne!(new_key, kek, "the host receives the new VEK through the store command");let posts: Vec<_> = host.requests_to("Vault").into_iter().filter(|r| r.method == "POST").collect();let body = posts[0].body.as_ref().unwrap();assert!(body["accountKeys"]["encryptedAccountKey"].is_string(), "the migration push carries the key hierarchy");@@ -616,10 +616,10 @@ fn vault_key_body(hierarchy: &crypto::AccountKeyHierarchy) -> Value {}/// The cross-device race: this device logged in while the account was legacy (no cached chain, KEK session), and-/// another device created the hierarchy since. The pull adopts it, and the stored vault reaches the host+/// another device created the hierarchy since. The pull accepts it, and the stored vault reaches the host/// together with the VEK it is now encrypted under.#[test]-fn a_hierarchy_created_on_another_device_is_adopted_on_the_next_pull() {+fn a_hierarchy_created_on_another_device_is_accepted_on_the_next_pull() {let kek = crypto::generate_key_base64();let hierarchy = crypto::create_account_key_hierarchy(&kek).unwrap();let vek = hierarchy.vault_encryption_key.clone();@@ -635,7 +635,7 @@ fn a_hierarchy_created_on_another_device_is_adopted_on_the_next_pull() {let result = host.drive(&SyncSession::new(&request("fullSync", &kek, false, 0)).unwrap());assert_eq!(result["success"], true, "{}", result);- assert_eq!(host.vault_key, vek, "the store carried the VEK, so the host adopted it before opening the blob");+ assert_eq!(host.vault_key, vek, "the store carried the VEK, so the host switched to it before opening the blob");assert!(matches!(&host.store_calls[0], Command::VaultStore { encryption_key: Some(key), .. } if *key == vek));assert_eq!(item_names(&host.local), vec!["Server item"]);assert_eq!(host.state[state::ENCRYPTED_ACCOUNT_KEY], hierarchy.account_keys.encrypted_account_key);diff --git a/core/rust/src/vault_sync/tests/test_host.rs b/core/rust/src/vault_sync/tests/test_host.rsindex b384cf440..801aa3838 100644--- a/core/rust/src/vault_sync/tests/test_host.rs+++ b/core/rust/src/vault_sync/tests/test_host.rs@@ -158,7 +158,7 @@ impl TestHost {if expected != self.mutation_sequence {json!({ "success": false, "mutationSequence": self.mutation_sequence })} else {- self.adopt_blob(&encrypted_blob);+ self.store_blob(&encrypted_blob);json!({ "success": true, "mutationSequence": self.mutation_sequence })}} else {@@ -166,7 +166,7 @@ impl TestHost {self.mutation_sequence += 1;self.is_dirty = true;}- self.adopt_blob(&encrypted_blob);+ self.store_blob(&encrypted_blob);json!({ "success": true, "mutationSequence": self.mutation_sequence })}}@@ -189,7 +189,7 @@ impl TestHost {}/// Store a blob and reload `local` from it, as the contract requires.- fn adopt_blob(&mut self, encrypted_blob: &str) {+ fn store_blob(&mut self, encrypted_blob: &str) {self.vault_blob = Some(encrypted_blob.to_string());let bytes = crypto::symmetric_decrypt_bytes(&base64_decode(encrypted_blob).unwrap(), &self.vault_key).expect("stored blob decrypts with the vault key");self.local = open_from_bytes(&bytes);diff --git a/core/rust/src/vault_sync/tests/unloaded_blobs.rs b/core/rust/src/vault_sync/tests/unloaded_blobs.rsindex 2108f5058..e7b8966c3 100644--- a/core/rust/src/vault_sync/tests/unloaded_blobs.rs+++ b/core/rust/src/vault_sync/tests/unloaded_blobs.rs@@ -45,7 +45,7 @@ fn snapshot(conn: &rusqlite::Connection, vek: &str, blob_key: &str, salt: &str,tables: read_tables(conn),canonicalized_at: "2026-09-11T00:00:00.000Z".to_string(),manifests: vec![ManifestSpec { manifest_id: PERSONAL_MANIFEST_ID.to_string(), manifest_salt: salt.to_string(), name: None }],- adopt_unstamped_into: None,+ stamp_unstamped_into: None,}).unwrap();let entry = &canonicalized.manifests[0];