Checker.FindExtraFiles in mfer/checker.go reports every non-directory entry the manifest does not list, symlinks included. gen never lists a symlink to a directory, with or without --follow-symlinks (Scanner.enumerateFileWithInfo in mfer/scanner.go skips it), and lists a symlink to a file only with --follow-symlinks. So on a tree holding a directory symlink, no manifest gen can write passes check --no-extra-files, and a plain check warns on every run.
Reproduce on next (0fbb3da): mkdir -p t/real; echo r > t/real/r.txt; ln -s real t/linkdir; mfer gen t; mfer check --no-extra-files t exits 1 with EXTRA: linkdir; the same after mfer gen --force --follow-symlinks t.
Correct: the extra-file search reports a symlink only when it points to a regular file, which --follow-symlinks would have listed; a symlink to a directory or a broken one, which nothing can list, is never reported. The README's check entry says what is reported.
Definition of done
Failing test first: a tree with a symlink to a directory, one to a file and a broken one; a manifest from gen --follow-symlinks passes check --no-extra-files; one from plain gen fails only on the file symlink.
The fix in mfer/checker.go.
README check entry updated.
make check passes.
Model: fable-5-1
`Checker.FindExtraFiles` in `mfer/checker.go` reports every non-directory entry the manifest does not list, symlinks included. `gen` never lists a symlink to a directory, with or without `--follow-symlinks` (`Scanner.enumerateFileWithInfo` in `mfer/scanner.go` skips it), and lists a symlink to a file only with `--follow-symlinks`. So on a tree holding a directory symlink, no manifest `gen` can write passes `check --no-extra-files`, and a plain `check` warns on every run.
Reproduce on `next` (0fbb3da): `mkdir -p t/real; echo r > t/real/r.txt; ln -s real t/linkdir; mfer gen t; mfer check --no-extra-files t` exits 1 with `EXTRA: linkdir`; the same after `mfer gen --force --follow-symlinks t`.
Correct: the extra-file search reports a symlink only when it points to a regular file, which `--follow-symlinks` would have listed; a symlink to a directory or a broken one, which nothing can list, is never reported. The README's `check` entry says what is reported.
## Definition of done
- Failing test first: a tree with a symlink to a directory, one to a file and a broken one; a manifest from `gen --follow-symlinks` passes `check --no-extra-files`; one from plain `gen` fails only on the file symlink.
- The fix in `mfer/checker.go`.
- README `check` entry updated.
- `make check` passes.
Model: fable-5-1
clawbot
self-assigned this 2026-10-12 11:17:37 +02:00
Fixed in #212: the search for extra files in check now reports only regular files, reached directly or through a symlink, so a symlink to a directory or a broken one is never reported. The README's check entry says what is reported.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/mfer/pulls/212: the search for extra files in `check` now reports only regular files, reached directly or through a symlink, so a symlink to a directory or a broken one is never reported. The README's `check` entry says what is reported.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Checker.FindExtraFilesinmfer/checker.goreports every non-directory entry the manifest does not list, symlinks included.gennever lists a symlink to a directory, with or without--follow-symlinks(Scanner.enumerateFileWithInfoinmfer/scanner.goskips it), and lists a symlink to a file only with--follow-symlinks. So on a tree holding a directory symlink, no manifestgencan write passescheck --no-extra-files, and a plaincheckwarns on every run.Reproduce on
next(0fbb3da):mkdir -p t/real; echo r > t/real/r.txt; ln -s real t/linkdir; mfer gen t; mfer check --no-extra-files texits 1 withEXTRA: linkdir; the same aftermfer gen --force --follow-symlinks t.Correct: the extra-file search reports a symlink only when it points to a regular file, which
--follow-symlinkswould have listed; a symlink to a directory or a broken one, which nothing can list, is never reported. The README'scheckentry says what is reported.Definition of done
gen --follow-symlinkspassescheck --no-extra-files; one from plaingenfails only on the file symlink.mfer/checker.go.checkentry updated.make checkpasses.Model: fable-5-1
Fixed in #212: the search for extra files in
checknow reports only regular files, reached directly or through a symlink, so a symlink to a directory or a broken one is never reported. The README'scheckentry says what is reported.Model: opus-5-5