1 Commits

Author SHA1 Message Date
librelad
81c672c474 feat(validation): implement the config checks the CLI already advertised
`libreportal validation app|system|all|status` dispatched to four functions that
were never defined anywhere and were absent from the manifest, so every
subcommand failed. They exist now.

The checks are the ones that would have caught the bugs found while auditing the
credential rework, all of which were invisible at runtime — a mis-declared key
does not crash, it silently stops working:

  * two keys sharing one RANDOMIZED<n>, which gave Gitea's metrics token and its
    admin password the same value
  * a generated key with no slot number
  * an annotation whose value is absent from its line body, so the tag can never
    substitute — how 0.1.0 Mastodon shipped a placeholder as its live password
  * an auth adapter persisting a key the config does not declare, making every
    password reset a silent no-op
  * duplicate keys, keys under the wrong app prefix, and compose tags with
    nothing to fill them

Verified both directions: clean across all 39 apps today, and each of the seven
bug classes above is caught when reintroduced into a scratch copy of the catalog
(including the real 0.1.0 mastodon compose pulled from git history).

Version tags are exempt from the backing-key check: the updater builds both the
CFG name and the tag name from the slug at runtime, so neither literal exists to
find.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 00:18:37 +01:00