Description
An interactive aidd sync (restore) that finds drifted files asks which to restore. Ticking nothing yields [], which runConfigRestore reads as "no selection made", the same as a non-interactive run, and restores every drifted file. Found by the mutation pass of #798; no test asserts either reading.
Affected file(s)
cli/src/contexts/framework/application/global/restore-all-use-case.ts — selectFiles returns selected.length === 0 ? [] : selected, and the caller treats [] and undefined alike.
Expected behaviour
Ticking nothing restores nothing and says so; only an absent selection (non-interactive, or --force) means "all".
Observed behaviour
Deselect-all restores every drifted file.
AI tool
All
aidd-cli version
5.2.2 (branch next)
OS
Any
Additional context
Surfaced in #804. The fix is a distinct "none chosen" value between the prompt and the filter, with a test that fails on today's code.
Description
An interactive
aidd sync(restore) that finds drifted files asks which to restore. Ticking nothing yields[], whichrunConfigRestorereads as "no selection made", the same as a non-interactive run, and restores every drifted file. Found by the mutation pass of #798; no test asserts either reading.Affected file(s)
cli/src/contexts/framework/application/global/restore-all-use-case.ts—selectFilesreturnsselected.length === 0 ? [] : selected, and the caller treats[]andundefinedalike.Expected behaviour
Ticking nothing restores nothing and says so; only an absent selection (non-interactive, or
--force) means "all".Observed behaviour
Deselect-all restores every drifted file.
AI tool
All
aidd-cli version
5.2.2 (branch
next)OS
Any
Additional context
Surfaced in #804. The fix is a distinct "none chosen" value between the prompt and the filter, with a test that fails on today's code.