{"record":{"id":"805783ac916f6ecd","repo":"AprilNEA/OpenLogi","slug":"fixture-structure-verification-failed-unexpected-entry-name","errorCode":null,"errorMessage":"fixture structure verification failed: unexpected entry {name:?} in {}","messagePattern":"fixture structure verification failed: unexpected entry (.+?) in (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/fixture/verify.rs","lineNumber":105,"sourceCode":"        let mut manifest = None;\n        let mut profile = None;\n        let mut cases = None;\n        for entry in read_directory(directory, \"fixture directory\")? {\n            let name = entry_name(&entry)?;\n            match name.as_str() {\n                MANIFEST_FILE => {\n                    require_regular_file(&entry, \"fixture manifest\")?;\n                    manifest = Some(entry.path());\n                }\n                PROFILE_FILE => {\n                    require_regular_file(&entry, \"device profile\")?;\n                    profile = Some(entry.path());\n                }\n                CASES_DIRECTORY => {\n                    require_entry_directory(&entry, \"fixture cases directory\")?;\n                    cases = Some(entry.path());\n                }\n                _ => bail!(\n                    \"fixture structure verification failed: unexpected entry {name:?} in {}\",\n                    directory.display()\n                ),\n            }\n        }\n        Ok(Self {\n            manifest: manifest.context(\n                \"fixture structure verification failed: fixture directory has no manifest.json\",\n            )?,\n            profile: profile.context(\n                \"fixture structure verification failed: fixture directory has no profile.json\",\n            )?,\n            cases,\n        })\n    }\n}\n\nfn load_cassettes(","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/fixture/verify.rs#L87-L123","documentation":"Fixture `verify` inspects a fixture directory and expects exactly the known top-level entries (e.g. the profile manifest and the fixture-cases directory), each of the right type. `inspect` bails when it encounters any other entry name, enforcing a closed, known fixture layout. It throws because an unrecognized entry means the fixture was created or edited outside the tool's schema and may be corrupt.","triggerScenarios":"Running fixture verification over a directory that contains an unexpected file or subdirectory next to the manifest and cases directory — e.g. stray `notes.txt`, editor backup files, a `cassettes/` folder with a different name, or an OS artifact like `.DS_Store` if it is not filtered.","commonSituations":"Hand-copying fixture folders and dragging in extra files; a git-ignored scratch file landing inside the fixture; renaming the cases directory so its constant (CASES_DIRECTORY) no longer matches; extracting an archive that added top-level metadata files.","solutions":["Remove or move the unexpected entry out of the fixture directory (the error names it: {name:?} at the path shown)","Rename the entry to the expected constant (e.g. the canonical cases directory name) if it was misnamed","Re-record or re-export the fixture with the current tool version if the layout itself changed","Check .gitignore/extraction settings so auxiliary files never land inside the fixture folder"],"exampleFix":"// before\nfixture-dir/\n  manifest.toml\n  cases/\n  scratch-notes.md      <- unexpected entry\n// after\nfixture-dir/\n  manifest.toml\n  cases/","handlingStrategy":"validation","validationCode":"# pre-check: only the known entries should exist\nls fixture-dir | grep -v -E '^(manifest\\.toml|cases)$' && echo \"unexpected entries present — clean before verify\"","typeGuard":null,"tryCatchPattern":"match verify(fixture_dir) {\n    Err(e) if e.to_string().starts_with(\"fixture structure verification failed: unexpected entry\") => {\n        let name = extract_entry_name(&e); // move/delete it, then retry\n        remove_or_relocate(fixture_dir.join(name));\n        verify(fixture_dir)\n    }\n    other => other,\n}","preventionTips":["Keep scratch files outside fixture directories","Add fixture-aware .gitignore rules for editor/OS artifacts inside fixture folders","Never rename the canonical cases directory","Re-export fixtures with the current tool rather than hand-assembling layouts"],"tags":["fixture","verification","file-structure"],"backgroundTag":"schema-validation-failed","analyzedSha":"e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8","analyzedAt":"2026-09-13T03:07:16.451Z","contentChangedAt":"2026-09-13T03:07:16.451Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}