1 Commits
Author SHA1 Message Date
sneak edab668a20 Never report index.mf at the top of the base as unlisted in check (closes #229)
check / check (push) Waiting to run
gen and fetch write the manifest as index.mf at the top of the tree.
check left out only the manifest file it was given, so given a URL, or a
manifest stored elsewhere, it reported that index.mf as not in the
manifest, and --no-extra-files failed a tree fetch had just verified.
check now drops that one report for index.mf at the top of the base
directory. A manifest that lists index.mf still has it checked, and
index.mf in a subdirectory or fetch's leftover .index.mf.tmp are still
reported. The change is in package cli, which owns the default manifest
name; the Checker in package mfer is unchanged.

Model: opus-5-5
2026-10-15 21:27:11 +00:00
+7 -7
View File
@@ -1190,13 +1190,13 @@ func TestCheckURLManifestWithoutTempDirectory(t *testing.T) {
assert.Equal(t, 0, runCLI(opts), "stderr: %s", testStderr(t, opts))
}
// TestCheckNeverReportsIndexMfAtTopOfBase checks a tree holding index.mf at
// TestCheckNeverReportsIndexMFAtTopOfBase checks a tree holding index.mf at
// its top, where gen and fetch write the manifest, against a manifest that
// does not list it, given by URL and by a path outside the tree: check never
// reports it, and passes with and without --no-extra-files. index.mf in a
// subdirectory, and the temp file fetch saves index.mf through, are still
// reported.
func TestCheckNeverReportsIndexMfAtTopOfBase(t *testing.T) {
func TestCheckNeverReportsIndexMFAtTopOfBase(t *testing.T) {
t.Parallel()
files := map[string][]byte{testFileTxt: []byte("hello")}
@@ -1239,7 +1239,7 @@ func TestCheckNeverReportsIndexMfAtTopOfBase(t *testing.T) {
assert.NotContains(t, stderr, "EXTRA: "+defaultManifestName)
reported := []string{
testSubdir + "/" + defaultManifestName,
testSubdirManifest,
tempPathFor(defaultManifestName),
}
@@ -1261,10 +1261,10 @@ func TestCheckNeverReportsIndexMfAtTopOfBase(t *testing.T) {
}
}
// TestCheckChecksListedIndexMf checks a tree against a manifest that lists
// TestCheckChecksListedIndexMF checks a tree against a manifest that lists
// index.mf at the top of the tree, where that file has changed since: check
// reports it like any other changed file.
func TestCheckChecksListedIndexMf(t *testing.T) {
func TestCheckChecksListedIndexMF(t *testing.T) {
t.Parallel()
manifestPath := filepath.Join(t.TempDir(), "other.mf")
@@ -1331,11 +1331,11 @@ func TestCheckWithUnlistableDirectory(t *testing.T) {
assert.Contains(t, testStderr(t, opts), "unlisted.txt")
}
// TestCheckReportsUnreadableIndexMfAtTopOfBase has a directory named
// TestCheckReportsUnreadableIndexMFAtTopOfBase has a directory named
// index.mf at the top of the base that cannot be listed. check leaves out
// only the report that index.mf is not in the manifest, so it reports the
// error and fails under --no-extra-files.
func TestCheckReportsUnreadableIndexMfAtTopOfBase(t *testing.T) {
func TestCheckReportsUnreadableIndexMFAtTopOfBase(t *testing.T) {
t.Parallel()
unreadable := filepath.Join(testDir, defaultManifestName)