fix(identity-wallet): address PR review feedback for identity_store
Critical fixes:
- remove_identity: distinguish not-found from transient Keychain errors
during cleanup instead of silently discarding all errors; log transient
failures with tracing::warn\!
- Add tracing logging at key failure points: managed-dids deserialization,
key generation, SE access control creation, SE key creation, and
application_label None
Important fixes:
- remove_identity: update index before cleaning up entries so partial
failure leaves orphaned entries (benign) rather than a registered-but-
empty identity (confusing)
- Replace // Task N: test section comments with descriptive labels per
CLAUDE.md no-ticket-references convention
- Strengthen remove_identity_cleans_up_all_entries test to verify device
key cleanup by asserting the new key differs from the old one
- Fix CLAUDE.md invariant: device-key suffix is software path only, not
written on SE path
- Fix test plan: AC2.1 wording clarifies add_identity vs
get_or_create_device_key roles; biometric prompt expectation corrected
(kSecAccessControlPrivateKeyUsage without biometric flags)
Minor fixes:
- SigningKey::from_slice error mapped to SerializationError (data
corruption) instead of KeychainError (I/O)
- Use expect() instead of if let for multibase decode in test
- Fix test count for AC2.9 in traceability table