Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Remove unused manifest name column, update blob byte format
Leendert de Borst8ae9512ee547
diff --git a/apps/browser-extension/tests/helpers/manifest-v2-api.ts b/apps/browser-extension/tests/helpers/manifest-v2-api.tsindex 0da0695b4..0ae11996a 100644--- a/apps/browser-extension/tests/helpers/manifest-v2-api.ts+++ b/apps/browser-extension/tests/helpers/manifest-v2-api.ts@@ -234,7 +234,7 @@ export async function pushInitialVault(apiBaseUrl: string, token: string, usernaconst canonicalized = await vaultCodecCanonicalizeFromSqlite({tables,canonicalizedAt: new Date().toISOString(),- manifests: [{ manifestId, manifestSalt: await vaultCodecGenerateManifestSalt(), name: null }],+ manifests: [{ manifestId, manifestSalt: await vaultCodecGenerateManifestSalt() }],});const manifest = canonicalized.manifests[0].manifest as DecryptedManifest;diff --git a/apps/browser-extension/tests/helpers/vault-tamper.ts b/apps/browser-extension/tests/helpers/vault-tamper.tsindex 3a041c305..49ebbb724 100644--- a/apps/browser-extension/tests/helpers/vault-tamper.ts+++ b/apps/browser-extension/tests/helpers/vault-tamper.ts@@ -29,7 +29,7 @@ export async function writeManifestWithBrokenRow(apiUrl: string, user: TestUser,const canonicalized = await vaultCodecCanonicalizeFromSqlite({tables: (await getSyncableTableNames()).map((name) => ({ name, records: [] })),canonicalizedAt: new Date().toISOString(),- manifests: [{ manifestId, manifestSalt: await vaultCodecGenerateManifestSalt(), name: null }],+ manifests: [{ manifestId, manifestSalt: await vaultCodecGenerateManifestSalt() }],});const manifest = canonicalized.manifests[0].manifest as DecryptedManifest;manifest.tables[table] = [...(manifest.tables[table] ?? []), row];diff --git a/apps/web/tests/helpers/vault-tamper.ts b/apps/web/tests/helpers/vault-tamper.tsindex 99b3ac84c..eaa389c3f 100644--- a/apps/web/tests/helpers/vault-tamper.ts+++ b/apps/web/tests/helpers/vault-tamper.ts@@ -35,7 +35,7 @@ export async function writeManifestWithBrokenRow(apiUrl: string, user: TestUser,const canonicalized = await vaultCodecCanonicalizeFromSqlite({tables: (await getSyncableTableNames()).map((name) => ({ name, records: [] })),canonicalizedAt: new Date().toISOString(),- manifests: [{ manifestId, manifestSalt: await vaultCodecGenerateManifestSalt(), name: null }],+ manifests: [{ manifestId, manifestSalt: await vaultCodecGenerateManifestSalt() }],});const manifest = canonicalized.manifests[0].manifest as { tables: Record<string, unknown[]> };manifest.tables[table] = [...(manifest.tables[table] ?? []), row];diff --git a/core/client/src/rust/RustCoreTypes.ts b/core/client/src/rust/RustCoreTypes.tsindex a179908e1..4ec69779d 100644--- a/core/client/src/rust/RustCoreTypes.ts+++ b/core/client/src/rust/RustCoreTypes.ts@@ -159,7 +159,6 @@ export type CodecManifest = {manifestSalt: string;canonicalizedAt: string;manifestId: string;- name?: string | null;tables: Record<string, Array<Record<string, unknown>>>;[key: string]: unknown;};@@ -170,7 +169,6 @@ export type CodecManifest = {export type CodecManifestSpec = {manifestId: string;manifestSalt: string;- name?: string | null;};/**@@ -184,8 +182,8 @@ export type CodecDataBucket = {[key: string]: unknown;};-/** A decoded blob entry: kind + plaintext bytes (base64). */-export type CodecBlobEntry = { kind: string; bytesBase64: string };+/** A decoded blob entry: kind + plaintext bytes. */+export type CodecBlobEntry = { kind: string; bytes: number[] };/** One manifest produced by canonicalize: the manifest and the blobs hashed with its own salt. */export type CodecCanonicalizedManifest = { manifest: CodecManifest; blobs: Record<string, CodecBlobEntry> };diff --git a/core/rust/src/vault_codec/canonicalize.rs b/core/rust/src/vault_codec/canonicalize.rsindex f1def1d7e..1aa66ce9d 100644--- a/core/rust/src/vault_codec/canonicalize.rs+++ b/core/rust/src/vault_codec/canonicalize.rs@@ -80,7 +80,7 @@ pub fn canonicalize_from_sqlite(input: CanonicalizeInput) -> VaultResult<Canoniclet tables: Tables = partition.tables.into_iter().map(|(name, records)| Ok((name.clone(), extract_table_blobs(&name, records, &partition.spec.manifest_salt, &mut blobs)?))).collect::<VaultResult<_>>()?;let extra = overflow.manifest_extra(&partition.spec.manifest_id);manifests.push(CanonicalizedManifest {- manifest: Manifest { schema_version: SCHEMA_VERSION, manifest_salt: partition.spec.manifest_salt, canonicalized_at: input.canonicalized_at.clone(), manifest_id: partition.spec.manifest_id, name: partition.spec.name, tables, extra },+ manifest: Manifest { schema_version: SCHEMA_VERSION, manifest_salt: partition.spec.manifest_salt, canonicalized_at: input.canonicalized_at.clone(), manifest_id: partition.spec.manifest_id, tables, extra },blobs,});}@@ -208,7 +208,7 @@ fn extract_blob_cell(cell: Option<&Value>, manifest_salt: &str, kind: &str, blob_ => return Ok(Value::Null),};let hash = salted_blob_hash(&bytes, manifest_salt)?;- blobs.entry(hash.clone()).or_insert_with(|| BlobEntry { kind: kind.to_string(), bytes_base64: b64.to_string() });+ blobs.entry(hash.clone()).or_insert_with(|| BlobEntry { kind: kind.to_string(), bytes });Ok(blob_ref(&hash, kind))}diff --git a/core/rust/src/vault_codec/manifest.rs b/core/rust/src/vault_codec/manifest.rsindex 240f81676..3bd612fee 100644--- a/core/rust/src/vault_codec/manifest.rs+++ b/core/rust/src/vault_codec/manifest.rs@@ -68,13 +68,13 @@ pub struct BucketLayoutEntry {pub tables: Vec<String>,}-/// A decoded blob entry. `bytes_base64` is the plaintext blob, base64-encoded for transport+/// A decoded blob entry: its kind and plaintext bytes.#[derive(Debug, Clone, Serialize, Deserialize)]#[serde(rename_all = "camelCase")]pub struct BlobEntry {/// "favicon" | "attachment".pub kind: String,- pub bytes_base64: String,+ pub bytes: Vec<u8>,}/// One manifest the caller wants canonicalize to emit.diff --git a/core/rust/src/vault_codec/materialize.rs b/core/rust/src/vault_codec/materialize.rsindex 66ed7c7e1..be257387a 100644--- a/core/rust/src/vault_codec/materialize.rs+++ b/core/rust/src/vault_codec/materialize.rs@@ -116,7 +116,7 @@ fn store_blob_hashes(table_name: &str, records: &mut [CodecRecord], schema_colum}}-/// One `Manifests` row per materialized manifest: `{ Id, Name }`.+/// One `Manifests` row per materialized manifest: `{ Id }`.fn manifest_bookkeeping_records(manifests: &[Manifest]) -> Vec<CodecRecord> {let mut records: Vec<CodecRecord> = Vec::with_capacity(manifests.len());for manifest in manifests {@@ -126,7 +126,6 @@ fn manifest_bookkeeping_records(manifests: &[Manifest]) -> Vec<CodecRecord> {}let mut row: CodecRecord = HashMap::new();row.insert(ID_COL.to_string(), json!(id));- row.insert("Name".to_string(), manifest.name.as_deref().map(|n| json!(n)).unwrap_or(serde_json::Value::Null));super::normalize::normalize_row_id_spelling(&mut row);records.push(row);}diff --git a/core/rust/src/vault_codec/tests/mod.rs b/core/rust/src/vault_codec/tests/mod.rsindex 550fa32a8..f65849425 100644--- a/core/rust/src/vault_codec/tests/mod.rs+++ b/core/rust/src/vault_codec/tests/mod.rs@@ -23,7 +23,7 @@ fn canonicalize(tables: Vec<CodecTableData>) -> CanonicalizedVault {canonicalize_from_sqlite(CanonicalizeInput {tables: stamp_unstamped(tables, PERSONAL),canonicalized_at: "2026-01-01T00:00:00.000Z".to_string(),- manifests: vec![ManifestSpec { manifest_id: PERSONAL.to_string(), manifest_salt: SALT.to_string(), name: None }],+ manifests: vec![ManifestSpec { manifest_id: PERSONAL.to_string(), manifest_salt: SALT.to_string() }],stamp_unstamped_into: None,}).unwrap()@@ -134,7 +134,7 @@ fn a_vault_round_trips_through_manifest_buckets_and_blobs() {assert!(re.overflow.is_empty() && overflow_table_of(&re).is_none(), "a fitting schema splits nothing off");// The vault DB carries one Manifests row per materialized manifest, which canonicalize consumes as bookkeeping.- assert_eq!(tables[MANIFESTS_TABLE], vec![row(&[("Id", json!(PERSONAL)), ("Name", serde_json::Value::Null)])]);+ assert_eq!(tables[MANIFESTS_TABLE], vec![row(&[("Id", json!(PERSONAL))])]);assert!(!canonicalize(re.tables.clone()).manifests[0].manifest.tables.contains_key(MANIFESTS_TABLE));}@@ -371,7 +371,6 @@ fn materialize_derives_the_missing_ids_back() {manifest_salt: SALT.to_string(),canonicalized_at: "2026-01-01T00:00:00.000Z".to_string(),manifest_id: PERSONAL.to_string(),- name: None,tables: [("Items".to_string(), vec![stamped(PERSONAL, &[("Id", json!("i-1"))])]),("FieldValues".to_string(), vec![diff --git a/core/rust/src/vault_codec/tests/sharing.rs b/core/rust/src/vault_codec/tests/sharing.rsindex 802e710e1..9fec3d8d3 100644--- a/core/rust/src/vault_codec/tests/sharing.rs+++ b/core/rust/src/vault_codec/tests/sharing.rs@@ -12,8 +12,8 @@ use std::collections::{HashMap, HashSet};const SALT_SHARED: &str = "ffeeddccbbaa99887766554433221100ffeeddccbbaa99887766554433221100";fn spec(manifest_id: &str) -> ManifestSpec {- let (salt, name) = if manifest_id == PERSONAL { (SALT_PERSONAL, None) } else { (SALT_SHARED, Some(format!("Share {manifest_id}"))) };- ManifestSpec { manifest_id: manifest_id.to_string(), manifest_salt: salt.to_string(), name }+ let salt = if manifest_id == PERSONAL { SALT_PERSONAL } else { SALT_SHARED };+ ManifestSpec { manifest_id: manifest_id.to_string(), manifest_salt: salt.to_string() }}/// A canonicalize input for the personal manifest plus `shared` manifests; rows carry their stamps already.@@ -172,7 +172,6 @@ fn every_row_routes_to_the_manifest_its_stamp_names() {let personal = &manifest(&out, PERSONAL).manifest;let shared = &manifest(&out, SHARED).manifest;- assert_eq!(shared.name.as_deref(), Some(format!("Share {SHARED}").as_str()), "the manifest carries its display name");assert_eq!(shared.manifest_salt, SALT_SHARED);assert_eq!(ids(rows_of(&shared.tables, "Folders")), vec!["f-shared", "f-sub"]);assert_eq!(ids(rows_of(&personal.tables, "Folders")), vec!["f-personal"]);@@ -585,7 +584,7 @@ fn rebind_blobs(tables: &mut [CodecTableData], blobs: &HashMap<String, BlobEntryfor record in tables.iter_mut().flat_map(|t| t.records.iter_mut()) {let refs: Vec<(String, String)> = record.iter().filter_map(|(col, value)| Some((col.clone(), value.get("__blobRef")?.as_str()?.to_string()))).collect();for (col, hash) in refs {- record.insert(col, json!({ "__b64": blobs.get(&hash).map(|b| b.bytes_base64.clone()).unwrap_or_default() }));+ record.insert(col, json!({ "__b64": blobs.get(&hash).map(|b| b64(&b.bytes)).unwrap_or_default() }));}}}@@ -653,7 +652,7 @@ fn a_members_push_keeps_the_shared_logo_and_its_bytes() {let blob_ref = logo["FileData"]["__blobRef"].as_str().unwrap_or_else(|| panic!("shared row empty {shared_row_empty}: the pushed folder logo must still carry bytes, got {:?}", logo["FileData"]));assert!(shared.blobs.contains_key(blob_ref), "and registers them so the write keeps a live blob reference");if !shared_row_empty {- assert_eq!(shared.blobs[blob_ref].bytes_base64, b64(&[0xAA, 0xBB]), "the folder keeps the logo its members agreed on");+ assert_eq!(shared.blobs[blob_ref].bytes, [0xAA, 0xBB], "the folder keeps the logo its members agreed on");}assert_eq!(find(rows_of(&shared.manifest.tables, "Items"), "i-shared")["LogoId"], logo["Id"], "the item was folded back onto the folder's row");}@@ -669,7 +668,6 @@ fn combine_scopes_a_manifest_written_before_scoping_into_its_own_namespace() {manifest_salt: SALT_SHARED.to_string(),canonicalized_at: "2026-01-01T00:00:00.000Z".to_string(),manifest_id: "m-legacy".to_string(),- name: Some("Legacy share".to_string()),tables: HashMap::from([("Folders".to_string(), vec![row(&[("Id", json!("f-legacy")), ("ParentFolderId", serde_json::Value::Null)])]),("Items".to_string(), vec![row(&[("Id", json!("i-legacy")), ("FolderId", json!("f-legacy")), ("LogoId", json!("their-random-id"))])]),@@ -965,18 +963,17 @@ fn children_left_unstamped_follow_their_item_only_while_that_is_unambiguous() {#[test]fn manifest_specs_deserialize_from_camel_case_json() {- // Every manifest is described the same way on the wire (id, salt, optional name) with nothing marking one as special.+ // Every manifest is described the same way on the wire (id, salt) with nothing marking one as special.let input_json = json!({"tables": [{ "name": "Items", "records": [] }],"canonicalizedAt": "2026-01-01T00:00:00.000Z",- "manifests": [{ "manifestId": PERSONAL, "manifestSalt": SALT_PERSONAL }, { "manifestId": "m-1", "manifestSalt": SALT_SHARED, "name": "Team", "anchorFolderId": "f-1" }]+ "manifests": [{ "manifestId": PERSONAL, "manifestSalt": SALT_PERSONAL }, { "manifestId": "m-1", "manifestSalt": SALT_SHARED, "anchorFolderId": "f-1" }]}).to_string();let out_json = crate::common::error::json_call(&input_json, |input: CanonicalizeInput| canonicalize_from_sqlite(input)).unwrap();let value: serde_json::Value = serde_json::from_str(&out_json).unwrap();assert_eq!(value["manifests"][0]["manifest"]["manifestId"], json!(PERSONAL));assert_eq!(value["manifests"][1]["manifest"]["manifestId"], json!("m-1"));- assert_eq!(value["manifests"][1]["manifest"]["name"], json!("Team"));assert!(value["manifests"].as_array().unwrap().iter().all(|m| m.get("isPersonal").is_none() && m["manifest"].get("anchorFolderId").is_none()), "nothing flags a manifest as the vault's own, and folder anchoring is never persisted");assert!(value["dataBuckets"].is_array() && value["manifests"][0].get("dataBuckets").is_none(), "buckets belong to the vault, beside the manifests");}diff --git a/core/rust/src/vault_merge/tests/mod.rs b/core/rust/src/vault_merge/tests/mod.rsindex 371d5f17b..d0a1a5f24 100644--- a/core/rust/src/vault_merge/tests/mod.rs+++ b/core/rust/src/vault_merge/tests/mod.rs@@ -10,7 +10,7 @@ const T_MID: &str = "2024-01-05T00:00:00Z";const T_NEW: &str = "2024-01-09T00:00:00Z";fn manifest(manifest_id: &str, tables: &[(&str, Vec<CodecRecord>)]) -> Manifest {- Manifest { schema_version: 1, manifest_salt: SALT.to_string(), canonicalized_at: T_OLD.to_string(), manifest_id: manifest_id.to_string(), name: None, tables: tables.iter().map(|(name, rows)| (name.to_string(), rows.clone())).collect(), extra: HashMap::new() }+ Manifest { schema_version: 1, manifest_salt: SALT.to_string(), canonicalized_at: T_OLD.to_string(), manifest_id: manifest_id.to_string(), tables: tables.iter().map(|(name, rows)| (name.to_string(), rows.clone())).collect(), extra: HashMap::new() }}/// A row in `PERSONAL` with the given columns plus an `UpdatedAt`.@@ -167,11 +167,10 @@ fn blob_references_and_server_metadata_ride_through() {let (rows, _) = merge_table("Attachments", vec![attachment("hash-old", T_OLD)], vec![attachment("hash-new", T_NEW)]);assert_eq!(rows[0]["Blob"], json!({ "__blobRef": "hash-new", "__blobKind": "attachment" }), "no byte payload ever crosses the merge");- let mut server = manifest(PERSONAL, &[("Items", vec![item("a", "server", T_OLD)])]);- server.name = Some("Family".to_string());+ let server = manifest(PERSONAL, &[("Items", vec![item("a", "server", T_OLD)])]);let output = merge(vec![server], vec![manifest(PERSONAL, &[("Items", vec![item("b", "local", T_MID)])])]);let merged = &output.manifests[0].manifest;- assert_eq!((merged.manifest_salt.as_str(), merged.name.as_deref()), (SALT, Some("Family")), "salt and name come from the server manifest");+ assert_eq!(merged.manifest_salt, SALT, "the salt comes from the server manifest");assert!(crate::vault_codec::validate_manifest(merged).ok);}diff --git a/core/rust/src/vault_sync/merge.rs b/core/rust/src/vault_sync/merge.rsindex c9d248fbd..b7ea6cc6c 100644--- a/core/rust/src/vault_sync/merge.rs+++ b/core/rust/src/vault_sync/merge.rs@@ -131,7 +131,7 @@ async fn merge_onto_opened_manifests(ctx: &mut Ctx, opened: &OpenedManifestSet,for (hash, blob) in &canonicalized.blobs {local_blobs.insert(hash.clone(), blob.clone());if !blob_map.contains_key(hash) {- blob_map.insert(hash.clone(), crate::common::encoding::base64_decode(&blob.bytes_base64)?);+ blob_map.insert(hash.clone(), blob.bytes.clone());}}}@@ -186,7 +186,7 @@ fn collect_merged_blobs(manifests: &[Manifest], blob_map: &HashMap<String, Vec<uif let Some(local) = local_blobs.get(&hash) {blobs.insert(hash, local.clone());} else if let Some(bytes) = blob_map.get(&hash) {- blobs.insert(hash, BlobEntry { kind, bytes_base64: crate::common::encoding::base64_encode(bytes) });+ blobs.insert(hash, BlobEntry { kind, bytes: bytes.clone() });}}}diff --git a/core/rust/src/vault_sync/migration.rs b/core/rust/src/vault_sync/migration.rsindex b8d8b724a..caafa0016 100644--- a/core/rust/src/vault_sync/migration.rs+++ b/core/rust/src/vault_sync/migration.rs@@ -120,7 +120,7 @@ pub(crate) async fn rebuild_local_schema(ctx: &mut Ctx, stamp_unstamped_into: Oplet mut blob_map = HashMap::new();for entry in &set.canonicalized.manifests {for (hash, blob) in &entry.blobs {- blob_map.insert(hash.clone(), crate::common::encoding::base64_decode(&blob.bytes_base64)?);+ blob_map.insert(hash.clone(), blob.bytes.clone());}}let manifests: Vec<_> = set.canonicalized.manifests.iter().map(|m| m.manifest.clone()).collect();diff --git a/core/rust/src/vault_sync/pull.rs b/core/rust/src/vault_sync/pull.rsindex bab4d2652..03aefd567 100644--- a/core/rust/src/vault_sync/pull.rs+++ b/core/rust/src/vault_sync/pull.rs@@ -396,7 +396,7 @@ async fn empty_personal_manifest(ctx: &Ctx, dto: &ManifestDto, vek: &str) -> Syn// A salt from an earlier attempt is kept, so blob hashes stay stable until the first write lands.let manifest_salt = state::get::<String>(&ctx.host, state::VAULT_MANIFEST_SALT).await?.unwrap_or_else(vault_codec::generate_manifest_salt);let tables = SYNCABLE_TABLE_NAMES.iter().map(|name| CodecTableData { name: name.to_string(), records: Vec::new() }).collect();- let spec = ManifestSpec { manifest_id: dto.manifest_id.clone(), manifest_salt, name: None };+ let spec = ManifestSpec { manifest_id: dto.manifest_id.clone(), manifest_salt };let canonicalized = vault_codec::canonicalize_from_sqlite(CanonicalizeInput { tables, canonicalized_at: crate::common::timestamp::now_iso_utc(), manifests: vec![spec], stamp_unstamped_into: None })?;let manifest = canonicalized.manifests.into_iter().next().map(|m| m.manifest).ok_or_else(|| SyncError::Other("canonicalize returned no manifest for the empty vault".to_string()))?;Ok(ResolvedManifest { manifest_id: dto.manifest_id.clone(), is_personal: true, manifest, vek: SecretString::from(vek), revision: dto.revision, blob_references: Vec::new(), content_fingerprint: String::new() })diff --git a/core/rust/src/vault_sync/push.rs b/core/rust/src/vault_sync/push.rsindex 0d1ce6d81..9de96634b 100644--- a/core/rust/src/vault_sync/push.rs+++ b/core/rust/src/vault_sync/push.rs@@ -75,7 +75,7 @@ pub(crate) struct UploadOutcome {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 manifests: Vec<ManifestSpec> = manifest_records.iter().map(|r| ManifestSpec { manifest_id: r.manifest_id.clone(), manifest_salt: r.salt.clone() }).collect();let canonicalized = vault_codec::canonicalize_from_sqlite(CanonicalizeInput { tables, canonicalized_at: crate::common::timestamp::now_iso_utc(), manifests, stamp_unstamped_into })?;Ok(CanonicalizedSet { canonicalized, manifest_records })}@@ -517,7 +517,7 @@ fn collect_upload_blobs(candidates: &[Candidate]) -> SyncResult<UploadBlobs> {continue;}blobs.order.push(hash.clone());- blobs.entries.insert(hash.clone(), UploadBlobEntry { manifest_id: candidate.record.manifest_id.clone(), bytes: crate::common::encoding::base64_decode(&blob.bytes_base64)?, kind: blob.kind.clone(), vek: candidate.vek.clone(), from_personal: candidate.record.is_personal });+ blobs.entries.insert(hash.clone(), UploadBlobEntry { manifest_id: candidate.record.manifest_id.clone(), bytes: blob.bytes.clone(), kind: blob.kind.clone(), vek: candidate.vek.clone(), from_personal: candidate.record.is_personal });}}Ok(blobs)diff --git a/core/rust/src/vault_sync/sharing.rs b/core/rust/src/vault_sync/sharing.rsindex 3871ed7f0..b29cc5b77 100644--- a/core/rust/src/vault_sync/sharing.rs+++ b/core/rust/src/vault_sync/sharing.rs@@ -595,13 +595,8 @@ async fn invite_to_shared_manifest(ctx: &mut Ctx) -> Outcome {let record = record.ok_or_else(|| SyncError::Other("This account holds no key for the shared manifest".to_string()))?;let manifest_vek = keys::open_shared_manifest_vek(ctx, &record).await?.ok_or_else(|| SyncError::Other("The key of the shared manifest did not open".to_string()))?;- // The name travels encrypted in the invitation, so the recipient sees what they are invited to; one too long to fit is left out.- let served_name = record.encrypted_name.as_deref().and_then(|ciphertext| pull::open_manifest_name(ciphertext, &manifest.manifest_id, manifest_vek.expose_secret()));- let name = match served_name {- Some(name) => Some(name),- None => db::manifest_display_names(&ctx.host).await?.get(&id_key(&manifest.manifest_id)).cloned(),- }- .filter(|name| !name.is_empty() && name.len() <= MAX_SHARED_MANIFEST_NAME_BYTES);+ // The name travels encrypted in the invitation, so the recipient sees what they are invited to.+ let name = record.encrypted_name.as_deref().and_then(|ciphertext| pull::open_manifest_name(ciphertext, &manifest.manifest_id, manifest_vek.expose_secret())).filter(|name| name.len() <= MAX_SHARED_MANIFEST_NAME_BYTES);let encrypted_vek = keys::encrypt_manifest_vek(manifest_vek.expose_secret(), &manifest.manifest_id, &recipient_public_key)?;let encrypted_name = name.map(|name| crypto::encrypt_with_public_key_and_label(name.as_bytes(), &recipient_public_key, &crypto::aad::invitation_name(&manifest.manifest_id))).transpose()?;let grant = ManifestGrant {diff --git a/core/rust/src/vault_sync/tests/email_routing.rs b/core/rust/src/vault_sync/tests/email_routing.rsindex cab0a44a1..e04ea2b57 100644--- a/core/rust/src/vault_sync/tests/email_routing.rs+++ b/core/rust/src/vault_sync/tests/email_routing.rs@@ -9,7 +9,7 @@ fn manifest(id: &str, items: Vec<Value>, fields: Vec<Value>) -> Manifest {let mut tables = HashMap::new();tables.insert("Items".to_string(), items.into_iter().map(|v| serde_json::from_value(v).unwrap()).collect());tables.insert("FieldValues".to_string(), fields.into_iter().map(|v| serde_json::from_value(v).unwrap()).collect());- Manifest { schema_version: 1, manifest_salt: String::new(), canonicalized_at: String::new(), manifest_id: id.to_string(), name: None, tables, extra: HashMap::new() }+ Manifest { schema_version: 1, manifest_salt: String::new(), canonicalized_at: String::new(), manifest_id: id.to_string(), tables, extra: HashMap::new() }}#[test]diff --git a/core/rust/src/vault_sync/tests/fake_server.rs b/core/rust/src/vault_sync/tests/fake_server.rsindex b29420621..c96b3d4da 100644--- a/core/rust/src/vault_sync/tests/fake_server.rs+++ b/core/rust/src/vault_sync/tests/fake_server.rs@@ -113,7 +113,7 @@ impl FakeServer {let canonicalized = vault_codec::canonicalize_from_sqlite(CanonicalizeInput {tables: read_tables(db),canonicalized_at: "2026-09-11T00:00:00.000Z".to_string(),- manifests: vec![ManifestSpec { manifest_id: personal.clone(), manifest_salt: salt.to_string(), name: None }],+ manifests: vec![ManifestSpec { manifest_id: personal.clone(), manifest_salt: salt.to_string() }],stamp_unstamped_into: None,}).unwrap();@@ -122,8 +122,8 @@ impl FakeServer {let store = self.blobs.entry(personal.clone()).or_default();let mut references = Vec::new();for (blob_hash, blob_entry) in &entry.blobs {- let bytes = crate::common::encoding::base64_decode(&blob_entry.bytes_base64).unwrap();- let encrypted = blob_keys::encrypt_blob(&bytes, blob_key, &personal, blob_hash).unwrap();+ let bytes = &blob_entry.bytes;+ let encrypted = blob_keys::encrypt_blob(bytes, blob_key, &personal, blob_hash).unwrap();store.insert(blob_hash.clone(), json!({ "hash": blob_hash, "category": blob_entry.kind, "encryptedDataBase64": crate::common::encoding::base64_encode(&encrypted.encrypted_data), "encryptedBlobKey": encrypted.encrypted_blob_key }));references.push(json!({ "hash": blob_hash, "category": blob_entry.kind, "sizeBytes": bytes.len() }));}@@ -199,7 +199,7 @@ impl FakeServer {let local = vault_codec::canonicalize_from_sqlite(CanonicalizeInput {tables: read_tables(&host.local),canonicalized_at: String::new(),- manifests: vec![ManifestSpec { manifest_id: self.personal_manifest_id.clone(), manifest_salt: salt.to_string(), name: None }],+ manifests: vec![ManifestSpec { manifest_id: self.personal_manifest_id.clone(), manifest_salt: salt.to_string() }],stamp_unstamped_into: None,}).unwrap();