Question for sneak: where should mfer gen DIR write its manifest, and what should it list?
Today mfer gen sub writes index.mf in the current directory and lists sub's files as if they sat next to it (b.txt for sub/b.txt), so checking that manifest fails. mfer gen a.txt, given a file, stops with "path cannot be empty". The README says each listed path is relative to the manifest, but not where gen puts the manifest when given a directory.
Options:
A. (recommended) gen DIR writes DIR/index.mf, the manifest of that tree, which is where check DIR looks for one and where fetch --dest saves one. With --output, or with several arguments, each file is listed by its path relative to the output file's directory, and a file outside that directory is refused. A file argument is listed the same way.
B. gen always writes ./index.mf (or --output) and lists each file relative to the output file's directory, so gen sub lists sub/b.txt; a file outside that directory is refused.
Both make every manifest gen writes check correctly from its own directory. Nothing else waits on this: the fix for check and freshen, #177, does not depend on it.
Model: opus-5-5
Question for sneak: where should `mfer gen DIR` write its manifest, and what should it list?
Today `mfer gen sub` writes `index.mf` in the current directory and lists `sub`'s files as if they sat next to it (`b.txt` for `sub/b.txt`), so checking that manifest fails. `mfer gen a.txt`, given a file, stops with "path cannot be empty". The README says each listed path is relative to the manifest, but not where `gen` puts the manifest when given a directory.
Options:
A. (recommended) `gen DIR` writes `DIR/index.mf`, the manifest of that tree, which is where `check DIR` looks for one and where `fetch --dest` saves one. With `--output`, or with several arguments, each file is listed by its path relative to the output file's directory, and a file outside that directory is refused. A file argument is listed the same way.
B. `gen` always writes `./index.mf` (or `--output`) and lists each file relative to the output file's directory, so `gen sub` lists `sub/b.txt`; a file outside that directory is refused.
Both make every manifest `gen` writes check correctly from its own directory. Nothing else waits on this: the fix for `check` and `freshen`, https://git.eeqj.de/sneak/mfer/issues/177, does not depend on it.
Model: opus-5-5
sneak
was assigned by clawbot2026-10-07 16:03:57 +02:00
Ruling from sneak (#178 (comment) and #178 (comment)): option A, gen DIR writes DIR/index.mf, but listed paths are not relative to the output file. The manifest's bytes are the same wherever the output is written, as with a shell redirect: --output only chooses where the bytes go and never changes what is listed. Paths are relative to the tree being scanned.
Readings taken for the cases the ruling leaves open, each keeping the bytes independent of the output location:
A file argument is listed by its own name, as Scanner.EnumerateFile already does.
Several arguments: one manifest; each directory's files are listed relative to that directory and each file by its name, as today; a path two arguments share is refused, as today.
Default output: index.mf in the directory the single argument names, or holds when it is a file; with no argument or several, index.mf in the current directory, as today.
Definition of done
Failing tests first.
mfer gen DIR writes DIR/index.mf, listing DIR's files relative to DIR.
mfer gen FILE writes index.mf beside the file, listing it by its name; today it stops with "path cannot be empty".
With --seed and an unchanged tree, gen writes byte-identical manifests whatever --output names: inside the scanned tree, outside it, or under another name. The output file and its temp file are never listed.
The existing-output refusal and --force apply to the output path actually used.
The --output help text and the README's Tool Examples state the default.
make check passes.
Model: opus-5-5
**Ruling from sneak** (https://git.eeqj.de/sneak/mfer/issues/178#issuecomment-132614 and https://git.eeqj.de/sneak/mfer/issues/178#issuecomment-132619): option A, `gen DIR` writes `DIR/index.mf`, but listed paths are not relative to the output file. The manifest's bytes are the same wherever the output is written, as with a shell redirect: `--output` only chooses where the bytes go and never changes what is listed. Paths are relative to the tree being scanned.
Readings taken for the cases the ruling leaves open, each keeping the bytes independent of the output location:
- A file argument is listed by its own name, as `Scanner.EnumerateFile` already does.
- Several arguments: one manifest; each directory's files are listed relative to that directory and each file by its name, as today; a path two arguments share is refused, as today.
- Default output: `index.mf` in the directory the single argument names, or holds when it is a file; with no argument or several, `index.mf` in the current directory, as today.
## Definition of done
- Failing tests first.
- `mfer gen DIR` writes `DIR/index.mf`, listing `DIR`'s files relative to `DIR`.
- `mfer gen FILE` writes `index.mf` beside the file, listing it by its name; today it stops with "path cannot be empty".
- With `--seed` and an unchanged tree, `gen` writes byte-identical manifests whatever `--output` names: inside the scanned tree, outside it, or under another name. The output file and its temp file are never listed.
- The existing-output refusal and `--force` apply to the output path actually used.
- The `--output` help text and the README's Tool Examples state the default.
- `make check` passes.
Model: opus-5-5
sneak
was unassigned by clawbot2026-10-07 22:58:15 +02:00
clawbot
self-assigned this 2026-10-07 22:58:15 +02:00
Built in #180 to the readings in the ruling above. One judgement call is noted there: a file argument is listed even when it is a dotfile or a symlink, as EnumerateFile already lists it.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/mfer/pulls/180 to the readings in the ruling above. One judgement call is noted there: a file argument is listed even when it is a dotfile or a symlink, as `EnumerateFile` already lists it.
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.
Question for sneak: where should
mfer gen DIRwrite its manifest, and what should it list?Today
mfer gen subwritesindex.mfin the current directory and listssub's files as if they sat next to it (b.txtforsub/b.txt), so checking that manifest fails.mfer gen a.txt, given a file, stops with "path cannot be empty". The README says each listed path is relative to the manifest, but not wheregenputs the manifest when given a directory.Options:
A. (recommended)
gen DIRwritesDIR/index.mf, the manifest of that tree, which is wherecheck DIRlooks for one and wherefetch --destsaves one. With--output, or with several arguments, each file is listed by its path relative to the output file's directory, and a file outside that directory is refused. A file argument is listed the same way.B.
genalways writes./index.mf(or--output) and lists each file relative to the output file's directory, sogen sublistssub/b.txt; a file outside that directory is refused.Both make every manifest
genwrites check correctly from its own directory. Nothing else waits on this: the fix forcheckandfreshen, #177, does not depend on it.Model: opus-5-5
a, but without the paths being relative to the output file.
the manifest bytes should be the same no matter where the output file is written, same as a shell redirect.
Ruling from sneak (#178 (comment) and #178 (comment)): option A,
gen DIRwritesDIR/index.mf, but listed paths are not relative to the output file. The manifest's bytes are the same wherever the output is written, as with a shell redirect:--outputonly chooses where the bytes go and never changes what is listed. Paths are relative to the tree being scanned.Readings taken for the cases the ruling leaves open, each keeping the bytes independent of the output location:
Scanner.EnumerateFilealready does.index.mfin the directory the single argument names, or holds when it is a file; with no argument or several,index.mfin the current directory, as today.Definition of done
mfer gen DIRwritesDIR/index.mf, listingDIR's files relative toDIR.mfer gen FILEwritesindex.mfbeside the file, listing it by its name; today it stops with "path cannot be empty".--seedand an unchanged tree,genwrites byte-identical manifests whatever--outputnames: inside the scanned tree, outside it, or under another name. The output file and its temp file are never listed.--forceapply to the output path actually used.--outputhelp text and the README's Tool Examples state the default.make checkpasses.Model: opus-5-5
Built in #180 to the readings in the ruling above. One judgement call is noted there: a file argument is listed even when it is a dotfile or a symlink, as
EnumerateFilealready lists it.Model: opus-5-5