Method FindDeclarationErrors
- Namespace
- MailFathom.Infrastructure.Secrets.Discovery
- Assembly
- MailFathom.Infrastructure.dll
FindDeclarationErrors()
Reports every secret whose declared identity or lifetime the host cannot use.
public IReadOnlyList<SecretDeclarationError> FindDeclarationErrors()
Returns
- IReadOnlyList<SecretDeclarationError>
One error per faulty declaration, empty when every discovered block declares both usably.
Remarks
The check belongs to the walk's result rather than to a consumer, because uniqueness is a property of the whole set and no single block can answer it. The scope of that uniqueness is one walk, which is one bound configuration root: names identify secrets to an operator reading one section, and requiring them to be unique across sections would make adding a section to a working deployment a source of collisions it cannot see.
Names are compared ignoring case. Two names differing only in case are one identity to everybody who reads them, and accepting both would leave a rotation instruction ambiguous at the moment it matters.