The walks in gen and freshen do not follow a symlink at their top. A directory given as a symlink, or a working directory whose path names one (the shell's PWD, which os.Getwd returns), was listed as empty: gen wrote a manifest with no files and freshen removed every entry. Each walk now resolves its starting directory with filepath.EvalSymlinks first, the way FindExtraFiles in mfer/checker.go does. Symlinks inside the tree still follow --follow-symlinks; the new tests put one there and check it stays out.
What the diff does not show:
If resolving fails, the walk starts at the path as named, as in FindExtraFiles. The fallback keeps a scanner on a filesystem other than the disk working (most gen tests use an in-memory one), since EvalSymlinks reads the real disk.
freshen resolves inside freshenScan, for the walk only. Hashing still opens files through the base as named, which reaches the same files. freshenManifestOperation is at the linter's function-length limit.
Scanner.EnumeratePath carries its own copy of the three lines until #184 makes it call EnumeratePaths. Whichever of the two lands second drops that copy when it rebases.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/mfer/issues/185.
The walks in `gen` and `freshen` do not follow a symlink at their top. A directory given as a symlink, or a working directory whose path names one (the shell's `PWD`, which `os.Getwd` returns), was listed as empty: `gen` wrote a manifest with no files and `freshen` removed every entry. Each walk now resolves its starting directory with `filepath.EvalSymlinks` first, the way `FindExtraFiles` in `mfer/checker.go` does. Symlinks inside the tree still follow `--follow-symlinks`; the new tests put one there and check it stays out.
What the diff does not show:
- If resolving fails, the walk starts at the path as named, as in `FindExtraFiles`. The fallback keeps a scanner on a filesystem other than the disk working (most `gen` tests use an in-memory one), since `EvalSymlinks` reads the real disk.
- `freshen` resolves inside `freshenScan`, for the walk only. Hashing still opens files through the base as named, which reaches the same files. `freshenManifestOperation` is at the linter's function-length limit.
- `Scanner.EnumeratePath` carries its own copy of the three lines until https://git.eeqj.de/sneak/mfer/pulls/184 makes it call `EnumeratePaths`. Whichever of the two lands second drops that copy when it rebases.
Model: opus-5-5
The walk in gen and freshen does not follow a symlink at its top. A
directory given as a symlink, or a working directory whose path names
one, was listed as empty and gen exited 0, while freshen removed every
entry from the manifest. Each walk now resolves its starting directory
with filepath.EvalSymlinks first, as check's search for extra files
does, and starts at the path as named if that fails. Symlinks inside the
tree are still skipped unless --follow-symlinks is given.
Model: opus-5-5
Judgement call: the second copy of the fix in Scanner.EnumeratePath is acceptable until #184 makes that method call EnumeratePaths.
Judgement call: the starting directory is resolved on the real disk even when the scanner is given another filesystem, as the search for extra files in check already does.
Model: opus-5-5
Review passed.
- Gated on `next` at `6229c4e`.
- Judgement call: the second copy of the fix in `Scanner.EnumeratePath` is acceptable until https://git.eeqj.de/sneak/mfer/pulls/184 makes that method call `EnumeratePaths`.
- Judgement call: the starting directory is resolved on the real disk even when the scanner is given another filesystem, as the search for extra files in `check` already does.
Model: opus-5-5
clawbot
merged commit a5f218e42a into next2026-10-08 05:59:03 +02:00
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.
Fixes #185.
The walks in
genandfreshendo not follow a symlink at their top. A directory given as a symlink, or a working directory whose path names one (the shell'sPWD, whichos.Getwdreturns), was listed as empty:genwrote a manifest with no files andfreshenremoved every entry. Each walk now resolves its starting directory withfilepath.EvalSymlinksfirst, the wayFindExtraFilesinmfer/checker.godoes. Symlinks inside the tree still follow--follow-symlinks; the new tests put one there and check it stays out.What the diff does not show:
FindExtraFiles. The fallback keeps a scanner on a filesystem other than the disk working (mostgentests use an in-memory one), sinceEvalSymlinksreads the real disk.freshenresolves insidefreshenScan, for the walk only. Hashing still opens files through the base as named, which reaches the same files.freshenManifestOperationis at the linter's function-length limit.Scanner.EnumeratePathcarries its own copy of the three lines until #184 makes it callEnumeratePaths. Whichever of the two lands second drops that copy when it rebases.Model: opus-5-5
Review passed.
nextat6229c4e.Scanner.EnumeratePathis acceptable until #184 makes that method callEnumeratePaths.checkalready does.Model: opus-5-5