cosmetic: a cancelled confirmation prompt exits 0 #423

Closed
opened 2026-11-11 01:01:46 +01:00 by clawbot · 2 comments
Collaborator

Found by the acceptance test (#418).

Steps to reproduce

  • Run vaultik database delete, vaultik snapshot remove ID, or vaultik snapshot purge --keep-latest without --force, and answer the prompt with anything but y, or close stdin (< /dev/null).

What happened

The command prints Cancelled (or Aborted.) and exits 0. A script cannot tell a cancelled deletion from a completed one.

What should happen

A command that did not do what it was asked exits non-zero (1, like every other failure), and the README's exit-status section says so.

Model: fable-5-1

Found by the acceptance test (https://git.eeqj.de/sneak/vaultik/issues/418). **Steps to reproduce** - Run `vaultik database delete`, `vaultik snapshot remove ID`, or `vaultik snapshot purge --keep-latest` without `--force`, and answer the prompt with anything but `y`, or close stdin (`< /dev/null`). **What happened** The command prints `Cancelled` (or `Aborted.`) and exits 0. A script cannot tell a cancelled deletion from a completed one. **What should happen** A command that did not do what it was asked exits non-zero (1, like every other failure), and the README's exit-status section says so. Model: fable-5-1
Author
Collaborator

Plan, as the issue says: a command whose confirmation prompt is answered no, or left empty, exits 1 after printing that nothing was changed. This covers prune, snapshot purge, snapshot remove and database delete. The README's exit-status section says so.

Packages: internal/vaultik for the prompts, internal/cli where database delete asks.

For every unit from the acceptance test

  • One branch off current next, one PR with base next, labelled needs-review and assigned to clawbot. The title ends (closes #N).
  • Add nothing to docs/TODO.md. sneak ruled on 11 November that it is not a history document (#440).
  • README.md on next: change only a sentence the fix makes false. The rewritten README in #399 is with sneak and is updated after this merges.
  • A test that fails on current next shows the fix. Run make fmt and make check before the final push.

Model: opus-5-5

Plan, as the issue says: a command whose confirmation prompt is answered no, or left empty, exits 1 after printing that nothing was changed. This covers `prune`, `snapshot purge`, `snapshot remove` and `database delete`. The README's exit-status section says so. Packages: `internal/vaultik` for the prompts, `internal/cli` where `database delete` asks. **For every unit from the acceptance test** - One branch off current `next`, one PR with base `next`, labelled `needs-review` and assigned to `clawbot`. The title ends `(closes #N)`. - Add nothing to `docs/TODO.md`. sneak ruled on 11 November that it is not a history document (https://git.eeqj.de/sneak/vaultik/issues/440). - `README.md` on `next`: change only a sentence the fix makes false. The rewritten README in https://git.eeqj.de/sneak/vaultik/pulls/399 is with sneak and is updated after this merges. - A test that fails on current `next` shows the fix. Run `make fmt` and `make check` before the final push. Model: opus-5-5
clawbot self-assigned this 2026-11-11 01:21:26 +01:00
Author
Collaborator

Built in #447. If the prompt in prune, snapshot purge, snapshot remove or database delete is answered no, or stdin ends, the command now reports deletion not confirmed and exits 1. The README on next has no exit-status section, so it is unchanged.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/vaultik/pulls/447. If the prompt in `prune`, `snapshot purge`, `snapshot remove` or `database delete` is answered no, or stdin ends, the command now reports `deletion not confirmed` and exits 1. The README on `next` has no exit-status section, so it is unchanged. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#423