freshen skipped writing the manifest whenever no file was added, changed or removed, so mfer freshen --sign-key key.asc on an unchanged tree left it unsigned, and --include-timestamps was dropped the same way. The write is now skipped only when the manifest would come out the same: nothing in the tree changed, the manifest is signed by the --sign-key key (or unsigned when none is given), and it has a createdAt timestamp exactly when --include-timestamps asks for one. --include-permissions needs no check of its own there, because the scan already counts a file whose recorded mode is not what that flag asks for as changed.
Not visible in the diff:
Running freshen again with the same key, or with --include-timestamps again, leaves the manifest untouched; a different key rewrites it.
freshen without --include-timestamps on an unchanged tree whose manifest has a createdAt timestamp now rewrites it without one. Before, it was left alone.
Disclosures:
Deviation: the fix needed two read-only additions to the mfer package, SecretKeyFingerprint and a loaded manifest's CreatedAt; the issue placed the fix in internal/cli/freshen.go only.
Judgement call: the showProgress local in freshenManifestOperation is inlined to keep that function within the lint length limit.
Judgement call: the signer comparison is exact, so a manifest whose signer fingerprint is written in lower case (mfer never writes one) is rewritten once.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/mfer/issues/190.
freshen skipped writing the manifest whenever no file was added, changed or removed, so `mfer freshen --sign-key key.asc` on an unchanged tree left it unsigned, and `--include-timestamps` was dropped the same way. The write is now skipped only when the manifest would come out the same: nothing in the tree changed, the manifest is signed by the `--sign-key` key (or unsigned when none is given), and it has a createdAt timestamp exactly when `--include-timestamps` asks for one. `--include-permissions` needs no check of its own there, because the scan already counts a file whose recorded mode is not what that flag asks for as changed.
Not visible in the diff:
- Running freshen again with the same key, or with `--include-timestamps` again, leaves the manifest untouched; a different key rewrites it.
- freshen without `--include-timestamps` on an unchanged tree whose manifest has a createdAt timestamp now rewrites it without one. Before, it was left alone.
Disclosures:
- Deviation: the fix needed two read-only additions to the `mfer` package, `SecretKeyFingerprint` and a loaded manifest's `CreatedAt`; the issue placed the fix in `internal/cli/freshen.go` only.
- Judgement call: the `showProgress` local in `freshenManifestOperation` is inlined to keep that function within the lint length limit.
- Judgement call: the signer comparison is exact, so a manifest whose signer fingerprint is written in lower case (mfer never writes one) is rewritten once.
Model: opus-5-5
freshen skipped the write whenever no file was added, changed or
removed, so --sign-key and --include-timestamps on an unchanged tree
did nothing. It now skips only when the manifest would come out the
same: nothing in the tree changed, the manifest is signed by the
--sign-key key (unsigned without one), and it has a createdAt
timestamp exactly when --include-timestamps asks for one. A file whose
recorded mode is not what --include-permissions asks for already
counts as changed.
Deviation: the mfer package gains SecretKeyFingerprint and a loaded
manifest's CreatedAt, which the comparison needs.
Model: opus-5-5
Judgement call: the two read-only additions to the mfer package are accepted as needed for the comparison the issue asks for, although the issue placed the fix in internal/cli/freshen.go only.
Model: opus-5-5
Review passed.
Judgement call: the two read-only additions to the `mfer` package are accepted as needed for the comparison the issue asks for, although the issue placed the fix in `internal/cli/freshen.go` only.
Model: opus-5-5
clawbot
merged commit 0baf83deb6 into next2026-10-14 00:42:47 +02:00
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.
Fixes #190.
freshen skipped writing the manifest whenever no file was added, changed or removed, so
mfer freshen --sign-key key.ascon an unchanged tree left it unsigned, and--include-timestampswas dropped the same way. The write is now skipped only when the manifest would come out the same: nothing in the tree changed, the manifest is signed by the--sign-keykey (or unsigned when none is given), and it has a createdAt timestamp exactly when--include-timestampsasks for one.--include-permissionsneeds no check of its own there, because the scan already counts a file whose recorded mode is not what that flag asks for as changed.Not visible in the diff:
--include-timestampsagain, leaves the manifest untouched; a different key rewrites it.--include-timestampson an unchanged tree whose manifest has a createdAt timestamp now rewrites it without one. Before, it was left alone.Disclosures:
mferpackage,SecretKeyFingerprintand a loaded manifest'sCreatedAt; the issue placed the fix ininternal/cli/freshen.goonly.showProgresslocal infreshenManifestOperationis inlined to keep that function within the lint length limit.Model: opus-5-5
Review passed.
Judgement call: the two read-only additions to the
mferpackage are accepted as needed for the comparison the issue asks for, although the issue placed the fix ininternal/cli/freshen.goonly.Model: opus-5-5