gen and freshen leave out of the manifest only the file they write. Given -o (for gen) or a manifest outside the directory they list (for freshen --base DIR), they list a file named index.mf at the top of that directory like any other file. fetch refuses a manifest that lists index.mf at the top of the tree, since it saves the manifest there (README, mfer fetch), so gen writes a manifest mfer's own fetch will not take. check already never reports index.mf at the top of the base directory as unlisted (#229), for the same reason.
Reproduce on next: a directory srv holding a.txt and a stray index.mf; mfer gen -o out/other.mf srv lists both; serve srv with out/other.mf copied into it as published.mf; mfer fetch --dest mirror http://HOST/published.mf stops with manifest lists a file where fetch writes another file: index.mf (the saved manifest).
Correct: gen and freshen never list index.mf at the top of the directory they list, wherever they write the manifest, so every manifest they write is one fetch accepts. index.mf in a subdirectory is still listed.
Severity: minor
Definition of done
Failing tests first, through the CLI entry point: gen -o OTHER DIR with an index.mf at the top of DIR does not list it; freshen --base DIR OTHER likewise; both still list index.mf in a subdirectory.
The fix in package cli (internal/cli/gen.go, internal/cli/freshen.go), which owns the default manifest name; package mfer changes only if its scanner cannot be told which file to leave out another way.
README, mfer gen and mfer freshen sections: say index.mf at the top of the directory is never listed.
make check passes.
Model: opus-5-5
`gen` and `freshen` leave out of the manifest only the file they write. Given `-o` (for `gen`) or a manifest outside the directory they list (for `freshen --base DIR`), they list a file named `index.mf` at the top of that directory like any other file. `fetch` refuses a manifest that lists `index.mf` at the top of the tree, since it saves the manifest there (README, `mfer fetch`), so `gen` writes a manifest mfer's own `fetch` will not take. `check` already never reports `index.mf` at the top of the base directory as unlisted (https://git.eeqj.de/sneak/mfer/issues/229), for the same reason.
Reproduce on `next`: a directory `srv` holding `a.txt` and a stray `index.mf`; `mfer gen -o out/other.mf srv` lists both; serve `srv` with `out/other.mf` copied into it as `published.mf`; `mfer fetch --dest mirror http://HOST/published.mf` stops with `manifest lists a file where fetch writes another file: index.mf (the saved manifest)`.
Correct: `gen` and `freshen` never list `index.mf` at the top of the directory they list, wherever they write the manifest, so every manifest they write is one `fetch` accepts. `index.mf` in a subdirectory is still listed.
Severity: minor
## Definition of done
- Failing tests first, through the CLI entry point: `gen -o OTHER DIR` with an `index.mf` at the top of `DIR` does not list it; `freshen --base DIR OTHER` likewise; both still list `index.mf` in a subdirectory.
- The fix in package `cli` (`internal/cli/gen.go`, `internal/cli/freshen.go`), which owns the default manifest name; package `mfer` changes only if its scanner cannot be told which file to leave out another way.
- README, `mfer gen` and `mfer freshen` sections: say `index.mf` at the top of the directory is never listed.
- `make check` passes.
Model: opus-5-5
clawbot
self-assigned this 2026-10-15 23:25:49 +02:00
Plan: built as the issue says, one PR to next through an independent review, alongside the rework of #232; whichever lands second rebases, since both add a README.md bullet and CLI tests. Worker rules: #99 (comment), without the TODO.md step.
Model: opus-5-5
Plan: built as the issue says, one PR to `next` through an independent review, alongside the rework of https://git.eeqj.de/sneak/mfer/pulls/232; whichever lands second rebases, since both add a `README.md` bullet and CLI tests. Worker rules: https://git.eeqj.de/sneak/mfer/issues/99#issuecomment-115880, without the `TODO.md` step.
Model: opus-5-5
Built in #234: gen and freshen leave out each file whose path in the manifest would be exactly index.mf, which is index.mf at the top of a directory gen is given or of the base directory freshen lists, and a file gen is given by that name. No file is looked up for this, so a symlink named index.mf never leaves out the file it points to. index.mf in a subdirectory is still listed. Not covered, though fetch refuses those too: INDEX.MF in another letter case, and .index.mf.tmp listed with --include-dotfiles.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/mfer/pulls/234: `gen` and `freshen` leave out each file whose path in the manifest would be exactly `index.mf`, which is `index.mf` at the top of a directory `gen` is given or of the base directory `freshen` lists, and a file `gen` is given by that name. No file is looked up for this, so a symlink named `index.mf` never leaves out the file it points to. `index.mf` in a subdirectory is still listed. Not covered, though `fetch` refuses those too: `INDEX.MF` in another letter case, and `.index.mf.tmp` listed with `--include-dotfiles`.
Model: opus-5-5
Scope, decided: only the exact name index.mf at the top of the tree is left out, since that is where gen writes the manifest and a stray one is a stale manifest. A file at the top named index.mf in another letter case, or .index.mf.tmp listed under --include-dotfiles, is the user's own file and stays listed; fetch refusing such a tree, because it cannot write it safely, is correct and not part of this issue.
Model: opus-5-5
Scope, decided: only the exact name `index.mf` at the top of the tree is left out, since that is where `gen` writes the manifest and a stray one is a stale manifest. A file at the top named `index.mf` in another letter case, or `.index.mf.tmp` listed under `--include-dotfiles`, is the user's own file and stays listed; `fetch` refusing such a tree, because it cannot write it safely, is correct and not part of this issue.
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.
genandfreshenleave out of the manifest only the file they write. Given-o(forgen) or a manifest outside the directory they list (forfreshen --base DIR), they list a file namedindex.mfat the top of that directory like any other file.fetchrefuses a manifest that listsindex.mfat the top of the tree, since it saves the manifest there (README,mfer fetch), sogenwrites a manifest mfer's ownfetchwill not take.checkalready never reportsindex.mfat the top of the base directory as unlisted (#229), for the same reason.Reproduce on
next: a directorysrvholdinga.txtand a strayindex.mf;mfer gen -o out/other.mf srvlists both; servesrvwithout/other.mfcopied into it aspublished.mf;mfer fetch --dest mirror http://HOST/published.mfstops withmanifest lists a file where fetch writes another file: index.mf (the saved manifest).Correct:
genandfreshennever listindex.mfat the top of the directory they list, wherever they write the manifest, so every manifest they write is onefetchaccepts.index.mfin a subdirectory is still listed.Severity: minor
Definition of done
gen -o OTHER DIRwith anindex.mfat the top ofDIRdoes not list it;freshen --base DIR OTHERlikewise; both still listindex.mfin a subdirectory.cli(internal/cli/gen.go,internal/cli/freshen.go), which owns the default manifest name; packagemferchanges only if its scanner cannot be told which file to leave out another way.mfer genandmfer freshensections: sayindex.mfat the top of the directory is never listed.make checkpasses.Model: opus-5-5
Plan: built as the issue says, one PR to
nextthrough an independent review, alongside the rework of #232; whichever lands second rebases, since both add aREADME.mdbullet and CLI tests. Worker rules: #99 (comment), without theTODO.mdstep.Model: opus-5-5
Built in #234:
genandfreshenleave out each file whose path in the manifest would be exactlyindex.mf, which isindex.mfat the top of a directorygenis given or of the base directoryfreshenlists, and a filegenis given by that name. No file is looked up for this, so a symlink namedindex.mfnever leaves out the file it points to.index.mfin a subdirectory is still listed. Not covered, thoughfetchrefuses those too:INDEX.MFin another letter case, and.index.mf.tmplisted with--include-dotfiles.Model: opus-5-5
Scope, decided: only the exact name
index.mfat the top of the tree is left out, since that is wheregenwrites the manifest and a stray one is a stale manifest. A file at the top namedindex.mfin another letter case, or.index.mf.tmplisted under--include-dotfiles, is the user's own file and stays listed;fetchrefusing such a tree, because it cannot write it safely, is correct and not part of this issue.Model: opus-5-5