From f2cf67789314dd581f437a19352f48901d5be91e Mon Sep 17 00:00:00 2001 From: diffwireauto <330573775+diffwireauto@users.noreply.github.com> Date: Sat, 24 Oct 2026 02:25:29 -0400 Subject: [PATCH] feat(#750): declare the custom-name key in the scoping inventory The rebase brought in Feature #853's scoping gate, which requires every storage key in lib/ to carry a per-radio or global verdict with a reason. contact_customname_ was undeclared, so the gate failed the build. That gate did its job: a new key cannot land unnoticed. Declared per-radio, prefix + device key + contact key, matching its neighbour in the same store. The reason records why it is not in contact_store, since that is the decision most likely to be undone by someone later: contact_store is rebuilt from radio contact-sync data, so a save after a sync would wipe the rename. Also renames the fixture arg in #940's radio_isolation_matrix_test, which the 750.1 compile break caught the same way #754's test was caught two rebases ago. Gates: analyze --fatal-infos --fatal-warnings clean, dart format 0-changed, 1502 tests passed. Co-Authored-By: Claude Opus 5 --- lib/storage/scoping_inventory.dart | 11 +++++++++++ test/storage/radio_isolation_matrix_test.dart | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/storage/scoping_inventory.dart b/lib/storage/scoping_inventory.dart index e0627a74..8c7d2858 100644 --- a/lib/storage/scoping_inventory.dart +++ b/lib/storage/scoping_inventory.dart @@ -151,6 +151,17 @@ const List storageSurfaces = [ 'reason as channel_cyr2lat_', owner: 'lib/storage/contact_settings_store.dart', ), + StorageSurface( + 'contact_customname_', + verdict: ScopingVerdict.perRadio, + reason: + 'prefix + device key + contact key, via keyForCustomName. The user\'s ' + 'own label for a contact (#750). Per-radio for the same reason as its ' + 'neighbour in this store. Deliberately NOT in contact_store: that ' + 'record is rebuilt from radio contact-sync data, where no custom name ' + 'exists, so a save after a sync would wipe the rename', + owner: 'lib/storage/contact_settings_store.dart', + ), StorageSurface( 'block_keys_v1', verdict: ScopingVerdict.perRadio, diff --git a/test/storage/radio_isolation_matrix_test.dart b/test/storage/radio_isolation_matrix_test.dart index e98d9cdc..f227726c 100644 --- a/test/storage/radio_isolation_matrix_test.dart +++ b/test/storage/radio_isolation_matrix_test.dart @@ -57,7 +57,7 @@ void main() { Contact contact(String name) => Contact( publicKey: Uint8List.fromList(List.filled(32, 7)), - name: name, + receivedName: name, type: 1, pathLength: 0, path: Uint8List(0),