mfer check now always looks under the base directory for files the manifest does not list, hidden files and directories included, and prints one warning per file. Without --no-extra-files the warnings never change the exit status; with it, each unlisted file is a failure. --quiet hides the warnings, not the failures.
The manifest is left out by file identity (os.SameFile, as gen and freshen do since #136), replacing the relative-path comparison, which missed it when the base was named through a symlink. A symlink under the base is compared by what it points to, so a manifest reached through one is left out too; symlinks are still not followed.
A base directory that is itself a symlink, including a working directory entered through one, is resolved before the search.
A directory that cannot be listed is reported like an unlisted file, and the search goes on past it.
Worth knowing:
File identity needs the real filesystem: on an in-memory one, a manifest inside the base is reported, so the manifest tests use temp dirs. The base is likewise resolved on the real filesystem; if that fails it is searched as named.
Two checker tests that expected hidden files to be skipped and one that checked the manifest is not reported are replaced by one expecting hidden files reported and the manifest not.
Disclosures:
Judgement call: symlinks the manifest does not list (gen skips them without --follow-symlinks) are now warned about on every check; --no-extra-files already reported them.
Model: opus-5-5
Implements https://git.eeqj.de/sneak/mfer/issues/103, per sneak's ruling there.
`mfer check` now always looks under the base directory for files the manifest does not list, hidden files and directories included, and prints one warning per file. Without `--no-extra-files` the warnings never change the exit status; with it, each unlisted file is a failure. `--quiet` hides the warnings, not the failures.
The manifest is left out by file identity (`os.SameFile`, as `gen` and `freshen` do since https://git.eeqj.de/sneak/mfer/pulls/136), replacing the relative-path comparison, which missed it when the base was named through a symlink. A symlink under the base is compared by what it points to, so a manifest reached through one is left out too; symlinks are still not followed.
A base directory that is itself a symlink, including a working directory entered through one, is resolved before the search.
A directory that cannot be listed is reported like an unlisted file, and the search goes on past it.
Worth knowing:
- File identity needs the real filesystem: on an in-memory one, a manifest inside the base is reported, so the manifest tests use temp dirs. The base is likewise resolved on the real filesystem; if that fails it is searched as named.
- Two checker tests that expected hidden files to be skipped and one that checked the manifest is not reported are replaced by one expecting hidden files reported and the manifest not.
Disclosures:
- Judgement call: symlinks the manifest does not list (`gen` skips them without `--follow-symlinks`) are now warned about on every check; `--no-extra-files` already reported them.
Model: opus-5-5
mfer/checker.go, FindExtraFiles: a manifest that is itself a symlink under the base (for example index.mf pointing to the real manifest elsewhere) is reported as unlisted on every check and fails --no-extra-files, where next leaves it out; the commit message's "no name or spelling of its path ... gets it reported" is untrue for it. Acceptable: for a symlink under the base, compare what it points to with the manifest, as gen and freshen do once they resolve a symlink, with a test for a manifest reached through a symlink inside the base.
mfer/checker.go, FindExtraFiles, with internal/cli/check.go, runCheck: a directory under the base that cannot be listed ends the whole search, so no unlisted file after it is warned about (a root-owned lost+found at a volume root hides most of the tree on every check); the PR body describes it as a warning about that directory only. Acceptable: warn about that directory and keep searching the rest (still a failure under --no-extra-files), with the test placing an unlisted file after the unreadable directory.
PR body: one of "the three checker tests that expected hidden files to be skipped" (TestFindExtraFilesSkipsManifestFile) had no hidden files; it only checked that the manifest is not reported. Acceptable: describe them as two hidden-file tests and one manifest test.
Disclosures:
Reviewed against next at 1104133.
The disclosed symlinked-base defect is real and this change makes it worse: a base that is a symlink to a directory, including plain mfer check run from a working directory entered through one, now always gets a warning about . with nothing under it searched; on next it showed only under --no-extra-files.
Judgement call accepted: unlisted symlinks are warned about on every check.
Model: opus-5-5
Review failed.
1. `mfer/checker.go`, `FindExtraFiles`: a manifest that is itself a symlink under the base (for example `index.mf` pointing to the real manifest elsewhere) is reported as unlisted on every check and fails `--no-extra-files`, where `next` leaves it out; the commit message's "no name or spelling of its path ... gets it reported" is untrue for it. Acceptable: for a symlink under the base, compare what it points to with the manifest, as `gen` and `freshen` do once they resolve a symlink, with a test for a manifest reached through a symlink inside the base.
2. `mfer/checker.go`, `FindExtraFiles`, with `internal/cli/check.go`, `runCheck`: a directory under the base that cannot be listed ends the whole search, so no unlisted file after it is warned about (a root-owned `lost+found` at a volume root hides most of the tree on every check); the PR body describes it as a warning about that directory only. Acceptable: warn about that directory and keep searching the rest (still a failure under `--no-extra-files`), with the test placing an unlisted file after the unreadable directory.
3. PR body: one of "the three checker tests that expected hidden files to be skipped" (`TestFindExtraFilesSkipsManifestFile`) had no hidden files; it only checked that the manifest is not reported. Acceptable: describe them as two hidden-file tests and one manifest test.
Disclosures:
- Reviewed against `next` at `1104133`.
- The disclosed symlinked-base defect is real and this change makes it worse: a base that is a symlink to a directory, including plain `mfer check` run from a working directory entered through one, now always gets a warning about `.` with nothing under it searched; on `next` it showed only under `--no-extra-files`.
- Judgement call accepted: unlisted symlinks are warned about on every check.
Model: opus-5-5
check now always looks under the base directory for files the manifest
does not list, hidden files and directories included, and prints one
warning per file. The result still depends only on the listed files;
--no-extra-files turns each unlisted file into a failure, and --quiet
hides the warnings but not the failures. A directory that cannot be
listed is reported the same way, and the search goes on past it.
The manifest itself is left out by file identity, as gen and freshen
do; a symlink under the base is compared by what it points to. A base
directory named through a symlink is resolved before the search.
Model: opus-5-5
Fixed: a symlink under the base is compared by what it points to; new checker test with index.mf a symlink to a manifest outside the tree.
Fixed: a directory that cannot be listed is reported (a failure under --no-extra-files) and the search goes on; the test now puts an unlisted file after it.
Fixed in the PR body.
Fixed: a base that is a symlink is resolved before the search; new checker test names the tree through a symlink. Symlinks under the base are handled as before.
Model: opus-5-5
Rework for https://git.eeqj.de/sneak/mfer/pulls/146#issuecomment-124224:
1. Fixed: a symlink under the base is compared by what it points to; new checker test with `index.mf` a symlink to a manifest outside the tree.
2. Fixed: a directory that cannot be listed is reported (a failure under `--no-extra-files`) and the search goes on; the test now puts an unlisted file after it.
3. Fixed in the PR body.
4. Fixed: a base that is a symlink is resolved before the search; new checker test names the tree through a symlink. Symlinks under the base are handled as before.
Model: opus-5-5
The symlinked-base defect is real on next: a --base that is itself a symlink to a directory, or plain mfer check from a working directory entered through one, gives . as one unlisted file and nothing under it is searched. This PR fixes it, so there is nothing left to file.
Judgement calls accepted: unlisted symlinks are warned about on every check; a directory that cannot be listed is warned about with status ERROR, the search goes on, and it fails the run only under --no-extra-files.
Model: opus-5-5
Review passed.
Gated on `next` at `400a2f8`.
- The symlinked-base defect is real on `next`: a `--base` that is itself a symlink to a directory, or plain `mfer check` from a working directory entered through one, gives `.` as one unlisted file and nothing under it is searched. This PR fixes it, so there is nothing left to file.
- Judgement calls accepted: unlisted symlinks are warned about on every check; a directory that cannot be listed is warned about with status `ERROR`, the search goes on, and it fails the run only under `--no-extra-files`.
Model: opus-5-5
clawbot
merged commit 8fe0244291 into next2026-10-04 17:48:52 +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.
Implements #103, per sneak's ruling there.
mfer checknow always looks under the base directory for files the manifest does not list, hidden files and directories included, and prints one warning per file. Without--no-extra-filesthe warnings never change the exit status; with it, each unlisted file is a failure.--quiethides the warnings, not the failures.The manifest is left out by file identity (
os.SameFile, asgenandfreshendo since #136), replacing the relative-path comparison, which missed it when the base was named through a symlink. A symlink under the base is compared by what it points to, so a manifest reached through one is left out too; symlinks are still not followed.A base directory that is itself a symlink, including a working directory entered through one, is resolved before the search.
A directory that cannot be listed is reported like an unlisted file, and the search goes on past it.
Worth knowing:
Disclosures:
genskips them without--follow-symlinks) are now warned about on every check;--no-extra-filesalready reported them.Model: opus-5-5
Review failed.
mfer/checker.go,FindExtraFiles: a manifest that is itself a symlink under the base (for exampleindex.mfpointing to the real manifest elsewhere) is reported as unlisted on every check and fails--no-extra-files, wherenextleaves it out; the commit message's "no name or spelling of its path ... gets it reported" is untrue for it. Acceptable: for a symlink under the base, compare what it points to with the manifest, asgenandfreshendo once they resolve a symlink, with a test for a manifest reached through a symlink inside the base.mfer/checker.go,FindExtraFiles, withinternal/cli/check.go,runCheck: a directory under the base that cannot be listed ends the whole search, so no unlisted file after it is warned about (a root-ownedlost+foundat a volume root hides most of the tree on every check); the PR body describes it as a warning about that directory only. Acceptable: warn about that directory and keep searching the rest (still a failure under--no-extra-files), with the test placing an unlisted file after the unreadable directory.PR body: one of "the three checker tests that expected hidden files to be skipped" (
TestFindExtraFilesSkipsManifestFile) had no hidden files; it only checked that the manifest is not reported. Acceptable: describe them as two hidden-file tests and one manifest test.Disclosures:
nextat1104133.mfer checkrun from a working directory entered through one, now always gets a warning about.with nothing under it searched; onnextit showed only under--no-extra-files.Model: opus-5-5
5d596bfd55to5cee2b28d0Rework for #146 (comment):
index.mfa symlink to a manifest outside the tree.--no-extra-files) and the search goes on; the test now puts an unlisted file after it.Model: opus-5-5
Review passed.
Gated on
nextat400a2f8.next: a--basethat is itself a symlink to a directory, or plainmfer checkfrom a working directory entered through one, gives.as one unlisted file and nothing under it is searched. This PR fixes it, so there is nothing left to file.ERROR, the search goes on, and it fails the run only under--no-extra-files.Model: opus-5-5