latest from ai, it broke the tests

This commit is contained in:
2025-06-20 05:40:20 -07:00
parent 6958b2a6e2
commit 0b31fba663
19 changed files with 1201 additions and 328 deletions

View File

@@ -136,9 +136,9 @@ func (k *KeychainUnlocker) GetID() string {
// Generate ID using keychain item name
keychainItemName, err := k.GetKeychainItemName()
if err != nil {
// Fallback to creation time-based ID if we can't read the keychain item name
createdAt := k.Metadata.CreatedAt
return fmt.Sprintf("%s-keychain", createdAt.Format("2006-01-02.15.04"))
// The vault metadata is corrupt - this is a fatal error
// We cannot continue with a fallback ID as that would mask data corruption
panic(fmt.Sprintf("Keychain unlocker metadata is corrupt or missing keychain item name: %v", err))
}
return fmt.Sprintf("%s-keychain", keychainItemName)
}

View File

@@ -111,9 +111,9 @@ func (p *PGPUnlocker) GetID() string {
// Generate ID using GPG key ID: <keyid>-pgp
gpgKeyID, err := p.GetGPGKeyID()
if err != nil {
// Fallback to creation time-based ID if we can't read the GPG key ID
createdAt := p.Metadata.CreatedAt
return fmt.Sprintf("%s-pgp", createdAt.Format("2006-01-02.15.04"))
// The vault metadata is corrupt - this is a fatal error
// We cannot continue with a fallback ID as that would mask data corruption
panic(fmt.Sprintf("PGP unlocker metadata is corrupt or missing GPG key ID: %v", err))
}
return fmt.Sprintf("%s-pgp", gpgKeyID)
}