Shortening the retention deleted history at once and for good, with no
second look. Besides mistakes, it was a way to remove traces: anyone with an
open admin session could wipe the history of what they did.
Now (owner's decision 2026-11-30):
- PUT /api/v1/settings/app?dry_run=1 saves nothing and returns what the new
retention would remove (entries, backups, oldest entry left) and whether
it is shorter.
- A shorter retention (fewer days or entries) needs a recently confirmed
password (403 confirm_password, like deleting data, F-AUT-5). A longer one
removes nothing new and needs none.
- System page: Save on a shorter setting shows the preview first ("Removed
now: 237 entries and 17 backups; the oldest entry left is from …",
can't be undone); "Remove now" applies it, and the UI asks for the
password when needed. While the preview is open the fields are locked, so
what was previewed is what gets applied. When nothing would be removed now
the button says "Save shorter history".
- The daily trim stays automatic; it only removes what the confirmed
setting already lets expire.
Trim got a dry-run mode (journal and backups are only counted);
Retention.Shorter compares two retentions.
Tests: dry run changes nothing (configstore), Shorter (changes), API:
preview saves and removes nothing, shorter without a recent password is
refused and changes nothing, longer needs no password, after confirming it
applies (internal/server); e2e on CT 151 desktop + phone. Checked in a real
browser on CT 151 after the 5-minute window: the password dialog appears
("Shortening the change history needs your password again"), and after
confirming the setting is saved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>