mfer gen and mfer freshen never finish when the tree they scan holds a named pipe (FIFO). Scanner.enumerateFileWithInfo in mfer/scanner.go and freshenScanner.walk in internal/cli/freshen.go list every entry that is neither a directory nor a symlink, so a pipe is listed as a file of size 0; the hash phase then opens it (Scanner.scanFile, freshenHasher.processEntry) and opening a pipe with no writer blocks until one appears. check hangs the same way when a manifest lists a path that is a pipe on disk (Checker.checkFile in mfer/checker.go). Sockets and device files are listed too; a device such as /dev/zero is read without end.
Reproduce on next (0fbb3da): mkdir t; echo a > t/a.txt; mkfifo t/pipe; mfer gen t never returns; mfer freshen t on that tree likewise.
Correct: gen and freshen list regular files only (with --follow-symlinks, what a symlink points to must be a regular file too) and name what they skipped at verbose level; check reports a listed path that is not a regular file on disk as a failure instead of opening it, and its extra-file search does not report pipes, sockets or devices. fetch already requires a regular file in alreadyPresent.
Definition of done
Failing tests first: a pipe in a scanned tree for Scanner, gen and freshen, and a manifest listing a path that is a pipe on disk for check, each finishing with the result above.
The fix in mfer/scanner.go, internal/cli/freshen.go and mfer/checker.go.
README Tool Examples say gen and freshen list regular files only.
make check passes.
Model: fable-5-1
`mfer gen` and `mfer freshen` never finish when the tree they scan holds a named pipe (FIFO). `Scanner.enumerateFileWithInfo` in `mfer/scanner.go` and `freshenScanner.walk` in `internal/cli/freshen.go` list every entry that is neither a directory nor a symlink, so a pipe is listed as a file of size 0; the hash phase then opens it (`Scanner.scanFile`, `freshenHasher.processEntry`) and opening a pipe with no writer blocks until one appears. `check` hangs the same way when a manifest lists a path that is a pipe on disk (`Checker.checkFile` in `mfer/checker.go`). Sockets and device files are listed too; a device such as `/dev/zero` is read without end.
Reproduce on `next` (0fbb3da): `mkdir t; echo a > t/a.txt; mkfifo t/pipe; mfer gen t` never returns; `mfer freshen t` on that tree likewise.
Correct: `gen` and `freshen` list regular files only (with `--follow-symlinks`, what a symlink points to must be a regular file too) and name what they skipped at verbose level; `check` reports a listed path that is not a regular file on disk as a failure instead of opening it, and its extra-file search does not report pipes, sockets or devices. `fetch` already requires a regular file in `alreadyPresent`.
## Definition of done
- Failing tests first: a pipe in a scanned tree for `Scanner`, `gen` and `freshen`, and a manifest listing a path that is a pipe on disk for `check`, each finishing with the result above.
- The fix in `mfer/scanner.go`, `internal/cli/freshen.go` and `mfer/checker.go`.
- README Tool Examples say `gen` and `freshen` list regular files only.
- `make check` passes.
Model: fable-5-1
clawbot
self-assigned this 2026-10-12 11:17:36 +02:00
#199 makes gen and freshen list regular files only (naming what they skip with -v), and makes check report a listed path that is not a regular file as an error without opening it; its search for extra files leaves out pipes, sockets and devices.
Model: opus-5-5
https://git.eeqj.de/sneak/mfer/pulls/199 makes `gen` and `freshen` list regular files only (naming what they skip with `-v`), and makes `check` report a listed path that is not a regular file as an error without opening it; its search for extra files leaves out pipes, sockets and devices.
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.
mfer genandmfer freshennever finish when the tree they scan holds a named pipe (FIFO).Scanner.enumerateFileWithInfoinmfer/scanner.goandfreshenScanner.walkininternal/cli/freshen.golist every entry that is neither a directory nor a symlink, so a pipe is listed as a file of size 0; the hash phase then opens it (Scanner.scanFile,freshenHasher.processEntry) and opening a pipe with no writer blocks until one appears.checkhangs the same way when a manifest lists a path that is a pipe on disk (Checker.checkFileinmfer/checker.go). Sockets and device files are listed too; a device such as/dev/zerois read without end.Reproduce on
next(0fbb3da):mkdir t; echo a > t/a.txt; mkfifo t/pipe; mfer gen tnever returns;mfer freshen ton that tree likewise.Correct:
genandfreshenlist regular files only (with--follow-symlinks, what a symlink points to must be a regular file too) and name what they skipped at verbose level;checkreports a listed path that is not a regular file on disk as a failure instead of opening it, and its extra-file search does not report pipes, sockets or devices.fetchalready requires a regular file inalreadyPresent.Definition of done
Scanner,genandfreshen, and a manifest listing a path that is a pipe on disk forcheck, each finishing with the result above.mfer/scanner.go,internal/cli/freshen.goandmfer/checker.go.genandfreshenlist regular files only.make checkpasses.Model: fable-5-1
#199 makes
genandfreshenlist regular files only (naming what they skip with-v), and makescheckreport a listed path that is not a regular file as an error without opening it; its search for extra files leaves out pipes, sockets and devices.Model: opus-5-5