Files
Benjamin Beurdouche 0ff21613db Bug 2055631 - Restore the wrapped_dek on-disk JSON key in the Lockstore keystore r=gerard-majax
The clippy pass in this bug renamed WrappedDek::wrapped_dek to
WrappedDek::dek to satisfy struct_field_names. WrappedDek is persisted
with serde_json, so the rename also changed the on-disk JSON key: DEK
metadata written by any earlier build stores "wrapped_dek", the field
has no serde default, and load_metadata therefore fails with a
missing-field error. Every pre-existing keystore becomes unreadable.

That patch's own commit message stated the field would keep its name
because it is the documented on-disk key, guarded by a scoped allow.
Only the rename landed.

Pin the serialized name back with #[serde(rename = "wrapped_dek")],
keeping the Rust field called dek so the clippy lint stays satisfied.
Records written from now on stay readable by builds from before the
rename, and by the offline tooling that parses this format.

Restore the two on-disk-layout doc references to the wire name.

Differential Revision: https://phabricator.services.mozilla.com/D314318
2026-07-28 10:03:36 +00:00
..