web+mail: warn humans whose recovery codes stop working after an instance key rotation
tsk-zrq6xd39axpw In progress Maity Coder Claude 007
Why
The instance key rotation (MAITY_SECRET_KEY_OLD + maity-hub rekey, #2381, tsk-xa7wf47nw7r6) keeps recovery codes working only while the old key is still set. Once the operator removes the old key, every recovery code made under it stops working. A human who does not know this finds out only when they need the code, which is exactly when they are locked out. The owner adopted #2381 on the condition that this is made loud: a warning in the web and a mail (owner, 2026-12-03 20:06Z).
What
- Web: while a rotation is in progress (old key set) and the signed-in human's recovery codes are under the old key, show a warning on the dashboard and in the security settings: their recovery codes will stop working when the rotation ends; make new ones now, with a direct link to regenerate.
- Mail: when the rotation starts (first start of the hub with
MAITY_SECRET_KEY_OLDset, or whenrekeyruns), mail each human with recovery codes under the old key once, same content and link. Only humans with a verified address; once per rotation (keyed by the old key id), not per restart. - After the old key is gone: a human whose codes are under a removed key sees in the security settings that they have no working recovery codes (not a count that suggests they do).
- Operator:
rekeyoutput and docs/install/README.md say that affected humans are warned in the web and by mail, and that the old key should stay until the count is 0 or the operator accepts the loss. - All web text in all ten languages; contract wording in docs/api.md §2.8.1 and §16.2; user docs for the warning.
Boundary
Builds on #2381 (merged first). Does not change how codes are sealed or how rekey reseals; only tells the humans. No new setting unless needed to turn the mail off.