check: always warn about files on disk that are not in the manifest, dotfiles included #103

Open
opened 2026-09-21 09:21:40 +02:00 by clawbot · 1 comment
Collaborator

Owner ruling (sneak, 2026-09-21, verbatim)

"check should warn about files on disk that aren't in the manifest (any files!) but should primarily concern itself with files enumerated in the manifest."

This replaces the earlier plan for a --include-dotfiles flag on check. No such flag is added.

Context

mfer check looks for files that are on disk but not in the manifest only when --no-extra-files is given (internal/cli/check.go), and Checker.FindExtraFiles (mfer/checker.go) skips every hidden path unconditionally. So by default the user is never told about unlisted files, and hidden ones are never reported at all.

Definition of done

  • mfer check always looks for files on disk that the manifest does not list, hidden files and directories included, and prints one warning per file. The manifest file itself is never reported.
  • Without --no-extra-files, these warnings do not change the exit status: the result depends only on the files the manifest lists (missing, size mismatch, hash mismatch).
  • With --no-extra-files, every unlisted file, hidden or not, counts as a failure, as that flag does today for non-hidden files.
  • --quiet suppresses the warnings, not the failures.
  • Tests through the real CLI entry point: an unlisted regular file and an unlisted dotfile are each warned about with exit status 0; both fail with --no-extra-files; the manifest file (index.mf and .index.mf) is never reported; a tree with no unlisted files prints no warning.
  • README usage text for check matches; make check passes; TODO.md updated in the same commit.

Implementation requirements

  • Reading taken of the ruling: unlisted files are warnings by default and failures only under the existing --no-extra-files flag. If that is wrong, sneak says so here.
  • Land after #78 if that unit is in flight, since both touch the checker's constructor; otherwise do not wait for it.
  • Commit title must end with (closes #103).

Model: fable-5-1

## Owner ruling (sneak, 2026-09-21, verbatim) "check should warn about files on disk that aren't in the manifest (any files!) but should primarily concern itself with files enumerated in the manifest." This replaces the earlier plan for a `--include-dotfiles` flag on `check`. No such flag is added. ## Context `mfer check` looks for files that are on disk but not in the manifest only when `--no-extra-files` is given (`internal/cli/check.go`), and `Checker.FindExtraFiles` (`mfer/checker.go`) skips every hidden path unconditionally. So by default the user is never told about unlisted files, and hidden ones are never reported at all. ## Definition of done - `mfer check` always looks for files on disk that the manifest does not list, hidden files and directories included, and prints one warning per file. The manifest file itself is never reported. - Without `--no-extra-files`, these warnings do not change the exit status: the result depends only on the files the manifest lists (missing, size mismatch, hash mismatch). - With `--no-extra-files`, every unlisted file, hidden or not, counts as a failure, as that flag does today for non-hidden files. - `--quiet` suppresses the warnings, not the failures. - Tests through the real CLI entry point: an unlisted regular file and an unlisted dotfile are each warned about with exit status 0; both fail with `--no-extra-files`; the manifest file (`index.mf` and `.index.mf`) is never reported; a tree with no unlisted files prints no warning. - README usage text for `check` matches; `make check` passes; `TODO.md` updated in the same commit. ## Implementation requirements - Reading taken of the ruling: unlisted files are warnings by default and failures only under the existing `--no-extra-files` flag. If that is wrong, sneak says so here. - Land after https://git.eeqj.de/sneak/mfer/issues/78 if that unit is in flight, since both touch the checker's constructor; otherwise do not wait for it. - Commit title must end with ` (closes #103)`. Model: fable-5-1
clawbot self-assigned this 2026-09-21 09:21:40 +02:00
Owner

check should warn about files on disk that aren’t in the manifest (any files!) but should primarily concern itself with files enumerated in the manifest.

check should warn about files on disk that aren’t in the manifest (any files!) but should primarily concern itself with files enumerated in the manifest.
clawbot changed title from check: add --include-dotfiles so manifests generated with it can be fully verified to check: always warn about files on disk that are not in the manifest, dotfiles included 2026-09-22 00:31:22 +02:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/mfer#103