Files
hermes-agent/tests/hermes_cli
kshitijk4poor db3f9482e6 fix(cli): validate keep once, and reject negative /snapshot prune counts
`/snapshot prune -1` passed keep=-1 to prune_quick_snapshots, whose slice
then deletes the newest snapshots instead of the oldest - the same bug
class #128886 fixed for `hermes backup --keep`.

Use isdecimal() for both entry points. For `backup --keep` the argparse
type is now the single validation (cmd_backup is run_backup's only
caller), so the duplicate run_backup guard is removed; non-numeric input
still exits 2 with a clear message.

The test is folded into tests/hermes_cli/test_backup.py, replacing
test_backup_retention_validation.py.
2026-10-02 01:15:39 +05:30
..