Report only symlinks to regular files as extra files in check (closes #192) #212

Merged
clawbot merged 1 commits from issue-192-check-symlinks into next 2026-10-14 00:00:54 +02:00
Collaborator

Fixes #192.

The search for extra files in check (Checker.FindExtraFiles in mfer/checker.go) reported every symlink the manifest did not list. gen never lists a symlink to a directory or a broken one, so on a tree holding either, no manifest gen writes passed check --no-extra-files, and a plain check warned on every run.

The search now resolves a symlink first and reports the entry only if it is a regular file, which is what gen lists. A symlink to a regular file is still reported when the manifest leaves it out, as a plain gen does. That one check replaces the separate test for named pipes, sockets and devices added for #189.

The README's check entry now says what is reported.

Judgement call: since the regular-file check replaces the pipe, socket and device test, a file of unknown type is not reported either; gen does not list one.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/mfer/issues/192. The search for extra files in `check` (`Checker.FindExtraFiles` in `mfer/checker.go`) reported every symlink the manifest did not list. `gen` never lists a symlink to a directory or a broken one, so on a tree holding either, no manifest `gen` writes passed `check --no-extra-files`, and a plain `check` warned on every run. The search now resolves a symlink first and reports the entry only if it is a regular file, which is what `gen` lists. A symlink to a regular file is still reported when the manifest leaves it out, as a plain `gen` does. That one check replaces the separate test for named pipes, sockets and devices added for https://git.eeqj.de/sneak/mfer/issues/189. The README's `check` entry now says what is reported. Judgement call: since the regular-file check replaces the pipe, socket and device test, a file of unknown type is not reported either; `gen` does not list one. Model: opus-5-5
clawbot self-assigned this 2026-10-13 20:14:02 +02:00
clawbot added 1 commit 2026-10-13 20:14:02 +02:00
gen never lists a symlink to a directory or a broken one, and lists a
symlink to a regular file only with --follow-symlinks. check's search for
extra files reported every symlink, so on a tree holding a directory
symlink no manifest gen writes could pass check --no-extra-files. The
search now resolves a symlink and reports an entry only if it is a
regular file, which also covers the pipes, sockets and devices it already
left out. The README's check entry says what is reported.

Judgement call: one regular-file check replaces the separate test for
pipes, sockets and devices, so a file of unknown type is not reported
either; gen does not list one.

Model: opus-5-5
clawbot added the needs-review label 2026-10-13 20:14:10 +02:00
Author
Collaborator

Review passed.

Judgement call: a symlink whose target cannot be examined, such as one inside a directory the user cannot search, is treated like a broken one and not reported; gen skips it too.

Model: opus-5-5

Review passed. Judgement call: a symlink whose target cannot be examined, such as one inside a directory the user cannot search, is treated like a broken one and not reported; gen skips it too. Model: opus-5-5
clawbot merged commit 0057f6463b into next 2026-10-14 00:00:54 +02:00
clawbot deleted branch issue-192-check-symlinks 2026-10-14 00:00:55 +02:00
Sign in to join this conversation.