mfer gen a b lists each argument's files relative to that argument, so a file x.txt in both a and b gives two entries x.txt; mfer gen . . lists every file twice.
Builder.AddFile and Builder.AddFileWithHash (mfer/builder.go) accept a path they already hold.
Loading (mfer/deserialize.go) accepts a manifest that lists a path twice. check then checks the one file against both entries and fails one of them, while fetch refuses the manifest as a name clash.
Definition of done
Failing tests first for each point below.
Builder.AddFile and Builder.AddFileWithHash refuse a path already added, naming it.
gen given arguments whose files would share a path fails before hashing anything, naming the path. The paths entries get stay as they are.
Loading refuses a manifest that lists a path twice (byte-for-byte equal; the letter-case comparison stays in fetch).
The Path Rules section of docs/FORMAT.md says each path appears at most once and readers reject a manifest that repeats one.
make check passes.
Model: opus-5-5
## Problem
A manifest can list the same path twice:
- `mfer gen a b` lists each argument's files relative to that argument, so a file `x.txt` in both `a` and `b` gives two entries `x.txt`; `mfer gen . .` lists every file twice.
- `Builder.AddFile` and `Builder.AddFileWithHash` (`mfer/builder.go`) accept a path they already hold.
- Loading (`mfer/deserialize.go`) accepts a manifest that lists a path twice. `check` then checks the one file against both entries and fails one of them, while `fetch` refuses the manifest as a name clash.
## Definition of done
- Failing tests first for each point below.
- `Builder.AddFile` and `Builder.AddFileWithHash` refuse a path already added, naming it.
- `gen` given arguments whose files would share a path fails before hashing anything, naming the path. The paths entries get stay as they are.
- Loading refuses a manifest that lists a path twice (byte-for-byte equal; the letter-case comparison stays in `fetch`).
- The Path Rules section of `docs/FORMAT.md` says each path appears at most once and readers reject a manifest that repeats one.
- `make check` passes.
Model: opus-5-5
Built in #174, for review. gen refuses arguments whose files share a path while it lists them, naming the path and both files; the builder and loading refuse a repeated path, compared byte for byte; the Path Rules in docs/FORMAT.md state the rule.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/mfer/pulls/174, for review. `gen` refuses arguments whose files share a path while it lists them, naming the path and both files; the builder and loading refuse a repeated path, compared byte for byte; the Path Rules in `docs/FORMAT.md` state the rule.
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.
Problem
A manifest can list the same path twice:
mfer gen a blists each argument's files relative to that argument, so a filex.txtin bothaandbgives two entriesx.txt;mfer gen . .lists every file twice.Builder.AddFileandBuilder.AddFileWithHash(mfer/builder.go) accept a path they already hold.mfer/deserialize.go) accepts a manifest that lists a path twice.checkthen checks the one file against both entries and fails one of them, whilefetchrefuses the manifest as a name clash.Definition of done
Builder.AddFileandBuilder.AddFileWithHashrefuse a path already added, naming it.gengiven arguments whose files would share a path fails before hashing anything, naming the path. The paths entries get stay as they are.fetch).docs/FORMAT.mdsays each path appears at most once and readers reject a manifest that repeats one.make checkpasses.Model: opus-5-5
Built in #174, for review.
genrefuses arguments whose files share a path while it lists them, naming the path and both files; the builder and loading refuse a repeated path, compared byte for byte; the Path Rules indocs/FORMAT.mdstate the rule.Model: opus-5-5