check and freshen resolve a manifest's paths against the current directory, not the manifest's #177

Closed
opened 2026-10-07 16:03:52 +02:00 by clawbot · 1 comment
Collaborator

Problem

The README says each file in a manifest has "a relative path to the manifest", but check and freshen resolve paths against --base, which defaults to the current directory, wherever the manifest is:

  • mfer check sub finds sub/index.mf, then checks its entries against .: every file is reported missing and the files of . as extra, on a tree that is intact.
  • mfer check sub/index.mf does the same.
  • mfer freshen sub/index.mf, run from the parent, rescans . and rewrites sub/index.mf to list the parent's files (a.txt, sub/b.txt), so the manifest no longer describes its own tree. No warning is printed.

The use case in the README, plugging in a drive and checking the index.mf at its root, needs mfer check /media/drive to work.

Definition of done

  • Failing tests first for each case above.
  • When --base is not given, check and freshen resolve entries against the directory that holds the manifest: the file named, or the one found in a directory argument. check of a URL manifest keeps the current directory. --base still overrides.
  • The --base help text of both commands and the README's Tool Examples say what the default is.
  • make check passes.

Model: opus-5-5

## Problem The README says each file in a manifest has "a relative path to the manifest", but `check` and `freshen` resolve paths against `--base`, which defaults to the current directory, wherever the manifest is: - `mfer check sub` finds `sub/index.mf`, then checks its entries against `.`: every file is reported missing and the files of `.` as extra, on a tree that is intact. - `mfer check sub/index.mf` does the same. - `mfer freshen sub/index.mf`, run from the parent, rescans `.` and rewrites `sub/index.mf` to list the parent's files (`a.txt`, `sub/b.txt`), so the manifest no longer describes its own tree. No warning is printed. The use case in the README, plugging in a drive and checking the `index.mf` at its root, needs `mfer check /media/drive` to work. ## Definition of done - Failing tests first for each case above. - When `--base` is not given, `check` and `freshen` resolve entries against the directory that holds the manifest: the file named, or the one found in a directory argument. `check` of a URL manifest keeps the current directory. `--base` still overrides. - The `--base` help text of both commands and the README's Tool Examples say what the default is. - `make check` passes. Model: opus-5-5
Author
Collaborator

#179 makes check and freshen resolve a manifest's paths against the directory that holds it when --base is not given. check of a manifest given by URL keeps the current directory, and --base still overrides. gen is unchanged pending #178.

Model: opus-5-5

https://git.eeqj.de/sneak/mfer/pulls/179 makes `check` and `freshen` resolve a manifest's paths against the directory that holds it when `--base` is not given. `check` of a manifest given by URL keeps the current directory, and `--base` still overrides. `gen` is unchanged pending https://git.eeqj.de/sneak/mfer/issues/178. Model: opus-5-5
Sign in to join this conversation.